summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoportenum.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-10-31 16:31:11 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-31 16:53:25 +0100
commit6606313d6e69fbab7841f60de8bc152ce605e46b (patch)
tree79c74282313e283a8ac29f33317dcbaa16c24098 /sw/source/core/unocore/unoportenum.cxx
parent2ec4c8b07427af868e32e14aaefd20649c1135d6 (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/source/core/unocore/unoportenum.cxx')
-rw-r--r--sw/source/core/unocore/unoportenum.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 35e074a335ad..1aa2bd56ae54 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -1281,7 +1281,7 @@ static void lcl_CreatePortions(
PortionStack_t PortionStack;
PortionStack.push( PortionList_t(&i_rPortions, (const SwTxtAttr *)0) );
- std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
+ std::set<const SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pUnoCrsr->GetNode());
bool bAtEnd( false );
while (!bAtEnd) // every iteration consumes at least current character!