[Libreoffice-commits] .: writerfilter/inc writerfilter/source

Lubos Lunak llunak at kemper.freedesktop.org
Tue May 15 06:13:43 PDT 2012


 writerfilter/inc/ooxml/OOXMLDocument.hxx              |    2 --
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx       |   10 ----------
 writerfilter/source/ooxml/OOXMLDocumentImpl.hxx       |    3 ---
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |    2 --
 4 files changed, 17 deletions(-)

New commits:
commit 60cb70b94537e9ff1155fb80255fc04ce41363b2
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Tue May 15 15:05:29 2012 +0200

    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

diff --git a/writerfilter/inc/ooxml/OOXMLDocument.hxx b/writerfilter/inc/ooxml/OOXMLDocument.hxx
index 7ce8052..1e150b4 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 acf84f9..18357bc 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 a20fbab..d534b15 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 7d2f539..f0e21c2 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())


More information about the Libreoffice-commits mailing list