Kaydet (Commit) 60cb70b9 authored tarafından Luboš Luňák's avatar Luboš Luňák

do not reuse shape context (part of bnc#705956)

As far as I can say, this reusing is just an optimization, but
it breaks e.g. with <w:pict><v:group><w:pict>... , where
using the same context for two shapes breaks things, e.g.
oox::vml::ShapeContainer::getFirstShape() does not work right.

Change-Id: I90bb85b4d320e1bb0727401879b0551abbac5f12
üst 516f81a1
...@@ -246,8 +246,6 @@ public: ...@@ -246,8 +246,6 @@ public:
virtual void setXNoteType(const Id & nId) = 0; virtual void setXNoteType(const Id & nId) = 0;
virtual const Id & getXNoteType() const = 0; virtual const Id & getXNoteType() const = 0;
virtual const ::rtl::OUString & getTarget() const = 0; virtual const ::rtl::OUString & getTarget() const = 0;
virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( ) = 0;
virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext ) = 0;
}; };
......
...@@ -401,16 +401,6 @@ uno::Reference<io::XInputStream> OOXMLDocumentImpl::getStorageStream() ...@@ -401,16 +401,6 @@ uno::Reference<io::XInputStream> OOXMLDocumentImpl::getStorageStream()
return mpStream->getStorageStream(); return mpStream->getStorageStream();
} }
void OOXMLDocumentImpl::setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext )
{
mxShapeContext = xContext;
}
uno::Reference<xml::sax::XFastShapeContextHandler> OOXMLDocumentImpl::getShapeContext( )
{
return mxShapeContext;
}
OOXMLDocument * OOXMLDocument *
OOXMLDocumentFactory::createDocument OOXMLDocumentFactory::createDocument
(OOXMLStream::Pointer_t pStream) (OOXMLStream::Pointer_t pStream)
......
...@@ -48,7 +48,6 @@ class OOXMLDocumentImpl : public OOXMLDocument ...@@ -48,7 +48,6 @@ class OOXMLDocumentImpl : public OOXMLDocument
uno::Reference<frame::XModel> mxModel; uno::Reference<frame::XModel> mxModel;
uno::Reference<drawing::XDrawPage> mxDrawPage; uno::Reference<drawing::XDrawPage> mxDrawPage;
uno::Reference<xml::sax::XFastShapeContextHandler> mxShapeContext;
bool mbIsSubstream; bool mbIsSubstream;
...@@ -111,8 +110,6 @@ public: ...@@ -111,8 +110,6 @@ public:
virtual void setXNoteType(const Id & rId); virtual void setXNoteType(const Id & rId);
virtual const Id & getXNoteType() const; virtual const Id & getXNoteType() const;
virtual const ::rtl::OUString & getTarget() const; virtual const ::rtl::OUString & getTarget() const;
virtual uno::Reference<xml::sax::XFastShapeContextHandler> getShapeContext( );
virtual void setShapeContext( uno::Reference<xml::sax::XFastShapeContextHandler> xContext );
}; };
}} }}
#endif // OOXML_DOCUMENT_IMPL_HXX #endif // OOXML_DOCUMENT_IMPL_HXX
......
...@@ -1894,7 +1894,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape ...@@ -1894,7 +1894,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
uno::Reference<XMultiComponentFactory> rServiceManager uno::Reference<XMultiComponentFactory> rServiceManager
(xContext->getServiceManager()); (xContext->getServiceManager());
mrShapeContext.set( getDocument( )->getShapeContext( ) );
if ( !mrShapeContext.is( ) ) if ( !mrShapeContext.is( ) )
{ {
// Define the shape context for the whole document // Define the shape context for the whole document
...@@ -1905,7 +1904,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape ...@@ -1905,7 +1904,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape
(RTL_CONSTASCII_USTRINGPARAM (RTL_CONSTASCII_USTRINGPARAM
("com.sun.star.xml.sax.FastShapeContextHandler")), xContext), ("com.sun.star.xml.sax.FastShapeContextHandler")), xContext),
uno::UNO_QUERY); uno::UNO_QUERY);
getDocument()->setShapeContext( mrShapeContext );
} }
if (mrShapeContext.is()) if (mrShapeContext.is())
......
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