diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-21 12:12:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-22 11:01:53 +0200 |
commit | 442df6cf8345f8029d5a3b470bc4981a5aa2bf20 (patch) | |
tree | 9efa6f2b29f41d79f968d1e8ad2588c323305776 /xmloff | |
parent | a411d7729ab2bed05c3c5d22a8cbcf5dde034b91 (diff) |
ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
187 files changed, 696 insertions, 724 deletions
diff --git a/xmloff/inc/DomBuilderContext.hxx b/xmloff/inc/DomBuilderContext.hxx index b298df0ad813..0df0f6de135d 100644 --- a/xmloff/inc/DomBuilderContext.hxx +++ b/xmloff/inc/DomBuilderContext.hxx @@ -71,7 +71,7 @@ public: // implement SvXMLImportContext methods: - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/PageMasterImportContext.hxx b/xmloff/inc/PageMasterImportContext.hxx index 09365e18ed5f..ad0e483f7254 100644 --- a/xmloff/inc/PageMasterImportContext.hxx +++ b/xmloff/inc/PageMasterImportContext.hxx @@ -45,7 +45,7 @@ public: bool bDefaultStyle); virtual ~PageStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/XMLBackgroundImageContext.hxx b/xmloff/inc/XMLBackgroundImageContext.hxx index 9688b8a5d75f..e965935206a6 100644 --- a/xmloff/inc/XMLBackgroundImageContext.hxx +++ b/xmloff/inc/XMLBackgroundImageContext.hxx @@ -61,7 +61,7 @@ public: virtual ~XMLBackgroundImageContext() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/XMLChartStyleContext.hxx b/xmloff/inc/XMLChartStyleContext.hxx index 6e32fc1e6b88..cef31d3f5f1c 100644 --- a/xmloff/inc/XMLChartStyleContext.hxx +++ b/xmloff/inc/XMLChartStyleContext.hxx @@ -48,7 +48,7 @@ public: const css::uno::Reference<css::beans::XPropertySet > & rPropSet ) override; /// necessary for property context (element-property symbol-image) - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index 206707ce1409..eaf322305309 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx @@ -45,7 +45,7 @@ public: virtual ~XMLEmbeddedObjectImportContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx index 6153f68c4c33..096714d33fdc 100644 --- a/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx +++ b/xmloff/inc/XMLFootnoteConfigurationImportContext.hxx @@ -80,7 +80,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; /// for footnotes, also parse begin and end notices - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/inc/XMLImageMapContext.hxx b/xmloff/inc/XMLImageMapContext.hxx index f535a2ad3cf9..646b707b0d02 100644 --- a/xmloff/inc/XMLImageMapContext.hxx +++ b/xmloff/inc/XMLImageMapContext.hxx @@ -52,7 +52,7 @@ public: virtual ~XMLImageMapContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx index 368161dab1a9..83461d1a25c2 100644 --- a/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx +++ b/xmloff/inc/XMLIndexBibliographyConfigurationContext.hxx @@ -81,7 +81,7 @@ protected: virtual void CreateAndInsert( bool bOverwrite ) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/inc/XMLLineNumberingImportContext.hxx b/xmloff/inc/XMLLineNumberingImportContext.hxx index ad01b45f61cf..3216070020ef 100644 --- a/xmloff/inc/XMLLineNumberingImportContext.hxx +++ b/xmloff/inc/XMLLineNumberingImportContext.hxx @@ -101,7 +101,7 @@ protected: virtual void CreateAndInsert(bool bOverwrite) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx index 4f4d1c8e849a..0dbdc9f94fe8 100644 --- a/xmloff/inc/XMLNumberStylesImport.hxx +++ b/xmloff/inc/XMLNumberStylesImport.hxx @@ -57,7 +57,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; sal_Int32 GetDrawKey() const { return mnKey; } diff --git a/xmloff/inc/XMLReplacementImageContext.hxx b/xmloff/inc/XMLReplacementImageContext.hxx index dd6a3fa733f8..217dbaba3aed 100644 --- a/xmloff/inc/XMLReplacementImageContext.hxx +++ b/xmloff/inc/XMLReplacementImageContext.hxx @@ -48,7 +48,7 @@ public: virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx b/xmloff/inc/XMLShapePropertySetContext.hxx index d583983d9005..2a5ac3c81129 100644 --- a/xmloff/inc/XMLShapePropertySetContext.hxx +++ b/xmloff/inc/XMLShapePropertySetContext.hxx @@ -42,7 +42,7 @@ public: virtual void EndElement() override; using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, diff --git a/xmloff/inc/XMLStringBufferImportContext.hxx b/xmloff/inc/XMLStringBufferImportContext.hxx index c3bb802f0e11..d3215963ab04 100644 --- a/xmloff/inc/XMLStringBufferImportContext.hxx +++ b/xmloff/inc/XMLStringBufferImportContext.hxx @@ -45,7 +45,7 @@ public: virtual ~XMLStringBufferImportContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx index 424ff41c7f9d..fdc969b3e2e1 100644 --- a/xmloff/inc/XMLTextColumnsContext.hxx +++ b/xmloff/inc/XMLTextColumnsContext.hxx @@ -58,7 +58,7 @@ public: const XMLPropertyState& rProp, ::std::vector< XMLPropertyState > &rProps ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/XMLTextHeaderFooterContext.hxx b/xmloff/inc/XMLTextHeaderFooterContext.hxx index 46f7798a6f67..47688ba08021 100644 --- a/xmloff/inc/XMLTextHeaderFooterContext.hxx +++ b/xmloff/inc/XMLTextHeaderFooterContext.hxx @@ -53,7 +53,7 @@ public: virtual ~XMLTextHeaderFooterContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/animationimport.hxx b/xmloff/inc/animationimport.hxx index 6e77eea29ee8..6d59ad9a4898 100644 --- a/xmloff/inc/animationimport.hxx +++ b/xmloff/inc/animationimport.hxx @@ -51,7 +51,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; static void postProcessRootNode( const css::uno::Reference< css::animations::XAnimationNode >& xNode, css::uno::Reference< css::beans::XPropertySet > const & xPageProps ); diff --git a/xmloff/inc/animimp.hxx b/xmloff/inc/animimp.hxx index 0a07b3fe0e28..971071e82d79 100644 --- a/xmloff/inc/animimp.hxx +++ b/xmloff/inc/animimp.hxx @@ -40,7 +40,7 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList); - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/inc/txtfldi.hxx b/xmloff/inc/txtfldi.hxx index e42ee3b51d96..f2812dbb52cb 100644 --- a/xmloff/inc/txtfldi.hxx +++ b/xmloff/inc/txtfldi.hxx @@ -432,7 +432,7 @@ public: const css::uno::Reference< css::beans::XPropertySet> & xPropertySet) override; /// handle database-location children - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; @@ -913,7 +913,7 @@ public: protected: /// for <office:events> children - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; @@ -971,7 +971,7 @@ public: sal_uInt16 nPrfx, const OUString& sLocalName); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; @@ -1145,7 +1145,7 @@ protected: virtual void PrepareField( const css::uno::Reference< css::beans::XPropertySet > & xPropertySet) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; @@ -1218,7 +1218,7 @@ public: sal_uInt16 nPrfx, const OUString& sLocalName); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/inc/txtvfldi.hxx b/xmloff/inc/txtvfldi.hxx index a4c05bcd37ae..78f9fc6565b9 100644 --- a/xmloff/inc/txtvfldi.hxx +++ b/xmloff/inc/txtvfldi.hxx @@ -391,7 +391,7 @@ public: const OUString& rLocalName, /// element name w/o prefix enum VarType eVarType); /// variable type - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx index d9f349f421c3..90ddd625f7cd 100644 --- a/xmloff/inc/xmltabi.hxx +++ b/xmloff/inc/xmltabi.hxx @@ -41,7 +41,7 @@ public: const XMLPropertyState& rProp, ::std::vector< XMLPropertyState > &rProps ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index 0c8f69fdcc4e..e709efb6f5a4 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.hxx @@ -87,7 +87,7 @@ public: virtual ~XMLVersionListContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 667305fa6902..fb186a947687 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -613,7 +613,7 @@ public: struct theAxisChildTokenMap : public rtl::Static< AxisChildTokenMap, theAxisChildTokenMap > {}; } -SvXMLImportContext* SchXMLAxisContext::CreateChildContext( +SvXMLImportContextRef SchXMLAxisContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) diff --git a/xmloff/source/chart/SchXMLAxisContext.hxx b/xmloff/source/chart/SchXMLAxisContext.hxx index 68b6ed740d91..287548262f7a 100644 --- a/xmloff/source/chart/SchXMLAxisContext.hxx +++ b/xmloff/source/chart/SchXMLAxisContext.hxx @@ -38,7 +38,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 5464c5c4d936..c9891ce490aa 100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx @@ -56,7 +56,7 @@ SchXMLCalculationSettingsContext::SchXMLCalculationSettingsContext( SvXMLImport& } } } -SvXMLImportContext* SchXMLCalculationSettingsContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SchXMLCalculationSettingsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) { diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx index 7d6ae3e84f2d..0fbe3056a162 100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.hxx @@ -31,7 +31,7 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 364c687fe685..596f9e580b50 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -1042,7 +1042,7 @@ void SchXMLChartContext::MergeSeriesForStockChart() } } -SvXMLImportContext* SchXMLChartContext::CreateChildContext( +SvXMLImportContextRef SchXMLChartContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) @@ -1248,7 +1248,7 @@ void SchXMLTitleContext::StartElement( const uno::Reference< xml::sax::XAttribut } } -SvXMLImportContext* SchXMLTitleContext::CreateChildContext( +SvXMLImportContextRef SchXMLTitleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) diff --git a/xmloff/source/chart/SchXMLChartContext.hxx b/xmloff/source/chart/SchXMLChartContext.hxx index 14782920b4c2..c816b4492305 100644 --- a/xmloff/source/chart/SchXMLChartContext.hxx +++ b/xmloff/source/chart/SchXMLChartContext.hxx @@ -82,7 +82,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -141,7 +141,7 @@ public: virtual ~SchXMLTitleContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLParagraphContext.cxx b/xmloff/source/chart/SchXMLParagraphContext.cxx index 5fa8ecf4b053..b073e9da370d 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.cxx +++ b/xmloff/source/chart/SchXMLParagraphContext.cxx @@ -80,7 +80,7 @@ void SchXMLParagraphContext::EndElement() mrText = maBuffer.makeStringAndClear(); } -SvXMLImportContext* SchXMLParagraphContext::CreateChildContext( +SvXMLImportContextRef SchXMLParagraphContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) diff --git a/xmloff/source/chart/SchXMLParagraphContext.hxx b/xmloff/source/chart/SchXMLParagraphContext.hxx index f0b6d227b6b8..fade1b355317 100644 --- a/xmloff/source/chart/SchXMLParagraphContext.hxx +++ b/xmloff/source/chart/SchXMLParagraphContext.hxx @@ -43,7 +43,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index bed146edf7b6..b724655f7066 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -410,7 +410,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri } } -SvXMLImportContext* SchXMLPlotAreaContext::CreateChildContext( +SvXMLImportContextRef SchXMLPlotAreaContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) @@ -1148,14 +1148,4 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax } } -SvXMLImportContext* SchXMLStatisticsObjectContext::CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const uno::Reference< xml::sax::XAttributeList >& xAttrList ) -{ - SvXMLImportContext* pContext = nullptr; - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index d369af474998..6c21c93f3b18 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -98,7 +98,7 @@ public: virtual ~SchXMLPlotAreaContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -244,10 +244,6 @@ public: virtual ~SchXMLStatisticsObjectContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext* CreateChildContext( - sal_uInt16 nPrefix, - const OUString& rLocalName, - const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; private: SchXMLImportHelper & mrImportHelper; diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx index 7e06dcebdb7b..a7cf77f69fd7 100644 --- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx +++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx @@ -82,24 +82,24 @@ void SchXMLRegressionCurveObjectContext::StartElement( const uno::Reference< xml mrRegressionStyleList.push_back( aStyle ); } -SvXMLImportContext* SchXMLRegressionCurveObjectContext::CreateChildContext( +SvXMLImportContextRef SchXMLRegressionCurveObjectContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if( nPrefix == XML_NAMESPACE_CHART && IsXMLToken( rLocalName, XML_EQUATION ) ) { - pContext = new SchXMLEquationContext( + xContext = new SchXMLEquationContext( mrImportHelper, GetImport(), nPrefix, rLocalName, maChartSize, mrRegressionStyleList.back()); } else { - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); } - return pContext; + return xContext; } SchXMLEquationContext::SchXMLEquationContext( diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx index 6de26ae03b51..0d6fc2fea29e 100644 --- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx +++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.hxx @@ -42,7 +42,7 @@ public: virtual ~SchXMLRegressionCurveObjectContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx index a40d23c3a6a5..5aa8eec6e80a 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.cxx +++ b/xmloff/source/chart/SchXMLSeries2Context.cxx @@ -635,7 +635,7 @@ void SchXMLSeries2Context::EndElement() maPostponedSequences.clear(); } -SvXMLImportContext* SchXMLSeries2Context::CreateChildContext( +SvXMLImportContextRef SchXMLSeries2Context::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) diff --git a/xmloff/source/chart/SchXMLSeries2Context.hxx b/xmloff/source/chart/SchXMLSeries2Context.hxx index c3ebf3a000c5..82a5542f8a9f 100644 --- a/xmloff/source/chart/SchXMLSeries2Context.hxx +++ b/xmloff/source/chart/SchXMLSeries2Context.hxx @@ -86,7 +86,7 @@ public: virtual ~SchXMLSeries2Context() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index f68f4b27c873..4d9a6d6333fd 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -226,7 +226,7 @@ SchXMLTableContext::~SchXMLTableContext() { } -SvXMLImportContext *SchXMLTableContext::CreateChildContext( +SvXMLImportContextRef SchXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -415,7 +415,7 @@ SchXMLTableColumnsContext::~SchXMLTableColumnsContext() { } -SvXMLImportContext* SchXMLTableColumnsContext::CreateChildContext( +SvXMLImportContextRef SchXMLTableColumnsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -509,7 +509,7 @@ SchXMLTableRowsContext::~SchXMLTableRowsContext() { } -SvXMLImportContext* SchXMLTableRowsContext::CreateChildContext( +SvXMLImportContextRef SchXMLTableRowsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -552,7 +552,7 @@ SchXMLTableRowContext::~SchXMLTableRowContext() { } -SvXMLImportContext* SchXMLTableRowContext::CreateChildContext( +SvXMLImportContextRef SchXMLTableRowContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -590,7 +590,7 @@ public: const OUString& rLocalName, OUString& rRangeString ); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -664,7 +664,7 @@ void SchXMLTableCellContext::StartElement( const uno::Reference< xml::sax::XAttr mrTable.nMaxColumnIndex = mrTable.nColumnIndex; } -SvXMLImportContext* SchXMLTableCellContext::CreateChildContext( +SvXMLImportContextRef SchXMLTableCellContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) @@ -1087,7 +1087,7 @@ SchXMLRangeSomewhereContext::SchXMLRangeSomewhereContext( SvXMLImport& rImport, { } -SvXMLImportContext* SchXMLRangeSomewhereContext::CreateChildContext( +SvXMLImportContextRef SchXMLRangeSomewhereContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) diff --git a/xmloff/source/chart/SchXMLTableContext.hxx b/xmloff/source/chart/SchXMLTableContext.hxx index af5f2b155c4c..1c790a50e1c2 100644 --- a/xmloff/source/chart/SchXMLTableContext.hxx +++ b/xmloff/source/chart/SchXMLTableContext.hxx @@ -53,7 +53,7 @@ public: SchXMLTable& aTable ); virtual ~SchXMLTableContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -97,7 +97,7 @@ public: SchXMLTable& aTable ); virtual ~SchXMLTableColumnsContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -131,7 +131,7 @@ public: SchXMLTable& aTable ); virtual ~SchXMLTableRowsContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -150,7 +150,7 @@ public: SchXMLTable& aTable ); virtual ~SchXMLTableRowContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -174,7 +174,7 @@ public: SchXMLTable& aTable ); virtual ~SchXMLTableCellContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/SchXMLTextListContext.cxx b/xmloff/source/chart/SchXMLTextListContext.cxx index 0893f42ff930..8abd79e8cf39 100644 --- a/xmloff/source/chart/SchXMLTextListContext.cxx +++ b/xmloff/source/chart/SchXMLTextListContext.cxx @@ -38,7 +38,7 @@ public: virtual void StartElement( const Reference< xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -64,7 +64,7 @@ void SchXMLListItemContext::EndElement() { } -SvXMLImportContext* SchXMLListItemContext::CreateChildContext( +SvXMLImportContextRef SchXMLListItemContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { @@ -103,7 +103,7 @@ void SchXMLTextListContext::EndElement() m_rTextList[nN]=m_aTextVector[nN]; } -SvXMLImportContext* SchXMLTextListContext::CreateChildContext( +SvXMLImportContextRef SchXMLTextListContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& ) { diff --git a/xmloff/source/chart/SchXMLTextListContext.hxx b/xmloff/source/chart/SchXMLTextListContext.hxx index 87c52345bfbe..4c2c6c9c38cc 100644 --- a/xmloff/source/chart/SchXMLTextListContext.hxx +++ b/xmloff/source/chart/SchXMLTextListContext.hxx @@ -37,7 +37,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/XMLChartPropertyContext.cxx b/xmloff/source/chart/XMLChartPropertyContext.cxx index 5866ef13b156..eca08cccf629 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.cxx +++ b/xmloff/source/chart/XMLChartPropertyContext.cxx @@ -41,33 +41,33 @@ XMLChartPropertyContext::XMLChartPropertyContext( XMLChartPropertyContext::~XMLChartPropertyContext() {} -SvXMLImportContext* XMLChartPropertyContext::CreateChildContext( +SvXMLImportContextRef XMLChartPropertyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) ) { case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE: - pContext = new XMLSymbolImageContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); + xContext = new XMLSymbolImageContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); break; case XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR: - pContext = new XMLLabelSeparatorContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); + xContext = new XMLLabelSeparatorContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); break; } // default / no context yet: create child context by base class - if( !pContext ) + if (!xContext) { - pContext = SvXMLPropertySetContext::CreateChildContext( + xContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, xAttrList, rProperties, rProp ); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLChartPropertyContext.hxx b/xmloff/source/chart/XMLChartPropertyContext.hxx index 7f888c2040cd..ba572e7e5c9e 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.hxx +++ b/xmloff/source/chart/XMLChartPropertyContext.hxx @@ -34,7 +34,7 @@ public: virtual ~XMLChartPropertyContext() override; using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList, diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index b93eee5d14ee..07541e396e5f 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -105,12 +105,12 @@ void XMLChartStyleContext::FillPropertySet( lcl_NumberFormatStyleToProperty( msPercentageDataStyleName, "PercentageNumberFormat", mrStyles, rPropSet ); } -SvXMLImportContext *XMLChartStyleContext::CreateChildContext( +SvXMLImportContextRef XMLChartStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -128,17 +128,17 @@ SvXMLImportContext *XMLChartStyleContext::CreateChildContext( rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new XMLChartPropertyContext( + xContext = new XMLChartPropertyContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), xImpPrMap ); } } - if( !pContext ) - pContext = XMLShapeStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLShapeStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.cxx b/xmloff/source/chart/XMLLabelSeparatorContext.cxx index 321f266c0f68..3775da281814 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.cxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.cxx @@ -47,7 +47,7 @@ void XMLLabelSeparatorContext::StartElement( const uno::Reference< xml::sax::XAt { } -SvXMLImportContext* XMLLabelSeparatorContext::CreateChildContext( +SvXMLImportContextRef XMLLabelSeparatorContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & /*xAttrList*/ ) { diff --git a/xmloff/source/chart/XMLLabelSeparatorContext.hxx b/xmloff/source/chart/XMLLabelSeparatorContext.hxx index 641787c5e7ec..7307924d2a5d 100644 --- a/xmloff/source/chart/XMLLabelSeparatorContext.hxx +++ b/xmloff/source/chart/XMLLabelSeparatorContext.hxx @@ -32,7 +32,7 @@ public: virtual ~XMLLabelSeparatorContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx index c3ee0e29c763..d90119809028 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.cxx +++ b/xmloff/source/chart/XMLSymbolImageContext.cxx @@ -88,7 +88,7 @@ void XMLSymbolImageContext::StartElement( const uno::Reference< xml::sax::XAttri } } -SvXMLImportContext* XMLSymbolImageContext::CreateChildContext( +SvXMLImportContextRef XMLSymbolImageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { diff --git a/xmloff/source/chart/XMLSymbolImageContext.hxx b/xmloff/source/chart/XMLSymbolImageContext.hxx index 9e9a8a4dfe02..a26d85212d5c 100644 --- a/xmloff/source/chart/XMLSymbolImageContext.hxx +++ b/xmloff/source/chart/XMLSymbolImageContext.hxx @@ -36,7 +36,7 @@ public: virtual ~XMLSymbolImageContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/chart/contexts.cxx b/xmloff/source/chart/contexts.cxx index 2708d37bf18e..79a3b6bca37c 100644 --- a/xmloff/source/chart/contexts.cxx +++ b/xmloff/source/chart/contexts.cxx @@ -41,7 +41,7 @@ public: SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override; }; @@ -54,7 +54,7 @@ SchXMLBodyContext_Impl::SchXMLBodyContext_Impl( { } -SvXMLImportContext *SchXMLBodyContext_Impl::CreateChildContext( +SvXMLImportContextRef SchXMLBodyContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & ) @@ -81,12 +81,12 @@ SchXMLDocContext::~SchXMLDocContext() {} -SvXMLImportContext* SchXMLDocContext::CreateChildContext( +SvXMLImportContextRef SchXMLDocContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = mrImportHelper.GetDocElemTokenMap(); SvXMLImportFlags nFlags = GetImport().getImportFlags(); @@ -96,30 +96,30 @@ SvXMLImportContext* SchXMLDocContext::CreateChildContext( if( nFlags & SvXMLImportFlags::AUTOSTYLES ) // not nice, but this is safe, as the SchXMLDocContext class can only by // instantiated by the chart import class SchXMLImport (header is not exported) - pContext = + xContext = static_cast< SchXMLImport& >( GetImport() ).CreateStylesContext( rLocalName, xAttrList ); break; case XML_TOK_DOC_STYLES: // for draw styles containing gradients/hatches/markers and dashes if( nFlags & SvXMLImportFlags::STYLES ) - pContext = new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = new SvXMLStylesContext( GetImport(), nPrefix, rLocalName, xAttrList ); break; case XML_TOK_DOC_META: // we come here in the flat ODF file format, // if XDocumentPropertiesSupplier is not supported at the model - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); break; case XML_TOK_DOC_BODY: if( nFlags & SvXMLImportFlags::CONTENT ) - pContext = new SchXMLBodyContext_Impl( mrImportHelper, GetImport(), nPrefix, rLocalName ); + xContext = new SchXMLBodyContext_Impl( mrImportHelper, GetImport(), nPrefix, rLocalName ); break; } // call parent when no own context was created - if( ! pContext ) - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } SchXMLFlatDocContext_Impl::SchXMLFlatDocContext_Impl( @@ -134,7 +134,7 @@ SchXMLFlatDocContext_Impl::SchXMLFlatDocContext_Impl( { } -SvXMLImportContext *SchXMLFlatDocContext_Impl::CreateChildContext( +SvXMLImportContextRef SchXMLFlatDocContext_Impl::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) { @@ -168,18 +168,18 @@ void SchXMLBodyContext::EndElement() { } -SvXMLImportContext* SchXMLBodyContext::CreateChildContext( +SvXMLImportContextRef SchXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; // <chart:chart> element if( nPrefix == XML_NAMESPACE_CHART && IsXMLToken( rLocalName, XML_CHART ) ) { - pContext = mrImportHelper.CreateChartContext( GetImport(), + xContext = mrImportHelper.CreateChartContext( GetImport(), nPrefix, rLocalName, GetImport().GetModel(), xAttrList ); @@ -188,14 +188,14 @@ SvXMLImportContext* SchXMLBodyContext::CreateChildContext( IsXMLToken( rLocalName, XML_CALCULATION_SETTINGS )) { // i99104 handle null date correctly - pContext = new SchXMLCalculationSettingsContext ( GetImport(), nPrefix, rLocalName, xAttrList); + xContext = new SchXMLCalculationSettingsContext ( GetImport(), nPrefix, rLocalName, xAttrList); } else { - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/chart/contexts.hxx b/xmloff/source/chart/contexts.hxx index 2f77de2bce8a..7fe73de90ef9 100644 --- a/xmloff/source/chart/contexts.hxx +++ b/xmloff/source/chart/contexts.hxx @@ -50,7 +50,7 @@ public: virtual ~SchXMLDocContext() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -67,7 +67,7 @@ public: sal_uInt16 i_nPrefix, const OUString & i_rLName, const css::uno::Reference<css::document::XDocumentProperties>& i_xDocProps); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& i_xAttrList) override; }; @@ -86,7 +86,7 @@ public: virtual ~SchXMLBodyContext() override; virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index 6d2627f77e6d..dd875a91db82 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -151,7 +151,7 @@ public: const OUString& rItemName, XMLConfigBaseContext* pBaseContext); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; @@ -169,7 +169,7 @@ public: css::uno::Any& rAny, XMLConfigBaseContext* pBaseContext); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; @@ -184,7 +184,7 @@ public: css::uno::Any& rAny, XMLConfigBaseContext* pBaseContext); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; @@ -204,7 +204,7 @@ public: const OUString& rConfigItemName, XMLConfigBaseContext* pBaseContext); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; @@ -288,7 +288,7 @@ XMLDocumentSettingsContext::~XMLDocumentSettingsContext() { } -SvXMLImportContext *XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p_nPrefix, +SvXMLImportContextRef XMLDocumentSettingsContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { @@ -441,7 +441,7 @@ XMLConfigItemSetContext::XMLConfigItemSetContext(SvXMLImport& rImport, sal_uInt1 // here are no attributes } -SvXMLImportContext *XMLConfigItemSetContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLConfigItemSetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { @@ -482,7 +482,7 @@ XMLConfigItemContext::XMLConfigItemContext(SvXMLImport& rImport, sal_uInt16 nPrf } } -SvXMLImportContext *XMLConfigItemContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLConfigItemContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& ) { @@ -645,7 +645,7 @@ XMLConfigItemMapNamedContext::XMLConfigItemMapNamedContext(SvXMLImport& rImport, { } -SvXMLImportContext *XMLConfigItemMapNamedContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLConfigItemMapNamedContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { @@ -675,7 +675,7 @@ XMLConfigItemMapIndexedContext::XMLConfigItemMapIndexedContext(SvXMLImport& rImp { } -SvXMLImportContext *XMLConfigItemMapIndexedContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLConfigItemMapIndexedContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { diff --git a/xmloff/source/core/DomBuilderContext.cxx b/xmloff/source/core/DomBuilderContext.cxx index 354358fa88ea..281c4fbee953 100644 --- a/xmloff/source/core/DomBuilderContext.cxx +++ b/xmloff/source/core/DomBuilderContext.cxx @@ -93,7 +93,7 @@ Reference<XDocument> DomBuilderContext::getTree() return mxNode->getOwnerDocument(); } -SvXMLImportContext* DomBuilderContext::CreateChildContext( +SvXMLImportContextRef DomBuilderContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& ) diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 50401c3dc7ee..5669dad5b969 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -49,7 +49,7 @@ public: const OUString& rLName, const css::uno::Reference< css::xml::sax::XDocumentHandler >& rHandler ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -70,7 +70,7 @@ XMLEmbeddedObjectImportContext_Impl::XMLEmbeddedObjectImportContext_Impl( { } -SvXMLImportContext *XMLEmbeddedObjectImportContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLEmbeddedObjectImportContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& ) @@ -221,7 +221,7 @@ XMLEmbeddedObjectImportContext::~XMLEmbeddedObjectImportContext() { } -SvXMLImportContext *XMLEmbeddedObjectImportContext::CreateChildContext( +SvXMLImportContextRef XMLEmbeddedObjectImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& ) { diff --git a/xmloff/source/core/xmlictxt.cxx b/xmloff/source/core/xmlictxt.cxx index a16dfa2f0beb..f2242af256de 100644 --- a/xmloff/source/core/xmlictxt.cxx +++ b/xmloff/source/core/xmlictxt.cxx @@ -47,7 +47,7 @@ SvXMLImportContext::~SvXMLImportContext() { } -SvXMLImportContext *SvXMLImportContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SvXMLImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index 883e471b3d9a..a4635551c622 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -703,7 +703,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName, SvXMLImportContextRef xContext; if(!maContexts.empty()) { - xContext.set(maContexts.top()->CreateChildContext(nPrefix, aLocalName, xAttrList)); + xContext = maContexts.top()->CreateChildContext(nPrefix, aLocalName, xAttrList); SAL_WARN_IF( !xContext.is() || (xContext->GetPrefix() != nPrefix), "xmloff.core", "SvXMLImport::startElement: created context has wrong prefix" ); } diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 8abc0ed7185b..d04fb00d2a3a 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -55,9 +55,9 @@ XMLGraphicsDefaultStyle::~XMLGraphicsDefaultStyle() { } -SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) +SvXMLImportContextRef XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -72,14 +72,14 @@ SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPre { rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new XMLShapePropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), xImpPrMap ); + xContext = new XMLShapePropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), xImpPrMap ); } } - if( !pContext ) - pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } struct XMLPropertyByIndex { diff --git a/xmloff/source/draw/XMLImageMapContext.cxx b/xmloff/source/draw/XMLImageMapContext.cxx index 0fafed0fc439..490a5238e9b2 100644 --- a/xmloff/source/draw/XMLImageMapContext.cxx +++ b/xmloff/source/draw/XMLImageMapContext.cxx @@ -123,7 +123,7 @@ public: void EndElement() override; - SvXMLImportContext *CreateChildContext( + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; @@ -204,7 +204,7 @@ void XMLImageMapObjectContext::EndElement() // else: not valid -> don't create and insert } -SvXMLImportContext* XMLImageMapObjectContext::CreateChildContext( +SvXMLImportContextRef XMLImageMapObjectContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) @@ -572,36 +572,36 @@ XMLImageMapContext::~XMLImageMapContext() { } -SvXMLImportContext *XMLImageMapContext::CreateChildContext( +SvXMLImportContextRef XMLImageMapContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( XML_NAMESPACE_DRAW == nPrefix ) { if ( IsXMLToken(rLocalName, XML_AREA_RECTANGLE) ) { - pContext = new XMLImageMapRectangleContext( + xContext = new XMLImageMapRectangleContext( GetImport(), nPrefix, rLocalName, xImageMap); } else if ( IsXMLToken(rLocalName, XML_AREA_POLYGON) ) { - pContext = new XMLImageMapPolygonContext( + xContext = new XMLImageMapPolygonContext( GetImport(), nPrefix, rLocalName, xImageMap); } else if ( IsXMLToken(rLocalName, XML_AREA_CIRCLE) ) { - pContext = new XMLImageMapCircleContext( + xContext = new XMLImageMapCircleContext( GetImport(), nPrefix, rLocalName, xImageMap); } } else - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } void XMLImageMapContext::EndElement() diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx index 909c0d69372d..81d91a03f5e1 100644 --- a/xmloff/source/draw/XMLNumberStyles.cxx +++ b/xmloff/source/draw/XMLNumberStyles.cxx @@ -484,7 +484,7 @@ private: bool mbTextual; bool mbDecimal02; OUString maText; - rtl::Reference< SvXMLImportContext > mxSlaveContext; + SvXMLImportContextRef mxSlaveContext; public: @@ -493,9 +493,9 @@ public: const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SdXMLNumberFormatImportContext* pParent, - SvXMLImportContext* pSlaveContext ); + const SvXMLImportContextRef& rSlaveContext ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -507,11 +507,11 @@ public: }; -SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SdXMLNumberFormatImportContext* pParent, SvXMLImportContext* pSlaveContext ) +SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, SdXMLNumberFormatImportContext* pParent, const SvXMLImportContextRef& rSlaveContext ) : SvXMLImportContext(rImport, nPrfx, rLocalName), mpParent( pParent ), maNumberStyle( rLocalName ), - mxSlaveContext( pSlaveContext ) + mxSlaveContext( rSlaveContext ) { mbLong = false; mbTextual = false; @@ -544,7 +544,7 @@ SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext( SvXM } -SvXMLImportContext *SdXMLNumberFormatMemberImportContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLNumberFormatMemberImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) { @@ -705,7 +705,7 @@ void SdXMLNumberFormatImportContext::EndElement() } } -SvXMLImportContext * SdXMLNumberFormatImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLNumberFormatImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { return new SdXMLNumberFormatMemberImportContext( GetImport(), nPrefix, rLocalName, xAttrList, this, SvXMLNumFormatContext::CreateChildContext( nPrefix, rLocalName, xAttrList ) ); } diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 4ceca19a46ac..4d3807c5588b 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -97,7 +97,7 @@ void XMLReplacementImageContext::EndElement() m_xPropSet->setPropertyValue( m_sGraphicURL, makeAny( sHRef ) ); } -SvXMLImportContext *XMLReplacementImageContext::CreateChildContext( +SvXMLImportContextRef XMLReplacementImageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index ef0453f802dc..072a5c9a9c89 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx @@ -63,34 +63,34 @@ void XMLShapePropertySetContext::EndElement() SvXMLPropertySetContext::EndElement(); } -SvXMLImportContext *XMLShapePropertySetContext::CreateChildContext( +SvXMLImportContextRef XMLShapePropertySetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) ) { case CTF_NUMBERINGRULES: mnBulletIndex = rProp.mnIndex; - mxBulletStyle = pContext = new SvxXMLListStyleContext( GetImport(), nPrefix, rLocalName, xAttrList ); + mxBulletStyle = xContext = new SvxXMLListStyleContext( GetImport(), nPrefix, rLocalName, xAttrList ); break; case CTF_TABSTOP: - pContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix, + xContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); break; } - if( !pContext ) - pContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, xAttrList, rProperties, rProp ); - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 78ee86693777..80f31a57f9bc 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -86,12 +86,12 @@ void XMLShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, const OUString& } } -SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( +SvXMLImportContextRef XMLShapeStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -107,7 +107,7 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new XMLShapePropertySetContext( GetImport(), nPrefix, + xContext = new XMLShapePropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), @@ -115,11 +115,11 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( } } - if( !pContext ) - pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet > & rPropSet ) diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index dd5eb993b7e1..3bb5c93cc5a7 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -1233,7 +1233,7 @@ void AnimationNodeContext::init_node( const css::uno::Reference< css::xml::sax: } } -SvXMLImportContext * AnimationNodeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, +SvXMLImportContextRef AnimationNodeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { if( mxNode.is()) diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index fb520bb9e3b7..faa16a01b48e 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -387,7 +387,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; }; @@ -521,7 +521,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( SvXMLImport& rImport, s } } -SvXMLImportContext * XMLAnimationsEffectContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) +SvXMLImportContextRef XMLAnimationsEffectContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) { return new XMLAnimationsSoundContext( GetImport(), nPrefix, rLocalName, xAttrList, this ); } @@ -625,7 +625,7 @@ XMLAnimationsContext::XMLAnimationsContext( SvXMLImport& rImport, sal_uInt16 nPr { } -SvXMLImportContext * XMLAnimationsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, +SvXMLImportContextRef XMLAnimationsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { return new XMLAnimationsEffectContext( GetImport(), nPrefix, rLocalName, xAttrList, mpImpl ); diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx index 38c3460df817..6f0cfbd623b4 100644 --- a/xmloff/source/draw/eventimp.cxx +++ b/xmloff/source/draw/eventimp.cxx @@ -78,7 +78,7 @@ public: SdXMLEventContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList, const Reference< XShape >& rxShape ); - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) override; virtual void EndElement() override; bool mbValid; @@ -246,7 +246,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons mbValid = !sEventName.isEmpty(); } -SvXMLImportContext * SdXMLEventContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLEventContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) { return new XMLEventSoundContext( GetImport(), nPrefix, rLocalName, xAttrList, this ); } @@ -467,7 +467,7 @@ SdXMLEventsContext::~SdXMLEventsContext() { } -SvXMLImportContext * SdXMLEventsContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLocalName, +SvXMLImportContextRef SdXMLEventsContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { return new SdXMLEventContext( GetImport(), nPrfx, rLocalName, xAttrList, mxShape ); diff --git a/xmloff/source/draw/eventimp.hxx b/xmloff/source/draw/eventimp.hxx index cf2e2b04c3ad..5f7937a529b3 100644 --- a/xmloff/source/draw/eventimp.hxx +++ b/xmloff/source/draw/eventimp.hxx @@ -39,7 +39,7 @@ public: const css::uno::Reference< css::drawing::XShape >& rxShape ); virtual ~SdXMLEventsContext() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/layerimp.cxx b/xmloff/source/draw/layerimp.cxx index 4b4d516096a2..a3b3a50bf757 100644 --- a/xmloff/source/draw/layerimp.cxx +++ b/xmloff/source/draw/layerimp.cxx @@ -52,7 +52,7 @@ class SdXMLLayerContext : public SvXMLImportContext public: SdXMLLayerContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, const Reference< XNameAccess >& xLayerManager ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; virtual void EndElement() override; private: @@ -84,7 +84,7 @@ SdXMLLayerContext::SdXMLLayerContext( SvXMLImport& rImport, sal_uInt16 nPrefix, } -SvXMLImportContext * SdXMLLayerContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& ) +SvXMLImportContextRef SdXMLLayerContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& ) { if( (XML_NAMESPACE_SVG == nPrefix) && IsXMLToken(rLocalName, XML_TITLE) ) { @@ -150,7 +150,7 @@ SdXMLLayerSetContext::~SdXMLLayerSetContext() { } -SvXMLImportContext * SdXMLLayerSetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, +SvXMLImportContextRef SdXMLLayerSetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { return new SdXMLLayerContext( GetImport(), nPrefix, rLocalName, xAttrList, mxLayerManager ); diff --git a/xmloff/source/draw/layerimp.hxx b/xmloff/source/draw/layerimp.hxx index 882f5cb3dd55..031a4a1b44cc 100644 --- a/xmloff/source/draw/layerimp.hxx +++ b/xmloff/source/draw/layerimp.hxx @@ -38,7 +38,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList); virtual ~SdXMLLayerSetContext() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index b99022d4f471..a62f92ea21f6 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -62,7 +62,7 @@ public: const OUString& rLName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override; }; @@ -74,7 +74,7 @@ SdXMLBodyContext_Impl::SdXMLBodyContext_Impl( SdXMLImport& rImport, { } -SvXMLImportContext *SdXMLBodyContext_Impl::CreateChildContext( +SvXMLImportContextRef SdXMLBodyContext_Impl::CreateChildContext( sal_uInt16 /*nPrefix*/, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) @@ -96,7 +96,7 @@ public: const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList); - virtual SvXMLImportContext *CreateChildContext(sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext(sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList) override; }; @@ -110,26 +110,26 @@ SdXMLDocContext_Impl::SdXMLDocContext_Impl( { } -SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( +SvXMLImportContextRef SdXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = GetSdImport().GetDocElemTokenMap(); switch(rTokenMap.Get(nPrefix, rLocalName)) { case XML_TOK_DOC_FONTDECLS: { - pContext = GetSdImport().CreateFontDeclsContext( rLocalName, xAttrList ); + xContext = GetSdImport().CreateFontDeclsContext( rLocalName, xAttrList ); break; } case XML_TOK_DOC_SETTINGS: { if( GetImport().getImportFlags() & SvXMLImportFlags::SETTINGS ) { - pContext = new XMLDocumentSettingsContext(GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = new XMLDocumentSettingsContext(GetImport(), nPrefix, rLocalName, xAttrList ); } break; } @@ -138,7 +138,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( if( GetImport().getImportFlags() & SvXMLImportFlags::STYLES ) { // office:styles inside office:document - pContext = GetSdImport().CreateStylesContext(rLocalName, xAttrList); + xContext = GetSdImport().CreateStylesContext(rLocalName, xAttrList); } break; } @@ -147,7 +147,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( if( GetImport().getImportFlags() & SvXMLImportFlags::AUTOSTYLES ) { // office:automatic-styles inside office:document - pContext = GetSdImport().CreateAutoStylesContext(rLocalName, xAttrList); + xContext = GetSdImport().CreateAutoStylesContext(rLocalName, xAttrList); } break; } @@ -156,7 +156,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( if( GetImport().getImportFlags() & SvXMLImportFlags::MASTERSTYLES ) { // office:master-styles inside office:document - pContext = GetSdImport().CreateMasterStylesContext(rLocalName, xAttrList); + xContext = GetSdImport().CreateMasterStylesContext(rLocalName, xAttrList); } break; } @@ -170,7 +170,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( if( GetImport().getImportFlags() & SvXMLImportFlags::SCRIPTS ) { // office:script inside office:document - pContext = GetSdImport().CreateScriptContext( rLocalName ); + xContext = GetSdImport().CreateScriptContext( rLocalName ); } break; } @@ -179,7 +179,7 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( if( GetImport().getImportFlags() & SvXMLImportFlags::CONTENT ) { // office:body inside office:document - pContext = new SdXMLBodyContext_Impl(GetSdImport(),nPrefix, + xContext = new SdXMLBodyContext_Impl(GetSdImport(),nPrefix, rLocalName, xAttrList); } break; @@ -187,10 +187,10 @@ SvXMLImportContext *SdXMLDocContext_Impl::CreateChildContext( } // call parent when no own context was created - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } // context for flat file xml format @@ -203,7 +203,7 @@ public: const uno::Reference<xml::sax::XAttributeList>& i_xAttrList, const uno::Reference<document::XDocumentProperties>& i_xDocProps); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) override; }; @@ -219,7 +219,7 @@ SdXMLFlatDocContext_Impl::SdXMLFlatDocContext_Impl( SdXMLImport& i_rImport, { } -SvXMLImportContext *SdXMLFlatDocContext_Impl::CreateChildContext( +SvXMLImportContextRef SdXMLFlatDocContext_Impl::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) { diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index e7f9f61c5858..cc541900fcb9 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -628,19 +628,19 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateFrameChildContext( return pContext; } -SvXMLImportContext *XMLShapeImportHelper::CreateFrameChildContext( +SvXMLImportContextRef XMLShapeImportHelper::CreateFrameChildContext( SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = nullptr; + SvXMLImportContextRef xContext; SdXMLFrameShapeContext *pFrameContext = dynamic_cast<SdXMLFrameShapeContext*>( pThisContext ); - if( pFrameContext ) - pContext = pFrameContext->CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (pFrameContext) + xContext = pFrameContext->CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } /** this function is called whenever the implementation classes like to add this new diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index d6bcbeea619d..62ffb7098f5e 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -167,44 +167,44 @@ void SdXML3DSceneShapeContext::EndElement() } } -SvXMLImportContext* SdXML3DSceneShapeContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXML3DSceneShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; // #i68101# if( nPrefix == XML_NAMESPACE_SVG && (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) { - pContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); } else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) { - pContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); } // look for local light context first else if(nPrefix == XML_NAMESPACE_DR3D && IsXMLToken( rLocalName, XML_LIGHT ) ) { // dr3d:light inside dr3d:scene context - pContext = create3DLightContext( nPrefix, rLocalName, xAttrList ); + xContext = create3DLightContext( nPrefix, rLocalName, xAttrList ); } // call GroupChildContext function at common ShapeImport - if(!pContext) + if (!xContext) { - pContext = GetImport().GetShapeImport()->Create3DSceneChildContext( + xContext = GetImport().GetShapeImport()->Create3DSceneChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxChildren); - } + } // call parent when no own context was created - if(!pContext) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext( + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImporter ) diff --git a/xmloff/source/draw/ximp3dscene.hxx b/xmloff/source/draw/ximp3dscene.hxx index e99b3b5bdefa..63ab0bde3be4 100644 --- a/xmloff/source/draw/ximp3dscene.hxx +++ b/xmloff/source/draw/ximp3dscene.hxx @@ -48,7 +48,7 @@ public: virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList) override; virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx index be23c0725876..6556ab45aa53 100644 --- a/xmloff/source/draw/ximpbody.cxx +++ b/xmloff/source/draw/ximpbody.cxx @@ -211,11 +211,11 @@ SdXMLDrawPageContext::~SdXMLDrawPageContext() { } -SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = GetSdImport().GetDrawPageElemTokenMap(); // some special objects inside draw:page context @@ -236,7 +236,7 @@ SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix if(xNewShapes.is()) { // presentation:notes inside draw:page context - pContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); + xContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); } } } @@ -251,7 +251,7 @@ SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix uno::Reference< animations::XAnimationNodeSupplier > xNodeSupplier(GetLocalShapesContext(), uno::UNO_QUERY); if(xNodeSupplier.is()) { - pContext = new xmloff::AnimationNodeContext( xNodeSupplier->getAnimationNode(), GetSdImport(), nPrefix, rLocalName, xAttrList ); + xContext = new xmloff::AnimationNodeContext( xNodeSupplier->getAnimationNode(), GetSdImport(), nPrefix, rLocalName, xAttrList ); mbHadSMILNodes = true; } } @@ -260,10 +260,10 @@ SvXMLImportContext *SdXMLDrawPageContext::CreateChildContext( sal_uInt16 nPrefix } // call parent when no own context was created - if(!pContext) - pContext = SdXMLGenericPageContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SdXMLGenericPageContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } void SdXMLDrawPageContext::EndElement() @@ -290,12 +290,12 @@ SdXMLBodyContext::~SdXMLBodyContext() { } -SvXMLImportContext *SdXMLBodyContext::CreateChildContext( +SvXMLImportContextRef SdXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = GetSdImport().GetBodyElemTokenMap(); switch(rTokenMap.Get(nPrefix, rLocalName)) @@ -304,7 +304,7 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( case XML_TOK_BODY_FOOTER_DECL: case XML_TOK_BODY_DATE_TIME_DECL: { - pContext = new SdXMLHeaderFooterDeclContext( GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = new SdXMLHeaderFooterDeclContext( GetImport(), nPrefix, rLocalName, xAttrList ); break; } case XML_TOK_BODY_PAGE: @@ -340,7 +340,7 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( if(xNewShapes.is()) { // draw:page inside office:body context - pContext = new SdXMLDrawPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, + xContext = new SdXMLDrawPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); } } @@ -349,15 +349,15 @@ SvXMLImportContext *SdXMLBodyContext::CreateChildContext( } case XML_TOK_BODY_SETTINGS: { - pContext = new SdXMLShowsContext( GetSdImport(), nPrefix, rLocalName, xAttrList ); + xContext = new SdXMLShowsContext( GetSdImport(), nPrefix, rLocalName, xAttrList ); } } // call parent when no own context was created - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/draw/ximpbody.hxx b/xmloff/source/draw/ximpbody.hxx index 3616480b2fbc..801fa0e2eca8 100644 --- a/xmloff/source/draw/ximpbody.hxx +++ b/xmloff/source/draw/ximpbody.hxx @@ -43,7 +43,7 @@ public: css::uno::Reference< css::drawing::XShapes > const & rShapes); virtual ~SdXMLDrawPageContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void EndElement() override; @@ -61,7 +61,7 @@ public: SdXMLBodyContext( SdXMLImport& rImport, const OUString& rLocalName ); virtual ~SdXMLBodyContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 0a9dc7be5b43..5f6ae87e1358 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -1292,7 +1292,7 @@ void XMLEnhancedCustomShapeContext::EndElement() SdXMLCustomShapePropertyMerge( mrCustomShapeGeometry, maHandles, EASGet( EAS_Handles ) ); } -SvXMLImportContext* XMLEnhancedCustomShapeContext::CreateChildContext( sal_uInt16 nPrefix,const OUString& rLocalName, +SvXMLImportContextRef XMLEnhancedCustomShapeContext::CreateChildContext( sal_uInt16 nPrefix,const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList> & xAttrList ) { EnhancedCustomShapeTokenEnum aTokenEnum = EASGet( rLocalName ); diff --git a/xmloff/source/draw/ximpcustomshape.hxx b/xmloff/source/draw/ximpcustomshape.hxx index 74318059d52a..218f6e5267bb 100644 --- a/xmloff/source/draw/ximpcustomshape.hxx +++ b/xmloff/source/draw/ximpcustomshape.hxx @@ -58,7 +58,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList> & xAttrList ) override; }; diff --git a/xmloff/source/draw/ximpgrp.cxx b/xmloff/source/draw/ximpgrp.cxx index 555f446433b6..3e3284bdccbf 100644 --- a/xmloff/source/draw/ximpgrp.cxx +++ b/xmloff/source/draw/ximpgrp.cxx @@ -42,21 +42,21 @@ SdXMLGroupShapeContext::~SdXMLGroupShapeContext() { } -SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; // #i68101# if( nPrefix == XML_NAMESPACE_SVG && (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) { - pContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLDescriptionContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); } else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) { - pContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLEventsContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShape ); } else if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_GLUE_POINT ) ) { @@ -65,16 +65,16 @@ SvXMLImportContext* SdXMLGroupShapeContext::CreateChildContext( sal_uInt16 nPref else { // call GroupChildContext function at common ShapeImport - pContext = GetImport().GetShapeImport()->CreateGroupChildContext( + xContext = GetImport().GetShapeImport()->CreateGroupChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxChildren); } // call parent when no own context was created - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext( + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } void SdXMLGroupShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>&) diff --git a/xmloff/source/draw/ximpgrp.hxx b/xmloff/source/draw/ximpgrp.hxx index 665b1639aeb9..7c585ebf2342 100644 --- a/xmloff/source/draw/ximpgrp.hxx +++ b/xmloff/source/draw/ximpgrp.hxx @@ -41,7 +41,7 @@ public: bool bTemporaryShape); virtual ~SdXMLGroupShapeContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList) override; diff --git a/xmloff/source/draw/ximplink.cxx b/xmloff/source/draw/ximplink.cxx index 3bbe4271d89d..728dd0d35728 100644 --- a/xmloff/source/draw/ximplink.cxx +++ b/xmloff/source/draw/ximplink.cxx @@ -48,7 +48,7 @@ SdXMLShapeLinkContext::~SdXMLShapeLinkContext() { } -SvXMLImportContext* SdXMLShapeLinkContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLShapeLinkContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { diff --git a/xmloff/source/draw/ximplink.hxx b/xmloff/source/draw/ximplink.hxx index dac00fdbec70..c930f9b0f7e7 100644 --- a/xmloff/source/draw/ximplink.hxx +++ b/xmloff/source/draw/ximplink.hxx @@ -44,7 +44,7 @@ public: css::uno::Reference< css::drawing::XShapes > const & rShapes); virtual ~SdXMLShapeLinkContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index 35deee58ab56..cfa7bfdd3668 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -60,7 +60,7 @@ class DrawAnnotationContext : public SvXMLImportContext public: DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName,const Reference< xml::sax::XAttributeList>& xAttrList, const Reference< XAnnotationAccess >& xAnnotationAccess ); - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void EndElement() override; private: @@ -130,23 +130,23 @@ DrawAnnotationContext::DrawAnnotationContext( SvXMLImport& rImport, sal_uInt16 n } } -SvXMLImportContext * DrawAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef DrawAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { - SvXMLImportContext * pContext = nullptr; + SvXMLImportContextRef xContext; if( mxAnnotation.is() ) { if( XML_NAMESPACE_DC == nPrefix ) { if( IsXMLToken( rLocalName, XML_CREATOR ) ) - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maAuthorBuffer); + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maAuthorBuffer); else if( IsXMLToken( rLocalName, XML_DATE ) ) - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maDateBuffer); + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maDateBuffer); } else if( (XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix) && IsXMLToken(rLocalName, XML_SENDER_INITIALS) ) { - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maInitialsBuffer); + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, maInitialsBuffer); } else { @@ -166,16 +166,16 @@ SvXMLImportContext * DrawAnnotationContext::CreateChildContext( sal_uInt16 nPref // if we have a text cursor, lets try to import some text if( mxCursor.is() ) { - pContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList ); } } } // call parent for content - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void DrawAnnotationContext::EndElement() @@ -242,38 +242,38 @@ void SdXMLGenericPageContext::StartElement( const Reference< css::xml::sax::XAtt GetImport().GetFormImport()->startPage( Reference< drawing::XDrawPage >::query( mxShapes ) ); } -SvXMLImportContext* SdXMLGenericPageContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLGenericPageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if( nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_ANIMATIONS ) ) { - pContext = new XMLAnimationsContext( GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = new XMLAnimationsContext( GetImport(), nPrefix, rLocalName, xAttrList ); } else if( nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_FORMS ) ) { if( GetImport().IsFormsSupported() ) - pContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetImport(), nPrefix, rLocalName ); + xContext = xmloff::OFormLayerXMLImport::createOfficeFormsContext( GetImport(), nPrefix, rLocalName ); } else if( ((nPrefix == XML_NAMESPACE_OFFICE) || (nPrefix == XML_NAMESPACE_OFFICE_EXT)) && IsXMLToken( rLocalName, XML_ANNOTATION ) ) { if( mxAnnotationAccess.is() ) - pContext = new DrawAnnotationContext( GetImport(), nPrefix, rLocalName, xAttrList, mxAnnotationAccess ); + xContext = new DrawAnnotationContext( GetImport(), nPrefix, rLocalName, xAttrList, mxAnnotationAccess ); } else { // call GroupChildContext function at common ShapeImport - pContext = GetImport().GetShapeImport()->CreateGroupChildContext( + xContext = GetImport().GetShapeImport()->CreateGroupChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes); } // call parent when no own context was created - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } void SdXMLGenericPageContext::EndElement() diff --git a/xmloff/source/draw/ximppage.hxx b/xmloff/source/draw/ximppage.hxx index 938ad814c968..024d35284b62 100644 --- a/xmloff/source/draw/ximppage.hxx +++ b/xmloff/source/draw/ximppage.hxx @@ -67,7 +67,7 @@ public: virtual ~SdXMLGenericPageContext() override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void EndElement() override; diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 0cf5d26693fd..a267d57a56f6 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -166,21 +166,21 @@ SdXMLShapeContext::~SdXMLShapeContext() { } -SvXMLImportContext *SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, +SvXMLImportContextRef SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = nullptr; + SvXMLImportContextRef xContext; // #i68101# if( p_nPrefix == XML_NAMESPACE_SVG && (IsXMLToken( rLocalName, XML_TITLE ) || IsXMLToken( rLocalName, XML_DESC ) ) ) { - pContext = new SdXMLDescriptionContext( GetImport(), p_nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLDescriptionContext( GetImport(), p_nPrefix, rLocalName, xAttrList, mxShape ); } else if( p_nPrefix == XML_NAMESPACE_OFFICE && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) { - pContext = new SdXMLEventsContext( GetImport(), p_nPrefix, rLocalName, xAttrList, mxShape ); + xContext = new SdXMLEventsContext( GetImport(), p_nPrefix, rLocalName, xAttrList, mxShape ); } else if( p_nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_GLUE_POINT ) ) { @@ -233,17 +233,17 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, // if we have a text cursor, lets try to import some text if( mxCursor.is() ) { - pContext = GetImport().GetTextImport()->CreateTextChildContext( + xContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), p_nPrefix, rLocalName, xAttrList, ( mbTextBox ? XMLTextType::TextBox : XMLTextType::Shape ) ); } } // call parent for content - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext( p_nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( p_nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XAttributeList>& xAttrList ) @@ -2462,11 +2462,11 @@ void SdXMLGraphicObjectShapeContext::EndElement() SdXMLShapeContext::EndElement(); } -SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext( +SvXMLImportContextRef SdXMLGraphicObjectShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) @@ -2475,18 +2475,18 @@ SvXMLImportContext* SdXMLGraphicObjectShapeContext::CreateChildContext( { mxBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64(); if( mxBase64Stream.is() ) - pContext = new XMLBase64ImportContext( GetImport(), nPrefix, + xContext = new XMLBase64ImportContext( GetImport(), nPrefix, rLocalName, xAttrList, mxBase64Stream ); } } // delegate to parent class if no context could be created - if ( nullptr == pContext ) - pContext = SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, + if (!xContext) + xContext = SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } SdXMLGraphicObjectShapeContext::~SdXMLGraphicObjectShapeContext() @@ -2582,7 +2582,7 @@ void SdXMLChartShapeContext::Characters( const OUString& rChars ) mxChartContext->Characters( rChars ); } -SvXMLImportContext * SdXMLChartShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, +SvXMLImportContextRef SdXMLChartShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { if( mxChartContext.is() ) @@ -2758,27 +2758,27 @@ void SdXMLObjectShapeContext::processAttribute( sal_uInt16 nPrefix, const OUStri SdXMLShapeContext::processAttribute( nPrefix, rLocalName, rValue ); } -SvXMLImportContext* SdXMLObjectShapeContext::CreateChildContext( +SvXMLImportContextRef SdXMLObjectShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if((XML_NAMESPACE_OFFICE == nPrefix) && IsXMLToken(rLocalName, XML_BINARY_DATA)) { mxBase64Stream = GetImport().GetStreamForEmbeddedObjectURLFromBase64(); if( mxBase64Stream.is() ) - pContext = new XMLBase64ImportContext( GetImport(), nPrefix, + xContext = new XMLBase64ImportContext( GetImport(), nPrefix, rLocalName, xAttrList, mxBase64Stream ); } else if( ((XML_NAMESPACE_OFFICE == nPrefix) && IsXMLToken(rLocalName, XML_DOCUMENT)) || ((XML_NAMESPACE_MATH == nPrefix) && IsXMLToken(rLocalName, XML_MATH)) ) { - XMLEmbeddedObjectImportContext *pEContext = - new XMLEmbeddedObjectImportContext( GetImport(), nPrefix, - rLocalName, xAttrList ); - maCLSID = pEContext->GetFilterCLSID(); + rtl::Reference<XMLEmbeddedObjectImportContext> xEContext( + new XMLEmbeddedObjectImportContext(GetImport(), nPrefix, + rLocalName, xAttrList)); + maCLSID = xEContext->GetFilterCLSID(); if( !maCLSID.isEmpty() ) { uno::Reference< beans::XPropertySet > xPropSet(mxShape, uno::UNO_QUERY); @@ -2789,20 +2789,19 @@ SvXMLImportContext* SdXMLObjectShapeContext::CreateChildContext( uno::Reference< lang::XComponent > xComp; xPropSet->getPropertyValue("Model") >>= xComp; SAL_WARN_IF( !xComp.is(), "xmloff", "no xModel for own OLE format" ); - pEContext->SetComponent( xComp ); + xEContext->SetComponent(xComp); } } - pContext = pEContext; + xContext = xEContext.get(); } // delegate to parent class if no context could be created - if(!pContext) - pContext = SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SdXMLShapeContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } - SdXMLAppletShapeContext::SdXMLAppletShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, @@ -2910,7 +2909,7 @@ void SdXMLAppletShapeContext::EndElement() SdXMLShapeContext::EndElement(); } -SvXMLImportContext * SdXMLAppletShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLAppletShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { if( p_nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_PARAM ) ) { @@ -3180,7 +3179,7 @@ void SdXMLPluginShapeContext::EndElement() SdXMLShapeContext::EndElement(); } -SvXMLImportContext * SdXMLPluginShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLPluginShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { if( p_nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( rLocalName, XML_PARAM ) ) { @@ -3400,18 +3399,18 @@ OUString SdXMLFrameShapeContext::getGraphicURLFromImportContext(const SvXMLImpor return aRetval; } -SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext * pContext = nullptr; + SvXMLImportContextRef xContext; if( !mxImplContext.is() ) { SvXMLShapeContext* pShapeContext= GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList ); - pContext = pShapeContext; + xContext = pShapeContext; // propagate the hyperlink to child context if ( !msHyperlink.isEmpty() ) @@ -3430,11 +3429,11 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref } #endif - mxImplContext = pContext; + mxImplContext = xContext; mbSupportsReplacement = IsXMLToken(rLocalName, XML_OBJECT ) || IsXMLToken(rLocalName, XML_OBJECT_OLE); setSupportsMultipleContents(IsXMLToken(rLocalName, XML_IMAGE)); - if(getSupportsMultipleContents() && dynamic_cast< SdXMLGraphicObjectShapeContext* >(pContext)) + if(getSupportsMultipleContents() && dynamic_cast< SdXMLGraphicObjectShapeContext* >(xContext.get())) { addContent(*mxImplContext.get()); } @@ -3442,11 +3441,11 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref else if(getSupportsMultipleContents() && XML_NAMESPACE_DRAW == nPrefix && IsXMLToken(rLocalName, XML_IMAGE)) { // read another image - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + xContext = GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), nPrefix, rLocalName, xAttrList, mxShapes, mxAttrList); - mxImplContext = pContext; + mxImplContext = xContext; - if(dynamic_cast< SdXMLGraphicObjectShapeContext* >(pContext)) + if(dynamic_cast< SdXMLGraphicObjectShapeContext* >(xContext.get())) { addContent(*mxImplContext.get()); } @@ -3465,9 +3464,9 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref pSContext->getShape(), uno::UNO_QUERY ); if( xPropSet.is() ) { - pContext = new XMLReplacementImageContext( GetImport(), + xContext = new XMLReplacementImageContext( GetImport(), nPrefix, rLocalName, xAttrList, xPropSet ); - mxReplImplContext = pContext; + mxReplImplContext = xContext; } } } @@ -3484,7 +3483,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref mxImplContext = solveMultipleImages(); } SvXMLImportContext *pImplContext = mxImplContext.get(); - pContext = dynamic_cast<SdXMLShapeContext&>(*pImplContext).CreateChildContext( nPrefix, + xContext = dynamic_cast<SdXMLShapeContext&>(*pImplContext).CreateChildContext( nPrefix, rLocalName, xAttrList ); } else if ( (XML_NAMESPACE_DRAW == nPrefix) && IsXMLToken( rLocalName, XML_IMAGE_MAP ) ) @@ -3500,15 +3499,15 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref uno::Reference < beans::XPropertySet > xPropSet( pSContext->getShape(), uno::UNO_QUERY ); if (xPropSet.is()) { - pContext = new XMLImageMapContext(GetImport(), nPrefix, rLocalName, xPropSet); + xContext = new XMLImageMapContext(GetImport(), nPrefix, rLocalName, xPropSet); } } } // call parent for content - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void SdXMLFrameShapeContext::StartElement(const uno::Reference< xml::sax::XAttributeList>&) @@ -3823,28 +3822,27 @@ void SdXMLCustomShapeContext::EndElement() } } -SvXMLImportContext* SdXMLCustomShapeContext::CreateChildContext( +SvXMLImportContextRef SdXMLCustomShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( XML_NAMESPACE_DRAW == nPrefix ) { if ( IsXMLToken( rLocalName, XML_ENHANCED_GEOMETRY ) ) { uno::Reference< beans::XPropertySet > xPropSet( mxShape,uno::UNO_QUERY ); if ( xPropSet.is() ) - pContext = new XMLEnhancedCustomShapeContext( GetImport(), mxShape, nPrefix, rLocalName, maCustomShapeGeometry ); + xContext = new XMLEnhancedCustomShapeContext( GetImport(), mxShape, nPrefix, rLocalName, maCustomShapeGeometry ); } } // delegate to parent class if no context could be created - if ( nullptr == pContext ) - pContext = SdXMLShapeContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SdXMLShapeContext::CreateChildContext( nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } - SdXMLTableShapeContext::SdXMLTableShapeContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, css::uno::Reference< css::drawing::XShapes > const & rShapes ) : SdXMLShapeContext( rImport, nPrfx, rLocalName, xAttrList, rShapes, false ) { @@ -3985,7 +3983,7 @@ void SdXMLTableShapeContext::processAttribute( sal_uInt16 nPrefix, const OUStrin SdXMLShapeContext::processAttribute( nPrefix, rLocalName, rValue ); } -SvXMLImportContext* SdXMLTableShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLTableShapeContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { if( mxTableImportContext.is() && (nPrefix == XML_NAMESPACE_TABLE) ) return mxTableImportContext->CreateChildContext(nPrefix, rLocalName, xAttrList); diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx index 71dfad28d06c..f1dbfde62ce6 100644 --- a/xmloff/source/draw/ximpshap.hxx +++ b/xmloff/source/draw/ximpshap.hxx @@ -117,7 +117,7 @@ public: virtual void StartElement(const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -396,7 +396,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -420,7 +420,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; virtual void Characters( const OUString& rChars ) override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; @@ -445,7 +445,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -475,7 +475,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -504,7 +504,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -561,7 +561,7 @@ public: bool bTemporaryShape); virtual ~SdXMLFrameShapeContext() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -591,7 +591,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list @@ -613,7 +613,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; // this is called from the parent group for each unparsed attribute in the attribute list virtual void processAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ) override; diff --git a/xmloff/source/draw/ximpshow.cxx b/xmloff/source/draw/ximpshow.cxx index caed5664e6ef..d9e2a4e95651 100644 --- a/xmloff/source/draw/ximpshow.cxx +++ b/xmloff/source/draw/ximpshow.cxx @@ -184,7 +184,7 @@ SdXMLShowsContext::~SdXMLShowsContext() } } -SvXMLImportContext * SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) +SvXMLImportContextRef SdXMLShowsContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference< XAttributeList>& xAttrList ) { if( mpImpl && p_nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_SHOW ) ) { diff --git a/xmloff/source/draw/ximpshow.hxx b/xmloff/source/draw/ximpshow.hxx index af59f8eec008..3764b5922879 100644 --- a/xmloff/source/draw/ximpshow.hxx +++ b/xmloff/source/draw/ximpshow.hxx @@ -40,7 +40,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList); virtual ~SdXMLShowsContext() override; - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; }; diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 8a5751f7d526..5ceaffdadd07 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -65,7 +65,7 @@ public: const rtl::Reference < SvXMLImportPropertyMapper > &rMap ); using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, @@ -84,14 +84,14 @@ SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext( { } -SvXMLImportContext *SdXMLDrawingPagePropertySetContext::CreateChildContext( +SvXMLImportContextRef SdXMLDrawingPagePropertySetContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) ) { @@ -114,12 +114,12 @@ SvXMLImportContext *SdXMLDrawingPagePropertySetContext::CreateChildContext( } } - if( !pContext ) - pContext = SvXMLPropertySetContext::CreateChildContext( p_nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLPropertySetContext::CreateChildContext( p_nPrefix, rLocalName, xAttrList, rProperties, rProp ); - return pContext; + return xContext; } class SdXMLDrawingPageStyleContext : public XMLPropStyleContext @@ -134,7 +134,7 @@ public: SvXMLStylesContext& rStyles, sal_uInt16 nFamily = XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID); - SvXMLImportContext * CreateChildContext( + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -157,12 +157,12 @@ SdXMLDrawingPageStyleContext::SdXMLDrawingPageStyleContext( { } -SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext( +SvXMLImportContextRef SdXMLDrawingPageStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_DRAWING_PAGE_PROPERTIES ) ) @@ -170,17 +170,17 @@ SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext( rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new SdXMLDrawingPagePropertySetContext( GetImport(), nPrefix, + xContext = new SdXMLDrawingPagePropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, GetProperties(), xImpPrMap ); } - if( !pContext ) - pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void SdXMLDrawingPageStyleContext::Finish( bool bOverwrite ) @@ -395,28 +395,27 @@ SdXMLPageMasterContext::SdXMLPageMasterContext( } } -SvXMLImportContext *SdXMLPageMasterContext::CreateChildContext( +SvXMLImportContextRef SdXMLPageMasterContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( rLocalName, XML_PAGE_LAYOUT_PROPERTIES) ) { DBG_ASSERT(!mxPageMasterStyle.is(), "PageMasterStyle is set, there seem to be two of them (!)"); mxPageMasterStyle.set(new SdXMLPageMasterStyleContext(GetSdImport(), nPrefix, rLocalName, xAttrList)); - pContext = mxPageMasterStyle.get(); + xContext = mxPageMasterStyle.get(); } // call base class - if(!pContext) - pContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } - SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext( SdXMLImport& rImport, sal_uInt16 nPrfx, @@ -442,29 +441,29 @@ SdXMLPresentationPageLayoutContext::SdXMLPresentationPageLayoutContext( } } -SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext( +SvXMLImportContextRef SdXMLPresentationPageLayoutContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if(nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_PLACEHOLDER ) ) { - const rtl::Reference< SdXMLPresentationPlaceholderContext > xContext{ + const rtl::Reference< SdXMLPresentationPlaceholderContext > xLclContext{ new SdXMLPresentationPlaceholderContext(GetSdImport(), nPrefix, rLocalName, xAttrList)}; // presentation:placeholder inside style:presentation-page-layout context - pContext = xContext.get(); + xContext = xLclContext.get(); // remember SdXMLPresentationPlaceholderContext for later evaluation - maList.push_back( xContext ); + maList.push_back(xLclContext); } // call base class - if(!pContext) - pContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } void SdXMLPresentationPageLayoutContext::EndElement() @@ -843,12 +842,12 @@ void SdXMLMasterPageContext::EndElement() GetImport().GetShapeImport()->endPage(GetLocalShapesContext()); } -SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( +SvXMLImportContextRef SdXMLMasterPageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = GetSdImport().GetMasterPageElemTokenMap(); // some special objects inside style:masterpage context @@ -865,7 +864,7 @@ SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( XML_STYLE_FAMILY_SD_PRESENTATION_ID); // add this style to the outer StylesContext class for later processing - pContext = pNew; + xContext = pNew; GetSdImport().GetShapeImport()->GetStylesContext()->AddStyle(*pNew); } break; @@ -885,7 +884,7 @@ SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( if(xNewShapes.is()) { // presentation:notes inside master-page context - pContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); + xContext = new SdXMLNotesContext( GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes); } } } @@ -894,13 +893,12 @@ SvXMLImportContext* SdXMLMasterPageContext::CreateChildContext( } // call base class - if(!pContext) - pContext = SdXMLGenericPageContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SdXMLGenericPageContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } - SdXMLStylesContext::SdXMLStylesContext( SdXMLImport& rImport, const OUString& rLName, @@ -1414,12 +1412,12 @@ SdXMLMasterStylesContext::SdXMLMasterStylesContext( { } -SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( +SvXMLImportContextRef SdXMLMasterStylesContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if(nPrefix == XML_NAMESPACE_STYLE && IsXMLToken( rLocalName, XML_MASTER_PAGE ) ) @@ -1449,11 +1447,11 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( uno::Reference< drawing::XShapes > xNewShapes(xNewMasterPage, uno::UNO_QUERY); if(xNewShapes.is() && GetSdImport().GetShapeImport()->GetStylesContext()) { - const rtl::Reference<SdXMLMasterPageContext> xContext{ + const rtl::Reference<SdXMLMasterPageContext> xLclContext{ new SdXMLMasterPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, xNewShapes)}; - pContext = xContext.get(); - maMasterPageList.push_back(xContext); + xContext = xLclContext.get(); + maMasterPageList.push_back(xLclContext); } } } @@ -1467,21 +1465,21 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext( uno::Reference< drawing::XShapes > xHandoutPage( xHandoutSupp->getHandoutMasterPage(), uno::UNO_QUERY ); if(xHandoutPage.is() && GetSdImport().GetShapeImport()->GetStylesContext()) { - pContext = new SdXMLMasterPageContext(GetSdImport(), + xContext = new SdXMLMasterPageContext(GetSdImport(), nPrefix, rLocalName, xAttrList, xHandoutPage); } } } else if( (nPrefix == XML_NAMESPACE_DRAW )&& IsXMLToken( rLocalName, XML_LAYER_SET ) ) { - pContext = new SdXMLLayerSetContext( GetImport(), nPrefix, rLocalName, xAttrList ); + xContext = new SdXMLLayerSetContext( GetImport(), nPrefix, rLocalName, xAttrList ); } // call base class - if(!pContext) - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } SdXMLHeaderFooterDeclContext::SdXMLHeaderFooterDeclContext(SvXMLImport& rImport, diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index c33bcf092264..d70fc8cfca88 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.hxx @@ -82,7 +82,7 @@ public: const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -108,7 +108,7 @@ public: css::uno::Reference< css::drawing::XShapes > const & rShapes); virtual ~SdXMLMasterPageContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -163,7 +163,7 @@ public: const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; @@ -236,7 +236,7 @@ public: SdXMLImport& rImport, const OUString& rLName); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 322297d81672..66e436c37f11 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -160,7 +160,7 @@ namespace xmloff OPropertyImport::StartElement( _rxAttrList ); } - SvXMLImportContext* OElementImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OElementImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& _rxAttrList) { if( token::IsXMLToken(_rLocalName, token::XML_EVENT_LISTENERS) && (XML_NAMESPACE_OFFICE == _nPrefix)) @@ -1351,7 +1351,7 @@ namespace xmloff enableTrackAttributes(); } - SvXMLImportContext* OTextLikeImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OTextLikeImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& _rxAttrList ) { if ( ( XML_NAMESPACE_TEXT == _nPrefix ) && _rLocalName.equalsIgnoreAsciiCase("p") ) @@ -1536,7 +1536,7 @@ namespace xmloff enableTrackAttributes(); } - SvXMLImportContext* OListAndComboImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OListAndComboImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& _rxAttrList) { // is it the "option" sub tag of a listbox ? @@ -1818,7 +1818,7 @@ namespace xmloff ,m_rEventManager(_rEventManager) { } - SvXMLImportContext* OColumnWrapperImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OColumnWrapperImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >&) { OControlImport* pReturn = implCreateChildContext(_nPrefix, _rLocalName, OElementNameMap::getElementType(_rLocalName)); @@ -1896,7 +1896,7 @@ namespace xmloff enableTrackAttributes(); } - SvXMLImportContext* OFormImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OFormImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& _rxAttrList) { if( token::IsXMLToken(_rLocalName, token::XML_FORM) ) diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index 61ec30b228ea..cf81af025784 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -116,7 +116,7 @@ namespace xmloff // SvXMLImportContext overridables virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; virtual void EndElement() override; @@ -441,7 +441,7 @@ namespace xmloff // SvXMLImportContext overridables virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; virtual void EndElement() override; @@ -491,7 +491,7 @@ namespace xmloff // SvXMLImportContext overridables virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; virtual void EndElement() override; @@ -572,7 +572,7 @@ namespace xmloff } // SvXMLImportContext overridables - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) SAL_OVERRIDE; virtual void EndElement() SAL_OVERRIDE; @@ -627,7 +627,7 @@ namespace xmloff const css::uno::Reference< css::container::XNameContainer >& _rxParentContainer); // SvXMLImportContext overridables - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; virtual void StartElement( @@ -670,7 +670,7 @@ namespace xmloff protected: // SvXMLImportContext overridables - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; virtual void StartElement( @@ -707,7 +707,7 @@ namespace xmloff //= OContainerImport template <class BASE> - inline SvXMLImportContext* OContainerImport< BASE >::CreateChildContext( + inline SvXMLImportContextRef OContainerImport< BASE >::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) { diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 8e4f8f91bbb8..34b26f8090b0 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -48,7 +48,7 @@ namespace xmloff { } - SvXMLImportContext* OFormsRootImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, + SvXMLImportContextRef OFormsRootImport::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList>& xAttrList ) { SvXMLImportContext* pRet = nullptr; diff --git a/xmloff/source/forms/officeforms.hxx b/xmloff/source/forms/officeforms.hxx index 2279f3dc8a32..027f095b877c 100644 --- a/xmloff/source/forms/officeforms.hxx +++ b/xmloff/source/forms/officeforms.hxx @@ -42,7 +42,7 @@ namespace xmloff virtual ~OFormsRootImport() override; // SvXMLImportContext overridable - virtual SvXMLImportContext * CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList ) override; virtual void EndElement() override; diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx index 09d1ba7161be..9bced59ecdd0 100644 --- a/xmloff/source/forms/propertyimport.cxx +++ b/xmloff/source/forms/propertyimport.cxx @@ -257,7 +257,7 @@ OPropertyImport::OPropertyImport(OFormLayerXMLImport_Impl& _rImport, sal_uInt16 { } -SvXMLImportContext* OPropertyImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, +SvXMLImportContextRef OPropertyImport::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& _rxAttrList) { if( token::IsXMLToken( _rLocalName, token::XML_PROPERTIES) ) @@ -352,7 +352,7 @@ OPropertyElementsContext::OPropertyElementsContext(SvXMLImport& _rImport, sal_uI { } -SvXMLImportContext* OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, +SvXMLImportContextRef OPropertyElementsContext::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >&) { if( token::IsXMLToken( _rLocalName, token::XML_PROPERTY ) ) @@ -395,7 +395,7 @@ OSinglePropertyContext::OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 { } -SvXMLImportContext* OSinglePropertyContext::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, +SvXMLImportContextRef OSinglePropertyContext::CreateChildContext(sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >&) { OSL_FAIL(OStringBuffer("OSinglePropertyContext::CreateChildContext: unknown child element (\""). @@ -526,7 +526,7 @@ void OListPropertyContext::EndElement() m_xPropertyImporter->implPushBackGenericPropertyValue( aSequenceValue ); } -SvXMLImportContext* OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& /*_rxAttrList*/ ) +SvXMLImportContextRef OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const Reference< XAttributeList >& /*_rxAttrList*/ ) { if ( token::IsXMLToken( _rLocalName, token::XML_LIST_VALUE ) ) { diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index 70b1dd71ec84..9d497e01497b 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -95,7 +95,7 @@ namespace xmloff public: OPropertyImport(OFormLayerXMLImport_Impl& _rImport, sal_uInt16 _nPrefix, const OUString& _rName); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; @@ -164,7 +164,7 @@ namespace xmloff OPropertyElementsContext(SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rName, const OPropertyImportRef& _rPropertyImporter); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; @@ -186,7 +186,7 @@ namespace xmloff OSinglePropertyContext(SvXMLImport& _rImport, sal_uInt16 _nPrefix, const OUString& _rName, const OPropertyImportRef& _rPropertyImporter); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; @@ -211,7 +211,7 @@ namespace xmloff virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 _nPrefix, const OUString& _rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& _rxAttrList) override; }; diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index ca5f21e7349c..ba733bd73a20 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -46,7 +46,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList, const css::uno::Reference< css::xml::dom::XSAXDocumentBuilder2>& rDocBuilder); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; @@ -66,7 +66,7 @@ XMLDocumentBuilderContext::XMLDocumentBuilderContext(SvXMLImport& rImport, { } -SvXMLImportContext * +SvXMLImportContextRef XMLDocumentBuilderContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList>& rAttrs) @@ -178,7 +178,7 @@ SvXMLMetaDocumentContext::~SvXMLMetaDocumentContext() { } -SvXMLImportContext *SvXMLMetaDocumentContext::CreateChildContext( +SvXMLImportContextRef SvXMLMetaDocumentContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& rAttrs) { diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index 13410f4aaad8..080a954536aa 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -144,7 +144,7 @@ XMLVersionListContext::XMLVersionListContext( XMLVersionListImport& rImport, XMLVersionListContext::~XMLVersionListContext() {} -SvXMLImportContext *XMLVersionListContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLVersionListContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { diff --git a/xmloff/source/script/XMLEventsImportContext.cxx b/xmloff/source/script/XMLEventsImportContext.cxx index 07ffa2f048b0..3a6e988634b0 100644 --- a/xmloff/source/script/XMLEventsImportContext.cxx +++ b/xmloff/source/script/XMLEventsImportContext.cxx @@ -86,7 +86,7 @@ void XMLEventsImportContext::EndElement() // nothing to be done } -SvXMLImportContext* XMLEventsImportContext::CreateChildContext( +SvXMLImportContextRef XMLEventsImportContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/script/xmlbasici.cxx b/xmloff/source/script/xmlbasici.cxx index 8e884c9c211b..a9ab4dae7a64 100644 --- a/xmloff/source/script/xmlbasici.cxx +++ b/xmloff/source/script/xmlbasici.cxx @@ -45,7 +45,7 @@ XMLBasicImportContext::~XMLBasicImportContext() { } -SvXMLImportContext* XMLBasicImportContext::CreateChildContext( +SvXMLImportContextRef XMLBasicImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& ) { @@ -116,7 +116,7 @@ XMLBasicImportChildContext::~XMLBasicImportChildContext() { } -SvXMLImportContext* XMLBasicImportChildContext::CreateChildContext( +SvXMLImportContextRef XMLBasicImportChildContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& ) { diff --git a/xmloff/source/script/xmlbasici.hxx b/xmloff/source/script/xmlbasici.hxx index e74e8d737b59..ac85c18fc372 100644 --- a/xmloff/source/script/xmlbasici.hxx +++ b/xmloff/source/script/xmlbasici.hxx @@ -38,7 +38,7 @@ public: virtual ~XMLBasicImportContext() override; - virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& rxAttrList ) override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& rxAttrList ) override; @@ -61,7 +61,7 @@ public: virtual ~XMLBasicImportChildContext() override; - virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/script/xmlscripti.cxx b/xmloff/source/script/xmlscripti.cxx index 31bb0398c45a..4844fcb04da4 100644 --- a/xmloff/source/script/xmlscripti.cxx +++ b/xmloff/source/script/xmlscripti.cxx @@ -50,7 +50,7 @@ public: const css::uno::Reference< css::frame::XModel>& rxModel, const OUString& rLanguage ); - virtual SvXMLImportContext* CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; virtual void EndElement() override; @@ -65,11 +65,11 @@ XMLScriptChildContext::XMLScriptChildContext( SvXMLImport& rImport, sal_uInt16 n { } -SvXMLImportContext* XMLScriptChildContext::CreateChildContext( +SvXMLImportContextRef XMLScriptChildContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( m_xDocumentScripts.is() ) { // document supports embedding scripts/macros @@ -77,13 +77,13 @@ SvXMLImportContext* XMLScriptChildContext::CreateChildContext( aBasic += ":Basic"; if ( m_aLanguage == aBasic && nPrefix == XML_NAMESPACE_OOO && IsXMLToken( rLocalName, XML_LIBRARIES ) ) - pContext = new XMLBasicImportContext( GetImport(), nPrefix, rLocalName, m_xModel ); + xContext = new XMLBasicImportContext( GetImport(), nPrefix, rLocalName, m_xModel ); } - if ( !pContext ) - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLScriptChildContext::EndElement() @@ -103,18 +103,18 @@ XMLScriptContext::~XMLScriptContext() { } -SvXMLImportContext* XMLScriptContext::CreateChildContext( +SvXMLImportContextRef XMLScriptContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( nPrefix == XML_NAMESPACE_OFFICE ) { if ( IsXMLToken( rLName, XML_EVENT_LISTENERS ) ) { Reference< XEventsSupplier> xSupplier( GetImport().GetModel(), UNO_QUERY ); - pContext = new XMLEventsImportContext( GetImport(), nPrefix, rLName, xSupplier ); + xContext = new XMLEventsImportContext( GetImport(), nPrefix, rLName, xSupplier ); } else if ( IsXMLToken( rLName, XML_SCRIPT ) ) { @@ -133,16 +133,16 @@ SvXMLImportContext* XMLScriptContext::CreateChildContext( aMedDescr[nNewLen-1].Value <<= true; m_xModel->attachResource( m_xModel->getURL(), aMedDescr ); - pContext = new XMLScriptChildContext( GetImport(), nPrefix, rLName, m_xModel, aLanguage ); + xContext = new XMLScriptChildContext( GetImport(), nPrefix, rLName, m_xModel, aLanguage ); } } } } - if ( !pContext ) - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLName, xAttrList); + if (!xContext) + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLName, xAttrList); - return pContext; + return xContext; } void XMLScriptContext::EndElement() diff --git a/xmloff/source/style/FillStyleContext.cxx b/xmloff/source/style/FillStyleContext.cxx index 1c02a68e77b0..13c20eed836a 100644 --- a/xmloff/source/style/FillStyleContext.cxx +++ b/xmloff/source/style/FillStyleContext.cxx @@ -133,7 +133,7 @@ XMLBitmapStyleContext::~XMLBitmapStyleContext() { } -SvXMLImportContext* XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) +SvXMLImportContextRef XMLBitmapStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) { SvXMLImportContext *pContext = nullptr; if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName, xmloff::token::XML_BINARY_DATA ) ) diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx index 7d0b90f5c39a..d351f619de68 100644 --- a/xmloff/source/style/FillStyleContext.hxx +++ b/xmloff/source/style/FillStyleContext.hxx @@ -77,7 +77,7 @@ public: const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ); virtual ~XMLBitmapStyleContext() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index 45309e0691f9..9689f649b8eb 100644 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -48,28 +48,28 @@ PageHeaderFooterContext::~PageHeaderFooterContext() { } -SvXMLImportContext *PageHeaderFooterContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef PageHeaderFooterContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLName, XML_HEADER_FOOTER_PROPERTIES ) ) { PageContextType aType = Header; if (!bHeader) aType = Footer; - pContext = new PagePropertySetContext( GetImport(), nPrefix, + xContext = new PagePropertySetContext( GetImport(), nPrefix, rLName, xAttrList, XML_TYPE_PROP_HEADER_FOOTER, rProperties, rMap, nStartIndex, nEndIndex, aType); } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLName ); - return pContext; + return xContext; } void PageHeaderFooterContext::EndElement() diff --git a/xmloff/source/style/PageHeaderFooterContext.hxx b/xmloff/source/style/PageHeaderFooterContext.hxx index b955fbbb1467..fb3e034a6416 100644 --- a/xmloff/source/style/PageHeaderFooterContext.hxx +++ b/xmloff/source/style/PageHeaderFooterContext.hxx @@ -41,7 +41,7 @@ public: virtual ~PageHeaderFooterContext() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override; diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index 7d79145893e3..a4dbacece337 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -73,7 +73,7 @@ PageStyleContext::~PageStyleContext() { } -SvXMLImportContext *PageStyleContext::CreateChildContext( +SvXMLImportContextRef PageStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx index a225f298dbd8..160ec5b2d8ff 100644 --- a/xmloff/source/style/PagePropertySetContext.cxx +++ b/xmloff/source/style/PagePropertySetContext.cxx @@ -47,7 +47,7 @@ PagePropertySetContext::~PagePropertySetContext() { } -SvXMLImportContext *PagePropertySetContext::CreateChildContext( +SvXMLImportContextRef PagePropertySetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList, @@ -73,7 +73,7 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( default: break; } - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex ) ) @@ -87,7 +87,7 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( nFil == mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex-1 ), "invalid property map!"); - pContext = + xContext = new XMLBackgroundImageContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, @@ -99,24 +99,24 @@ SvXMLImportContext *PagePropertySetContext::CreateChildContext( break; case CTF_PM_TEXTCOLUMNS: - pContext = new XMLTextColumnsContext( GetImport(), nPrefix, + xContext = new XMLTextColumnsContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, rProperties ); break; case CTF_PM_FTN_LINE_WEIGHT: - pContext = new XMLFootnoteSeparatorImport( + xContext = new XMLFootnoteSeparatorImport( GetImport(), nPrefix, rLocalName, rProperties, mxMapper->getPropertySetMapper(), rProp.mnIndex); break; } - if( !pContext ) - pContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, xAttrList, rProperties, rProp ); - return pContext; + return xContext; } diff --git a/xmloff/source/style/PagePropertySetContext.hxx b/xmloff/source/style/PagePropertySetContext.hxx index 3f82d6b99389..31b4d7341300 100644 --- a/xmloff/source/style/PagePropertySetContext.hxx +++ b/xmloff/source/style/PagePropertySetContext.hxx @@ -46,7 +46,7 @@ public: virtual ~PagePropertySetContext() override; using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx index e9981daed89e..dc5de6953e68 100644 --- a/xmloff/source/style/XMLBackgroundImageContext.cxx +++ b/xmloff/source/style/XMLBackgroundImageContext.cxx @@ -344,7 +344,7 @@ XMLBackgroundImageContext::~XMLBackgroundImageContext() { } -SvXMLImportContext *XMLBackgroundImageContext::CreateChildContext( +SvXMLImportContextRef XMLBackgroundImageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index f63d70769668..d2d08f0973b8 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -172,7 +172,7 @@ void XMLFontStyleContextFontFace::FillProperties( } } -SvXMLImportContext * XMLFontStyleContextFontFace::CreateChildContext( +SvXMLImportContextRef XMLFontStyleContextFontFace::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) @@ -217,7 +217,7 @@ XMLFontStyleContextFontFaceSrc::XMLFontStyleContextFontFaceSrc( SvXMLImport& rIm { } -SvXMLImportContext * XMLFontStyleContextFontFaceSrc::CreateChildContext( +SvXMLImportContextRef XMLFontStyleContextFontFaceSrc::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) @@ -237,7 +237,7 @@ XMLFontStyleContextFontFaceUri::XMLFontStyleContextFontFaceUri( SvXMLImport& rIm { } -SvXMLImportContext * XMLFontStyleContextFontFaceUri::CreateChildContext( +SvXMLImportContextRef XMLFontStyleContextFontFaceUri::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/style/XMLFontStylesContext_impl.hxx b/xmloff/source/style/XMLFontStylesContext_impl.hxx index ef387927681c..e1baa2dd1ed0 100644 --- a/xmloff/source/style/XMLFontStylesContext_impl.hxx +++ b/xmloff/source/style/XMLFontStylesContext_impl.hxx @@ -64,7 +64,7 @@ public: OUString familyName() const; - SvXMLImportContext * CreateChildContext( + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -81,7 +81,7 @@ public: const OUString& rLName, const XMLFontStyleContextFontFace& font ); - virtual SvXMLImportContext * CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -111,7 +111,7 @@ public: const OUString& rValue ) override; void SetFormat( const OUString& rFormat ); void EndElement() override; - SvXMLImportContext * CreateChildContext( + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 97a6c7861728..51b3578029af 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -172,12 +172,12 @@ const OldFillStyleDefinitionSet& XMLPropStyleContext::getFooterSet() return theFooterSet::get(); } -SvXMLImportContext *XMLPropStyleContext::CreateChildContext( +SvXMLImportContextRef XMLPropStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; sal_uInt32 nFamily = 0; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) @@ -211,18 +211,18 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( static_cast<SvXMLStylesContext *>(mxStyles.get())->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new SvXMLPropertySetContext( GetImport(), nPrefix, + xContext = new SvXMLPropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, maProperties, xImpPrMap ); } - if( !pContext ) - pContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLPropStyleContext::FillPropertySet( diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 4d5b7c93d7a3..895db57dfecf 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -140,7 +140,7 @@ public: SvXMLNumFormatContext& rParentContext, sal_uInt16 nNewType, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; @@ -161,7 +161,7 @@ public: SvXMLNumFmtElementContext& rParentContext, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; @@ -180,7 +180,7 @@ public: SvXMLNumFormatContext& rParentContext, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; @@ -199,7 +199,7 @@ public: SvXMLNumFormatContext& rParentContext, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override; virtual void Characters( const OUString& rChars ) override; @@ -617,7 +617,7 @@ SvXMLNumFmtMapContext::SvXMLNumFmtMapContext( SvXMLImport& rImport, } } -SvXMLImportContext* SvXMLNumFmtMapContext::CreateChildContext( +SvXMLImportContextRef SvXMLNumFmtMapContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& ) { @@ -661,7 +661,7 @@ SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport, } } -SvXMLImportContext* SvXMLNumFmtPropContext::CreateChildContext( +SvXMLImportContextRef SvXMLNumFmtPropContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& ) { @@ -708,7 +708,7 @@ SvXMLNumFmtEmbeddedTextContext::SvXMLNumFmtEmbeddedTextContext( SvXMLImport& rIm } } -SvXMLImportContext* SvXMLNumFmtEmbeddedTextContext::CreateChildContext( +SvXMLImportContextRef SvXMLNumFmtEmbeddedTextContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& ) { @@ -1073,7 +1073,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport, aNumInfo.aIntegerFractionDelimiter = " "; } -SvXMLImportContext* SvXMLNumFmtElementContext::CreateChildContext( +SvXMLImportContextRef SvXMLNumFmtElementContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { @@ -1529,7 +1529,7 @@ SvXMLNumFormatContext::~SvXMLNumFormatContext() { } -SvXMLImportContext* SvXMLNumFormatContext::CreateChildContext( +SvXMLImportContextRef SvXMLNumFormatContext::CreateChildContext( sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index eef7317cd281..aad99be527c1 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -79,7 +79,7 @@ public: const Reference< xml::sax::XAttributeList >& xAttrList, SvxXMLListLevelStyleContext_Impl& rLLevel ); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; }; @@ -214,7 +214,7 @@ public: const OUString& rLName, const Reference< xml::sax::XAttributeList > & xAttrList ); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -358,7 +358,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( } } -SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext( +SvXMLImportContextRef SvxXMLListLevelStyleContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -887,7 +887,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl( rListLevel.SetImageVertOrient( eVertOrient ); } -SvXMLImportContext* SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( +SvXMLImportContextRef SvxXMLListLevelStyleAttrContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -1014,12 +1014,12 @@ SvxXMLListStyleContext::SvxXMLListStyleContext( SvXMLImport& rImport, SvxXMLListStyleContext::~SvxXMLListStyleContext() {} -SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext( +SvXMLImportContextRef SvxXMLListStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_TEXT == nPrefix && ( bOutline @@ -1035,14 +1035,14 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext( pLevelStyles = o3tl::make_unique<SvxXMLListStyle_Impl>(); pLevelStyles->push_back( xLevelStyle ); - pContext = xLevelStyle.get(); + xContext = xLevelStyle.get(); } else { - pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } - return pContext; + return xContext; } void SvxXMLListStyleContext::FillUnoNumRule( diff --git a/xmloff/source/style/xmlprcon.cxx b/xmloff/source/style/xmlprcon.cxx index b96bec798b6c..a3e347da1292 100644 --- a/xmloff/source/style/xmlprcon.cxx +++ b/xmloff/source/style/xmlprcon.cxx @@ -50,7 +50,7 @@ SvXMLPropertySetContext::~SvXMLPropertySetContext() { } -SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( +SvXMLImportContextRef SvXMLPropertySetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) @@ -78,7 +78,7 @@ SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( CreateChildContext if the element matches an entry in the SvXMLImportItemMapper with the mid flag MID_FLAG_ELEMENT */ -SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( +SvXMLImportContextRef SvXMLPropertySetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >&, diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index d51efb52b36f..cf782521ebed 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -148,7 +148,7 @@ SvXMLStyleContext::~SvXMLStyleContext() { } -SvXMLImportContext *SvXMLStyleContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SvXMLStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & ) { @@ -755,7 +755,7 @@ SvXMLStylesContext::~SvXMLStylesContext() { } -SvXMLImportContext *SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef SvXMLStylesContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) { diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index b7efacba6027..5efaf5eb6b03 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -65,7 +65,7 @@ public: const OUString& rLName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -152,7 +152,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl( aTabStop.FillChar = cTextFillChar; } -SvXMLImportContext *SvxXMLTabStopContext_Impl::CreateChildContext( +SvXMLImportContextRef SvxXMLTabStopContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & ) @@ -170,7 +170,7 @@ SvxXMLTabStopImportContext::SvxXMLTabStopImportContext( { } -SvXMLImportContext *SvxXMLTabStopImportContext::CreateChildContext( +SvXMLImportContextRef SvxXMLTabStopImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 9042de6b1450..031af1e40188 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -70,7 +70,7 @@ class XMLProxyContext : public SvXMLImportContext public: XMLProxyContext( SvXMLImport& rImport, const SvXMLImportContextRef& xParent, sal_uInt16 nPrfx, const OUString& rLName ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; private: SvXMLImportContextRef mxParent; @@ -94,7 +94,7 @@ class XMLTableImportContext : public SvXMLImportContext public: XMLTableImportContext( const rtl::Reference< XMLTableImport >& xThis, sal_uInt16 nPrfx, const OUString& rLName, Reference< XColumnRowRange > const & xColumnRowRange ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; virtual void StartElement( const Reference< XAttributeList >& xAttrList ) override; @@ -102,9 +102,9 @@ public: void InitColumns(); - SvXMLImportContext * ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ); + SvXMLImportContextRef ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ); SvXMLImportContext * ImportRow( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ); - SvXMLImportContext * ImportCell( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ); + SvXMLImportContextRef ImportCell( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ); OUString GetDefaultCellStyleName() const; @@ -131,7 +131,7 @@ public: sal_uInt16 nPrfx, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; virtual void EndElement() override; @@ -152,7 +152,7 @@ class XMLTableTemplateContext : public SvXMLStyleContext public: XMLTableTemplateContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const Reference< XAttributeList >& xAttrList ); - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) override; virtual void StartElement( const Reference< XAttributeList >& xAttrList ) override; @@ -172,7 +172,7 @@ XMLProxyContext::XMLProxyContext( SvXMLImport& rImport, const SvXMLImportContext { } -SvXMLImportContext * XMLProxyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLProxyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { if( mxParent.is() ) return mxParent->CreateChildContext( nPrefix, rLocalName, xAttrList ); @@ -372,7 +372,7 @@ XMLTableImportContext::XMLTableImportContext( const rtl::Reference< XMLTableImpo { } -SvXMLImportContext * XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { if( mxColumns.is() && (mnCurrentRow == -1) ) try { @@ -534,7 +534,7 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const return new XMLProxyContext( GetImport(), xThis, nPrefix, rLocalName ); } -SvXMLImportContext * XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { mnCurrentColumn++; if( mxColumns.is() ) try @@ -567,7 +567,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, cons return SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); } -SvXMLImportContext *XMLTableImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLTableImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { if( nPrefix == XML_NAMESPACE_TABLE ) { @@ -696,7 +696,7 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, const Referenc } } -SvXMLImportContext * XMLCellImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLCellImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { // create text cursor on demand if( !mxCursor.is() ) @@ -791,7 +791,7 @@ void XMLTableTemplateContext::CreateAndInsert(bool bOverwrite) xTableImport->insertTabletemplate(msTemplateStyleName, bOverwrite); } -SvXMLImportContext * XMLTableTemplateContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) +SvXMLImportContextRef XMLTableTemplateContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList ) { if( nPrefix == XML_NAMESPACE_TABLE ) { diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx index dd2feab983a0..bcef9836f61b 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.cxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.cxx @@ -51,7 +51,7 @@ XMLAutoTextContainerEventImport::~XMLAutoTextContainerEventImport() { } -SvXMLImportContext* XMLAutoTextContainerEventImport::CreateChildContext( +SvXMLImportContextRef XMLAutoTextContainerEventImport::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & ) diff --git a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx index 18374a85483f..4ddfecd301ff 100644 --- a/xmloff/source/text/XMLAutoTextContainerEventImport.hxx +++ b/xmloff/source/text/XMLAutoTextContainerEventImport.hxx @@ -53,7 +53,7 @@ public: protected: - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx index 93bba391b0a9..c0cd5affc6f5 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.cxx +++ b/xmloff/source/text/XMLChangeElementImportContext.cxx @@ -44,17 +44,17 @@ XMLChangeElementImportContext::XMLChangeElementImportContext( { } -SvXMLImportContext* XMLChangeElementImportContext::CreateChildContext( +SvXMLImportContextRef XMLChangeElementImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( (XML_NAMESPACE_OFFICE == nPrefix) && IsXMLToken( rLocalName, XML_CHANGE_INFO) ) { - pContext = new XMLChangeInfoContext(GetImport(), nPrefix, rLocalName, + xContext = new XMLChangeInfoContext(GetImport(), nPrefix, rLocalName, rChangedRegion, GetLocalName()); } else @@ -62,21 +62,21 @@ SvXMLImportContext* XMLChangeElementImportContext::CreateChildContext( // import into redline -> create XText rChangedRegion.UseRedlineText(); - pContext = GetImport().GetTextImport()->CreateTextChildContext( + xContext = GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList, XMLTextType::ChangedRegion); - if (nullptr == pContext) + if (!xContext) { // no text element // illegal element content! TODO: discard this redline! // for the moment -> use default - pContext = SvXMLImportContext::CreateChildContext( + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); } } - return pContext; + return xContext; } void XMLChangeElementImportContext::StartElement( const Reference< XAttributeList >& ) diff --git a/xmloff/source/text/XMLChangeElementImportContext.hxx b/xmloff/source/text/XMLChangeElementImportContext.hxx index 3713a2dbfd3c..f1fe47ef2e99 100644 --- a/xmloff/source/text/XMLChangeElementImportContext.hxx +++ b/xmloff/source/text/XMLChangeElementImportContext.hxx @@ -68,7 +68,7 @@ public: /// context of enclosing <text:changed-region> element XMLChangedRegionImportContext& rParent); - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx index 48ec70531c21..f413cbc2f3aa 100644 --- a/xmloff/source/text/XMLChangeInfoContext.cxx +++ b/xmloff/source/text/XMLChangeInfoContext.cxx @@ -54,37 +54,37 @@ void XMLChangeInfoContext::StartElement(const Reference<XAttributeList> &) // no attributes } -SvXMLImportContext* XMLChangeInfoContext::CreateChildContext( +SvXMLImportContextRef XMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList >& xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_DC == nPrefix ) { if( IsXMLToken( rLocalName, XML_CREATOR ) ) - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, sAuthorBuffer); else if( IsXMLToken( rLocalName, XML_DATE ) ) - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, sDateTimeBuffer); } else if ( ( XML_NAMESPACE_TEXT == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) && IsXMLToken( rLocalName, XML_P ) ) { - pContext = new XMLStringBufferImportContext(GetImport(), nPrefix, + xContext = new XMLStringBufferImportContext(GetImport(), nPrefix, rLocalName, sCommentBuffer); } - if( !pContext ) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } void XMLChangeInfoContext::EndElement() diff --git a/xmloff/source/text/XMLChangeInfoContext.hxx b/xmloff/source/text/XMLChangeInfoContext.hxx index ef8864e99c03..1e0cf5b9daa3 100644 --- a/xmloff/source/text/XMLChangeInfoContext.hxx +++ b/xmloff/source/text/XMLChangeInfoContext.hxx @@ -63,7 +63,7 @@ public: virtual void StartElement( const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index a8b54740a5dd..29b118fcb08a 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -92,12 +92,12 @@ void XMLChangedRegionImportContext::StartElement( } } -SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( +SvXMLImportContextRef XMLChangedRegionImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if (XML_NAMESPACE_TEXT == nPrefix) { @@ -109,7 +109,7 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( IsXMLToken( rLocalName, XML_FORMAT_CHANGE ) ) { // create XMLChangeElementImportContext for all kinds of changes - pContext = new XMLChangeElementImportContext( + xContext = new XMLChangeElementImportContext( GetImport(), nPrefix, rLocalName, IsXMLToken( rLocalName, XML_DELETION ), *this); @@ -117,23 +117,23 @@ SvXMLImportContext* XMLChangedRegionImportContext::CreateChildContext( // else: it may be a text element, see below } - if (nullptr == pContext) + if (!xContext) { // illegal element content! TODO: discard the redlines // for the moment -> use text - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); // or default if text fail - if (nullptr == pContext) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext( + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); } } - return pContext; + return xContext; } void XMLChangedRegionImportContext::EndElement() diff --git a/xmloff/source/text/XMLChangedRegionImportContext.hxx b/xmloff/source/text/XMLChangedRegionImportContext.hxx index c82b6670e7c8..c82712c5b6f6 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.hxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.hxx @@ -63,7 +63,7 @@ public: virtual void StartElement( const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx index 192bbe85d53e..dea1526f3b90 100644 --- a/xmloff/source/text/XMLFootnoteBodyImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteBodyImportContext.cxx @@ -38,7 +38,7 @@ XMLFootnoteBodyImportContext::XMLFootnoteBodyImportContext( { } -SvXMLImportContext* XMLFootnoteBodyImportContext::CreateChildContext( +SvXMLImportContextRef XMLFootnoteBodyImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLFootnoteBodyImportContext.hxx b/xmloff/source/text/XMLFootnoteBodyImportContext.hxx index 0d800b61f1ef..56fb359bb244 100644 --- a/xmloff/source/text/XMLFootnoteBodyImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteBodyImportContext.hxx @@ -45,7 +45,7 @@ public: protected: - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx index 667660a92df2..d4b885853e3e 100644 --- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx @@ -277,12 +277,12 @@ void XMLFootnoteConfigurationImportContext::StartElement( } } -SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( +SvXMLImportContextRef XMLFootnoteConfigurationImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if (!bIsEndnote) { @@ -291,14 +291,14 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( if ( IsXMLToken( rLocalName, XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD ) ) { - pContext = new XMLFootnoteConfigHelper(GetImport(), + xContext = new XMLFootnoteConfigHelper(GetImport(), nPrefix, rLocalName, *this, false); } else if ( IsXMLToken( rLocalName, XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD ) ) { - pContext = new XMLFootnoteConfigHelper(GetImport(), + xContext = new XMLFootnoteConfigHelper(GetImport(), nPrefix, rLocalName, *this, true); } @@ -308,15 +308,15 @@ SvXMLImportContext *XMLFootnoteConfigurationImportContext::CreateChildContext( } // else: endnote -> default context - if (pContext == nullptr) + if (!xContext) { // default: delegate to super class - pContext = SvXMLStyleContext::CreateChildContext(nPrefix, + xContext = SvXMLStyleContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } // Rename method <CreateAndInsertLate(..)> to <Finish(..)> (#i40597#) diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index 78721b62f3b4..0da84c109b34 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.cxx @@ -167,13 +167,12 @@ void XMLFootnoteImportContext::EndElement() } } - -SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext( +SvXMLImportContextRef XMLFootnoteImportContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; SvXMLTokenMap aTokenMap(aFootnoteChildTokenMap); @@ -200,25 +199,25 @@ SvXMLImportContext *XMLFootnoteImportContext::CreateChildContext( } // ignore content: return default context - pContext = new SvXMLImportContext(GetImport(), + xContext = new SvXMLImportContext(GetImport(), p_nPrefix, rLocalName); break; } case XML_TOK_FTN_NOTE_BODY: // return footnote body - pContext = new XMLFootnoteBodyImportContext(GetImport(), + xContext = new XMLFootnoteBodyImportContext(GetImport(), p_nPrefix, rLocalName); break; default: // default: - pContext = SvXMLImportContext::CreateChildContext(p_nPrefix, + xContext = SvXMLImportContext::CreateChildContext(p_nPrefix, rLocalName, xAttrList); break; } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx b/xmloff/source/text/XMLFootnoteImportContext.hxx index ff4f718ce395..0a6d8ce40b82 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteImportContext.hxx @@ -69,7 +69,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx index 584c67627288..63055aef9d5a 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx @@ -200,7 +200,7 @@ void XMLIndexAlphabeticalSourceContext::EndElement() XMLIndexSourceBaseContext::EndElement(); } -SvXMLImportContext* XMLIndexAlphabeticalSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexAlphabeticalSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx index 062b0ba31bc8..f1b380acc619 100644 --- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx +++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.hxx @@ -71,7 +71,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index 7bd55721731d..497a3b6e7052 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx @@ -147,7 +147,7 @@ void XMLIndexBibliographyConfigurationContext::ProcessAttribute( } } -SvXMLImportContext *XMLIndexBibliographyConfigurationContext::CreateChildContext( +SvXMLImportContextRef XMLIndexBibliographyConfigurationContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx index bc726f42218a..bdd3d0ddde6e 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.cxx @@ -68,7 +68,7 @@ void XMLIndexBibliographySourceContext::EndElement() } -SvXMLImportContext* XMLIndexBibliographySourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexBibliographySourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx b/xmloff/source/text/XMLIndexBibliographySourceContext.hxx index 748bab2e6142..c2e6ff61ef1f 100644 --- a/xmloff/source/text/XMLIndexBibliographySourceContext.hxx +++ b/xmloff/source/text/XMLIndexBibliographySourceContext.hxx @@ -55,7 +55,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexBodyContext.cxx b/xmloff/source/text/XMLIndexBodyContext.cxx index 53b3e52f6545..df805eddbcc1 100644 --- a/xmloff/source/text/XMLIndexBodyContext.cxx +++ b/xmloff/source/text/XMLIndexBodyContext.cxx @@ -40,7 +40,7 @@ XMLIndexBodyContext::~XMLIndexBodyContext() { } -SvXMLImportContext* XMLIndexBodyContext::CreateChildContext( +SvXMLImportContextRef XMLIndexBodyContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) diff --git a/xmloff/source/text/XMLIndexBodyContext.hxx b/xmloff/source/text/XMLIndexBodyContext.hxx index 6b4212a50713..d7b00c59ae41 100644 --- a/xmloff/source/text/XMLIndexBodyContext.hxx +++ b/xmloff/source/text/XMLIndexBodyContext.hxx @@ -54,7 +54,7 @@ public: protected: - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx index b8e6a2f5dcd1..87fa6219b570 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.cxx @@ -50,7 +50,7 @@ XMLIndexIllustrationSourceContext::~XMLIndexIllustrationSourceContext() { } -SvXMLImportContext* XMLIndexIllustrationSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexIllustrationSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx b/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx index b924efedad09..8e7d4d38bb01 100644 --- a/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx +++ b/xmloff/source/text/XMLIndexIllustrationSourceContext.hxx @@ -51,7 +51,7 @@ public: protected: - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.cxx b/xmloff/source/text/XMLIndexObjectSourceContext.cxx index 1b9ff89a47e0..fbde8e4eed1e 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.cxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.cxx @@ -126,7 +126,7 @@ void XMLIndexObjectSourceContext::EndElement() XMLIndexSourceBaseContext::EndElement(); } -SvXMLImportContext* XMLIndexObjectSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexObjectSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexObjectSourceContext.hxx b/xmloff/source/text/XMLIndexObjectSourceContext.hxx index f37e66f74a4c..8c5139840eba 100644 --- a/xmloff/source/text/XMLIndexObjectSourceContext.hxx +++ b/xmloff/source/text/XMLIndexObjectSourceContext.hxx @@ -60,7 +60,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx index 3aa829e4d69d..b9f98671d256 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx @@ -215,25 +215,25 @@ void XMLIndexSourceBaseContext::EndElement() rIndexPropertySet->setPropertyValue("CreateFromChapter", css::uno::Any(bChapterIndex)); } -SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext( +SvXMLImportContextRef XMLIndexSourceBaseContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if (XML_NAMESPACE_TEXT == nPrefix) { if ( IsXMLToken( rLocalName, XML_INDEX_TITLE_TEMPLATE ) ) { - pContext = new XMLIndexTitleTemplateContext(GetImport(), + xContext = new XMLIndexTitleTemplateContext(GetImport(), rIndexPropertySet, nPrefix, rLocalName); } else if ( bUseLevelFormats && IsXMLToken( rLocalName, XML_INDEX_SOURCE_STYLES ) ) { - pContext = new XMLIndexTOCStylesContext(GetImport(), + xContext = new XMLIndexTOCStylesContext(GetImport(), rIndexPropertySet, nPrefix, rLocalName); } @@ -242,13 +242,13 @@ SvXMLImportContext* XMLIndexSourceBaseContext::CreateChildContext( // else: unknown namespace -> ignore // use default context - if (pContext == nullptr) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.hxx b/xmloff/source/text/XMLIndexSourceBaseContext.hxx index bbd827f00cc5..09973439c805 100644 --- a/xmloff/source/text/XMLIndexSourceBaseContext.hxx +++ b/xmloff/source/text/XMLIndexSourceBaseContext.hxx @@ -107,7 +107,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index 26621f72aaa1..afdb6158c6d3 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -273,12 +273,12 @@ void XMLIndexTOCContext::EndElement() } } -SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( +SvXMLImportContextRef XMLIndexTOCContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if (bValid) { @@ -286,12 +286,12 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( { if ( IsXMLToken( rLocalName, XML_INDEX_BODY ) ) { - pContext = new XMLIndexBodyContext(GetImport(), nPrefix, + xContext = new XMLIndexBodyContext(GetImport(), nPrefix, rLocalName); if ( !xBodyContextRef.is() || !static_cast<XMLIndexBodyContext*>(xBodyContextRef.get())->HasContent() ) { - xBodyContextRef = pContext; + xBodyContextRef = xContext; } } else if (IsXMLToken(rLocalName, aIndexSourceElementMap[eIndexType])) @@ -300,37 +300,37 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( switch (eIndexType) { case TEXT_INDEX_TOC: - pContext = new XMLIndexTOCSourceContext( + xContext = new XMLIndexTOCSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_OBJECT: - pContext = new XMLIndexObjectSourceContext( + xContext = new XMLIndexObjectSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_ALPHABETICAL: - pContext = new XMLIndexAlphabeticalSourceContext( + xContext = new XMLIndexAlphabeticalSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_USER: - pContext = new XMLIndexUserSourceContext( + xContext = new XMLIndexUserSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_BIBLIOGRAPHY: - pContext = new XMLIndexBibliographySourceContext( + xContext = new XMLIndexBibliographySourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_TABLE: - pContext = new XMLIndexTableSourceContext( + xContext = new XMLIndexTableSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; case TEXT_INDEX_ILLUSTRATION: - pContext = new XMLIndexIllustrationSourceContext( + xContext = new XMLIndexIllustrationSourceContext( GetImport(), nPrefix, rLocalName, xTOCPropertySet); break; @@ -346,13 +346,13 @@ SvXMLImportContext* XMLIndexTOCContext::CreateChildContext( // else: not valid -> ignore // default: ignore - if (pContext == nullptr) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLIndexTOCContext.hxx b/xmloff/source/text/XMLIndexTOCContext.hxx index beaf17bba10d..2238f8455d06 100644 --- a/xmloff/source/text/XMLIndexTOCContext.hxx +++ b/xmloff/source/text/XMLIndexTOCContext.hxx @@ -80,7 +80,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.cxx b/xmloff/source/text/XMLIndexTOCSourceContext.cxx index c95ff0dfbdf3..4bbff39e76d5 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.cxx @@ -135,8 +135,7 @@ void XMLIndexTOCSourceContext::EndElement() XMLIndexSourceBaseContext::EndElement(); } - -SvXMLImportContext* XMLIndexTOCSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexTOCSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexTOCSourceContext.hxx b/xmloff/source/text/XMLIndexTOCSourceContext.hxx index c6268af8a7a7..a36b4ce88345 100644 --- a/xmloff/source/text/XMLIndexTOCSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTOCSourceContext.hxx @@ -59,7 +59,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.cxx b/xmloff/source/text/XMLIndexTOCStylesContext.cxx index eaee15cd753c..4139ce7606c3 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.cxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.cxx @@ -107,7 +107,7 @@ void XMLIndexTOCStylesContext::EndElement() } } -SvXMLImportContext *XMLIndexTOCStylesContext::CreateChildContext( +SvXMLImportContextRef XMLIndexTOCStylesContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexTOCStylesContext.hxx b/xmloff/source/text/XMLIndexTOCStylesContext.hxx index 347875d97d64..ecd002872471 100644 --- a/xmloff/source/text/XMLIndexTOCStylesContext.hxx +++ b/xmloff/source/text/XMLIndexTOCStylesContext.hxx @@ -69,7 +69,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index cb44feb858e8..af68096dea66 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx @@ -115,7 +115,6 @@ void XMLIndexTableSourceContext::ProcessAttribute( } } - void XMLIndexTableSourceContext::EndElement() { rIndexPropertySet->setPropertyValue("CreateFromLabels", css::uno::Any(bUseCaption)); @@ -133,8 +132,7 @@ void XMLIndexTableSourceContext::EndElement() XMLIndexSourceBaseContext::EndElement(); } - -SvXMLImportContext* XMLIndexTableSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexTableSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexTableSourceContext.hxx b/xmloff/source/text/XMLIndexTableSourceContext.hxx index a61dc4d4ab7b..b80d29220b3a 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.hxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.hxx @@ -61,7 +61,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 1498c5be39ba..16f62f89a121 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -210,7 +210,7 @@ SvXMLEnumMapEntry<TemplateTokenType> const aTemplateTokenTypeMap[] = { XML_TOKEN_INVALID, (TemplateTokenType)0 } }; -SvXMLImportContext *XMLIndexTemplateContext::CreateChildContext( +SvXMLImportContextRef XMLIndexTemplateContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexTemplateContext.hxx b/xmloff/source/text/XMLIndexTemplateContext.hxx index 09e141105b41..03562ee91541 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.hxx +++ b/xmloff/source/text/XMLIndexTemplateContext.hxx @@ -121,7 +121,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx index c81dfeb1b605..62f23631b5db 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.cxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx @@ -129,7 +129,6 @@ void XMLIndexUserSourceContext::ProcessAttribute( } } - void XMLIndexUserSourceContext::EndElement() { rIndexPropertySet->setPropertyValue("CreateFromEmbeddedObjects", css::uno::Any(bUseObjects)); @@ -148,8 +147,7 @@ void XMLIndexUserSourceContext::EndElement() XMLIndexSourceBaseContext::EndElement(); } - -SvXMLImportContext* XMLIndexUserSourceContext::CreateChildContext( +SvXMLImportContextRef XMLIndexUserSourceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLIndexUserSourceContext.hxx b/xmloff/source/text/XMLIndexUserSourceContext.hxx index 1016ceef8f5a..9a39dae86ba2 100644 --- a/xmloff/source/text/XMLIndexUserSourceContext.hxx +++ b/xmloff/source/text/XMLIndexUserSourceContext.hxx @@ -63,7 +63,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLLineNumberingImportContext.cxx b/xmloff/source/text/XMLLineNumberingImportContext.cxx index e70cd6db2bd1..ace06330bebe 100644 --- a/xmloff/source/text/XMLLineNumberingImportContext.cxx +++ b/xmloff/source/text/XMLLineNumberingImportContext.cxx @@ -257,7 +257,7 @@ void XMLLineNumberingImportContext::CreateAndInsert(bool) } } -SvXMLImportContext* XMLLineNumberingImportContext::CreateChildContext( +SvXMLImportContextRef XMLLineNumberingImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 1b9ae2358cfa..50021e9159f3 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -324,7 +324,7 @@ void XMLSectionImportContext::EndElement() rHelper->RedlineAdjustStartNodeCursor(false); } -SvXMLImportContext* XMLSectionImportContext::CreateChildContext( +SvXMLImportContextRef XMLSectionImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) diff --git a/xmloff/source/text/XMLSectionImportContext.hxx b/xmloff/source/text/XMLSectionImportContext.hxx index ea7a5c2d09ad..f4e558036d76 100644 --- a/xmloff/source/text/XMLSectionImportContext.hxx +++ b/xmloff/source/text/XMLSectionImportContext.hxx @@ -74,7 +74,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx index 753cb43b73a8..b9ceba3b47e1 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.cxx @@ -153,7 +153,7 @@ void XMLSectionSourceDDEImportContext::EndElement() // nothing to be done! } -SvXMLImportContext* XMLSectionSourceDDEImportContext::CreateChildContext( +SvXMLImportContextRef XMLSectionSourceDDEImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & ) diff --git a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx b/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx index 756ff9fe8a63..e1b9b0e9565a 100644 --- a/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceDDEImportContext.hxx @@ -50,7 +50,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx index 78d4847a3dbb..7a3048bb846f 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.cxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx @@ -130,7 +130,7 @@ void XMLSectionSourceImportContext::EndElement() // this space intentionally left blank. } -SvXMLImportContext* XMLSectionSourceImportContext::CreateChildContext( +SvXMLImportContextRef XMLSectionSourceImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & ) diff --git a/xmloff/source/text/XMLSectionSourceImportContext.hxx b/xmloff/source/text/XMLSectionSourceImportContext.hxx index 7c577899dffe..f47e36235705 100644 --- a/xmloff/source/text/XMLSectionSourceImportContext.hxx +++ b/xmloff/source/text/XMLSectionSourceImportContext.hxx @@ -50,7 +50,7 @@ protected: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList ) override; diff --git a/xmloff/source/text/XMLStringBufferImportContext.cxx b/xmloff/source/text/XMLStringBufferImportContext.cxx index add109644693..09290ba125b7 100644 --- a/xmloff/source/text/XMLStringBufferImportContext.cxx +++ b/xmloff/source/text/XMLStringBufferImportContext.cxx @@ -42,7 +42,7 @@ XMLStringBufferImportContext::~XMLStringBufferImportContext() { } -SvXMLImportContext *XMLStringBufferImportContext::CreateChildContext( +SvXMLImportContextRef XMLStringBufferImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> &) diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 84821260e717..10544955ee30 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -283,7 +283,7 @@ XMLTextColumnsContext::XMLTextColumnsContext( } } -SvXMLImportContext *XMLTextColumnsContext::CreateChildContext( +SvXMLImportContextRef XMLTextColumnsContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 2c896bd12a87..9a843675371d 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -391,7 +391,7 @@ public: virtual void Characters( const OUString& rChars ) override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -1052,7 +1052,7 @@ void XMLTextFrameContext_Impl::EndElement() GetImport().GetTextImport()->endAppletOrPlugin( xPropSet, aParamMap); } -SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLTextFrameContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) @@ -1377,12 +1377,12 @@ void XMLTextFrameContext::EndElement() } } -SvXMLImportContext *XMLTextFrameContext::CreateChildContext( +SvXMLImportContextRef XMLTextFrameContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( !m_xImplContext.is() ) { @@ -1413,7 +1413,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_HasAutomaticStyleWithoutParentStyle ) { Reference < XShapes > xShapes; - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + xContext = GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), p_nPrefix, rLocalName, xAttrList, xShapes, m_xAttrList ); } else if( XML_TEXT_FRAME_PLUGIN == nFrameType ) @@ -1439,7 +1439,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( if( bMedia ) { Reference < XShapes > xShapes; - pContext = GetImport().GetShapeImport()->CreateFrameChildContext( + xContext = GetImport().GetShapeImport()->CreateFrameChildContext( GetImport(), p_nPrefix, rLocalName, xAttrList, xShapes, m_xAttrList ); } } @@ -1453,17 +1453,16 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( setSupportsMultipleContents(IsXMLToken(rLocalName, XML_IMAGE)); } - if( !pContext ) + if (!xContext) { - - pContext = new XMLTextFrameContext_Impl( GetImport(), p_nPrefix, + xContext = new XMLTextFrameContext_Impl( GetImport(), p_nPrefix, rLocalName, xAttrList, m_eDefaultAnchorType, nFrameType, m_xAttrList ); } - m_xImplContext = pContext; + m_xImplContext = xContext; if(getSupportsMultipleContents() && XML_TEXT_FRAME_GRAPHIC == nFrameType) { @@ -1475,11 +1474,11 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( else if(getSupportsMultipleContents() && XML_NAMESPACE_DRAW == p_nPrefix && IsXMLToken(rLocalName, XML_IMAGE)) { // read another image - pContext = new XMLTextFrameContext_Impl( + xContext = new XMLTextFrameContext_Impl( GetImport(), p_nPrefix, rLocalName, xAttrList, m_eDefaultAnchorType, XML_TEXT_FRAME_GRAPHIC, m_xAttrList, true); - m_xImplContext = pContext; + m_xImplContext = xContext; addContent(*m_xImplContext.get()); } else if( m_bSupportsReplacement && !m_xReplImplContext.is() && @@ -1490,9 +1489,9 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( Reference < XPropertySet > xPropSet; if( CreateIfNotThere( xPropSet ) ) { - pContext = new XMLReplacementImageContext( GetImport(), + xContext = new XMLReplacementImageContext( GetImport(), p_nPrefix, rLocalName, xAttrList, xPropSet ); - m_xReplImplContext = pContext; + m_xReplImplContext = xContext; } } else if( nullptr != dynamic_cast< const XMLTextFrameContext_Impl*>( m_xImplContext.get() )) @@ -1506,7 +1505,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( { if ( IsXMLToken( rLocalName, XML_DESC ) ) { - pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), + xContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), p_nPrefix, rLocalName, m_sTitle ); @@ -1520,7 +1519,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( { // tdf#103567 ensure props are set on surviving shape m_xImplContext = solveMultipleImages(); } - pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), + xContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), p_nPrefix, rLocalName, m_sTitle ); @@ -1531,7 +1530,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( { // tdf#103567 ensure props are set on surviving shape m_xImplContext = solveMultipleImages(); } - pContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), + xContext = new XMLTextFrameTitleOrDescContext_Impl( GetImport(), p_nPrefix, rLocalName, m_sDesc ); @@ -1548,7 +1547,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_xImplContext = solveMultipleImages(); } if( CreateIfNotThere( xPropSet ) ) - pContext = new XMLTextFrameContourContext_Impl( GetImport(), p_nPrefix, rLocalName, + xContext = new XMLTextFrameContourContext_Impl( GetImport(), p_nPrefix, rLocalName, xAttrList, xPropSet, false ); } else if( IsXMLToken( rLocalName, XML_CONTOUR_PATH ) ) @@ -1558,7 +1557,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_xImplContext = solveMultipleImages(); } if( CreateIfNotThere( xPropSet ) ) - pContext = new XMLTextFrameContourContext_Impl( GetImport(), p_nPrefix, rLocalName, + xContext = new XMLTextFrameContourContext_Impl( GetImport(), p_nPrefix, rLocalName, xAttrList, xPropSet, true ); } else if( IsXMLToken( rLocalName, XML_IMAGE_MAP ) ) @@ -1568,7 +1567,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( m_xImplContext = solveMultipleImages(); } if( CreateIfNotThere( xPropSet ) ) - pContext = new XMLImageMapContext( GetImport(), p_nPrefix, rLocalName, xPropSet ); + xContext = new XMLImageMapContext( GetImport(), p_nPrefix, rLocalName, xPropSet ); } } else if( (XML_NAMESPACE_OFFICE == p_nPrefix) && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) @@ -1586,7 +1585,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( if (xEventsSupplier.is()) { // OK, we have the events, so create the context - pContext = new XMLEventsImportContext(GetImport(), p_nPrefix, + xContext = new XMLEventsImportContext(GetImport(), p_nPrefix, rLocalName, xEventsSupplier); } } @@ -1600,19 +1599,19 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext( // note: no more draw:image can be added once we get here m_xImplContext = solveMultipleImages(); } - pContext = m_xImplContext->CreateChildContext( p_nPrefix, rLocalName, xAttrList ); + xContext = m_xImplContext->CreateChildContext( p_nPrefix, rLocalName, xAttrList ); } else { // the child is a drawing shape - pContext = XMLShapeImportHelper::CreateFrameChildContext( + xContext = XMLShapeImportHelper::CreateFrameChildContext( m_xImplContext.get(), p_nPrefix, rLocalName, xAttrList ); } - if( !pContext ) - pContext = new SvXMLImportContext( GetImport(), p_nPrefix, rLocalName ); + if (!xContext) + xContext = new SvXMLImportContext( GetImport(), p_nPrefix, rLocalName ); - return pContext; + return xContext; } void XMLTextFrameContext::SetHyperlink( const OUString& rHRef, diff --git a/xmloff/source/text/XMLTextFrameContext.hxx b/xmloff/source/text/XMLTextFrameContext.hxx index 22587c16dd4f..98c85de61592 100644 --- a/xmloff/source/text/XMLTextFrameContext.hxx +++ b/xmloff/source/text/XMLTextFrameContext.hxx @@ -74,7 +74,7 @@ public: virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx index 469d1b58776b..08f684d7f7cd 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx @@ -103,7 +103,7 @@ void XMLTextFrameHyperlinkContext::EndElement() { } -SvXMLImportContext *XMLTextFrameHyperlinkContext::CreateChildContext( +SvXMLImportContextRef XMLTextFrameHyperlinkContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx index c876c499f175..4efa170f8653 100644 --- a/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx +++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.hxx @@ -50,7 +50,7 @@ public: virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index dd63772e4374..498814bffc7b 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -101,7 +101,7 @@ XMLTextHeaderFooterContext::~XMLTextHeaderFooterContext() { } -SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext( +SvXMLImportContextRef XMLTextHeaderFooterContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx index 190840a3b7e9..6f90dee9a2ac 100644 --- a/xmloff/source/text/XMLTextListBlockContext.cxx +++ b/xmloff/source/text/XMLTextListBlockContext.cxx @@ -252,7 +252,7 @@ void XMLTextListBlockContext::EndElement() mrTxtImport.GetTextListHelper().SetListItem( nullptr ); } -SvXMLImportContext *XMLTextListBlockContext::CreateChildContext( +SvXMLImportContextRef XMLTextListBlockContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx index eb4655489f49..8af3b8d73f69 100644 --- a/xmloff/source/text/XMLTextListBlockContext.hxx +++ b/xmloff/source/text/XMLTextListBlockContext.hxx @@ -61,7 +61,7 @@ public: virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx index a7c2ad0418c8..e568348c6ded 100644 --- a/xmloff/source/text/XMLTextListItemContext.cxx +++ b/xmloff/source/text/XMLTextListItemContext.cxx @@ -128,7 +128,7 @@ void XMLTextListItemContext::EndElement() rTxtImport.GetTextListHelper().SetListItem( nullptr ); } -SvXMLImportContext *XMLTextListItemContext::CreateChildContext( +SvXMLImportContextRef XMLTextListItemContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) diff --git a/xmloff/source/text/XMLTextListItemContext.hxx b/xmloff/source/text/XMLTextListItemContext.hxx index dcf49f226c3a..5a88db902a3e 100644 --- a/xmloff/source/text/XMLTextListItemContext.hxx +++ b/xmloff/source/text/XMLTextListItemContext.hxx @@ -49,7 +49,7 @@ public: virtual void EndElement() override; - SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx index 30a2a78ad6de..4bb7c0232e60 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.cxx +++ b/xmloff/source/text/XMLTextMarkImportContext.cxx @@ -386,7 +386,7 @@ void XMLTextMarkImportContext::EndElement() } } -SvXMLImportContext *XMLTextMarkImportContext::CreateChildContext( sal_uInt16 nPrefix, +SvXMLImportContextRef XMLTextMarkImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& ) { diff --git a/xmloff/source/text/XMLTextMarkImportContext.hxx b/xmloff/source/text/XMLTextMarkImportContext.hxx index cc9bdf992330..8f68bb055d74 100644 --- a/xmloff/source/text/XMLTextMarkImportContext.hxx +++ b/xmloff/source/text/XMLTextMarkImportContext.hxx @@ -90,7 +90,7 @@ protected: const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx index b2feaccdeec1..97ae81d15a93 100644 --- a/xmloff/source/text/XMLTextMasterPageContext.cxx +++ b/xmloff/source/text/XMLTextMasterPageContext.cxx @@ -167,12 +167,12 @@ XMLTextMasterPageContext::~XMLTextMasterPageContext() { } -SvXMLImportContext *XMLTextMasterPageContext::CreateChildContext( +SvXMLImportContextRef XMLTextMasterPageContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; const SvXMLTokenMap& rTokenMap = GetImport().GetTextImport()->GetTextMasterPageElemTokenMap(); @@ -214,17 +214,17 @@ SvXMLImportContext *XMLTextMasterPageContext::CreateChildContext( if( bInsert && xStyle.is() ) { - pContext = CreateHeaderFooterContext( nPrefix, rLocalName, + xContext = CreateHeaderFooterContext( nPrefix, rLocalName, xAttrList, bFooter, bLeft, bFirst ); } else { - pContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, + xContext = SvXMLStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); } - return pContext; + return xContext; } SvXMLImportContext *XMLTextMasterPageContext::CreateHeaderFooterContext( diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx index 1dbe2f79c5f1..f25929e9dfaa 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.cxx +++ b/xmloff/source/text/XMLTextPropertySetContext.cxx @@ -49,25 +49,25 @@ XMLTextPropertySetContext::~XMLTextPropertySetContext() { } -SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( +SvXMLImportContextRef XMLTextPropertySetContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex ) ) { case CTF_TABSTOP: - pContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix, + xContext = new SvxXMLTabStopImportContext( GetImport(), nPrefix, rLocalName, rProp, rProperties ); break; case CTF_TEXTCOLUMNS: - pContext = new XMLTextColumnsContext( GetImport(), nPrefix, + xContext = new XMLTextColumnsContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, rProperties ); break; @@ -85,7 +85,7 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( rProp.mnIndex-2, rProperties ); rDropCapTextStyleName = pDCContext->GetStyleName(); - pContext = pDCContext; + xContext = pDCContext; } break; @@ -107,7 +107,7 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( rProp.mnIndex-3 ) ) ) nTranspIndex = rProp.mnIndex-3; - pContext = + xContext = new XMLBackgroundImageContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, @@ -120,19 +120,18 @@ SvXMLImportContext *XMLTextPropertySetContext::CreateChildContext( break; case CTF_SECTION_FOOTNOTE_END: case CTF_SECTION_ENDNOTE_END: - pContext = new XMLSectionFootnoteConfigImport( + xContext = new XMLSectionFootnoteConfigImport( GetImport(), nPrefix, rLocalName, rProperties, mxMapper->getPropertySetMapper()); break; } - if( !pContext ) - pContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = SvXMLPropertySetContext::CreateChildContext( nPrefix, rLocalName, xAttrList, rProperties, rProp ); - return pContext; + return xContext; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTextPropertySetContext.hxx b/xmloff/source/text/XMLTextPropertySetContext.hxx index 8a1ef702413a..a35b4b389a67 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.hxx +++ b/xmloff/source/text/XMLTextPropertySetContext.hxx @@ -42,7 +42,7 @@ public: virtual ~XMLTextPropertySetContext() override; using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 10c3add0ad9e..cd4392b4ad57 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -51,7 +51,7 @@ public: const rtl::Reference < SvXMLImportPropertyMapper > &rMap ); using SvXMLPropertySetContext::CreateChildContext; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProperties, @@ -70,20 +70,20 @@ XMLTextShapePropertySetContext_Impl::XMLTextShapePropertySetContext_Impl( { } -SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLTextShapePropertySetContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProperties, const XMLPropertyState& rProp ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; switch( mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex ) ) { case CTF_TEXTCOLUMNS: - pContext = new XMLTextColumnsContext( GetImport(), nPrefix, + xContext = new XMLTextColumnsContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, rProperties ); break; @@ -98,7 +98,7 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext( CTF_BACKGROUND_FILTER == mxMapper->getPropertySetMapper() ->GetEntryContextId( rProp.mnIndex-1 ), "invalid property map!"); - pContext = + xContext = new XMLBackgroundImageContext( GetImport(), nPrefix, rLocalName, xAttrList, rProp, @@ -110,11 +110,11 @@ SvXMLImportContext *XMLTextShapePropertySetContext_Impl::CreateChildContext( break; } - if( !pContext ) - pContext = XMLShapePropertySetContext::CreateChildContext( + if (!xContext) + xContext = XMLShapePropertySetContext::CreateChildContext( nPrefix, rLocalName, xAttrList, rProperties, rProp ); - return pContext; + return xContext; } void XMLTextShapeStyleContext::SetAttribute( sal_uInt16 nPrefixKey, @@ -149,12 +149,12 @@ XMLTextShapeStyleContext::~XMLTextShapeStyleContext() { } -SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( +SvXMLImportContextRef XMLTextShapeStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix ) { @@ -171,7 +171,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) { - pContext = new XMLTextShapePropertySetContext_Impl( + xContext = new XMLTextShapePropertySetContext_Impl( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), xImpPrMap ); } @@ -182,16 +182,16 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( { // create and remember events import context // (for delayed processing of events) - pContext = new XMLEventsImportContext( GetImport(), nPrefix, + xContext = new XMLEventsImportContext( GetImport(), nPrefix, rLocalName); - xEventContext = pContext; + xEventContext = xContext; } - if( !pContext ) - pContext = XMLShapeStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLShapeStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLTextShapeStyleContext::CreateAndInsert( bool bOverwrite ) diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.cxx b/xmloff/source/text/XMLTrackedChangesImportContext.cxx index 6ff0c4f78ca8..f554b9e9b5b3 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.cxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.cxx @@ -76,27 +76,27 @@ void XMLTrackedChangesImportContext::StartElement( } -SvXMLImportContext* XMLTrackedChangesImportContext::CreateChildContext( +SvXMLImportContextRef XMLTrackedChangesImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( (XML_NAMESPACE_TEXT == nPrefix) && IsXMLToken( rLocalName, XML_CHANGED_REGION ) ) { - pContext = new XMLChangedRegionImportContext(GetImport(), + xContext = new XMLChangedRegionImportContext(GetImport(), nPrefix, rLocalName); } - if (nullptr == pContext) + if (!xContext) { - pContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/XMLTrackedChangesImportContext.hxx b/xmloff/source/text/XMLTrackedChangesImportContext.hxx index eb0562c6be76..3abaa438b2e8 100644 --- a/xmloff/source/text/XMLTrackedChangesImportContext.hxx +++ b/xmloff/source/text/XMLTrackedChangesImportContext.hxx @@ -46,7 +46,7 @@ public: virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override; - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList> & xAttrList) override; diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index c105ee7b49a4..fe8855d70cb1 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -1204,7 +1204,7 @@ void XMLDatabaseFieldImportContext::ProcessAttribute( } } -SvXMLImportContext* XMLDatabaseFieldImportContext::CreateChildContext( +SvXMLImportContextRef XMLDatabaseFieldImportContext::CreateChildContext( sal_uInt16 p_nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) @@ -2423,30 +2423,29 @@ XMLMacroFieldImportContext::XMLMacroFieldImportContext( { } -SvXMLImportContext* XMLMacroFieldImportContext::CreateChildContext( +SvXMLImportContextRef XMLMacroFieldImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) { - SvXMLImportContext* pContext = nullptr; + SvXMLImportContextRef xContext; if ( (nPrefix == XML_NAMESPACE_OFFICE) && IsXMLToken( rLocalName, XML_EVENT_LISTENERS ) ) { // create events context and remember it! - pContext = new XMLEventsImportContext( + xContext = new XMLEventsImportContext( GetImport(), nPrefix, rLocalName ); - xEventContext = pContext; + xEventContext = xContext; bValid = true; } else - pContext = SvXMLImportContext::CreateChildContext( + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList); - return pContext; + return xContext; } - void XMLMacroFieldImportContext::ProcessAttribute( sal_uInt16 nAttrToken, const OUString& sAttrValue ) @@ -2691,7 +2690,7 @@ XMLDdeFieldDeclsImportContext::XMLDdeFieldDeclsImportContext( { } -SvXMLImportContext * XMLDdeFieldDeclsImportContext::CreateChildContext( +SvXMLImportContextRef XMLDdeFieldDeclsImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList> & xAttrList ) @@ -3301,7 +3300,7 @@ void XMLAnnotationImportContext::ProcessAttribute( aName = rValue; } -SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext( +SvXMLImportContextRef XMLAnnotationImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList >& xAttrList ) @@ -3639,7 +3638,7 @@ static bool lcl_ProcessLabel( const SvXMLImport& rImport, return bValid; } -SvXMLImportContext* XMLDropDownFieldImportContext::CreateChildContext( +SvXMLImportContextRef XMLDropDownFieldImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 5b32166d0963..3115788f66cd 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -314,7 +314,7 @@ public: virtual ~XMLImpSpanContext_Impl() override; - static SvXMLImportContext *CreateChildContext( + static SvXMLImportContextRef CreateChildContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList, @@ -322,7 +322,7 @@ public: bool& rIgnLeadSpace, sal_uInt8 nStarFontsConvFlags = 0 ); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -349,7 +349,7 @@ public: virtual ~XMLImpHyperlinkContext_Impl() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -432,7 +432,7 @@ XMLImpHyperlinkContext_Impl::~XMLImpHyperlinkContext_Impl() ->GetCursorAsRange()->getStart() ); } -SvXMLImportContext *XMLImpHyperlinkContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLImpHyperlinkContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -479,7 +479,7 @@ public: XMLHints_Impl& rHints, bool& rIgnLeadSpace ); - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -500,7 +500,7 @@ XMLImpRubyBaseContext_Impl::XMLImpRubyBaseContext_Impl( { } -SvXMLImportContext *XMLImpRubyBaseContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLImpRubyBaseContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -542,7 +542,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) override; @@ -645,33 +645,33 @@ void XMLImpRubyContext_Impl::EndElement() m_sStyleName, m_sTextStyleName, m_sText ); } -SvXMLImportContext *XMLImpRubyContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLImpRubyContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_TEXT == nPrefix ) { if( IsXMLToken( rLocalName, XML_RUBY_BASE ) ) - pContext = new XMLImpRubyBaseContext_Impl( GetImport(), nPrefix, + xContext = new XMLImpRubyBaseContext_Impl( GetImport(), nPrefix, rLocalName, xAttrList, m_rHints, rIgnoreLeadingSpace ); else if( IsXMLToken( rLocalName, XML_RUBY_TEXT ) ) - pContext = new XMLImpRubyTextContext_Impl( GetImport(), nPrefix, + xContext = new XMLImpRubyTextContext_Impl( GetImport(), nPrefix, rLocalName, xAttrList, *this ); else - pContext = new SvXMLImportContext( + xContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } else - pContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, + xContext = SvXMLImportContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } /** for text:meta and text:meta-field @@ -702,7 +702,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const Reference< xml::sax::XAttributeList > & i_xAttrList) override; @@ -763,7 +763,7 @@ void XMLMetaImportContextBase::EndElement() InsertMeta(xInsertionCursor); } -SvXMLImportContext * XMLMetaImportContextBase::CreateChildContext( +SvXMLImportContextRef XMLMetaImportContextBase::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const Reference< xml::sax::XAttributeList > & i_xAttrList ) { @@ -1489,7 +1489,7 @@ XMLImpSpanContext_Impl::~XMLImpSpanContext_Impl() ->GetCursorAsRange()->getStart() ); } -SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList, @@ -1736,7 +1736,7 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( return pContext; } -SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext( +SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -2155,7 +2155,7 @@ void XMLParaContext::EndElement() m_xHints.reset(); } -SvXMLImportContext *XMLParaContext::CreateChildContext( +SvXMLImportContextRef XMLParaContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< xml::sax::XAttributeList > & xAttrList ) { @@ -2269,11 +2269,11 @@ void XMLNumberedParaContext::EndElement() } } -SvXMLImportContext *XMLNumberedParaContext::CreateChildContext( +SvXMLImportContextRef XMLNumberedParaContext::CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const Reference< xml::sax::XAttributeList > & i_xAttrList ) { - SvXMLImportContext *pContext( nullptr ); + SvXMLImportContextRef xContext; if ( XML_NAMESPACE_TEXT == i_nPrefix || XML_NAMESPACE_LO_EXT == i_nPrefix ) @@ -2281,18 +2281,17 @@ SvXMLImportContext *XMLNumberedParaContext::CreateChildContext( bool bIsHeader( IsXMLToken( i_rLocalName, XML_H ) ); if ( bIsHeader || IsXMLToken( i_rLocalName, XML_P ) ) { - pContext = new XMLParaContext( GetImport(), + xContext = new XMLParaContext( GetImport(), i_nPrefix, i_rLocalName, i_xAttrList, bIsHeader ); -// ignore text:number } else if (IsXMLToken( i_rLocalName, XML_NUMBER )) { } } - if (!pContext) { - pContext = SvXMLImportContext::CreateChildContext( + if (!xContext) { + xContext = SvXMLImportContext::CreateChildContext( i_nPrefix, i_rLocalName, i_xAttrList ); } - return pContext; + return xContext; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/text/txtparai.hxx b/xmloff/source/text/txtparai.hxx index e6d8f1b0c18a..163236c8e71c 100644 --- a/xmloff/source/text/txtparai.hxx +++ b/xmloff/source/text/txtparai.hxx @@ -65,7 +65,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; @@ -96,7 +96,7 @@ public: virtual void EndElement() override; - virtual SvXMLImportContext *CreateChildContext( sal_uInt16 i_nPrefix, + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const css::uno::Reference< css::xml::sax::XAttributeList > & i_xAttrList ) override; diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index b03e0382c73f..5f0a9fb2231d 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -145,12 +145,12 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport, XMLTextStyleContext::~XMLTextStyleContext() {} -SvXMLImportContext *XMLTextStyleContext::CreateChildContext( +SvXMLImportContextRef XMLTextStyleContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference< XAttributeList > & xAttrList ) { - SvXMLImportContext *pContext = nullptr; + SvXMLImportContextRef xContext; if( XML_NAMESPACE_STYLE == nPrefix ) { @@ -170,7 +170,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext( rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) - pContext = new XMLTextPropertySetContext( GetImport(), nPrefix, + xContext = new XMLTextPropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), @@ -185,14 +185,14 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext( // (for delayed processing of events) m_xEventContext.set(new XMLEventsImportContext( GetImport(), nPrefix, rLocalName)); - pContext = m_xEventContext.get(); + xContext = m_xEventContext.get(); } - if( !pContext ) - pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, + if (!xContext) + xContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, xAttrList ); - return pContext; + return xContext; } void XMLTextStyleContext::CreateAndInsert( bool bOverwrite ) diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx index c150ad5857a6..98abf8df4bf7 100644 --- a/xmloff/source/text/txtvfldi.cxx +++ b/xmloff/source/text/txtvfldi.cxx @@ -656,12 +656,12 @@ XMLVariableDeclsImportContext::XMLVariableDeclsImportContext( { } -SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( +SvXMLImportContextRef XMLVariableDeclsImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<xml::sax::XAttributeList> & xAttrList ) { enum XMLTokenEnum eElementName; - SvXMLImportContext* pImportContext = nullptr; + SvXMLImportContextRef xImportContext; if( XML_NAMESPACE_TEXT == nPrefix ) { @@ -684,20 +684,20 @@ SvXMLImportContext* XMLVariableDeclsImportContext::CreateChildContext( if( IsXMLToken( rLocalName, eElementName ) ) { - pImportContext = new XMLVariableDeclImportContext( + xImportContext = new XMLVariableDeclImportContext( GetImport(), rImportHelper, nPrefix, rLocalName, xAttrList, eVarDeclsContextType); } } // if no context was created, use default context - if (nullptr == pImportContext) { - pImportContext = SvXMLImportContext::CreateChildContext(nPrefix, + if (!xImportContext) { + xImportContext = SvXMLImportContext::CreateChildContext(nPrefix, rLocalName, xAttrList); } - return pImportContext; + return xImportContext; } diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx index 22dd5747c895..3af25dc965e7 100644 --- a/xmloff/source/xforms/TokenContext.cxx +++ b/xmloff/source/xforms/TokenContext.cxx @@ -84,7 +84,7 @@ void TokenContext::StartElement( } } -SvXMLImportContext* TokenContext::CreateChildContext( +SvXMLImportContextRef TokenContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx index fe26c740488a..97b595232726 100644 --- a/xmloff/source/xforms/TokenContext.hxx +++ b/xmloff/source/xforms/TokenContext.hxx @@ -60,7 +60,7 @@ public: * create a warning for all others. Classes that wish to override * CreateChildContext may want to call the parent method for * handling of defaults. */ - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList>& xAttrList ) override; diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx index 62792c1926f6..8ba624b2cb5f 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.cxx +++ b/xmloff/source/xforms/XFormsInstanceContext.cxx @@ -65,7 +65,7 @@ XFormsInstanceContext::XFormsInstanceContext( SAL_WARN_IF( !mxModel.is(), "xmloff", "need model" ); } -SvXMLImportContext* XFormsInstanceContext::CreateChildContext( +SvXMLImportContextRef XFormsInstanceContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& ) diff --git a/xmloff/source/xforms/XFormsInstanceContext.hxx b/xmloff/source/xforms/XFormsInstanceContext.hxx index 1bcdd16883d7..df77d00a7e18 100644 --- a/xmloff/source/xforms/XFormsInstanceContext.hxx +++ b/xmloff/source/xforms/XFormsInstanceContext.hxx @@ -52,7 +52,7 @@ public: // arbitrary DOM elements. For the attributes, we use the // TokenContext mechanism. - virtual SvXMLImportContext* CreateChildContext( + virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const css::uno::Reference<css::xml::sax::XAttributeList >& xAttrList ) override; |