summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/GraphicHelpers.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/dmapper/GraphicHelpers.cxx')
-rw-r--r--writerfilter/source/dmapper/GraphicHelpers.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 9168ad51eebd..0ea364cbff85 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -291,6 +291,20 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool bOldSt
return 0;
--it;
itemZOrderOffset = 1; // after the topmost
+
+ // Check if this shape has a textbox. If so, the textbox will have its own ZOrder, so
+ // suggest a larger offset.
+ bool bTextBox = false;
+ uno::Reference<beans::XPropertySet> xShape = it->second;
+ uno::Reference<beans::XPropertySetInfo> xInfo = xShape->getPropertySetInfo();
+ if (xInfo->hasPropertyByName("TextBox"))
+ {
+ xShape->getPropertyValue("TextBox") >>= bTextBox;
+ }
+ if (bTextBox)
+ {
+ ++itemZOrderOffset;
+ }
}
// SwXFrame::getPropertyValue throws uno::RuntimeException
// when its GetFrameFormat() returns nullptr