diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-06 15:54:12 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-06 16:02:38 +0100 |
commit | c8e9a953636524ff3ac79859f3698491f775e10a (patch) | |
tree | 79eda09187514d4025ebf3cd6381d5b12c9bc49a /oox | |
parent | 6b713bafe4d8f7fc4f5dfe2b794c07fb713a3462 (diff) |
DOCX import: fix import of wpg shapes after a wps textframe
Change-Id: I30844062bf4d4f15ca70d9f441f0505fa4f26bb7
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/ShapeContextHandler.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx index 5ac772c36a21..6cd8e82d8ace 100644 --- a/oox/source/shape/ShapeContextHandler.cxx +++ b/oox/source/shape/ShapeContextHandler.cxx @@ -322,6 +322,14 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element) if (xContextHandler.is()) xContextHandler->endFastElement(Element); + // In case a textbox is sent, and later we get additional properties for + // the textbox, then the wps context is not cleared, so do that here. + 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")) + mxWpsContext.clear(); + } } void SAL_CALL ShapeContextHandler::endUnknownElement |