writerfilter07: OOXMLFastContexHandlerShape: Only call endShape when startShape has been called
This commit is contained in:
parent
657b0466be
commit
884ebc79f3
2 changed files with 7 additions and 2 deletions
|
@ -2027,7 +2027,8 @@ void SAL_CALL ShapesNoAdd::remove(const uno::Reference< drawing::XShape > & xSha
|
|||
|
||||
OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
|
||||
(OOXMLFastContextHandler * pContext)
|
||||
: OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false )
|
||||
: OOXMLFastContextHandlerProperties(pContext), m_bShapeSent( false ),
|
||||
m_bShapeStarted(false)
|
||||
{
|
||||
uno::Reference<uno::XComponentContext> xContext(getComponentContext());
|
||||
if (xContext.is())
|
||||
|
@ -2119,7 +2120,10 @@ void OOXMLFastContextHandlerShape::sendShape( Token_t Element )
|
|||
|
||||
// Notify the dmapper that the shape is ready to use
|
||||
if ( !bIsPicture )
|
||||
{
|
||||
mpStream->startShape( xShape );
|
||||
m_bShapeStarted = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2138,7 +2142,7 @@ void OOXMLFastContextHandlerShape::lcl_endFastElement
|
|||
|
||||
// Ending the shape should be the last thing to do
|
||||
bool bIsPicture = Element == ( NS_picture | OOXML_pic );
|
||||
if ( !bIsPicture )
|
||||
if ( !bIsPicture && m_bShapeStarted)
|
||||
mpStream->endShape( );
|
||||
}
|
||||
|
||||
|
|
|
@ -517,6 +517,7 @@ class OOXMLFastContextHandlerShape: public OOXMLFastContextHandlerProperties
|
|||
{
|
||||
private:
|
||||
bool m_bShapeSent;
|
||||
bool m_bShapeStarted;
|
||||
|
||||
public:
|
||||
explicit OOXMLFastContextHandlerShape
|
||||
|
|
Loading…
Reference in a new issue