diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-03 14:55:13 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-03 16:15:09 +0200 |
commit | fbb3db64de22a7fd0e14dce5e14e3b690285afdb (patch) | |
tree | da3b4e7446d243ecaa128989fce3858a20ea19dd /sw/source | |
parent | 06127e06e1d9d99e58b32e618c93667f70929249 (diff) |
SwXFrame::setPropertyValue: ignore setting ZOrder on TextBoxes
The ZOrder of a TextBox should be the ZOrder of the shape + 1, don't
allow setting it to something custom.
Change-Id: I17439aa9e494ae62ab80e178a8c5d90cea030351
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/unocore/unoframe.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx index 847985308bd1..9803ef12d2c6 100644 --- a/sw/source/core/unocore/unoframe.cxx +++ b/sw/source/core/unocore/unoframe.cxx @@ -58,6 +58,7 @@ #include <ndole.hxx> #include <frmfmt.hxx> #include <frame.hxx> +#include <textboxhelper.hxx> #include <unotextrange.hxx> #include <unotextcursor.hxx> #include <unoparagraph.hxx> @@ -1674,7 +1675,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: { sal_Int32 nZOrder = - 1; aValue >>= nZOrder; - if( nZOrder >= 0) + + // Don't set an explicit ZOrder on TextBoxes. + std::list<SwFrmFmt*> aTextBoxes = SwTextBoxHelper::findTextBoxes(pDoc); + if( nZOrder >= 0 && std::find(aTextBoxes.begin(), aTextBoxes.end(), pFmt) == aTextBoxes.end()) { SdrObject* pObject = GetOrCreateSdrObject( (SwFlyFrmFmt&)*pFmt ); |