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

Noel (via logerrit) logerrit at kemper.freedesktop.org
Wed Feb 17 12:15:54 UTC 2021


 xmloff/source/core/xmlimp.cxx                        |    8 +++----
 xmloff/source/draw/XMLShapePropertySetContext.cxx    |    2 -
 xmloff/source/draw/animationexport.cxx               |    4 +--
 xmloff/source/draw/sdxmlexp.cxx                      |    4 +--
 xmloff/source/draw/shapeexport.cxx                   |    2 -
 xmloff/source/draw/shapeimport.cxx                   |   20 +++++++++----------
 xmloff/source/draw/ximp3dscene.cxx                   |    2 -
 xmloff/source/draw/ximpbody.cxx                      |    2 -
 xmloff/source/draw/ximpshap.cxx                      |    6 ++---
 xmloff/source/draw/ximpstyl.cxx                      |    6 ++---
 xmloff/source/forms/formcellbinding.cxx              |    6 ++---
 xmloff/source/forms/layerexport.cxx                  |    4 +--
 xmloff/source/meta/xmlmetai.cxx                      |    2 -
 xmloff/source/script/xmlbasicscript.cxx              |    2 -
 xmloff/source/style/xmlnumi.cxx                      |    2 -
 xmloff/source/style/xmltabi.cxx                      |    2 -
 xmloff/source/table/XMLTableExport.cxx               |    8 +++----
 xmloff/source/table/XMLTableImport.cxx               |   12 +++++------
 xmloff/source/text/XMLChangeElementImportContext.cxx |    2 -
 xmloff/source/text/XMLChangeInfoContext.cxx          |    2 -
 xmloff/source/text/XMLChangedRegionImportContext.cxx |    2 -
 xmloff/source/text/XMLFootnoteImportContext.cxx      |    2 -
 xmloff/source/text/XMLIndexSourceBaseContext.cxx     |    2 -
 xmloff/source/text/XMLIndexTOCContext.cxx            |    2 -
 xmloff/source/text/XMLTextColumnsContext.cxx         |    4 +--
 xmloff/source/text/XMLTextFrameContext.cxx           |   10 ++++-----
 xmloff/source/text/XMLTextMasterPageContext.cxx      |    2 -
 xmloff/source/text/XMLTextShapeStyleContext.cxx      |    2 -
 xmloff/source/text/txtfldi.cxx                       |    2 -
 xmloff/source/text/txtstyli.cxx                      |    2 -
 xmloff/source/transform/ChartPlotAreaOOoTContext.cxx |    2 -
 xmloff/source/transform/DeepTContext.cxx             |    2 -
 xmloff/source/transform/FormPropOOoTContext.cxx      |    2 -
 xmloff/source/transform/MergeElemTContext.cxx        |    4 +--
 xmloff/source/transform/MetaTContext.cxx             |    2 -
 xmloff/source/transform/StyleOASISTContext.cxx       |    2 -
 36 files changed, 71 insertions(+), 71 deletions(-)

New commits:
commit 7943752b9e85c44460f3663560b086b6fc26f91e
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Wed Feb 17 10:18:02 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Feb 17 13:15:11 2021 +0100

    loplugin:referencecasting in xmloff
    
    Change-Id: Ib601b7045d773ab612569a8fd00d76545dea13af
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111055
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 64dccb70abf5..33cca656fb1f 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -413,8 +413,8 @@ SvXMLImport::SvXMLImport(
     SAL_WARN_IF( !xContext.is(), "xmloff.core", "got no service manager" );
     InitCtor_();
     mxParser = xml::sax::FastParser::create( xContext );
-    setNamespaceHandler( maNamespaceHandler.get() );
-    setTokenHandler( xTokenHandler.get()  );
+    setNamespaceHandler( maNamespaceHandler );
+    setTokenHandler( xTokenHandler  );
     if ( !bIsNSMapsInitialized )
     {
         initializeNamespaceMaps();
@@ -768,7 +768,7 @@ void SAL_CALL SvXMLImport::startFastElement (sal_Int32 Element,
     maNamespaceAttrList->Clear();
 
     maNamespaceHandler->addNSDeclAttributes( maNamespaceAttrList );
-    processNSAttributes( maNamespaceAttrList.get() );
+    processNSAttributes( maNamespaceAttrList );
 
     SvXMLImportContextRef xContext;
     const bool bRootContext = maContexts.empty();
@@ -2197,7 +2197,7 @@ void SAL_CALL SvXMLLegacyToFastDocHandler::startElement( const OUString& rName,
             mxFastAttributes->add(nAttr, OUStringToOString(rAttrValue, RTL_TEXTENCODING_UTF8).getStr());
         }
     }
-    mrImport->startFastElement( mnElement, mxFastAttributes.get() );
+    mrImport->startFastElement( mnElement, mxFastAttributes );
     maDefaultNamespaces.push(nDefaultNamespace);
 }
 
diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx
index 456dc215b9db..45c8ace61fc5 100644
--- a/xmloff/source/draw/XMLShapePropertySetContext.cxx
+++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx
@@ -73,7 +73,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLShapePropertySetCon
     case CTF_NUMBERINGRULES:
         mnBulletIndex = rProp.mnIndex;
         mxBulletStyle = new SvxXMLListStyleContext( GetImport() );
-        return mxBulletStyle.get();
+        return mxBulletStyle;
     case CTF_TABSTOP:
         return new SvxXMLTabStopImportContext( GetImport(), nElement,
                                                    rProp,
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 0c750a3130a2..5ad5965dc5b9 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -567,7 +567,7 @@ void AnimationsExporterImpl::exportTransitionNode()
     if( !((nTransition != 0) || !sSoundURL.isEmpty() || bStopSound) )
         return;
 
-    Reference< XInterface > xSource( mxPageProps.get() );
+    Reference< XInterface > xSource( mxPageProps );
     Event aEvent;
     aEvent.Source <<= xSource;
     aEvent.Trigger = EventTrigger::BEGIN_EVENT;
@@ -659,7 +659,7 @@ void AnimationsExporterImpl::prepareTransitionNode()
         if( (nTransition != 0) || !sSoundURL.isEmpty() || bStopSound )
         {
             mbHasTransition = true;
-            Reference< XInterface > xInt( mxPageProps.get() );
+            Reference< XInterface > xInt( mxPageProps );
             mxExport->getInterfaceToIdentifierMapper().registerReference( xInt );
         }
     }
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index fad6a7e484e0..515644f953cd 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -398,7 +398,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
     mpSdPropHdlFactory = new XMLSdPropHdlFactory( GetModel(), *this );
 
     // construct PropertySetMapper
-    rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( mpSdPropHdlFactory.get(), true);
+    rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( mpSdPropHdlFactory, true);
 
     // get or create text paragraph export
     GetTextParagraphExport();
@@ -408,7 +408,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
     mpPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
 
     // construct PresPagePropsMapper
-    xMapper = new XMLPropertySetMapper(aXMLSDPresPageProps, mpSdPropHdlFactory.get(), true);
+    xMapper = new XMLPropertySetMapper(aXMLSDPresPageProps, mpSdPropHdlFactory, true);
 
     mpPresPagePropsMapper = new XMLPageExportPropertyMapper( xMapper, *this  );
 
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 7ce06f1edeb7..c8bbcbfa3ca2 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1345,7 +1345,7 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport()
     if( !mxShapeTableExport.is() )
     {
         rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ) );
-        rtl::Reference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get(), true ) );
+        rtl::Reference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory, true ) );
         mrExport.GetTextParagraphExport(); // get or create text paragraph export
         rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( new XMLShapeExportPropertyMapper( xMapper, mrExport ) );
         mxShapeTableExport = new XMLTableExport( mrExport, xPropertySetMapper, xFactory );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index a68105ea4b70..69f97973913f 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -132,7 +132,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
     mpSdPropHdlFactory = new XMLSdPropHdlFactory( rModel, rImporter );
 
     // construct PropertySetMapper
-    rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory.get(), false);
+    rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory, false);
     mpPropertySetMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
 
     if( pExtMapper )
@@ -146,7 +146,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
     mpPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaDefaultExtPropMapper(rImporter));
 
     // construct PresPagePropsMapper
-    xMapper = new XMLPropertySetMapper(aXMLSDPresPageProps, mpSdPropHdlFactory.get(), false);
+    xMapper = new XMLPropertySetMapper(aXMLSDPresPageProps, mpSdPropHdlFactory, false);
     mpPresPagePropsMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
 
     uno::Reference< lang::XServiceInfo > xInfo( rImporter.GetModel(), uno::UNO_QUERY );
@@ -384,46 +384,46 @@ SvXMLShapeContext* XMLShapeImportHelper::CreateFrameChildContext(
         case XML_ELEMENT(DRAW, XML_TEXT_BOX):
         {
             // text:text-box inside group context
-            pContext = new SdXMLTextBoxShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLTextBoxShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         case XML_ELEMENT(DRAW, XML_IMAGE):
         {
             // office:image inside group context
-            pContext = new SdXMLGraphicObjectShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLGraphicObjectShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         case XML_ELEMENT(DRAW, XML_OBJECT):
         case XML_ELEMENT(DRAW, XML_OBJECT_OLE):
         {
             // draw:object or draw:object_ole
-            pContext = new SdXMLObjectShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLObjectShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         case XML_ELEMENT(TABLE, XML_TABLE):
         {
             // draw:object or draw:object_ole
             if( rImport.IsTableShapeSupported() )
-                pContext = new SdXMLTableShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+                pContext = new SdXMLTableShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
 
         }
         case XML_ELEMENT(DRAW, XML_PLUGIN):
         {
             // draw:plugin
-            pContext = new SdXMLPluginShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLPluginShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         case XML_ELEMENT(DRAW, XML_FLOATING_FRAME):
         {
             // draw:floating-frame
-            pContext = new SdXMLFloatingFrameShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLFloatingFrameShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         case XML_ELEMENT(DRAW, XML_APPLET):
         {
             // draw:applet
-            pContext = new SdXMLAppletShapeContext( rImport, xCombinedAttrList.get(), rShapes );
+            pContext = new SdXMLAppletShapeContext( rImport, xCombinedAttrList, rShapes );
             break;
         }
         // add other shapes here...
@@ -937,7 +937,7 @@ const rtl::Reference< XMLTableImport >& XMLShapeImportHelper::GetShapeTableImpor
     if( !mxShapeTableImport.is() )
     {
         rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrImporter.GetModel(), mrImporter ) );
-        rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get(), false ) );
+        rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory, false ) );
         mxShapeTableImport = new XMLTableImport( mrImporter, xPropertySetMapper, xFactory );
     }
 
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index a925759ed4de..f6533a670bad 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -182,7 +182,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXML3DSceneShapeConte
             return XMLShapeImportHelper::Create3DSceneChildContext(
                 GetImport(), nElement, xAttrList, mxChildren);
     }
-    return xContext.get();
+    return xContext;
 }
 
 SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImporter )
diff --git a/xmloff/source/draw/ximpbody.cxx b/xmloff/source/draw/ximpbody.cxx
index f6dad065d9f6..d77ae15ed4e5 100644
--- a/xmloff/source/draw/ximpbody.cxx
+++ b/xmloff/source/draw/ximpbody.cxx
@@ -117,7 +117,7 @@ SdXMLDrawPageContext::SdXMLDrawPageContext( SdXMLImport& rImport,
 
     if (!sXmlId.isEmpty())
     {
-        uno::Reference< uno::XInterface > const xRef( rShapes.get() );
+        uno::Reference< uno::XInterface > const xRef( rShapes );
         GetImport().getInterfaceToIdentifierMapper().registerReference(
             sXmlId, xRef );
     }
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index b7be9280177c..1e2d11f6e850 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -237,7 +237,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLShapeContext::cre
     if (!xContext)
         XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 
-    return xContext.get();
+    return xContext;
 }
 
 void SdXMLShapeContext::addGluePoint( const uno::Reference< xml::sax::XFastAttributeList>& xAttrList )
@@ -2691,7 +2691,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLObjectShapeContex
                 xEContext->SetComponent(xComp);
             }
         }
-        return xEContext.get();
+        return xEContext;
     }
 
     // delegate to parent class if no context could be created
@@ -3391,7 +3391,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLFrameShapeContext
         }
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 void SdXMLFrameShapeContext::startFastElement (sal_Int32 /*nElement*/,
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 00d47c5c6f3a..e606c223b39d 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -376,7 +376,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPageMasterContext
     {
         DBG_ASSERT(!mxPageMasterStyle.is(), "PageMasterStyle is set, there seem to be two of them (!)");
         mxPageMasterStyle.set(new SdXMLPageMasterStyleContext(GetSdImport(), nElement, xAttrList));
-        return mxPageMasterStyle.get();
+        return mxPageMasterStyle;
     }
     else
         XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
@@ -414,7 +414,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLPresentationPageL
     else
         XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 
-    return xContext.get();
+    return xContext;
 }
 
 void SdXMLPresentationPageLayoutContext::endFastElement(sal_Int32 )
@@ -1338,7 +1338,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLMasterStylesConte
                         new SdXMLMasterPageContext(GetSdImport(),
                             nElement, xAttrList, xNewMasterPage)};
                     maMasterPageList.push_back(xLclContext);
-                    return xLclContext.get();
+                    return xLclContext;
                 }
             }
         }
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index f27891c033a7..21b09fc6b1cd 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -309,17 +309,17 @@ bool FormCellBindingHelper::isCellBindingAllowed( const Reference< XModel >& _rx
 
 bool FormCellBindingHelper::isCellBinding( const Reference< XValueBinding >& _rxBinding )
 {
-    return doesComponentSupport( _rxBinding.get(), SERVICE_CELLVALUEBINDING );
+    return doesComponentSupport( _rxBinding, SERVICE_CELLVALUEBINDING );
 }
 
 bool FormCellBindingHelper::isCellIntegerBinding( const Reference< XValueBinding >& _rxBinding )
 {
-    return doesComponentSupport( _rxBinding.get(), SERVICE_LISTINDEXCELLBINDING );
+    return doesComponentSupport( _rxBinding, SERVICE_LISTINDEXCELLBINDING );
 }
 
 bool FormCellBindingHelper::isCellRangeListSource( const Reference< XListEntrySource >& _rxSource )
 {
-    return doesComponentSupport( _rxSource.get(), SERVICE_CELLRANGELISTSOURCE );
+    return doesComponentSupport( _rxSource, SERVICE_CELLRANGELISTSOURCE );
 }
 
 bool FormCellBindingHelper::doesComponentSupport( const Reference< XInterface >& _rxComponent, const OUString& _rService )
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index d2beff0d3786..c587394d383f 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -77,8 +77,8 @@ namespace xmloff
 
         // add our style family to the export context's style pool
         m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
-        ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get(), true );
-        m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper.get() );
+        ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory, true );
+        m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper );
 
         // our style family
         m_rContext.GetAutoStylePool()->AddFamily(
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx
index cf61dba8fab7..a4d67dd92374 100644
--- a/xmloff/source/meta/xmlmetai.cxx
+++ b/xmloff/source/meta/xmlmetai.cxx
@@ -167,7 +167,7 @@ lcl_initGenerator(SvXMLImport & rImport,
         xPath->registerNS(GetXMLToken(XML_NP_META), GetXMLToken(XML_N_META));
 
         uno::Reference< xml::xpath::XXPathObject > const xObj(
-            xPath->eval(xDoc.get(), "string(/office:document-meta/office:meta/meta:generator)"),
+            xPath->eval(xDoc, "string(/office:document-meta/office:meta/meta:generator)"),
             uno::UNO_SET_THROW);
         OUString const value(xObj->getString());
         SvXMLMetaDocumentContext::setBuildId(value, rImport.getImportInfo());
diff --git a/xmloff/source/script/xmlbasicscript.cxx b/xmloff/source/script/xmlbasicscript.cxx
index d610e7e4d0f0..35a65ae13b64 100644
--- a/xmloff/source/script/xmlbasicscript.cxx
+++ b/xmloff/source/script/xmlbasicscript.cxx
@@ -79,7 +79,7 @@ BasicLibrariesElement::BasicLibrariesElement(SvXMLImport& rImport,
 {
     // try the XEmbeddedScripts interface
     Reference<document::XEmbeddedScripts> xDocumentScripts(rxModel, UNO_QUERY_THROW);
-    m_xLibContainer.set(xDocumentScripts->getBasicLibraries().get());
+    m_xLibContainer = xDocumentScripts->getBasicLibraries();
 
     if (!m_xLibContainer.is())
     {
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index 80f65a55f90b..778741501711 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -882,7 +882,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLListStyleContext
             pLevelStyles = std::make_unique<SvxXMLListStyle_Impl>();
         pLevelStyles->push_back( xLevelStyle );
 
-        return xLevelStyle.get();
+        return xLevelStyle;
     }
     XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
     return nullptr;
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index f93e7d86c9b1..601c3f5fd191 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -141,7 +141,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > SvxXMLTabStopImportCon
 
         mpTabStops->push_back( xTabStopContext );
 
-        return xTabStopContext.get();
+        return xTabStopContext;
     }
     else
         XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index a238bace6af5..203f25425816 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -190,11 +190,11 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
     {
         mxCellExportPropertySetMapper = xExportPropertyMapper;
         mxCellExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(rExp));
-        mxCellExportPropertySetMapper->ChainExportMapper(new SvXMLExportPropertyMapper(new XMLPropertySetMapper(getCellPropertiesMap(), xFactoryRef.get(), true)));
+        mxCellExportPropertySetMapper->ChainExportMapper(new SvXMLExportPropertyMapper(new XMLPropertySetMapper(getCellPropertiesMap(), xFactoryRef, true)));
     }
 
-    mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), true ) );
-    mxColumnExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), true ) );
+    mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef, true ) );
+    mxColumnExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef, true ) );
 
     mrExport.GetAutoStylePool()->AddFamily(XmlStyleFamily::TABLE_COLUMN,
         OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME),
@@ -496,7 +496,7 @@ void XMLTableExport::exportTableStyles()
         aStEx.set(new XMLStyleExport(mrExport, mrExport.GetAutoStylePool().get()));
     }
 
-    aStEx->exportStyleFamily(sCellStyleName, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), mxCellExportPropertySetMapper.get(), true, XmlStyleFamily::TABLE_CELL);
+    aStEx->exportStyleFamily(sCellStyleName, OUString(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME), mxCellExportPropertySetMapper, true, XmlStyleFamily::TABLE_CELL);
 
     exportTableTemplates();
 }
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index d6c2d549c3b5..99ed49941ff0 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -215,15 +215,15 @@ XMLTableImport::XMLTableImport( SvXMLImport& rImport, const rtl::Reference< XMLP
     }
     else
     {
-        mxCellImportPropertySetMapper = new SvXMLImportPropertyMapper( xCellPropertySetMapper.get(), rImport );
+        mxCellImportPropertySetMapper = new SvXMLImportPropertyMapper( xCellPropertySetMapper, rImport );
         mxCellImportPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(rImport));
-        mxCellImportPropertySetMapper->ChainImportMapper(new SvXMLImportPropertyMapper(new XMLPropertySetMapper(getCellPropertiesMap(), xFactoryRef.get(), true), rImport));
+        mxCellImportPropertySetMapper->ChainImportMapper(new SvXMLImportPropertyMapper(new XMLPropertySetMapper(getCellPropertiesMap(), xFactoryRef, true), rImport));
     }
 
-    rtl::Reference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), false ) );
+    rtl::Reference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef, false ) );
     mxRowImportPropertySetMapper = new SvXMLImportPropertyMapper( xRowMapper, rImport );
 
-    rtl::Reference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), false ) );
+    rtl::Reference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef, false ) );
     mxColumnImportPropertySetMapper = new SvXMLImportPropertyMapper( xColMapper, rImport );
 }
 
@@ -556,9 +556,9 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTableImportContext:
     {
         case XML_ELEMENT(TABLE, XML_TABLE_CELL):
         case XML_ELEMENT(TABLE, XML_COVERED_TABLE_CELL):
-            return ImportCell( nElement, xAttrList ).get();
+            return ImportCell( nElement, xAttrList );
         case XML_ELEMENT(TABLE, XML_TABLE_COLUMN):
-            return ImportColumn( xAttrList ).get();
+            return ImportColumn( xAttrList );
         case XML_ELEMENT(TABLE, XML_TABLE_ROW):
             return ImportRow( xAttrList );
         case XML_ELEMENT(TABLE, XML_TABLE_COLUMNS):
diff --git a/xmloff/source/text/XMLChangeElementImportContext.cxx b/xmloff/source/text/XMLChangeElementImportContext.cxx
index 4fc81a755eda..b00cdedb0375 100644
--- a/xmloff/source/text/XMLChangeElementImportContext.cxx
+++ b/xmloff/source/text/XMLChangeElementImportContext.cxx
@@ -72,7 +72,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLChangeElementImport
         }
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 void XMLChangeElementImportContext::startFastElement( sal_Int32, const Reference< css::xml::sax::XFastAttributeList >& )
diff --git a/xmloff/source/text/XMLChangeInfoContext.cxx b/xmloff/source/text/XMLChangeInfoContext.cxx
index c49dc1889832..9a005016fb51 100644
--- a/xmloff/source/text/XMLChangeInfoContext.cxx
+++ b/xmloff/source/text/XMLChangeInfoContext.cxx
@@ -69,7 +69,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLChangeInfoContext::
             XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 void XMLChangeInfoContext::endFastElement(sal_Int32 )
diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx
index b96da6c36fa2..4d43a8de3027 100644
--- a/xmloff/source/text/XMLChangedRegionImportContext.cxx
+++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx
@@ -112,7 +112,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLChangedRegionImport
     // for the moment -> use text
     // or default if text fail
 
-    return xContext.get();
+    return xContext;
 }
 
 void XMLChangedRegionImportContext::endFastElement(sal_Int32 )
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx
index c7d3c599d86b..f2a074033d6e 100644
--- a/xmloff/source/text/XMLFootnoteImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteImportContext.cxx
@@ -163,7 +163,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLFootnoteImportConte
             XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLIndexSourceBaseContext.cxx b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
index b9975b7e8766..77de7bf4cac9 100644
--- a/xmloff/source/text/XMLIndexSourceBaseContext.cxx
+++ b/xmloff/source/text/XMLIndexSourceBaseContext.cxx
@@ -117,7 +117,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexSourceBaseCont
     }
     // else: unknown namespace -> ignore
 
-    return xContext.get();
+    return xContext;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index d3a7ea4ef1b1..8dd1dac881c7 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -338,7 +338,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTOCContext::cr
     }
     // else: ignore
 
-    return xContext.get();
+    return xContext;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 4c301af5e8bd..244a0eccec83 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -243,14 +243,14 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextColumnsContext:
 
         pColumns->push_back( xColumn );
 
-        return xColumn.get();
+        return xColumn;
     }
     else if( nElement == XML_ELEMENT(STYLE, XML_COLUMN_SEP) )
     {
         mxColumnSep.set(
             new XMLTextColumnSepContext_Impl( GetImport(), nElement, xAttrList ));
 
-        return mxColumnSep.get();
+        return mxColumnSep;
     }
     XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
     return nullptr;
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index de19b3d56e15..0e482c031838 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1452,7 +1452,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
                 {
                     Reference < XShapes > xShapes;
                     xContext = XMLShapeImportHelper::CreateFrameChildContext(
-                                    GetImport(), nElement, xAttrList, xShapes, m_xAttrList.get() );
+                                    GetImport(), nElement, xAttrList, xShapes, m_xAttrList );
                 }
                 else if( XML_TEXT_FRAME_PLUGIN == nFrameType )
                 {
@@ -1475,7 +1475,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
                     {
                         Reference < XShapes > xShapes;
                         xContext = XMLShapeImportHelper::CreateFrameChildContext(
-                                        GetImport(), nElement, xAttrList, xShapes, m_xAttrList.get() );
+                                        GetImport(), nElement, xAttrList, xShapes, m_xAttrList );
                     }
                 }
                 else if( XML_TEXT_FRAME_OBJECT == nFrameType ||
@@ -1494,7 +1494,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
                                                         xAttrList,
                                                         m_eDefaultAnchorType,
                                                         nFrameType,
-                                                        m_xAttrList.get() );
+                                                        m_xAttrList );
                 }
 
                 m_xImplContext = xContext;
@@ -1511,7 +1511,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
         // read another image
         xContext = new XMLTextFrameContext_Impl(
             GetImport(), nElement, xAttrList,
-            m_eDefaultAnchorType, XML_TEXT_FRAME_GRAPHIC, m_xAttrList.get(), true);
+            m_eDefaultAnchorType, XML_TEXT_FRAME_GRAPHIC, m_xAttrList, true);
 
         m_xImplContext = xContext;
         addContent(*m_xImplContext);
@@ -1655,7 +1655,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c
                                     m_xImplContext.get(), nElement, xAttrList );
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 void XMLTextFrameContext::SetHyperlink( const OUString& rHRef,
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index a94b431cc009..0e643bede23c 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -227,7 +227,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextMasterPageConte
                                               bFooter, bLeft, bFirst );
     }
 
-    return xContext.get();
+    return xContext;
 }
 
 SvXMLImportContext *XMLTextMasterPageContext::CreateHeaderFooterContext(
diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx
index 70736d80d6c9..7bc12c2f9773 100644
--- a/xmloff/source/text/XMLTextShapeStyleContext.cxx
+++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx
@@ -177,7 +177,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextShapeStyleConte
         // create and remember events import context
         // (for delayed processing of events)
         xEventContext = new XMLEventsImportContext( GetImport() );
-        return xEventContext.get();
+        return xEventContext;
     }
 
     return XMLShapeStyleContext::createFastChildContext( nElement, xAttrList );
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index fc1e00d18347..f2a56cba30de 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -2368,7 +2368,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLMacroFieldImportCon
         // create events context and remember it!
         xEventContext = new XMLEventsImportContext( GetImport() );
         bValid = true;
-        return xEventContext.get();
+        return xEventContext;
     }
     XMLOFF_WARN_UNKNOWN_ELEMENT("xmloff", nElement);
 
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index e765f53417f2..701136e98fb2 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -170,7 +170,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextStyleContext::c
         // create and remember events import context
         // (for delayed processing of events)
         m_xEventContext.set(new XMLEventsImportContext( GetImport() ));
-        return m_xEventContext.get();
+        return m_xEventContext;
     }
 
     return XMLPropStyleContext::createFastChildContext( nElement, xAttrList );
diff --git a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
index 64d38506aef7..a16945f3f612 100644
--- a/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
+++ b/xmloff/source/transform/ChartPlotAreaOOoTContext.cxx
@@ -130,7 +130,7 @@ rtl::Reference<XMLTransformerContext> XMLChartPlotAreaOOoTContext::CreateChildCo
     {
         rtl::Reference<XMLAxisOOoContext> pAxisContext( new XMLAxisOOoContext( GetTransformer(), rQName ));
         AddContent( pAxisContext );
-        pContext.set(pAxisContext.get());
+        pContext = pAxisContext;
     }
     else if( XML_NAMESPACE_CHART == nPrefix &&
              IsXMLToken( rLocalName, XML_CATEGORIES ) )
diff --git a/xmloff/source/transform/DeepTContext.cxx b/xmloff/source/transform/DeepTContext.cxx
index 01c871c07036..05a4c9900cf2 100644
--- a/xmloff/source/transform/DeepTContext.cxx
+++ b/xmloff/source/transform/DeepTContext.cxx
@@ -120,7 +120,7 @@ rtl::Reference<XMLTransformerContext> XMLPersElemContentTContext::CreateChildCon
                     (*aIter).second.GetQNameTokenFromParam2(),
                        static_cast< ::xmloff::token::XMLTokenEnum >(
                         (*aIter).second.m_nParam3 & 0xffff ) );
-                pContext.set(pMC.get());
+                pContext = pMC;
             }
             break;
         case XML_ETACTION_PROC_ATTRS:
diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx
index a183f8c3a6d5..13d289ca89b8 100644
--- a/xmloff/source/transform/FormPropOOoTContext.cxx
+++ b/xmloff/source/transform/FormPropOOoTContext.cxx
@@ -130,7 +130,7 @@ rtl::Reference<XMLTransformerContext> XMLFormPropOOoTransformerContext::CreateCh
         {
             m_xValueContext=
                 new XMLFormPropValueTContext_Impl( GetTransformer(), rQName );
-            pContext.set(m_xValueContext.get());
+            pContext = m_xValueContext;
         }
     }
 
diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx
index 824dac6ea435..4beb2e016fe1 100644
--- a/xmloff/source/transform/MergeElemTContext.cxx
+++ b/xmloff/source/transform/MergeElemTContext.cxx
@@ -189,7 +189,7 @@ rtl::Reference<XMLTransformerContext> XMLMergeElemTransformerContext::CreateChil
                                     (*aIter).second.GetQNamePrefixFromParam1(),
                                     (*aIter).second.GetQNameTokenFromParam1() ));
                         m_aChildContexts.push_back(pTC);
-                        pContext.set(pTC.get());
+                        pContext = pTC;
                     }
                     break;
                 case XML_ETACTION_MOVE_TO_ATTR:
@@ -200,7 +200,7 @@ rtl::Reference<XMLTransformerContext> XMLMergeElemTransformerContext::CreateChil
                                     (*aIter).second.GetQNamePrefixFromParam1(),
                                     (*aIter).second.GetQNameTokenFromParam1() ));
                         m_aChildContexts.push_back(pTC);
-                        pContext.set(pTC.get());
+                        pContext = pTC;
                     }
                     break;
                 case XML_ETACTION_EXTRACT_CHARACTERS:
diff --git a/xmloff/source/transform/MetaTContext.cxx b/xmloff/source/transform/MetaTContext.cxx
index d37934eccf78..1e2ca46e5c37 100644
--- a/xmloff/source/transform/MetaTContext.cxx
+++ b/xmloff/source/transform/MetaTContext.cxx
@@ -77,7 +77,7 @@ rtl::Reference<XMLTransformerContext> XMLMetaTransformerContext::CreateChildCont
     XMLMetaContexts_Impl::value_type aVal( rLocalName, pContext );
     m_aContexts.insert( aVal );
 
-    return pContext.get();
+    return pContext;
 }
 
 void XMLMetaTransformerContext::EndElement()
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 4e708db44962..b1d64260ac21 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -756,7 +756,7 @@ rtl::Reference<XMLTransformerContext> XMLStyleOASISTContext::CreateChildContext(
                     GetTransformer(), rQName, ePropType, m_bControlStyle );
             else
                 m_xPropContext->SetQNameAndPropType( rQName, ePropType );
-            pContext.set(m_xPropContext.get());
+            pContext = m_xPropContext;
         }
     }
     if( !pContext.is() )


More information about the Libreoffice-commits mailing list