diff options
author | Noel Grandin <noel@peralex.com> | 2014-06-30 09:53:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-02 15:23:52 +0200 |
commit | 4ff115b3e7ff9c73dcc98fc6e7109f499ea81cfe (patch) | |
tree | 3660782eb23bdacd921bb11dcc825bc1b47035cf /xmloff/source/style | |
parent | 8635fa156ba63e5f63565b6d19ea798a61643b01 (diff) |
drop UniReference in favour of rtl::Reference
since they're doing the same thing.
Change-Id: I76134b6b848db8628f315fe5bd9eb972a6bf0cb6
Diffstat (limited to 'xmloff/source/style')
27 files changed, 80 insertions, 116 deletions
diff --git a/xmloff/source/style/PageHeaderFooterContext.cxx b/xmloff/source/style/PageHeaderFooterContext.cxx index 542cf91bd9df..8cb1e2f32189 100644 --- a/xmloff/source/style/PageHeaderFooterContext.cxx +++ b/xmloff/source/style/PageHeaderFooterContext.cxx @@ -32,7 +32,7 @@ PageHeaderFooterContext::PageHeaderFooterContext( SvXMLImport& rImport, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>&, ::std::vector< XMLPropertyState > & rTempProperties, - const UniReference < SvXMLImportPropertyMapper > &rTempMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rTempMap, sal_Int32 nStart, sal_Int32 nEnd, const bool bTempHeader ) : SvXMLImportContext( rImport, nPrfx, rLName ), diff --git a/xmloff/source/style/PageHeaderFooterContext.hxx b/xmloff/source/style/PageHeaderFooterContext.hxx index d369b0433985..11b86f75025d 100644 --- a/xmloff/source/style/PageHeaderFooterContext.hxx +++ b/xmloff/source/style/PageHeaderFooterContext.hxx @@ -27,7 +27,7 @@ class PageHeaderFooterContext : public SvXMLImportContext sal_Int32 nStartIndex; sal_Int32 nEndIndex; bool bHeader; - const UniReference < SvXMLImportPropertyMapper > rMap; + const rtl::Reference < SvXMLImportPropertyMapper > rMap; public: @@ -36,7 +36,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ::std::vector< XMLPropertyState > & rProperties, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, sal_Int32 nStartIndex, sal_Int32 nEndIndex, const bool bHeader); diff --git a/xmloff/source/style/PageMasterExportPropMapper.cxx b/xmloff/source/style/PageMasterExportPropMapper.cxx index 17a9522a817d..6c67709529b7 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.cxx +++ b/xmloff/source/style/PageMasterExportPropMapper.cxx @@ -214,7 +214,7 @@ void XMLPropertyStateBuffer::ContextFilter( ::std::vector< XMLPropertyState >& ) } XMLPageMasterExportPropMapper::XMLPageMasterExportPropMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) : SvXMLExportPropertyMapper( rMapper ), aBackgroundImageExport( rExport ), @@ -343,7 +343,7 @@ void XMLPageMasterExportPropMapper::ContextFilter( XMLPropertyState* pFooterRepeatOffsetX = NULL; XMLPropertyState* pFooterRepeatOffsetY = NULL; - UniReference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper()); + rtl::Reference < XMLPropertySetMapper > aPropMapper(getPropertySetMapper()); for( ::std::vector< XMLPropertyState >::iterator aIter = rPropState.begin(); aIter != rPropState.end(); ++aIter ) { diff --git a/xmloff/source/style/PageMasterExportPropMapper.hxx b/xmloff/source/style/PageMasterExportPropMapper.hxx index 1a11e840ba82..a06cb48135d3 100644 --- a/xmloff/source/style/PageMasterExportPropMapper.hxx +++ b/xmloff/source/style/PageMasterExportPropMapper.hxx @@ -40,7 +40,7 @@ protected: public: XMLPageMasterExportPropMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); virtual ~XMLPageMasterExportPropMapper(); diff --git a/xmloff/source/style/PageMasterImportContext.cxx b/xmloff/source/style/PageMasterImportContext.cxx index a88d204462ef..283075cdebcd 100644 --- a/xmloff/source/style/PageMasterImportContext.cxx +++ b/xmloff/source/style/PageMasterImportContext.cxx @@ -85,11 +85,11 @@ SvXMLImportContext *PageStyleContext::CreateChildContext( (IsXMLToken(rLocalName, XML_FOOTER_STYLE )) ) ) { bool bHeader = IsXMLToken(rLocalName, XML_HEADER_STYLE); - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) { - const UniReference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); sal_Int32 nFlag; if (bHeader) nFlag = CTF_PM_HEADERFLAG; @@ -126,11 +126,11 @@ SvXMLImportContext *PageStyleContext::CreateChildContext( if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken(rLocalName, XML_PAGE_LAYOUT_PROPERTIES) ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) { - const UniReference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); sal_Int32 nEndIndex (-1); bool bEnd(false); sal_Int32 nIndex = 0; @@ -193,7 +193,7 @@ void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet //UUUU do not use XMLPropStyleContext::FillPropertySet, we need to handle this ourselves since // we have properties which use the MID_FLAG_NO_PROPERTY_IMPORT flag since they need some special // handling - UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper(GetFamily()); + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper(GetFamily()); if(xImpPrMap.is()) { @@ -233,7 +233,7 @@ void PageStyleContext::FillPropertySet(const uno::Reference<beans::XPropertySet xImpPrMap->FillPropertySet(GetProperties(), rPropSet, aContextIDs); // get property set mapper - const UniReference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = xImpPrMap->getPropertySetMapper(); Reference< XPropertySetInfo > xInfo; //UUUU handle special attributes which have MID_FLAG_NO_PROPERTY_IMPORT set diff --git a/xmloff/source/style/PageMasterImportPropMapper.cxx b/xmloff/source/style/PageMasterImportPropMapper.cxx index 3de0721da47b..46a52639e938 100644 --- a/xmloff/source/style/PageMasterImportPropMapper.cxx +++ b/xmloff/source/style/PageMasterImportPropMapper.cxx @@ -37,7 +37,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::container; PageMasterImportPropertyMapper::PageMasterImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImp ) : SvXMLImportPropertyMapper( rMapper, rImp ), rImport( rImp ) diff --git a/xmloff/source/style/PageMasterImportPropMapper.hxx b/xmloff/source/style/PageMasterImportPropMapper.hxx index 01b245fbbd20..fcccc99e164f 100644 --- a/xmloff/source/style/PageMasterImportPropMapper.hxx +++ b/xmloff/source/style/PageMasterImportPropMapper.hxx @@ -33,7 +33,7 @@ protected: public: PageMasterImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImp); virtual ~PageMasterImportPropertyMapper(); diff --git a/xmloff/source/style/PageMasterPropMapper.cxx b/xmloff/source/style/PageMasterPropMapper.cxx index 0a031364bb14..de1fecfc9917 100644 --- a/xmloff/source/style/PageMasterPropMapper.cxx +++ b/xmloff/source/style/PageMasterPropMapper.cxx @@ -33,7 +33,7 @@ XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper( bool bForExport ): XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper( const XMLPropertyMapEntry* pEntries, - const UniReference< XMLPropertyHandlerFactory >& rFactory, + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory, bool bForExport ) : XMLPropertySetMapper( pEntries, rFactory, bForExport ) { diff --git a/xmloff/source/style/PageMasterPropMapper.hxx b/xmloff/source/style/PageMasterPropMapper.hxx index f93431517a5d..8a3814ba77b1 100644 --- a/xmloff/source/style/PageMasterPropMapper.hxx +++ b/xmloff/source/style/PageMasterPropMapper.hxx @@ -28,7 +28,7 @@ public: XMLPageMasterPropSetMapper( bool bForExport ); XMLPageMasterPropSetMapper( const XMLPropertyMapEntry* pEntries, - const UniReference< XMLPropertyHandlerFactory >& rFactory, + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory, bool bForExport ); virtual ~XMLPageMasterPropSetMapper(); }; diff --git a/xmloff/source/style/PagePropertySetContext.cxx b/xmloff/source/style/PagePropertySetContext.cxx index 7fa21ce6ccc6..c8d6e4dec8cf 100644 --- a/xmloff/source/style/PagePropertySetContext.cxx +++ b/xmloff/source/style/PagePropertySetContext.cxx @@ -34,7 +34,7 @@ PagePropertySetContext::PagePropertySetContext( const Reference< xml::sax::XAttributeList > & xAttrList, sal_uInt32 nFam, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, sal_Int32 nStartIndex, sal_Int32 nEndIndex, const PageContextType aTempType ) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFam, diff --git a/xmloff/source/style/PagePropertySetContext.hxx b/xmloff/source/style/PagePropertySetContext.hxx index 09c551e99e2b..20262e9529dc 100644 --- a/xmloff/source/style/PagePropertySetContext.hxx +++ b/xmloff/source/style/PagePropertySetContext.hxx @@ -40,7 +40,7 @@ public: ::com::sun::star::xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFam, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, sal_Int32 nStartIndex, sal_Int32 nEndIndex, const PageContextType aType ); diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx index 9aaf8583daa2..b551194e65d8 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx @@ -56,7 +56,7 @@ void XMLFootnoteSeparatorExport::exportXML( nIdx #endif , - const UniReference<XMLPropertySetMapper> & rMapper) + const rtl::Reference<XMLPropertySetMapper> & rMapper) { DBG_ASSERT(NULL != pProperties, "Need property states"); diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.hxx b/xmloff/source/style/XMLFootnoteSeparatorExport.hxx index 6b53c5974757..539d4221d034 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorExport.hxx +++ b/xmloff/source/style/XMLFootnoteSeparatorExport.hxx @@ -21,15 +21,14 @@ #define INCLUDED_XMLOFF_SOURCE_STYLE_XMLFOOTNOTESEPARATOREXPORT_HXX #include <sal/types.h> +#include <vector> class SvXMLExport; class XMLPropertySetMapper; struct XMLPropertyState; -template<class X> class UniReference; - - -#include <vector> - +namespace rtl { + template<class X> class Reference; +} /** * export footnote separator element in page styles @@ -48,7 +47,7 @@ public: const ::std::vector<XMLPropertyState> * pProperties, sal_uInt32 nIdx, /// used only for debugging - const UniReference<XMLPropertySetMapper> & rMapper); + const rtl::Reference<XMLPropertySetMapper> & rMapper); }; #endif diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx index 6fc1c21dfff7..0c0e1bd068ba 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx @@ -60,7 +60,7 @@ XMLFootnoteSeparatorImport::XMLFootnoteSeparatorImport( sal_uInt16 nPrefix, const OUString& rLocalName, vector<XMLPropertyState> & rProps, - const UniReference<XMLPropertySetMapper> & rMapperRef, + const rtl::Reference<XMLPropertySetMapper> & rMapperRef, sal_Int32 nIndex) : SvXMLImportContext(rImport, nPrefix, rLocalName), rProperties(rProps), diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx index 46da74cd3111..84b9724ef31d 100644 --- a/xmloff/source/style/XMLFootnoteSeparatorImport.hxx +++ b/xmloff/source/style/XMLFootnoteSeparatorImport.hxx @@ -20,11 +20,8 @@ #ifndef INCLUDED_XMLOFF_SOURCE_STYLE_XMLFOOTNOTESEPARATORIMPORT_HXX #define INCLUDED_XMLOFF_SOURCE_STYLE_XMLFOOTNOTESEPARATORIMPORT_HXX - - #include <xmloff/xmlictxt.hxx> -#include <xmloff/uniref.hxx> - +#include <rtl/ref.hxx> #include <vector> @@ -43,7 +40,7 @@ namespace com { namespace sun { namespace star { class XMLFootnoteSeparatorImport : public SvXMLImportContext { ::std::vector<XMLPropertyState> & rProperties; - UniReference<XMLPropertySetMapper> rMapper; + rtl::Reference<XMLPropertySetMapper> rMapper; sal_Int32 nPropIndex; public: @@ -55,7 +52,7 @@ public: sal_uInt16 nPrefix, const OUString& rLocalName, ::std::vector<XMLPropertyState> & rProperties, - const UniReference<XMLPropertySetMapper> & rMapperRef, + const rtl::Reference<XMLPropertySetMapper> & rMapperRef, sal_Int32 nIndex); virtual ~XMLFootnoteSeparatorImport(); diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx index 4cc26f994ad2..4522b2fc92b2 100644 --- a/xmloff/source/style/XMLPageExport.cxx +++ b/xmloff/source/style/XMLPageExport.cxx @@ -232,7 +232,7 @@ void XMLPageExport::exportDefaultStyle() xPageMasterExportPropMapper->FilterDefaults( xPropSet ); bool bExport = false; - UniReference < XMLPropertySetMapper > aPropMapper(xPageMasterExportPropMapper->getPropertySetMapper()); + rtl::Reference < XMLPropertySetMapper > aPropMapper(xPageMasterExportPropMapper->getPropertySetMapper()); for( ::std::vector< XMLPropertyState >::iterator aIter = xPropStates.begin(); aIter != xPropStates.end(); ++aIter ) { XMLPropertyState *pProp = &(*aIter); diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index eabd3f05917a..1f0c4fb0c7f8 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -45,7 +45,7 @@ using namespace ::xmloff::token; XMLAutoStyleFamily::XMLAutoStyleFamily( sal_Int32 nFamily, const OUString& rStrName, - const UniReference < SvXMLExportPropertyMapper > &rMapper, + const rtl::Reference < SvXMLExportPropertyMapper > &rMapper, const OUString& rStrPrefix, bool bAsFamily ) : mnFamily( nFamily ), maStrFamilyName( rStrName), mxMapper( rMapper ), @@ -389,7 +389,7 @@ SvXMLAutoStylePoolP_Impl::~SvXMLAutoStylePoolP_Impl() void SvXMLAutoStylePoolP_Impl::AddFamily( sal_Int32 nFamily, const OUString& rStrName, - const UniReference < SvXMLExportPropertyMapper > & rMapper, + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper, const OUString& rStrPrefix, bool bAsFamily ) { @@ -425,7 +425,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily( void SvXMLAutoStylePoolP_Impl::SetFamilyPropSetMapper( sal_Int32 nFamily, - const UniReference < SvXMLExportPropertyMapper > & rMapper ) + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper ) { XMLAutoStyleFamily aTemporary( nFamily ); @@ -724,7 +724,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML( { nStart = 0; sal_Int32 nIndex = 0; - UniReference< XMLPropertySetMapper > aPropMapper = + rtl::Reference< XMLPropertySetMapper > aPropMapper = rFamily.mxMapper->getPropertySetMapper(); sal_Int16 nContextID; while(nIndex < aPropMapper->GetEntryCount() && nEnd == -1) diff --git a/xmloff/source/style/impastpl.hxx b/xmloff/source/style/impastpl.hxx index a2d0ea28cf23..dda0e92e8a01 100644 --- a/xmloff/source/style/impastpl.hxx +++ b/xmloff/source/style/impastpl.hxx @@ -48,7 +48,7 @@ struct XMLAutoStyleFamily : boost::noncopyable sal_uInt32 mnFamily; OUString maStrFamilyName; - UniReference < SvXMLExportPropertyMapper > mxMapper; + rtl::Reference < SvXMLExportPropertyMapper > mxMapper; ParentSetType maParentSet; NameSetType maNameSet; @@ -58,7 +58,7 @@ struct XMLAutoStyleFamily : boost::noncopyable bool mbAsFamily; XMLAutoStyleFamily( sal_Int32 nFamily, const OUString& rStrName, - const UniReference<SvXMLExportPropertyMapper>& rMapper, + const rtl::Reference<SvXMLExportPropertyMapper>& rMapper, const OUString& rStrPrefix, bool bAsFamily = true ); XMLAutoStyleFamily( sal_Int32 nFamily ); @@ -145,10 +145,10 @@ public: SvXMLExport& GetExport() const { return rExport; } void AddFamily( sal_Int32 nFamily, const OUString& rStrName, - const UniReference < SvXMLExportPropertyMapper > & rMapper, + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper, const OUString& rStrPrefix, bool bAsFamily = true ); void SetFamilyPropSetMapper( sal_Int32 nFamily, - const UniReference < SvXMLExportPropertyMapper > & rMapper ); + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper ); void RegisterName( sal_Int32 nFamily, const OUString& rName ); void GetRegisteredNames( com::sun::star::uno::Sequence<sal_Int32>& aFamilies, diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx index 828b4a45f31b..5397ce9a20d9 100644 --- a/xmloff/source/style/prstylei.cxx +++ b/xmloff/source/style/prstylei.cxx @@ -190,7 +190,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( } if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = ((SvXMLStylesContext *)&mxStyles)->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) @@ -211,7 +211,7 @@ SvXMLImportContext *XMLPropStyleContext::CreateChildContext( void XMLPropStyleContext::FillPropertySet( const Reference< XPropertySet > & rPropSet ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = ((SvXMLStylesContext *)&mxStyles)->GetImportPropertyMapper( GetFamily() ); DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); @@ -250,7 +250,7 @@ typedef ::std::set < OUString > PropertyNameSet; void XMLPropStyleContext::CreateAndInsert( bool bOverwrite ) { SvXMLStylesContext* pSvXMLStylesContext = static_cast< SvXMLStylesContext* >(&mxStyles); - UniReference < SvXMLImportPropertyMapper > xImpPrMap = pSvXMLStylesContext->GetImportPropertyMapper(GetFamily()); + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pSvXMLStylesContext->GetImportPropertyMapper(GetFamily()); OSL_ENSURE(xImpPrMap.is(), "There is no import prop mapper"); //UUUU need to filter out old fill definitions when the new ones are used. The new @@ -375,7 +375,7 @@ void XMLPropStyleContext::CreateAndInsert( bool bOverwrite ) { Reference< XPropertyState > xPropState( xPropSet, uno::UNO_QUERY ); - UniReference < XMLPropertySetMapper > xPrMap; + rtl::Reference < XMLPropertySetMapper > xPrMap; if( xImpPrMap.is() ) xPrMap = xImpPrMap->getPropertySetMapper(); if( xPrMap.is() ) @@ -515,7 +515,7 @@ bool XMLPropStyleContext::doNewDrawingLayerFillStyleDefinitionsExist( { if(maProperties.size() && rFillStyleTag.getLength()) { - const UniReference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); if(rMapper.is()) { @@ -563,7 +563,7 @@ bool XMLPropStyleContext::deactivateOldFillStyleDefinitions( if(!rHashSetOfTags.empty() && maProperties.size()) { - const UniReference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); if(rMapper.is()) { @@ -594,7 +594,7 @@ bool XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToSt if(maProperties.size()) { - const UniReference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = GetStyles()->GetImportPropertyMapper(GetFamily())->getPropertySetMapper(); if(rMapper.is()) { diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx index a8166c58cbd8..03ac10749ed7 100644 --- a/xmloff/source/style/styleexp.cxx +++ b/xmloff/source/style/styleexp.cxx @@ -81,7 +81,7 @@ void XMLStyleExport::exportStyleContent( const Reference< XStyle >& ) bool XMLStyleExport::exportStyle( const Reference< XStyle >& rStyle, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, const Reference< XNameAccess >& xStyles, const OUString* pPrefix ) { @@ -336,7 +336,7 @@ bool XMLStyleExport::exportStyle( bool XMLStyleExport::exportDefaultStyle( const Reference< XPropertySet >& xPropSet, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper ) + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper ) { Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); @@ -365,7 +365,7 @@ bool XMLStyleExport::exportDefaultStyle( void XMLStyleExport::exportStyleFamily( const sal_Char *pFamily, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix) { const OUString sFamily(OUString::createFromAscii(pFamily )); @@ -375,7 +375,7 @@ void XMLStyleExport::exportStyleFamily( void XMLStyleExport::exportStyleFamily( const OUString& rFamily, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily, const OUString* pPrefix) { DBG_ASSERT( GetExport().GetModel().is(), "There is the model?" ); diff --git a/xmloff/source/style/uniref.cxx b/xmloff/source/style/uniref.cxx deleted file mode 100644 index 18f85c7f4343..000000000000 --- a/xmloff/source/style/uniref.cxx +++ /dev/null @@ -1,32 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <xmloff/uniref.hxx> - -UniRefBase::~UniRefBase() -{ -} - -void UniRefBase::release() -{ - if( !osl_atomic_decrement( &m_refCount ) ) - delete this; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx index ec8e95a81166..67f26ec4a556 100644 --- a/xmloff/source/style/xmlaustp.cxx +++ b/xmloff/source/style/xmlaustp.cxx @@ -40,7 +40,7 @@ using namespace ::xmloff::token; namespace { - static void lcl_exportDataStyle( SvXMLExport& _rExport, const UniReference< XMLPropertySetMapper >& _rxMapper, + static void lcl_exportDataStyle( SvXMLExport& _rExport, const rtl::Reference< XMLPropertySetMapper >& _rxMapper, const XMLPropertyState& _rProperty ) { DBG_ASSERT( _rxMapper.is(), "xmloff::lcl_exportDataStyle: invalid property mapper!" ); @@ -68,7 +68,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if ( XML_STYLE_FAMILY_CONTROL_ID == nFamily ) { // it's a control-related style - UniReference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); for ( vector< XMLPropertyState >::const_iterator pProp = rProperties.begin(); pProp != rProperties.end(); @@ -86,7 +86,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( if( (XML_STYLE_FAMILY_SD_GRAPHICS_ID == nFamily) || (XML_STYLE_FAMILY_SD_PRESENTATION_ID == nFamily) ) { // it's a graphics style - UniReference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > aPropertyMapper = rPropExp.getPropertySetMapper(); DBG_ASSERT(aPropertyMapper.is(), "SvXMLAutoStylePoolP::exportStyleAttributes: invalid property set mapper!"); bool bFoundControlShapeDataStyle = false; @@ -149,7 +149,7 @@ void SvXMLAutoStylePoolP::exportStyleAttributes( { if (pProp->mnIndex > -1) { - UniReference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); sal_Int32 nIndex = pProp->mnIndex; sal_Int16 nContextID = aPropMapper->GetEntryContextId( nIndex ); switch( nContextID ) @@ -193,7 +193,7 @@ void SvXMLAutoStylePoolP::exportStyleContent( bool bFooterStartIndex(false); bool bFooterEndIndex(false); - UniReference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > aPropMapper = rPropExp.getPropertySetMapper(); sal_Int32 nIndex(0); while(nIndex < aPropMapper->GetEntryCount()) @@ -283,14 +283,14 @@ void SvXMLAutoStylePoolP::AddFamily( const OUString& aStrPrefix, bool bAsFamily ) { - UniReference <SvXMLExportPropertyMapper> xTmp = pMapper; + rtl::Reference <SvXMLExportPropertyMapper> xTmp = pMapper; AddFamily( nFamily, rStrName, xTmp, aStrPrefix, bAsFamily ); } void SvXMLAutoStylePoolP::AddFamily( sal_Int32 nFamily, const OUString& rStrName, - const UniReference < SvXMLExportPropertyMapper > & rMapper, + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper, const OUString& rStrPrefix, bool bAsFamily ) { @@ -299,7 +299,7 @@ void SvXMLAutoStylePoolP::AddFamily( void SvXMLAutoStylePoolP::SetFamilyPropSetMapper( sal_Int32 nFamily, - const UniReference < SvXMLExportPropertyMapper > & rMapper ) + const rtl::Reference < SvXMLExportPropertyMapper > & rMapper ) { pImpl->SetFamilyPropSetMapper( nFamily, rMapper ); } diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx index 224729cedc72..bf0f968cc62c 100644 --- a/xmloff/source/style/xmlexppr.cxx +++ b/xmloff/source/style/xmlexppr.cxx @@ -189,7 +189,7 @@ public: void FillPropertyStateArray( vector< XMLPropertyState >& rPropStates, const Reference< XPropertySet >& xPropSet, - const UniReference< XMLPropertySetMapper >& maPropMapper, + const rtl::Reference< XMLPropertySetMapper >& maPropMapper, const bool bDefault = false); sal_uInt32 GetPropertyCount() const { return nCount; } }; @@ -277,7 +277,7 @@ const uno::Sequence<OUString>& FilterPropertiesInfo_Impl::GetApiNames() void FilterPropertiesInfo_Impl::FillPropertyStateArray( vector< XMLPropertyState >& rPropStates, const Reference< XPropertySet >& rPropSet, - const UniReference< XMLPropertySetMapper >& rPropMapper, + const rtl::Reference< XMLPropertySetMapper >& rPropMapper, const bool bDefault ) { XMLPropertyStates_Impl aPropStates; @@ -511,8 +511,8 @@ struct SvXMLExportPropertyMapper::Impl typedef std::map<css::uno::Reference<css::beans::XPropertySetInfo>, FilterPropertiesInfo_Impl*> CacheType; CacheType maCache; - UniReference<SvXMLExportPropertyMapper> mxNextMapper; - UniReference<XMLPropertySetMapper> mxPropMapper; + rtl::Reference<SvXMLExportPropertyMapper> mxNextMapper; + rtl::Reference<XMLPropertySetMapper> mxPropMapper; OUString maStyleName; @@ -527,7 +527,7 @@ struct SvXMLExportPropertyMapper::Impl // ctor/dtor , class SvXMLExportPropertyMapper SvXMLExportPropertyMapper::SvXMLExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ) : + const rtl::Reference< XMLPropertySetMapper >& rMapper ) : mpImpl(new Impl) { mpImpl->mxPropMapper = rMapper; @@ -539,7 +539,7 @@ SvXMLExportPropertyMapper::~SvXMLExportPropertyMapper() } void SvXMLExportPropertyMapper::ChainExportMapper( - const UniReference< SvXMLExportPropertyMapper>& rMapper ) + const rtl::Reference< SvXMLExportPropertyMapper>& rMapper ) { // add map entries from rMapper to current map mpImpl->mxPropMapper->AddMapperEntry( rMapper->getPropertySetMapper() ); @@ -547,7 +547,7 @@ void SvXMLExportPropertyMapper::ChainExportMapper( rMapper->mpImpl->mxPropMapper = mpImpl->mxPropMapper; // set rMapper as last mapper in current chain - UniReference< SvXMLExportPropertyMapper > xNext = mpImpl->mxNextMapper; + rtl::Reference< SvXMLExportPropertyMapper > xNext = mpImpl->mxNextMapper; if( xNext.is()) { while (xNext->mpImpl->mxNextMapper.is()) @@ -1027,7 +1027,7 @@ void SvXMLExportPropertyMapper::exportElementItems( rExport.IgnorableWhitespace(); } -const UniReference<XMLPropertySetMapper>& SvXMLExportPropertyMapper::getPropertySetMapper() const +const rtl::Reference<XMLPropertySetMapper>& SvXMLExportPropertyMapper::getPropertySetMapper() const { return mpImpl->mxPropMapper; } diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 6be3360e402c..9b7f11a76251 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -56,7 +56,7 @@ using ::com::sun::star::beans::PropertyVetoException; SvXMLImportPropertyMapper::SvXMLImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImp ): rImport(rImp), maPropMapper ( rMapper ) @@ -69,7 +69,7 @@ SvXMLImportPropertyMapper::~SvXMLImportPropertyMapper() } void SvXMLImportPropertyMapper::ChainImportMapper( - const UniReference< SvXMLImportPropertyMapper>& rMapper ) + const rtl::Reference< SvXMLImportPropertyMapper>& rMapper ) { // add map entries from rMapper to current map maPropMapper->AddMapperEntry( rMapper->getPropertySetMapper() ); @@ -77,7 +77,7 @@ void SvXMLImportPropertyMapper::ChainImportMapper( rMapper->maPropMapper = maPropMapper; // set rMapper as last mapper in current chain - UniReference< SvXMLImportPropertyMapper > xNext = mxNextMapper; + rtl::Reference< SvXMLImportPropertyMapper > xNext = mxNextMapper; if( xNext.is()) { while( xNext->mxNextMapper.is()) @@ -449,7 +449,7 @@ bool SvXMLImportPropertyMapper::_FillPropertySet( const vector<XMLPropertyState> & rProperties, const Reference<XPropertySet> & rPropSet, const Reference<XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, SvXMLImport& rImport, _ContextID_Index_Pair* pSpecialContextIds ) { @@ -567,7 +567,7 @@ struct PropertyPairLessFunctor : void SvXMLImportPropertyMapper::_PrepareForMultiPropertySet( const vector<XMLPropertyState> & rProperties, const Reference<XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, _ContextID_Index_Pair* pSpecialContextIds, Sequence<OUString>& rNames, Sequence<Any>& rValues) @@ -650,7 +650,7 @@ bool SvXMLImportPropertyMapper::_FillMultiPropertySet( const vector<XMLPropertyState> & rProperties, const Reference<XMultiPropertySet> & rMultiPropSet, const Reference<XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, _ContextID_Index_Pair* pSpecialContextIds ) { OSL_ENSURE( rMultiPropSet.is(), "Need multi property set. "); @@ -681,7 +681,7 @@ bool SvXMLImportPropertyMapper::_FillMultiPropertySet( bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet( const vector<XMLPropertyState> & rProperties, const Reference<XTolerantMultiPropertySet> & rTolMultiPropSet, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, SvXMLImport& rImport, _ContextID_Index_Pair* pSpecialContextIds ) { diff --git a/xmloff/source/style/xmlprcon.cxx b/xmloff/source/style/xmlprcon.cxx index 7c0594ad0831..f8b12df73a54 100644 --- a/xmloff/source/style/xmlprcon.cxx +++ b/xmloff/source/style/xmlprcon.cxx @@ -32,7 +32,7 @@ SvXMLPropertySetContext::SvXMLPropertySetContext( const uno::Reference< xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFam, vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, sal_Int32 nSIdx, sal_Int32 nEIdx ) : SvXMLImportContext( rImp, nPrfx, rLName ) , mnStartIdx( nSIdx ) @@ -56,7 +56,7 @@ SvXMLImportContext *SvXMLPropertySetContext::CreateChildContext( const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { - UniReference< XMLPropertySetMapper > aSetMapper( + rtl::Reference< XMLPropertySetMapper > aSetMapper( mxMapper->getPropertySetMapper() ); sal_Int32 nEntryIndex = aSetMapper->GetEntryIndex( nPrefix, rLocalName, mnFamily, mnStartIdx ); diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx index 08f6a346dfcc..c0d98b6cc96e 100644 --- a/xmloff/source/style/xmlprmap.cxx +++ b/xmloff/source/style/xmlprmap.cxx @@ -35,7 +35,7 @@ using ::xmloff::token::GetXMLToken; XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl( const XMLPropertyMapEntry& rMapEntry, - const UniReference< XMLPropertyHandlerFactory >& rFactory ) : + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory ) : sXMLAttributeName( GetXMLToken(rMapEntry.meXMLName) ), sAPIPropertyName( OUString(rMapEntry.msApiName, rMapEntry.nApiNameLength, RTL_TEXTENCODING_ASCII_US ) ), @@ -65,7 +65,7 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl( // Ctor XMLPropertySetMapper::XMLPropertySetMapper( const XMLPropertyMapEntry* pEntries, - const UniReference< XMLPropertyHandlerFactory >& rFactory, + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory, bool bForExport ) : mbOnlyExportMappings( bForExport) @@ -104,9 +104,9 @@ XMLPropertySetMapper::~XMLPropertySetMapper() } void XMLPropertySetMapper::AddMapperEntry( - const UniReference < XMLPropertySetMapper >& rMapper ) + const rtl::Reference < XMLPropertySetMapper >& rMapper ) { - for( vector < UniReference < XMLPropertyHandlerFactory > >::iterator + for( vector < rtl::Reference < XMLPropertyHandlerFactory > >::iterator aFIter = rMapper->aHdlFactories.begin(); aFIter != rMapper->aHdlFactories.end(); ++aFIter ) diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index 84f5425de3f7..c0a5f8682ce9 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -603,10 +603,10 @@ sal_uInt16 SvXMLStylesContext::GetFamily( const OUString& rValue ) const return nFamily; } -UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportPropertyMapper( +rtl::Reference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportPropertyMapper( sal_uInt16 nFamily ) const { - UniReference < SvXMLImportPropertyMapper > xMapper; + rtl::Reference < SvXMLImportPropertyMapper > xMapper; switch( nFamily ) { @@ -652,7 +652,7 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty case XML_STYLE_FAMILY_SD_POOL_ID: if(!mxShapeImpPropMapper.is()) { - UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport(); + rtl::Reference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport(); ((SvXMLStylesContext*)this)->mxShapeImpPropMapper = aImpHelper->GetPropertySetMapper(); } |