summaryrefslogtreecommitdiff
path: root/oox/source/shape
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/shape')
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 34a84b42f93f..f180f18bb906 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -331,7 +331,15 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
if (Element == (NMSP_wps | XML_wsp))
{
uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
- if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
+ bool bTextFrame = xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame");
+ bool bTextBox = false;
+ if (!bTextFrame)
+ {
+ uno::Reference<beans::XPropertySet> xPropertySet(mxSavedShape, uno::UNO_QUERY);
+ if (xPropertySet.is())
+ bTextBox = xPropertySet->getPropertyValue("TextBox").get<bool>();
+ }
+ if (bTextFrame || bTextBox)
mxWpsContext.clear();
mxSavedShape.clear();
}