diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-15 15:33:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-15 16:48:57 +0200 |
commit | 615d3e319c027b6ef656ff2358c5d2c3519d5440 (patch) | |
tree | db84bad4d80ead8b4be3b30a4e1a733af5626ed4 /sw | |
parent | 174e6796dfc910dc4b95673fcf9ec0704967acfd (diff) |
SwTextBoxHelper::findTextBox: take a const SwFrmFmt
Change-Id: I531a5864f61ab6c9bfcfc44f7fcacef58ad78489
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/textboxhelper.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/textboxhelper.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx index f2aab3bb2b41..d27fa6627b37 100644 --- a/sw/inc/textboxhelper.hxx +++ b/sw/inc/textboxhelper.hxx @@ -61,7 +61,7 @@ public: static void syncFlyFrmAttr(SwFrmFmt& rShape, SfxItemSet& rSet); /// If we have an associated TextFrame, then return that. - static SwFrmFmt* findTextBox(SwFrmFmt* pShape); + static SwFrmFmt* findTextBox(const SwFrmFmt* pShape); static SwFrmFmt* findTextBox(css::uno::Reference<css::drawing::XShape> xShape); /// Return the textbox rectangle of a draw shape (in twips). static Rectangle getTextRectangle(SwFrmFmt* pShape, bool bAbsolute = true); diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx index 43774cbf78cf..3c54f531be93 100644 --- a/sw/source/core/doc/textboxhelper.cxx +++ b/sw/source/core/doc/textboxhelper.cxx @@ -196,7 +196,7 @@ SwFrmFmt* SwTextBoxHelper::findTextBox(uno::Reference<drawing::XShape> xShape) return findTextBox(pShape->GetFrmFmt()); } -SwFrmFmt* SwTextBoxHelper::findTextBox(SwFrmFmt* pShape) +SwFrmFmt* SwTextBoxHelper::findTextBox(const SwFrmFmt* pShape) { SwFrmFmt* pRet = 0; @@ -204,8 +204,8 @@ SwFrmFmt* SwTextBoxHelper::findTextBox(SwFrmFmt* pShape) if (pShape->Which() == RES_DRAWFRMFMT && pShape->GetAttrSet().HasItem(RES_CNTNT)) { const SwFmtCntnt& rCntnt = pShape->GetCntnt(); - SwFrmFmts& rSpzFrmFmts = *pShape->GetDoc()->GetSpzFrmFmts(); - for (SwFrmFmts::iterator it = rSpzFrmFmts.begin(); it != rSpzFrmFmts.end(); ++it) + const SwFrmFmts& rSpzFrmFmts = *pShape->GetDoc()->GetSpzFrmFmts(); + for (SwFrmFmts::const_iterator it = rSpzFrmFmts.begin(); it != rSpzFrmFmts.end(); ++it) { SwFrmFmt* pFmt = *it; // Only a fly frame can be a TextBox. |