Kaydet (Commit) fbb3db64 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 06127e06
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
#include <ndole.hxx> #include <ndole.hxx>
#include <frmfmt.hxx> #include <frmfmt.hxx>
#include <frame.hxx> #include <frame.hxx>
#include <textboxhelper.hxx>
#include <unotextrange.hxx> #include <unotextrange.hxx>
#include <unotextcursor.hxx> #include <unotextcursor.hxx>
#include <unoparagraph.hxx> #include <unoparagraph.hxx>
...@@ -1674,7 +1675,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno:: ...@@ -1674,7 +1675,10 @@ void SwXFrame::setPropertyValue(const :: OUString& rPropertyName, const :: uno::
{ {
sal_Int32 nZOrder = - 1; sal_Int32 nZOrder = - 1;
aValue >>= nZOrder; 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 = SdrObject* pObject =
GetOrCreateSdrObject( (SwFlyFrmFmt&)*pFmt ); GetOrCreateSdrObject( (SwFlyFrmFmt&)*pFmt );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment