summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/textboxhelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/textboxhelper.cxx')
-rw-r--r--sw/source/core/doc/textboxhelper.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 8e6bfd5b152c..90d2b5446beb 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -126,6 +126,21 @@ std::list<SwFrmFmt*> SwTextBoxHelper::findTextBoxes(const SwDoc* pDoc)
return aRet;
}
+std::map<SwFrmFmt*, SwFrmFmt*> SwTextBoxHelper::findShapes(const SwDoc* pDoc)
+{
+ std::map<SwFrmFmt*, SwFrmFmt*> aRet;
+
+ const SwFrmFmts& rSpzFrmFmts = *pDoc->GetSpzFrmFmts();
+ for (SwFrmFmts::const_iterator it = rSpzFrmFmts.begin(); it != rSpzFrmFmts.end(); ++it)
+ {
+ SwFrmFmt* pTextBox = findTextBox(*it);
+ if (pTextBox)
+ aRet[pTextBox] = *it;
+ }
+
+ return aRet;
+}
+
/// If the passed SdrObject is in fact a TextFrame, that is used as a TextBox.
bool lcl_isTextBox(SdrObject* pSdrObject, std::list<SwFrmFmt*>& rTextBoxes)
{