diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-09 10:24:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-09 10:24:24 +0200 |
commit | d4b0ab2214425545aac5d98c49dc320ee39d6dc2 (patch) | |
tree | d56c6683cd059d4da65fed75b3fb72b1310e6ad5 /xmloff | |
parent | b3c72c734087b178cbcf1622e1088335c6eaf6a7 (diff) |
loplugin:refcounting
Change-Id: I3ab5f1df08670fdad3e31aadafd3a02f1925dd88
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/XMLTextColumnsContext.hxx | 4 | ||||
-rw-r--r-- | xmloff/inc/xmltabi.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/sdxmlimp_impl.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximp3dscene.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/draw/ximpstyl.hxx | 6 | ||||
-rw-r--r-- | xmloff/source/forms/layerimport.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/forms/layerimport.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlstyle.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/style/xmltabi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtparaimphint.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtstyli.cxx | 3 |
14 files changed, 26 insertions, 18 deletions
diff --git a/xmloff/inc/XMLTextColumnsContext.hxx b/xmloff/inc/XMLTextColumnsContext.hxx index 15b40cdedea0..424ff41c7f9d 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 de941e55c4c2..d9f349f421c3 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 e8bc3a14acc8..d2d9fdf2862f 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 31ce368758df..1d294b4b09ea 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 5a4266850089..dadbdaa35457 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 788e3e48a7d8..83445547d3e7 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 7992650b3b3a..fc105f17edcb 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 c3b91e2085ba..d3387a8e34db 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 bfec98025425..dbe28d7ccbae 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 a77496a83e2e..a7b861e74dd5 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 33382e921625..5aa1091e8b31 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 95440b0bd8bc..ee529eddd301 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 c2eeaee3f984..0a2b9ca8540e 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 6a78c2d77e27..8df44e21c744 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, |