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

oox: clear the saved shape when the shape really ends

Change-Id: Id0d644407bf1f5672e654082328434b9464c140a
üst dd1d7868
...@@ -330,6 +330,7 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element) ...@@ -330,6 +330,7 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY); uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame")) if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
mxWpsContext.clear(); mxWpsContext.clear();
mxSavedShape.clear();
} }
} }
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp>
#include <com/sun/star/drawing/XControlShape.hpp> #include <com/sun/star/drawing/XControlShape.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
...@@ -48,6 +49,7 @@ ...@@ -48,6 +49,7 @@
#include <com/sun/star/text/XDocumentIndex.hpp> #include <com/sun/star/text/XDocumentIndex.hpp>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <unotools/fltrcfg.hxx> #include <unotools/fltrcfg.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <bordertest.hxx> #include <bordertest.hxx>
...@@ -1653,6 +1655,15 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx") ...@@ -1653,6 +1655,15 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust")); CPPUNIT_ASSERT_EQUAL(drawing::TextVerticalAdjust_BOTTOM, getProperty<drawing::TextVerticalAdjust>(xGroup->getByIndex(1), "TextVerticalAdjust"));
} }
DECLARE_OOXMLIMPORT_TEST(testMissingPath, "missing-path.docx")
{
comphelper::SequenceAsHashMap aCustomShapeGeometry(getProperty<beans::PropertyValues>(getShape(1), "CustomShapeGeometry"));
comphelper::SequenceAsHashMap aPath(aCustomShapeGeometry["Path"].get<beans::PropertyValues>());
uno::Sequence<drawing::EnhancedCustomShapeParameterPair> aCoordinates = aPath["Coordinates"].get< uno::Sequence<drawing::EnhancedCustomShapeParameterPair> >();
// This was 0, the coordinate list was empty.
CPPUNIT_ASSERT_EQUAL(sal_Int32(19), aCoordinates.getLength());
}
DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx") DECLARE_OOXMLIMPORT_TEST(testFdo70457, "fdo70457.docx")
{ {
// The document contains a rotated bitmap // The document contains a rotated bitmap
......
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