[Libreoffice-commits] core.git: xmloff/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Jan 19 17:37:31 UTC 2020


 xmloff/source/draw/sdxmlimp.cxx      |   21 ++++-----------------
 xmloff/source/draw/sdxmlimp_impl.hxx |    3 ---
 2 files changed, 4 insertions(+), 20 deletions(-)

New commits:
commit 68a101b36d4e63b37a21688a5b5e85e9df4fa3aa
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sun Jan 19 12:48:58 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Sun Jan 19 18:36:57 2020 +0100

    inline some Create methods
    
    to make it easier to follow the flow of logic through the context
    classes
    
    Change-Id: I914c04dd0aa8148f9ff1be4ea86e83ff67d8bb76
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87039
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index 30a69187732d..10606f5c564e 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -77,9 +77,10 @@ SdXMLBodyContext_Impl::SdXMLBodyContext_Impl( SdXMLImport& rImport,
 SvXMLImportContextRef SdXMLBodyContext_Impl::CreateChildContext(
         sal_uInt16 /*nPrefix*/,
         const OUString& rLocalName,
-        const uno::Reference< xml::sax::XAttributeList > & xAttrList )
+        const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/ )
 {
-    return GetSdImport().CreateBodyContext(rLocalName, xAttrList);
+    SvXMLImportContext* pContext = new SdXMLBodyContext(GetSdImport(), rLocalName);
+    return pContext;
 }
 
 namespace {
@@ -177,7 +178,7 @@ SvXMLImportContextRef SdXMLDocContext_Impl::CreateChildContext(
             if( GetImport().getImportFlags() & SvXMLImportFlags::SCRIPTS )
             {
                 // office:script inside office:document
-                xContext = GetSdImport().CreateScriptContext( rLocalName );
+                xContext = new XMLScriptContext( GetSdImport(), rLocalName, GetSdImport().GetModel() );
             }
             break;
         }
@@ -707,13 +708,6 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const sal_Int32 /*nElement*/,
     return pContext;
 }
 
-SvXMLImportContext *SdXMLImport::CreateBodyContext(const OUString& rLocalName,
-    const uno::Reference<xml::sax::XAttributeList>&)
-{
-    SvXMLImportContext* pContext = new SdXMLBodyContext(*this, rLocalName);
-    return pContext;
-}
-
 SvXMLStylesContext *SdXMLImport::CreateStylesContext(const OUString& rLocalName,
     const uno::Reference<xml::sax::XAttributeList>& xAttrList)
 {
@@ -757,13 +751,6 @@ SvXMLImportContext *SdXMLImport::CreateFontDeclsContext(const OUString& rLocalNa
     return pFSContext;
 }
 
-SvXMLImportContext *SdXMLImport::CreateScriptContext(
-                                       const OUString& rLocalName )
-{
-    SvXMLImportContext *pContext = new XMLScriptContext( *this, rLocalName, GetModel() );
-    return pContext;
-}
-
 void SdXMLImport::SetViewSettings(const css::uno::Sequence<css::beans::PropertyValue>& aViewProps)
 {
     uno::Reference< beans::XPropertySet > xPropSet( GetModel(), uno::UNO_QUERY );
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index e61f8866ff2f..7205d4867ec8 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -202,9 +202,6 @@ public:
     //     the root element (i.e. office:document-meta)
     SvXMLImportContext* CreateMetaContext(const sal_Int32 nElement,
         const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList);
-    SvXMLImportContext* CreateScriptContext( const OUString& rLocalName );
-    SvXMLImportContext* CreateBodyContext(const OUString& rLocalName,
-        const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
     SvXMLStylesContext* CreateStylesContext(const OUString& rLocalName,
         const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList);
     SvXMLStylesContext* CreateAutoStylesContext(const OUString& rLocalName,


More information about the Libreoffice-commits mailing list