diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-01-19 12:48:58 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-19 18:36:57 +0100 |
commit | 68a101b36d4e63b37a21688a5b5e85e9df4fa3aa (patch) | |
tree | b68293594eaf13d3d4172f69ed85145f6b40c21d /xmloff | |
parent | 55f224ff57cf16057e0493ee4f9b8a14132d7ec1 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/sdxmlimp.cxx | 21 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp_impl.hxx | 3 |
2 files changed, 4 insertions, 20 deletions
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, |