oox: clear the saved shape when the shape really ends
Change-Id: Id0d644407bf1f5672e654082328434b9464c140a
This commit is contained in:
parent
dd1d7868a9
commit
22e6916a82
@ -330,6 +330,7 @@ void SAL_CALL ShapeContextHandler::endFastElement(::sal_Int32 Element)
|
||||
uno::Reference<lang::XServiceInfo> xServiceInfo(mxSavedShape, uno::UNO_QUERY);
|
||||
if (xServiceInfo.is() && xServiceInfo->supportsService("com.sun.star.text.TextFrame"))
|
||||
mxWpsContext.clear();
|
||||
mxSavedShape.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
BIN
sw/qa/extras/ooxmlimport/data/missing-path.docx
Executable file
BIN
sw/qa/extras/ooxmlimport/data/missing-path.docx
Executable file
Binary file not shown.
@ -17,6 +17,7 @@
|
||||
#include <com/sun/star/beans/XPropertySet.hpp>
|
||||
#include <com/sun/star/document/XEmbeddedObjectSupplier2.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/lang/XServiceInfo.hpp>
|
||||
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
|
||||
@ -48,6 +49,7 @@
|
||||
#include <com/sun/star/text/XDocumentIndex.hpp>
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <unotools/fltrcfg.hxx>
|
||||
#include <comphelper/sequenceashashmap.hxx>
|
||||
|
||||
#include <bordertest.hxx>
|
||||
|
||||
@ -1653,6 +1655,15 @@ DECLARE_OOXMLIMPORT_TEST(testMceNested, "mce-nested.docx")
|
||||
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")
|
||||
{
|
||||
// The document contains a rotated bitmap
|
||||
|
Loading…
x
Reference in New Issue
Block a user