diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-30 12:12:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-05-30 14:05:40 +0200 |
commit | 5a74ef3d249ea88cf0bf1f333014809f652a6a41 (patch) | |
tree | 2e018ff34bf67f93b145105b73ba415c8bd24bc3 /sw/inc | |
parent | 460cf721da261e6c9d7388fd4cddf4b66fc7b1b7 (diff) |
tdf#125372 writer, file with lots of hints very slow to open, part7
Takes load time from 1m45 to 22s
Instead of (1) taking a list of SwTextAttrs (2) invoking a method that
inserts a new one (3) taking a new list and doing a delta on the list,
just the information about the new SwTextAttr up the stack and avoid all
that work.
Change-Id: Iec88618af696299aaba65f43bc33b1a5f030fac0
Reviewed-on: https://gerrit.libreoffice.org/73195
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/IDocumentContentOperations.hxx | 4 | ||||
-rw-r--r-- | sw/inc/ndtxt.hxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sw/inc/IDocumentContentOperations.hxx b/sw/inc/IDocumentContentOperations.hxx index f0b7a8d88497..f59b1f0eef89 100644 --- a/sw/inc/IDocumentContentOperations.hxx +++ b/sw/inc/IDocumentContentOperations.hxx @@ -38,6 +38,7 @@ class SwDrawFrameFormat; class SwFlyFrameFormat; class SwNodeIndex; class SwRootFrame; +class SwTextAttr; namespace utl { class TransliterationWrapper; } namespace svt { class EmbeddedObjectRef; } @@ -215,7 +216,8 @@ public: virtual bool InsertPoolItem(const SwPaM &rRg, const SfxPoolItem&, const SetAttrMode nFlags = SetAttrMode::DEFAULT, SwRootFrame const* pLayout = nullptr, - bool bExpandCharToPara=false) = 0; + bool bExpandCharToPara = false, + SwTextAttr **ppNewTextAttr = nullptr) = 0; virtual void InsertItemSet (const SwPaM &rRg, const SfxItemSet&, const SetAttrMode nFlags = SetAttrMode::DEFAULT, diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index debe937dd0bf..d8ab09b60f23 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -295,7 +295,8 @@ public: set them only in AutoAttrSet (SwContentNode::SetAttr). */ bool SetAttr( const SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd, - const SetAttrMode nMode = SetAttrMode::DEFAULT ); + const SetAttrMode nMode = SetAttrMode::DEFAULT, + SwTextAttr **ppNewTextAttr = nullptr); /** Query the attributes of textnode over the range. Introduce 4th optional parameter <bMergeIndentValuesOfNumRule>. If <bMergeIndentValuesOfNumRule> == true, the indent attributes of |