[Libreoffice-commits] core.git: Branch 'feature/textbox' - sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed May 21 07:31:53 PDT 2014
sw/source/core/unocore/unoobj2.cxx | 9 +++++++++
1 file changed, 9 insertions(+)
New commits:
commit caa94e48e5e23c1d3fc07828aa16e5b3211d63b1
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed May 21 15:21:34 2014 +0200
SwXParaFrameEnumeration: ignore textboxes
Change-Id: I20278c8764d97b45c20fcb7caf1615dd6f79d5e7
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index cc43ec6..4660ce1 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -27,6 +27,7 @@
#include <frmfmt.hxx>
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
+#include <textboxhelper.hxx>
#include <ndtxt.hxx>
#include <ndnotxt.hxx>
#include <unocrsr.hxx>
@@ -181,10 +182,17 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
{
const SwSortedObjs *pObjs = pCFrm->GetDrawObjs();
if( pObjs )
+ {
+ std::list<SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc);
for( sal_uInt16 i = 0; i < pObjs->Count(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
SwFrmFmt& rFmt = pAnchoredObj->GetFrmFmt();
+
+ // Filter out textboxes, which are not interesting at an UNO level.
+ if (std::find(aTextBoxes.begin(), aTextBoxes.end(), &rFmt) != aTextBoxes.end())
+ continue;
+
if ( rFmt.GetAnchor().GetAnchorId() == nChkType )
{
// create SwDepend and insert into array
@@ -199,6 +207,7 @@ void CollectFrameAtNode( SwClient& rClnt, const SwNodeIndex& rIdx,
rFrames.push_back(entry);
}
}
+ }
}
else
{
More information about the Libreoffice-commits
mailing list