[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/flake-configwidgets-boemann] libs: Merge branch 'master' into flake-configwidgets-boemann
From: C. Boemann <cbo () boemann ! dk>
Date: 2012-12-31 15:31:28
Message-ID: 20121231153128.DF12AA6091 () git ! kde ! org
[Download RAW message or body]
Git commit e3357e90f09a952924a0a5656b8152c159d2eabc by C. Boemann.
Committed on 31/12/2012 at 16:31.
Pushed by boemann into branch 'flake-configwidgets-boemann'.
Merge branch 'master' into flake-configwidgets-boemann
Conflicts:
libs/textlayout/KoTextLayoutArea_paint.cpp
libs/textlayout/KoTextLayoutRootAreaProvider.cpp
libs/textlayout/KoTextLayoutRootAreaProvider.h
plugins/textshape/TextTool.cpp
M +48 -0 libs/kotext/KoTextBlockData.h
M +0 -4 libs/textlayout/KoTextLayoutRootAreaProvider.cpp
http://commits.kde.org/calligra/e3357e90f09a952924a0a5656b8152c159d2eabc
diff --cc libs/kotext/KoTextBlockData.h
index 1688555,63d7a98..08aa36a
--- a/libs/kotext/KoTextBlockData.h
+++ b/libs/kotext/KoTextBlockData.h
@@@ -57,30 -76,33 +76,59 @@@ public
explicit KoTextBlockData(QTextBlockUserData *userData);
virtual ~KoTextBlockData();
+ struct MarkupRange {
+ int firstChar;
+ int lastChar;
+ qreal startX;
+ qreal endX;
+ };
+
+ enum MarkupType {
+ Misspell,
+ Grammar
+ };
+
+ void appendMarkup(MarkupType type, int firstChar, int lastChar);
+
+ void clearMarkups(MarkupType type);
+
+ void rebaseMarkups(MarkupType type, int fromPosition, int delta);
+
+ MarkupRange findMarkup(MarkupType type, int positionWithin) const;
+
+ void setMarkupsLayoutValidity(MarkupType type, bool valid);
+ bool isMarkupsLayoutValid(MarkupType type) const;
+
+ QList<MarkupRange>::Iterator markupsBegin(MarkupType type);
++ QList<MarkupRange>::Iterator markupsEnd(MarkupType type);
++
+ /**
+ * Add a range to the _end_ of the list of markups. It's important that firstChar is after
+ * lastChar of the previous range for that type of markup.
+ */
+ void appendMarkup(MarkupType type, int firstChar, int lastChar);
+
+ /**
+ * Clear all ranges for a specific type of markup.
+ */
+ void clearMarkups(MarkupType type);
+
+ /**
+ * Move all ranges following fromPosition delta number of characters to the right.
+ * Applies to a specific type of markup.
+ */
+ void rebaseMarkups(MarkupType type, int fromPosition, int delta);
+
+ /**
+ * Find a range that contains positionWithin.
+ * If none is found a default Markuprange firstChar = lastChar = 0 is returned
+ */
+ MarkupRange findMarkup(MarkupType type, int positionWithin) const;
+
+ void setMarkupsLayoutValidity(MarkupType type, bool valid);
+ bool isMarkupsLayoutValid(MarkupType type) const;
+
+ QList<MarkupRange>::Iterator markupsBegin(MarkupType type);
QList<MarkupRange>::Iterator markupsEnd(MarkupType type);
/**
diff --cc libs/textlayout/KoTextLayoutRootAreaProvider.cpp
index d5a805d,f21b5c4..7d27944
--- a/libs/textlayout/KoTextLayoutRootAreaProvider.cpp
+++ b/libs/textlayout/KoTextLayoutRootAreaProvider.cpp
@@@ -25,8 -25,4 +25,4 @@@ KoTextLayoutRootAreaProvider::KoTextLay
KoTextLayoutRootAreaProvider::~KoTextLayoutRootAreaProvider()
{
-}
+}
-
- void KoTextLayoutRootAreaProvider::updateAll()
- {
- }
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic