diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-21 11:56:30 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-12-21 22:13:23 +0100 |
commit | 80cedb5dcb6a7dd6c01349b93fab49ecee5f6594 (patch) | |
tree | 86f8532d5b3cde18e70d1cd814a842c5a93953e9 /sw/inc/ToxTextGenerator.hxx | |
parent | 3103f9f9461f6eabb61a70be73862ef4be98010e (diff) |
sw_redlinehide: adapt ToX Update
The ToX exists only once in the model, so it either has to have the
content corresponding to redlines being shown, or hidden.
Adapt Update based on current layout setting.
Change-Id: Ibf5ec092632cf3a5f513965afdb840fd8239a7fd
Reviewed-on: https://gerrit.libreoffice.org/65527
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'sw/inc/ToxTextGenerator.hxx')
-rw-r--r-- | sw/inc/ToxTextGenerator.hxx | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/sw/inc/ToxTextGenerator.hxx b/sw/inc/ToxTextGenerator.hxx index 6540843f086b..91eac53d3c36 100644 --- a/sw/inc/ToxTextGenerator.hxx +++ b/sw/inc/ToxTextGenerator.hxx @@ -32,6 +32,7 @@ class SwFormatAutoFormat; class SwChapterField; class SwChapterFieldType; class SwContentFrame; +class SwRootFrame; class SwContentNode; class SwDoc; class SwForm; @@ -45,6 +46,7 @@ namespace sw { class ToxLinkProcessor; class ToxTabStopTokenHandler; +class ToxWhitespaceStripper; /** This class generates text for the entries of a table of x. * @@ -64,7 +66,8 @@ public: */ void GenerateText(SwDoc *doc, const std::vector<std::unique_ptr<SwTOXSortTabBase>>& entries, - sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess); + sal_uInt16 indexOfEntryToProcess, sal_uInt16 numberOfEntriesToProcess, + SwRootFrame const* pLayout); private: const SwForm& mToxForm; @@ -80,13 +83,23 @@ private: std::vector<sal_Int32> startPositions; std::vector<sal_Int32> endPositions; }; + + static void GetAttributesForNode( + HandledTextToken & rResult, + sal_Int32 & rOffset, + SwTextNode const& rNode, + ToxWhitespaceStripper const& rStripper, + SwAttrPool & rPool, + SwRootFrame const*const pLayout); + /** Append text (and selected attributes) to a target node. * * Will take the text of @p source, and return the text and the attributes which should be added to the * target text node. @see CollectAttributesForTox() for the criteria of the attributes which are taken. */ static HandledTextToken - HandleTextToken(const SwTOXSortTabBase& source, SwAttrPool& attrPool); + HandleTextToken(const SwTOXSortTabBase& source, SwAttrPool& attrPool, + SwRootFrame const*const pLayout); /** Applies the result of a handled text token to a target node. */ static void @@ -124,18 +137,20 @@ private: * for details. */ static OUString - GetNumStringOfFirstNode(const SwTOXSortTabBase& rBase, bool bUsePrefix, sal_uInt8 nLevel); + GetNumStringOfFirstNode(const SwTOXSortTabBase& rBase, bool bUsePrefix, + sal_uInt8 nLevel, SwRootFrame const* pLayout); /** Handle a chapter token. */ OUString - HandleChapterToken(const SwTOXSortTabBase& rBase, const SwFormToken& aToken, SwDoc* pDoc) const; + HandleChapterToken(const SwTOXSortTabBase& rBase, const SwFormToken& aToken, + SwRootFrame const* pLayout) const; /** Generate the text for a chapter token. */ OUString GenerateTextForChapterToken(const SwFormToken& chapterToken, const SwContentFrame* contentFrame, - const SwContentNode *contentNode) const; + const SwContentNode *contentNode, SwRootFrame const* pLayout) const; /** Obtain a ChapterField to use for the text generation. * @internal |