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

Noel Grandin noel.grandin at collabora.co.uk
Fri Sep 9 08:27:12 UTC 2016


 include/xmloff/shapeimport.hxx               |    6 +++---
 include/xmloff/txtstyli.hxx                  |    3 ++-
 include/xmloff/xmlictxt.hxx                  |    2 +-
 include/xmloff/xmlnumi.hxx                   |    2 +-
 sw/source/filter/xml/xmlfmt.cxx              |    4 ++--
 sw/source/filter/xml/xmltbli.hxx             |    2 +-
 xmloff/inc/XMLTextColumnsContext.hxx         |    4 ++--
 xmloff/inc/xmltabi.hxx                       |    2 +-
 xmloff/source/draw/sdxmlimp_impl.hxx         |    2 +-
 xmloff/source/draw/ximp3dscene.cxx           |    2 +-
 xmloff/source/draw/ximpstyl.cxx              |    4 ++--
 xmloff/source/draw/ximpstyl.hxx              |    6 +++---
 xmloff/source/forms/layerimport.cxx          |    3 +++
 xmloff/source/forms/layerimport.hxx          |    4 +++-
 xmloff/source/style/xmlnumi.cxx              |    2 +-
 xmloff/source/style/xmlstyle.cxx             |    6 +++---
 xmloff/source/style/xmltabi.cxx              |    2 +-
 xmloff/source/text/XMLTextColumnsContext.cxx |    2 +-
 xmloff/source/text/txtparaimphint.hxx        |    2 +-
 xmloff/source/text/txtstyli.cxx              |    3 +++
 20 files changed, 36 insertions(+), 27 deletions(-)

New commits:
commit d4b0ab2214425545aac5d98c49dc320ee39d6dc2
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Fri Sep 9 10:24:05 2016 +0200

    loplugin:refcounting
    
    Change-Id: I3ab5f1df08670fdad3e31aadafd3a02f1925dd88

diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx
index 3042e03..a1263c8 100644
--- a/include/xmloff/shapeimport.hxx
+++ b/include/xmloff/shapeimport.hxx
@@ -204,7 +204,7 @@ protected:
     SvXMLImport& mrImport;
 
     // list for local light contexts
-    ::std::vector< css::uno::Reference< SdXML3DLightContext > >
+    ::std::vector< rtl::Reference< SdXML3DLightContext > >
                                 maList;
 
     // local parameters which need to be read
@@ -274,8 +274,8 @@ class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public salhelper::SimpleReferenceO
     rtl::Reference<SvXMLImportPropertyMapper> mpPresPagePropsMapper;
 
     // contexts for Style and AutoStyle import
-    css::uno::Reference<SvXMLStylesContext> mxStylesContext;
-    css::uno::Reference<SvXMLStylesContext> mxAutoStylesContext;
+    rtl::Reference<SvXMLStylesContext> mxStylesContext;
+    rtl::Reference<SvXMLStylesContext> mxAutoStylesContext;
 
     // contexts for xShape contents TokenMaps
     std::unique_ptr<SvXMLTokenMap>              mpGroupShapeElemTokenMap;
diff --git a/include/xmloff/txtstyli.hxx b/include/xmloff/txtstyli.hxx
index 3b7cb23..a142e3d 100644
--- a/include/xmloff/txtstyli.hxx
+++ b/include/xmloff/txtstyli.hxx
@@ -53,7 +53,7 @@ private:
     // Introduce import of empty list style (#i69523#)
     bool        mbListStyleSet : 1;
 
-    css::uno::Reference<XMLEventsImportContext> mxEventContext;
+    rtl::Reference<XMLEventsImportContext> mxEventContext;
 
 protected:
 
@@ -69,6 +69,7 @@ public:
             const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
             SvXMLStylesContext& rStyles, sal_uInt16 nFamily,
             bool bDefaultStyle = false );
+    ~XMLTextStyleContext() override;
 
     virtual SvXMLImportContext *CreateChildContext(
             sal_uInt16 nPrefix,
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index c9d987e..eddbf70 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -130,7 +130,7 @@ public:
     void ReleaseRef();
 };
 
-typedef css::uno::Reference<SvXMLImportContext> SvXMLImportContextRef;
+typedef rtl::Reference<SvXMLImportContext> SvXMLImportContextRef;
 
 #endif // INCLUDED_XMLOFF_XMLICTXT_HXX
 
diff --git a/include/xmloff/xmlnumi.hxx b/include/xmloff/xmlnumi.hxx
index dbe8adc..ee7913a 100644
--- a/include/xmloff/xmlnumi.hxx
+++ b/include/xmloff/xmlnumi.hxx
@@ -33,7 +33,7 @@
 namespace com { namespace sun { namespace star { namespace frame { class XModel; } } } }
 
 class SvxXMLListLevelStyleContext_Impl;
-typedef std::vector<css::uno::Reference<SvxXMLListLevelStyleContext_Impl>> SvxXMLListStyle_Impl;
+typedef std::vector<rtl::Reference<SvxXMLListLevelStyleContext_Impl>> SvxXMLListStyle_Impl;
 
 class XMLOFF_DLLPUBLIC SvxXMLListStyleContext
     : public SvXMLStyleContext
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 53c81a1..09920b1 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -256,7 +256,7 @@ SwXMLConditionContext_Impl::~SwXMLConditionContext_Impl()
 }
 
 
-typedef std::vector<uno::Reference<SwXMLConditionContext_Impl>> SwXMLConditions_Impl;
+typedef std::vector<rtl::Reference<SwXMLConditionContext_Impl>> SwXMLConditions_Impl;
 
 class SwXMLTextStyleContext_Impl : public XMLTextStyleContext
 {
@@ -327,7 +327,7 @@ SvXMLImportContext *SwXMLTextStyleContext_Impl::CreateChildContext(
 
     if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MAP ) )
     {
-        uno::Reference<SwXMLConditionContext_Impl> xCond{
+        rtl::Reference<SwXMLConditionContext_Impl> xCond{
             new SwXMLConditionContext_Impl( GetImport(), nPrefix,
                                             rLocalName, xAttrList )};
         if( xCond->IsValid() )
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 11fd9c2..d050022 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -80,7 +80,7 @@ class SwXMLTableContext : public XMLTextTableContext
 
     SvXMLImportContextRef   m_xParentTable;   // if table is a sub table
 
-    uno::Reference<SwXMLDDETableContext_Impl> m_xDDESource;
+    rtl::Reference<SwXMLDDETableContext_Impl> m_xDDESource;
 
     bool            m_bFirstSection : 1;
     bool            m_bRelWidth : 1;
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx
index 15b40cd..424ff41 100644
--- a/xmloff/inc/XMLTextColumnsContext.hxx
+++ b/xmloff/inc/XMLTextColumnsContext.hxx
@@ -28,7 +28,7 @@ class XMLTextColumnContext_Impl;
 class XMLTextColumnSepContext_Impl;
 class SvXMLTokenMap;
 
-typedef std::vector<css::uno::Reference<XMLTextColumnContext_Impl>> XMLTextColumnsArray_Impl;
+typedef std::vector<rtl::Reference<XMLTextColumnContext_Impl>> XMLTextColumnsArray_Impl;
 
 class XMLTextColumnsContext :public XMLElementPropertyContext
 {
@@ -42,7 +42,7 @@ class XMLTextColumnsContext :public XMLElementPropertyContext
 
 
     std::unique_ptr<XMLTextColumnsArray_Impl> pColumns;
-    css::uno::Reference<XMLTextColumnSepContext_Impl> mxColumnSep;
+    rtl::Reference<XMLTextColumnSepContext_Impl> mxColumnSep;
     std::unique_ptr<SvXMLTokenMap> pColumnAttrTokenMap;
     std::unique_ptr<SvXMLTokenMap> pColumnSepAttrTokenMap;
     sal_Int16                nCount;
diff --git a/xmloff/inc/xmltabi.hxx b/xmloff/inc/xmltabi.hxx
index de941e5..d9f349f 100644
--- a/xmloff/inc/xmltabi.hxx
+++ b/xmloff/inc/xmltabi.hxx
@@ -27,7 +27,7 @@
 class SvXMLImport;
 class SvxXMLTabStopContext_Impl;
 
-typedef std::vector<css::uno::Reference<SvxXMLTabStopContext_Impl>> SvxXMLTabStopArray_Impl;
+typedef std::vector<rtl::Reference<SvxXMLTabStopContext_Impl>> SvxXMLTabStopArray_Impl;
 
 class SvxXMLTabStopImportContext : public XMLElementPropertyContext
 {
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index e8bc3a1..d2d9fdf 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -168,7 +168,7 @@ class SdXMLImport: public SvXMLImport
     css::uno::Reference< css::container::XNameAccess > mxPageLayouts;
 
     // contexts for Style and AutoStyle import
-    css::uno::Reference<SdXMLMasterStylesContext> mxMasterStylesContext;
+    rtl::Reference<SdXMLMasterStylesContext> mxMasterStylesContext;
 
     // token map lists
     std::unique_ptr<SvXMLTokenMap>              mpDocElemTokenMap;
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 31ce368..1d294b4 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -229,7 +229,7 @@ SdXML3DSceneAttributesHelper::SdXML3DSceneAttributesHelper( SvXMLImport& rImport
 /** creates a 3d light context and adds it to the internal list for later processing */
 SvXMLImportContext * SdXML3DSceneAttributesHelper::create3DLightContext( sal_uInt16 nPrfx, const OUString& rLName, const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList)
 {
-    const uno::Reference<SdXML3DLightContext> xContext{new SdXML3DLightContext(mrImport, nPrfx, rLName, xAttrList)};
+    const rtl::Reference<SdXML3DLightContext> xContext{new SdXML3DLightContext(mrImport, nPrfx, rLName, xAttrList)};
 
     // remember SdXML3DLightContext for later evaluation
     maList.push_back(xContext);
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 5a42668..dadbdaa 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -460,7 +460,7 @@ SvXMLImportContext *SdXMLPresentationPageLayoutContext::CreateChildContext(
 
     if(nPrefix == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_PLACEHOLDER ) )
     {
-        const uno::Reference< SdXMLPresentationPlaceholderContext > xContext{
+        const rtl::Reference< SdXMLPresentationPlaceholderContext > xContext{
             new SdXMLPresentationPlaceholderContext(GetSdImport(), nPrefix, rLocalName, xAttrList)};
         // presentation:placeholder inside style:presentation-page-layout context
         pContext = xContext.get();
@@ -1474,7 +1474,7 @@ SvXMLImportContext* SdXMLMasterStylesContext::CreateChildContext(
                 uno::Reference< drawing::XShapes > xNewShapes(xNewMasterPage, uno::UNO_QUERY);
                 if(xNewShapes.is() && GetSdImport().GetShapeImport()->GetStylesContext())
                 {
-                    const uno::Reference<SdXMLMasterPageContext> xContext{
+                    const rtl::Reference<SdXMLMasterPageContext> xContext{
                         new SdXMLMasterPageContext(GetSdImport(),
                             nPrefix, rLocalName, xAttrList, xNewShapes)};
                     pContext = xContext.get();
diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx
index 788e3e4..8344554 100644
--- a/xmloff/source/draw/ximpstyl.hxx
+++ b/xmloff/source/draw/ximpstyl.hxx
@@ -68,7 +68,7 @@ public:
 class SdXMLPageMasterContext: public SvXMLStyleContext
 {
     OUString               msName;
-    css::uno::Reference<SdXMLPageMasterStyleContext> mxPageMasterStyle;
+    rtl::Reference<SdXMLPageMasterStyleContext> mxPageMasterStyle;
 
     const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
     SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
@@ -147,7 +147,7 @@ public:
 class SdXMLPresentationPageLayoutContext: public SvXMLStyleContext
 {
     OUString               msName;
-    std::vector< css::uno::Reference< SdXMLPresentationPlaceholderContext > >
+    std::vector< rtl::Reference< SdXMLPresentationPlaceholderContext > >
                            maList;
     sal_uInt16             mnTypeId;
 
@@ -226,7 +226,7 @@ public:
 
 class SdXMLMasterStylesContext : public SvXMLImportContext
 {
-    std::vector< css::uno::Reference< SdXMLMasterPageContext > > maMasterPageList;
+    std::vector< rtl::Reference< SdXMLMasterPageContext > > maMasterPageList;
 
     const SdXMLImport& GetSdImport() const { return static_cast<const SdXMLImport&>(GetImport()); }
     SdXMLImport& GetSdImport() { return static_cast<SdXMLImport&>(GetImport()); }
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 7992650..fc105f1 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -225,6 +225,9 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
     m_aCurrentPageIds = m_aControlIds.end();
 }
 
+OFormLayerXMLImport_Impl::~OFormLayerXMLImport_Impl()
+{}
+
 void OFormLayerXMLImport_Impl::setAutoStyleContext(SvXMLStylesContext* _pNewContext)
 {
     OSL_ENSURE(!m_xAutoStyles.is(), "OFormLayerXMLImport_Impl::setAutoStyleContext: not to be called twice!");
diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx
index c3b91e2..d3387a8 100644
--- a/xmloff/source/forms/layerimport.hxx
+++ b/xmloff/source/forms/layerimport.hxx
@@ -58,7 +58,7 @@ namespace xmloff
         /// the supplier for the forms of the currently imported page
         css::uno::Reference< css::form::XFormsSupplier2 >
                                             m_xCurrentPageFormsSupp;
-        css::uno::Reference<SvXMLStylesContext> m_xAutoStyles;
+        rtl::Reference<SvXMLStylesContext>  m_xAutoStyles;
 
     protected:
         typedef std::map< OUString, css::uno::Reference< css::beans::XPropertySet > > MapString2PropertySet;
@@ -129,6 +129,8 @@ namespace xmloff
             const OUString& _rSubmissionID
         );
 
+        ~OFormLayerXMLImport_Impl() override;
+
     protected:
         explicit OFormLayerXMLImport_Impl(SvXMLImport& _rImporter);
 
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index bfec980..dbe28d7 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -1047,7 +1047,7 @@ SvXMLImportContext *SvxXMLListStyleContext::CreateChildContext(
                 IsXMLToken( rLocalName, XML_LIST_LEVEL_STYLE_BULLET ) ||
                  IsXMLToken( rLocalName, XML_LIST_LEVEL_STYLE_IMAGE )    ) ) )
     {
-        uno::Reference<SvxXMLListLevelStyleContext_Impl> xLevelStyle{
+        rtl::Reference<SvxXMLListLevelStyleContext_Impl> xLevelStyle{
             new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix,
                                                   rLocalName, xAttrList )};
         if( !pLevelStyles )
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index a77496a..a7b861e 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -207,7 +207,7 @@ class SvXMLStyleIndex_Impl
 {
     OUString              sName;
     sal_uInt16            nFamily;
-    const uno::Reference<SvXMLStyleContext> mxStyle;
+    const rtl::Reference<SvXMLStyleContext> mxStyle;
 
 public:
 
@@ -217,7 +217,7 @@ public:
     {
     }
 
-    SvXMLStyleIndex_Impl( const uno::Reference<SvXMLStyleContext> &rStl ) :
+    SvXMLStyleIndex_Impl( const rtl::Reference<SvXMLStyleContext> &rStl ) :
         sName( rStl->GetName() ),
         nFamily( rStl->GetFamily() ),
         mxStyle ( rStl )
@@ -248,7 +248,7 @@ struct SvXMLStyleIndexCmp_Impl
 
 class SvXMLStylesContext_Impl
 {
-    typedef std::vector<uno::Reference<SvXMLStyleContext>> StylesType;
+    typedef std::vector<rtl::Reference<SvXMLStyleContext>> StylesType;
     typedef std::set<SvXMLStyleIndex_Impl, SvXMLStyleIndexCmp_Impl> IndicesType;
 
     StylesType aStyles;
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index 33382e9..5aa1091 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -187,7 +187,7 @@ SvXMLImportContext *SvxXMLTabStopImportContext::CreateChildContext(
     if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_TAB_STOP ) )
     {
         // create new tabstop import context
-        const uno::Reference<SvxXMLTabStopContext_Impl> xTabStopContext{
+        const rtl::Reference<SvxXMLTabStopContext_Impl> xTabStopContext{
             new SvxXMLTabStopContext_Impl( GetImport(), nPrefix, rLocalName,
                                            xAttrList )};
 
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx
index 95440b0..ee529ed 100644
--- a/xmloff/source/text/XMLTextColumnsContext.cxx
+++ b/xmloff/source/text/XMLTextColumnsContext.cxx
@@ -318,7 +318,7 @@ SvXMLImportContext *XMLTextColumnsContext::CreateChildContext(
     if( XML_NAMESPACE_STYLE == nPrefix &&
         IsXMLToken( rLocalName, XML_COLUMN ) )
     {
-        const uno::Reference<XMLTextColumnContext_Impl> xColumn{
+        const rtl::Reference<XMLTextColumnContext_Impl> xColumn{
             new XMLTextColumnContext_Impl( GetImport(), nPrefix, rLocalName,
                                            xAttrList, *pColumnAttrTokenMap )};
 
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index c2eeaee..0a2b9ca 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -106,7 +106,7 @@ class XMLHyperlinkHint_Impl : public XMLHint_Impl
     OUString                 sTargetFrameName;
     OUString                 sStyleName;
     OUString                 sVisitedStyleName;
-    css::uno::Reference<XMLEventsImportContext> mxEvents;
+    rtl::Reference<XMLEventsImportContext> mxEvents;
 
 public:
 
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 6a78c2d..8df44e2 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -149,6 +149,9 @@ XMLTextStyleContext::XMLTextStyleContext( SvXMLImport& rImport,
 {
 }
 
+XMLTextStyleContext::~XMLTextStyleContext()
+{}
+
 SvXMLImportContext *XMLTextStyleContext::CreateChildContext(
         sal_uInt16 nPrefix,
         const OUString& rLocalName,


More information about the Libreoffice-commits mailing list