diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-05-15 15:05:29 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-05-15 15:13:28 +0200 |
commit | 60cb70b94537e9ff1155fb80255fc04ce41363b2 (patch) | |
tree | 0efee682df2714a41129ff182d49d56e2173d9e5 /writerfilter | |
parent | 516f81a17619a993694c08b024f0c1a6b11dceb5 (diff) |
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
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/inc/ooxml/OOXMLDocument.hxx | 2 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.cxx | 10 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLDocumentImpl.hxx | 3 | ||||
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 2 |
4 files changed, 0 insertions, 17 deletions
diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx index 7ce8052da2a5..1e150b41a8c9 100644 --- a/writerfilter/inc/ooxml/OOXMLDocument.hxx +++ b/writerfilter/inc/ooxml/OOXMLDocument.hxx @@ -246,8 +246,6 @@ public: virtual void setXNoteType(const Id & nId) = 0; virtual const Id & getXNoteType() 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; }; diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx index acf84f9ab68f..18357bcb3851 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx @@ -401,16 +401,6 @@ uno::Reference<io::XInputStream> OOXMLDocumentImpl::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 * OOXMLDocumentFactory::createDocument (OOXMLStream::Pointer_t pStream) diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx index a20fbab52af1..d534b158ffc4 100644 --- a/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx +++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.hxx @@ -48,7 +48,6 @@ class OOXMLDocumentImpl : public OOXMLDocument uno::Reference<frame::XModel> mxModel; uno::Reference<drawing::XDrawPage> mxDrawPage; - uno::Reference<xml::sax::XFastShapeContextHandler> mxShapeContext; bool mbIsSubstream; @@ -111,8 +110,6 @@ public: virtual void setXNoteType(const Id & rId); virtual const Id & getXNoteType() 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 diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 7d2f539dfda8..f0e21c2713fd 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1894,7 +1894,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape uno::Reference<XMultiComponentFactory> rServiceManager (xContext->getServiceManager()); - mrShapeContext.set( getDocument( )->getShapeContext( ) ); if ( !mrShapeContext.is( ) ) { // Define the shape context for the whole document @@ -1905,7 +1904,6 @@ OOXMLFastContextHandlerShape::OOXMLFastContextHandlerShape (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.xml.sax.FastShapeContextHandler")), xContext), uno::UNO_QUERY); - getDocument()->setShapeContext( mrShapeContext ); } if (mrShapeContext.is()) |