diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-31 16:31:11 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-31 16:53:25 +0100 |
commit | 6606313d6e69fbab7841f60de8bc152ce605e46b (patch) | |
tree | 79c74282313e283a8ac29f33317dcbaa16c24098 /sw/inc | |
parent | 2ec4c8b07427af868e32e14aaefd20649c1135d6 (diff) |
Add a SwTextBoxHelper::findTextBoxes() variant that takes an SwNode
This method is called by the ODF export for each paragraph, so limiting
the result for TextBoxes anchored to a single paragraph helps to avoid
iterating over all the frames for each paragraph.
For a test document of 2000 mail merge records and 16 frames, the times for
css::text::MailMerge::execute() are 8m18.811s -> 7m53.575s.
Change-Id: I7a9cd7b23a3e903059ec0ae3a6a8f8309681bb2e
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/textboxhelper.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index 1a59df587a21..5473979d59a9 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -29,6 +29,7 @@ class SwFmtCntnt; class SwDoc; class Rectangle; class _ZSortFly; +class SwNode; /** * A TextBox is a TextFrame, that is tied to a drawinglayer shape. @@ -68,6 +69,13 @@ public: /// Look up TextFrames in a document, which are in fact TextBoxes. static std::set<const SwFrmFmt*> findTextBoxes(const SwDoc* pDoc); + /** + * Look up TextFrames in a document, which are in fact TextBoxes. + * + * If rNode has a matching SwCntntFrm, then only TextBoxes of rNode are + * returned. + */ + static std::set<const SwFrmFmt*> findTextBoxes(const SwNode& rNode); /// Build a textbox -> shape format map. static std::map<SwFrmFmt*, SwFrmFmt*> findShapes(const SwDoc* pDoc); /// Count number of shapes in the document, excluding TextBoxes. |