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 /include | |
parent | 8635fa156ba63e5f63565b6d19ea798a61643b01 (diff) |
drop UniReference in favour of rtl::Reference
since they're doing the same thing.
Change-Id: I76134b6b848db8628f315fe5bd9eb972a6bf0cb6
Diffstat (limited to 'include')
24 files changed, 134 insertions, 355 deletions
diff --git a/include/xmloff/SchXMLExportHelper.hxx b/include/xmloff/SchXMLExportHelper.hxx index af866be30304..5149c7a89c19 100644 --- a/include/xmloff/SchXMLExportHelper.hxx +++ b/include/xmloff/SchXMLExportHelper.hxx @@ -22,7 +22,7 @@ #include <sal/config.h> #include <xmloff/dllapi.h> #include <sal/types.h> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <rtl/ustrbuf.hxx> #include <com/sun/star/util/XStringMapping.hpp> #include <com/sun/star/awt/Size.hpp> @@ -41,7 +41,7 @@ class SchXMLExportHelper_Impl; the latter case you have to provide a table address mapper if the cell addressing set at the document is not in XML format. */ -class XMLOFF_DLLPUBLIC SchXMLExportHelper : public UniRefBase +class XMLOFF_DLLPUBLIC SchXMLExportHelper : public salhelper::SimpleReferenceObject { public: SchXMLExportHelper( SvXMLExport& rExport, diff --git a/include/xmloff/SchXMLImportHelper.hxx b/include/xmloff/SchXMLImportHelper.hxx index e35f5b694a8a..b4dd0e518e33 100644 --- a/include/xmloff/SchXMLImportHelper.hxx +++ b/include/xmloff/SchXMLImportHelper.hxx @@ -19,7 +19,7 @@ #ifndef INCLUDED_XMLOFF_SCHXMLIMPORTHELPER_HXX #define INCLUDED_XMLOFF_SCHXMLIMPORTHELPER_HXX -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/families.hxx> #include <com/sun/star/util/XStringMapping.hpp> #include <com/sun/star/chart/XChartDocument.hpp> @@ -61,7 +61,7 @@ class SvXMLImport; converts table addresses in XML format to the appropriate application format. */ -class SchXMLImportHelper : public UniRefBase +class SchXMLImportHelper : public salhelper::SimpleReferenceObject { private: com::sun::star::uno::Reference< com::sun::star::chart::XChartDocument > mxChartDoc; diff --git a/include/xmloff/XMLFontAutoStylePool.hxx b/include/xmloff/XMLFontAutoStylePool.hxx index 5deabf76e9cd..b26c0d35ea84 100644 --- a/include/xmloff/XMLFontAutoStylePool.hxx +++ b/include/xmloff/XMLFontAutoStylePool.hxx @@ -24,14 +24,14 @@ #include <xmloff/dllapi.h> #include <rtl/ustring.hxx> #include <tools/fontenum.hxx> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <set> class XMLFontAutoStylePool_Impl; typedef std::set<OUString> XMLFontAutoStylePoolNames_Impl; class SvXMLExport; -class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public UniRefBase +class XMLOFF_DLLPUBLIC XMLFontAutoStylePool : public salhelper::SimpleReferenceObject { SvXMLExport& rExport; diff --git a/include/xmloff/XMLPageExport.hxx b/include/xmloff/XMLPageExport.hxx index 5961ad3b30a8..70ae41dc768e 100644 --- a/include/xmloff/XMLPageExport.hxx +++ b/include/xmloff/XMLPageExport.hxx @@ -26,7 +26,8 @@ #include <rtl/ustring.hxx> #include <vector> #include <xmloff/attrlist.hxx> -#include <xmloff/uniref.hxx> +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <com/sun/star/container/XIndexAccess.hpp> namespace com { namespace sun { namespace star { @@ -50,7 +51,7 @@ struct XMLPageExportNameEntry -class XMLOFF_DLLPUBLIC XMLPageExport : public UniRefBase +class XMLOFF_DLLPUBLIC XMLPageExport : public salhelper::SimpleReferenceObject { SvXMLExport& rExport; @@ -63,9 +64,9 @@ class XMLOFF_DLLPUBLIC XMLPageExport : public UniRefBase ::std::vector< XMLPageExportNameEntry > aNameVector; SAL_DLLPRIVATE bool findPageMasterName( const OUString& rStyleName, OUString& rPMName ) const; - UniReference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory; - UniReference < XMLPropertySetMapper > xPageMasterPropSetMapper; - UniReference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper; + rtl::Reference < XMLPropertyHandlerFactory > xPageMasterPropHdlFactory; + rtl::Reference < XMLPropertySetMapper > xPageMasterPropSetMapper; + rtl::Reference < SvXMLExportPropertyMapper > xPageMasterExportPropMapper; protected: diff --git a/include/xmloff/animationexport.hxx b/include/xmloff/animationexport.hxx index 4614fc961f5c..f6641447563b 100644 --- a/include/xmloff/animationexport.hxx +++ b/include/xmloff/animationexport.hxx @@ -26,7 +26,7 @@ #include <com/sun/star/animations/XAnimationNode.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> class SvXMLExport; @@ -34,7 +34,7 @@ namespace xmloff { class AnimationsExporterImpl; -class XMLOFF_DLLPUBLIC AnimationsExporter : public UniRefBase +class XMLOFF_DLLPUBLIC AnimationsExporter : public salhelper::SimpleReferenceObject { AnimationsExporterImpl* mpImpl; diff --git a/include/xmloff/animexp.hxx b/include/xmloff/animexp.hxx index 61946ae5576b..b5a575c05d2e 100644 --- a/include/xmloff/animexp.hxx +++ b/include/xmloff/animexp.hxx @@ -21,13 +21,13 @@ #define INCLUDED_XMLOFF_ANIMEXP_HXX #include <com/sun/star/drawing/XShape.hpp> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> class AnimExpImpl; class SvXMLExport; class XMLShapeExport; -class XMLAnimationsExporter : public UniRefBase +class XMLAnimationsExporter : public salhelper::SimpleReferenceObject { AnimExpImpl* mpImpl; diff --git a/include/xmloff/prhdlfac.hxx b/include/xmloff/prhdlfac.hxx index 7f3eda5643c1..e21b5cb32415 100644 --- a/include/xmloff/prhdlfac.hxx +++ b/include/xmloff/prhdlfac.hxx @@ -25,7 +25,7 @@ #include <sal/types.h> #include <map> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlprhdl.hxx> /** @@ -37,7 +37,7 @@ you have to override the virtual method GetPropertyHandler ( see below ). */ -class XMLOFF_DLLPUBLIC XMLPropertyHandlerFactory : public UniRefBase +class XMLOFF_DLLPUBLIC XMLPropertyHandlerFactory : public salhelper::SimpleReferenceObject { public: virtual ~XMLPropertyHandlerFactory(); diff --git a/include/xmloff/shapeexport.hxx b/include/xmloff/shapeexport.hxx index 9a3ec8ecb6ad..134b15f52f84 100644 --- a/include/xmloff/shapeexport.hxx +++ b/include/xmloff/shapeexport.hxx @@ -26,7 +26,7 @@ #include <rtl/ref.hxx> #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <com/sun/star/drawing/XShape.hpp> #include <com/sun/star/drawing/XShapes.hpp> @@ -154,14 +154,14 @@ namespace basegfx class B2DHomMatrix; } // end of namespace basegfx -class XMLOFF_DLLPUBLIC XMLShapeExport : public UniRefBase +class XMLOFF_DLLPUBLIC XMLShapeExport : public salhelper::SimpleReferenceObject { private: SvXMLExport& mrExport; - UniReference< XMLPropertyHandlerFactory > mxSdPropHdlFactory; - UniReference< SvXMLExportPropertyMapper > mxPropertySetMapper; - UniReference< XMLAnimationsExporter > mxAnimationsExporter; + rtl::Reference< XMLPropertyHandlerFactory > mxSdPropHdlFactory; + rtl::Reference< SvXMLExportPropertyMapper > mxPropertySetMapper; + rtl::Reference< XMLAnimationsExporter > mxAnimationsExporter; ShapesInfos maShapesInfos; ShapesInfos::iterator maCurrentShapesIter; bool mbExportLayer; @@ -179,7 +179,7 @@ protected: const SvXMLExport& GetExport() const { return mrExport; } private: - SAL_DLLPRIVATE UniReference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } + SAL_DLLPRIVATE rtl::Reference< SvXMLExportPropertyMapper > GetPropertySetMapper() const { return mxPropertySetMapper; } const OUString msZIndex; const OUString msPrintable; @@ -287,10 +287,10 @@ public: If this is a non NULL reference, the animation information from all shapes given to exportShape() from now on are collected. */ - void setAnimationsExporter( UniReference< XMLAnimationsExporter > xAnimExport ) { mxAnimationsExporter = xAnimExport; } + void setAnimationsExporter( rtl::Reference< XMLAnimationsExporter > xAnimExport ) { mxAnimationsExporter = xAnimExport; } /** returns the last set XMLAnimationExport */ - UniReference< XMLAnimationsExporter > getAnimationsExporter() const { return mxAnimationsExporter; } + rtl::Reference< XMLAnimationsExporter > getAnimationsExporter() const { return mxAnimationsExporter; } /// returns the export property mapper for external chaining static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport ); diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx index 47156c886482..a6d3a25ddbd9 100644 --- a/include/xmloff/shapeimport.hxx +++ b/include/xmloff/shapeimport.hxx @@ -29,7 +29,7 @@ #include <com/sun/star/drawing/HomogenMatrix.hpp> #include <com/sun/star/drawing/ProjectionMode.hpp> #include <com/sun/star/drawing/ShadeMode.hpp> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlictxt.hxx> #include <xmloff/table/XMLTableImport.hxx> @@ -269,7 +269,7 @@ class ShapeSortContext; struct XMLShapeImportHelperImpl; struct XMLShapeImportPageContextImpl; -class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public UniRefBase +class XMLOFF_DLLPUBLIC XMLShapeImportHelper : public salhelper::SimpleReferenceObject { XMLShapeImportHelperImpl* mpImpl; diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx index c58fc7f2d2c3..273248565006 100644 --- a/include/xmloff/styleexp.hxx +++ b/include/xmloff/styleexp.hxx @@ -24,7 +24,7 @@ #include <rtl/ustring.hxx> #include <com/sun/star/uno/Reference.h> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> namespace com { namespace sun { namespace star { @@ -48,7 +48,7 @@ class SvXMLExportPropertyMapper; class SvXMLAutoStylePoolP; class SvXMLExport; -class XMLOFF_DLLPUBLIC XMLStyleExport : public UniRefBase +class XMLOFF_DLLPUBLIC XMLStyleExport : public salhelper::SimpleReferenceObject { SvXMLExport& rExport; protected: @@ -73,7 +73,7 @@ protected: const ::com::sun::star::uno::Reference< ::com::sun::star::style::XStyle > & rStyle, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > & xStyles, const OUString* pPrefix = 0L ); @@ -93,13 +93,13 @@ public: // void exportStyleFamily( // const OUString& rFamily, const OUString& rXMLFamily, -// const UniReference < XMLPropertySetMapper >& rPropMapper, +// const rtl::Reference < XMLPropertySetMapper >& rPropMapper, // bool bUsed, sal_uInt16 nFamily = 0, // const OUString* pPrefix = 0L); // void exportStyleFamily( // const sal_Char *pFamily, const OUString& rXMLFamily, -// const UniReference < XMLPropertySetMapper >& rPropMapper, +// const rtl::Reference < XMLPropertySetMapper >& rPropMapper, // bool bUsed, sal_uInt16 nFamily = 0, // const OUString* pPrefix = 0L); @@ -107,17 +107,17 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xPropSet, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper ); + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper ); void exportStyleFamily( const OUString& rFamily, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily = 0, const OUString* pPrefix = 0L); void exportStyleFamily( const sal_Char *pFamily, const OUString& rXMLFamily, - const UniReference < SvXMLExportPropertyMapper >& rPropMapper, + const rtl::Reference < SvXMLExportPropertyMapper >& rPropMapper, bool bUsed, sal_uInt16 nFamily = 0, const OUString* pPrefix = 0L); }; diff --git a/include/xmloff/table/XMLTableExport.hxx b/include/xmloff/table/XMLTableExport.hxx index 8fe048c120e2..cf324e76924e 100644 --- a/include/xmloff/table/XMLTableExport.hxx +++ b/include/xmloff/table/XMLTableExport.hxx @@ -38,7 +38,7 @@ #include <rtl/ref.hxx> #include <xmloff/dllapi.h> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/xmlexppr.hxx> @@ -61,7 +61,7 @@ struct XMLTableInfo typedef ::std::map< const ::com::sun::star::uno::Reference< com::sun::star::table::XColumnRowRange >, boost::shared_ptr< XMLTableInfo > > TableInfoMap; -class XMLOFF_DLLPUBLIC XMLTableExport : public UniRefBase +class XMLOFF_DLLPUBLIC XMLTableExport : public salhelper::SimpleReferenceObject { public: XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExportPropertyMapper >& xCellExportPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef ); diff --git a/include/xmloff/table/XMLTableImport.hxx b/include/xmloff/table/XMLTableImport.hxx index bb40ff8bf954..4de0822b3bb3 100644 --- a/include/xmloff/table/XMLTableImport.hxx +++ b/include/xmloff/table/XMLTableImport.hxx @@ -24,7 +24,7 @@ #include <xmloff/dllapi.h> #include <xmloff/xmlictxt.hxx> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/xmlimppr.hxx> #include <xmloff/prhdlfac.hxx> @@ -38,7 +38,7 @@ class SvXMLStyleContext; typedef std::map< OUString, OUString > XMLTableTemplate; typedef std::map < OUString, boost::shared_ptr< XMLTableTemplate > > XMLTableTemplateMap; -class XMLTableImport : public UniRefBase +class XMLTableImport : public salhelper::SimpleReferenceObject { friend class XMLTableImportContext; diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx index 4ab7881b00da..892fd75e4385 100644 --- a/include/xmloff/txtimp.hxx +++ b/include/xmloff/txtimp.hxx @@ -30,7 +30,8 @@ #include <boost/scoped_ptr.hpp> #include <xmloff/xmltkmap.hxx> -#include <xmloff/uniref.hxx> +#include <rtl/ref.hxx> +#include <salhelper/simplereferenceobject.hxx> class XMLTextListsHelper; class SvXMLImportContext; @@ -365,7 +366,7 @@ enum XMLTextType #define XML_TEXT_RENAME_TYPE_FRAME 10 #define XML_TEXT_RENAME_TYPE_TABLE 20 -class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase, +class XMLOFF_DLLPUBLIC XMLTextImportHelper : public salhelper::SimpleReferenceObject, private boost::noncopyable { private: @@ -543,13 +544,13 @@ public: const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet >& rFrmPropSet ); - UniReference< SvXMLImportPropertyMapper > const& + rtl::Reference< SvXMLImportPropertyMapper > const& GetParaImportPropertySetMapper() const; - UniReference< SvXMLImportPropertyMapper > const& + rtl::Reference< SvXMLImportPropertyMapper > const& GetTextImportPropertySetMapper() const; - UniReference< SvXMLImportPropertyMapper > const& + rtl::Reference< SvXMLImportPropertyMapper > const& GetSectionImportPropertySetMapper() const; - UniReference< SvXMLImportPropertyMapper > const& + rtl::Reference< SvXMLImportPropertyMapper > const& GetRubyImportPropertySetMapper() const; static SvXMLImportPropertyMapper *CreateShapeExtPropMapper(SvXMLImport&); diff --git a/include/xmloff/txtimppr.hxx b/include/xmloff/txtimppr.hxx index 2290786b8b81..baa7cee25dca 100644 --- a/include/xmloff/txtimppr.hxx +++ b/include/xmloff/txtimppr.hxx @@ -56,7 +56,7 @@ protected: const SvXMLNamespaceMap& rNamespaceMap ) const SAL_OVERRIDE; public: XMLTextImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImport ); virtual ~XMLTextImportPropertyMapper(); diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx index ff4037420f12..2323660455f6 100644 --- a/include/xmloff/txtparae.hxx +++ b/include/xmloff/txtparae.hxx @@ -26,7 +26,6 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> -#include <xmloff/uniref.hxx> #include <xmloff/xmlexppr.hxx> #include <xmloff/styleexp.hxx> #include <xmloff/xmltoken.hxx> @@ -70,12 +69,12 @@ class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport // SvXMLExport& rExport; SvXMLAutoStylePoolP& rAutoStylePool; - UniReference < SvXMLExportPropertyMapper > xParaPropMapper; - UniReference < SvXMLExportPropertyMapper > xTextPropMapper; - UniReference < SvXMLExportPropertyMapper > xFramePropMapper; - UniReference < SvXMLExportPropertyMapper > xAutoFramePropMapper; - UniReference < SvXMLExportPropertyMapper > xSectionPropMapper; - UniReference < SvXMLExportPropertyMapper > xRubyPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xParaPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xTextPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xFramePropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xAutoFramePropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xSectionPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xRubyPropMapper; const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets; XMLTextFieldExport *pFieldExport; @@ -211,29 +210,29 @@ protected: const SvXMLAutoStylePoolP& GetAutoStylePool() const { return rAutoStylePool; } public: - UniReference < SvXMLExportPropertyMapper > GetParaPropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetParaPropMapper() const { return xParaPropMapper; } - UniReference < SvXMLExportPropertyMapper > GetTextPropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetTextPropMapper() const { return xTextPropMapper; } - UniReference < SvXMLExportPropertyMapper > GetFramePropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetFramePropMapper() const { return xFramePropMapper; } - UniReference < SvXMLExportPropertyMapper > GetAutoFramePropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetAutoFramePropMapper() const { return xAutoFramePropMapper; } - UniReference < SvXMLExportPropertyMapper > GetSectionPropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetSectionPropMapper() const { return xSectionPropMapper; } - UniReference < SvXMLExportPropertyMapper > GetRubyPropMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetRubyPropMapper() const { return xRubyPropMapper; } @@ -647,7 +646,7 @@ public: bool IsBlockMode() const { return bBlock; } - UniReference < SvXMLExportPropertyMapper > GetParagraphPropertyMapper() const + rtl::Reference < SvXMLExportPropertyMapper > GetParagraphPropertyMapper() const { return xParaPropMapper; } @@ -667,7 +666,7 @@ public: void PreventExportOfControlsInMuteSections( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess> & rShapes, - UniReference<xmloff::OFormLayerXMLExport> xFormExport ); + rtl::Reference<xmloff::OFormLayerXMLExport> xFormExport ); SinglePropertySetInfoCache& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache; } diff --git a/include/xmloff/uniref.hxx b/include/xmloff/uniref.hxx deleted file mode 100644 index e1ef4b81b667..000000000000 --- a/include/xmloff/uniref.hxx +++ /dev/null @@ -1,224 +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 . - */ - -#ifndef INCLUDED_XMLOFF_UNIREF_HXX -#define INCLUDED_XMLOFF_UNIREF_HXX - -#include <sal/config.h> -#include <xmloff/dllapi.h> -#include <sal/types.h> -#include <osl/interlck.h> - -/** - * An instance of this class holds a pointer to an object. The lifetime of - * the object is controlled by the instance. The constructor calls - * acquire() and the destructor calls release(). - * You could derive your class from the baseclass UniRefBase which implements - * the methods acquire and release, yet. - */ -template< class T > class UniReference -{ -private: - T* mpElement; - -public: - /** Create an empty reference.*/ - UniReference() - : mpElement( NULL ) - {} - - /** Destroy the reference and releases the element.*/ - inline ~UniReference(); - - /** Create a new reference with the same element as in rRef and acquire this one.*/ - inline UniReference( const UniReference< T > & rRef ); - - /** - * Create a new reference with the given element pElement and acquire this one. - */ - inline UniReference( T * pElement ); - - /** - * Release the reference and set the new one pObj. - */ - inline UniReference< T > & operator = ( T * pElement ); - - /** - * Release the reference and set the new one from rObj. - */ - inline UniReference< T > & operator = ( const UniReference< T > & rRef ); - - /** - * Return the pointer to the element, may be null. - */ - inline T* operator -> () const; - - /** - * Returns true if the pointer to the element is valid. - */ - inline bool is() const; - - /** - * Return true if both elements refer to the same object. - */ - inline bool operator == ( const UniReference & rRef ) const; - - /** - * Return true if both elements does not refer to the same object. - */ - inline bool operator != ( const UniReference & rRef ) const; - - /** Gets implementation pointer. - This call does <b>not</b> acquire the implementation. - <br> - @return <b>un</b>acquired implementation pointer - */ - inline T* get() const; -}; - -class XMLOFF_DLLPUBLIC UniRefBase -{ -private: - /** - * The reference counter. - */ - oslInterlockedCount m_refCount; - -public: - UniRefBase() : m_refCount( 0 ) - {} - virtual ~UniRefBase(); - - void acquire() { osl_atomic_increment( &m_refCount ); } - void release(); - -}; - - - -// Inline-implementations of UniReference - - -/** Create a new reference with the same element as in rRef and acquire this one.*/ -template< class T > -inline UniReference< T >::UniReference( const UniReference< T > & rRef ) - : mpElement( rRef.mpElement ) -{ - if( mpElement ) - mpElement->acquire(); -} - -template< class T > -inline UniReference< T >::~UniReference() -{ - if( mpElement ) - mpElement->release(); -} - -/** - * Create a new reference with the given element pElement and acquire this one. - * @param pInterface the interface, pointer may be null. - */ -template< class T > -inline UniReference< T >::UniReference( T * pElement ) - : mpElement( pElement ) -{ - if( mpElement ) - mpElement->acquire(); -} - -/** - * Release the reference and set the new one pObj.<BR> - * <B>The operation is not thread save. You must protect all assigns to a reference class.</B> - */ -template< class T > -inline UniReference< T > & UniReference< T >::operator = ( T * pElement ) -{ - if( pElement ) - pElement->acquire(); - if( mpElement ) - mpElement->release(); - - mpElement = pElement; - - return *this; -} - -/** - * Release the reference and set the new one from rObj.<BR> - * <B>The operation is not thread save. You must protect all assigns to a reference class.</B> - */ -template< class T > -inline UniReference< T > & UniReference< T >::operator = ( const UniReference< T > & rRef ) -{ - return operator = ( rRef.mpElement ); -} - -/** - * Return the pointer to the interface, may be null. - */ -template< class T > -inline T* UniReference< T >::operator -> () const -{ - return get(); -} - -/** - * Return the pointer to the interface, may be null. - */ -template< class T > -inline T* UniReference< T >::get () const -{ - return static_cast< T * >( mpElement ); -} - -/** - * Returns true if the pointer to the interface is valid. - */ -template< class T > -inline bool UniReference< T >::is() const -{ - return (mpElement != 0); -} -/** - * Return true if both interfaces refer to the same object. The operation can be - * much more expensive than a pointer comparison.<BR> - * - * @param rRef another interface reference - */ -template< class T > -inline bool UniReference< T >::operator == ( const UniReference & rRef ) const -{ - return ( mpElement == rRef.mpElement ); -} -/** - * Return true if both interfaces does not refer to the same object. The operation can be - * much more expensive than a pointer comparison.<BR> - * - * @param rRef another interface reference - */ -template< class T > -inline bool UniReference< T >::operator != ( const UniReference & rRef ) const -{ - return ( ! operator == ( rRef ) ); -} - -#endif // INCLUDED_XMLOFF_UNIREF_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/xmloff/xmlaustp.hxx b/include/xmloff/xmlaustp.hxx index 55cb05d52bf3..812f69ffef93 100644 --- a/include/xmloff/xmlaustp.hxx +++ b/include/xmloff/xmlaustp.hxx @@ -24,7 +24,7 @@ #include <xmloff/dllapi.h> #include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <xmloff/xmlprmap.hxx> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> class SvXMLExportPropertyMapper; class SvXMLNamespaceMap; @@ -35,7 +35,7 @@ namespace com { namespace sun { namespace star { namespace uno { template<typename A> class Sequence; } } } } -class XMLOFF_DLLPUBLIC SvXMLAutoStylePoolP : public UniRefBase +class XMLOFF_DLLPUBLIC SvXMLAutoStylePoolP : public salhelper::SimpleReferenceObject { friend class Test; friend class SvXMLAutoStylePoolP_Impl; @@ -79,10 +79,10 @@ public: // TODO: Remove this ugly method as soon as possible void AddFamily( sal_Int32 nFamily, const OUString& rStrName, SvXMLExportPropertyMapper* pMapper, const OUString& aStrPrefix, bool bAsFamily = true ); 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 ); /// Register a name that must not be used as a generated name. void RegisterName( sal_Int32 nFamily, const OUString& rName ); diff --git a/include/xmloff/xmlexp.hxx b/include/xmloff/xmlexp.hxx index 62a68be990c3..57cc643536bf 100644 --- a/include/xmloff/xmlexp.hxx +++ b/include/xmloff/xmlexp.hxx @@ -132,13 +132,13 @@ class XMLOFF_DLLPUBLIC SvXMLExport : public ::cppu::WeakImplHelper6< SvXMLNumFmtExport *mpNumExport; ProgressBarHelper *mpProgressBarHelper; - UniReference< XMLTextParagraphExport > mxTextParagraphExport; - UniReference< XMLShapeExport > mxShapeExport; - UniReference< SvXMLAutoStylePoolP > mxAutoStylePool; - UniReference< SchXMLExportHelper > mxChartExport; - UniReference< XMLPageExport > mxPageExport; - UniReference< XMLFontAutoStylePool > mxFontAutoStylePool; - UniReference< xmloff::OFormLayerXMLExport > mxFormExport; + rtl::Reference< XMLTextParagraphExport > mxTextParagraphExport; + rtl::Reference< XMLShapeExport > mxShapeExport; + rtl::Reference< SvXMLAutoStylePoolP > mxAutoStylePool; + rtl::Reference< SchXMLExportHelper > mxChartExport; + rtl::Reference< XMLPageExport > mxPageExport; + rtl::Reference< XMLFontAutoStylePool > mxFontAutoStylePool; + rtl::Reference< xmloff::OFormLayerXMLExport > mxFormExport; XMLEventExport* mpEventExport; XMLImageMapExport* mpImageMapExport; XMLErrors* mpXMLErrors; @@ -441,27 +441,27 @@ public: } // get export helper for text - inline UniReference< XMLTextParagraphExport > GetTextParagraphExport(); + inline rtl::Reference< XMLTextParagraphExport > GetTextParagraphExport(); // get export helper for shapes - inline UniReference< XMLShapeExport > GetShapeExport(); + inline rtl::Reference< XMLShapeExport > GetShapeExport(); // get auto style pool - inline UniReference< SvXMLAutoStylePoolP > GetAutoStylePool(); + inline rtl::Reference< SvXMLAutoStylePoolP > GetAutoStylePool(); // get Page Export - inline UniReference< XMLPageExport > GetPageExport(); + inline rtl::Reference< XMLPageExport > GetPageExport(); // get chart export helper - inline UniReference< SchXMLExportHelper > GetChartExport(); + inline rtl::Reference< SchXMLExportHelper > GetChartExport(); // get font auto style pool - inline UniReference< XMLFontAutoStylePool > GetFontAutoStylePool(); + inline rtl::Reference< XMLFontAutoStylePool > GetFontAutoStylePool(); ProgressBarHelper* GetProgressBarHelper(); // get Formlayer Export - inline UniReference< xmloff::OFormLayerXMLExport > GetFormExport(); + inline rtl::Reference< xmloff::OFormLayerXMLExport > GetFormExport(); inline bool HasFormExport(); // get XPropertySet with export information @@ -581,7 +581,7 @@ public: bool SetNullDateOnUnitConverter(); }; -inline UniReference< XMLTextParagraphExport > SvXMLExport::GetTextParagraphExport() +inline rtl::Reference< XMLTextParagraphExport > SvXMLExport::GetTextParagraphExport() { if( !mxTextParagraphExport.is() ) mxTextParagraphExport = CreateTextParagraphExport(); @@ -589,7 +589,7 @@ inline UniReference< XMLTextParagraphExport > SvXMLExport::GetTextParagraphExpor return mxTextParagraphExport; } -inline UniReference< XMLShapeExport > SvXMLExport::GetShapeExport() +inline rtl::Reference< XMLShapeExport > SvXMLExport::GetShapeExport() { if( !mxShapeExport.is() ) mxShapeExport = CreateShapeExport(); @@ -597,7 +597,7 @@ inline UniReference< XMLShapeExport > SvXMLExport::GetShapeExport() return mxShapeExport; } -inline UniReference< SvXMLAutoStylePoolP > SvXMLExport::GetAutoStylePool() +inline rtl::Reference< SvXMLAutoStylePoolP > SvXMLExport::GetAutoStylePool() { if( !mxAutoStylePool.is() ) mxAutoStylePool = CreateAutoStylePool(); @@ -605,7 +605,7 @@ inline UniReference< SvXMLAutoStylePoolP > SvXMLExport::GetAutoStylePool() return mxAutoStylePool; } -inline UniReference< SchXMLExportHelper > SvXMLExport::GetChartExport() +inline rtl::Reference< SchXMLExportHelper > SvXMLExport::GetChartExport() { if( !mxChartExport.is() ) mxChartExport = CreateChartExport(); @@ -613,7 +613,7 @@ inline UniReference< SchXMLExportHelper > SvXMLExport::GetChartExport() return mxChartExport; } -inline UniReference< XMLPageExport > SvXMLExport::GetPageExport() +inline rtl::Reference< XMLPageExport > SvXMLExport::GetPageExport() { if( !mxPageExport.is() ) mxPageExport = CreatePageExport(); @@ -621,7 +621,7 @@ inline UniReference< XMLPageExport > SvXMLExport::GetPageExport() return mxPageExport; } -inline UniReference< XMLFontAutoStylePool > SvXMLExport::GetFontAutoStylePool() +inline rtl::Reference< XMLFontAutoStylePool > SvXMLExport::GetFontAutoStylePool() { if( !mxFontAutoStylePool.is() ) mxFontAutoStylePool = CreateFontAutoStylePool(); @@ -629,7 +629,7 @@ inline UniReference< XMLFontAutoStylePool > SvXMLExport::GetFontAutoStylePool() return mxFontAutoStylePool; } -inline UniReference< xmloff::OFormLayerXMLExport > SvXMLExport::GetFormExport() +inline rtl::Reference< xmloff::OFormLayerXMLExport > SvXMLExport::GetFormExport() { if( !mxFormExport.is() ) mxFormExport = CreateFormExport(); diff --git a/include/xmloff/xmlexppr.hxx b/include/xmloff/xmlexppr.hxx index 7a1f655e62f0..8d98a1b257dd 100644 --- a/include/xmloff/xmlexppr.hxx +++ b/include/xmloff/xmlexppr.hxx @@ -20,10 +20,11 @@ #ifndef INCLUDED_XMLOFF_XMLEXPPR_HXX #define INCLUDED_XMLOFF_XMLEXPPR_HXX +#include <rtl/ref.hxx> #include <sal/config.h> #include <xmloff/dllapi.h> #include <xmloff/xmlprmap.hxx> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> class SvXMLUnitConverter; @@ -39,7 +40,7 @@ class SvXMLExport; // even if its empty #define XML_EXPORT_FLAG_IGN_WS 0x0008 -class XMLOFF_DLLPUBLIC SvXMLExportPropertyMapper : public UniRefBase +class XMLOFF_DLLPUBLIC SvXMLExportPropertyMapper : public salhelper::SimpleReferenceObject { struct Impl; Impl* mpImpl; @@ -91,14 +92,14 @@ protected: public: SvXMLExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ); + const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~SvXMLExportPropertyMapper(); // Add a ExportPropertyMapper at the end of the import mapper chain. // The added mapper MUST not be used outside the Mapper chain any longer, // because its PropertyMapper will be replaced. void ChainExportMapper( - const UniReference< SvXMLExportPropertyMapper>& rMapper ); + const rtl::Reference< SvXMLExportPropertyMapper>& rMapper ); /** Filter all properties we don't want to export: Take all properties of the XPropertySet which are also found in the @@ -174,7 +175,7 @@ public: const ::std::vector< XMLPropertyState > *pProperties = 0, sal_uInt32 nIdx = 0 ) const; - const UniReference<XMLPropertySetMapper>& getPropertySetMapper() const; + const rtl::Reference<XMLPropertySetMapper>& getPropertySetMapper() const; void SetStyleName( const OUString& rStyleName ); const OUString& GetStyleName() const; diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx index 397946314cb1..24414ff6a71f 100644 --- a/include/xmloff/xmlimp.hxx +++ b/include/xmloff/xmlimp.hxx @@ -106,10 +106,10 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper6< ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver > mxEmbeddedResolver; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxImportInfo; - UniReference< XMLTextImportHelper > mxTextImport; - UniReference< XMLShapeImportHelper > mxShapeImport; - UniReference< SchXMLImportHelper > mxChartImport; - UniReference< ::xmloff::OFormLayerXMLImport > mxFormImport; + rtl::Reference< XMLTextImportHelper > mxTextImport; + rtl::Reference< XMLShapeImportHelper > mxShapeImport; + rtl::Reference< SchXMLImportHelper > mxChartImport; + rtl::Reference< ::xmloff::OFormLayerXMLImport > mxFormImport; SvXMLImportContextRef mxFontDecls; SvXMLImportContextRef mxStyles; @@ -256,18 +256,18 @@ public: virtual void SetStatistics(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > & i_rStats); // get import helper for text - inline UniReference< XMLTextImportHelper > GetTextImport(); + inline rtl::Reference< XMLTextImportHelper > GetTextImport(); bool HasTextImport() const { return mxTextImport.is(); } inline SvXMLNumFmtHelper* GetDataStylesImport(); // get import helper for shapes - inline UniReference< XMLShapeImportHelper > GetShapeImport(); + inline rtl::Reference< XMLShapeImportHelper > GetShapeImport(); // get import helper for charts - inline UniReference< SchXMLImportHelper > GetChartImport(); + inline rtl::Reference< SchXMLImportHelper > GetChartImport(); // get import helper for form layer - inline UniReference< ::xmloff::OFormLayerXMLImport > GetFormImport(); + inline rtl::Reference< ::xmloff::OFormLayerXMLImport > GetFormImport(); // get XPropertySet with import information inline ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getImportInfo() const { return mxImportInfo; } @@ -482,7 +482,7 @@ public: bool needFixPositionAfterZ() const; }; -inline UniReference< XMLTextImportHelper > SvXMLImport::GetTextImport() +inline rtl::Reference< XMLTextImportHelper > SvXMLImport::GetTextImport() { if( !mxTextImport.is() ) mxTextImport = CreateTextImport(); @@ -490,7 +490,7 @@ inline UniReference< XMLTextImportHelper > SvXMLImport::GetTextImport() return mxTextImport; } -inline UniReference< XMLShapeImportHelper > SvXMLImport::GetShapeImport() +inline rtl::Reference< XMLShapeImportHelper > SvXMLImport::GetShapeImport() { if( !mxShapeImport.is() ) mxShapeImport = CreateShapeImport(); @@ -498,7 +498,7 @@ inline UniReference< XMLShapeImportHelper > SvXMLImport::GetShapeImport() return mxShapeImport; } -inline UniReference< SchXMLImportHelper > SvXMLImport::GetChartImport() +inline rtl::Reference< SchXMLImportHelper > SvXMLImport::GetChartImport() { if( !mxChartImport.is() ) mxChartImport = CreateChartImport(); @@ -506,7 +506,7 @@ inline UniReference< SchXMLImportHelper > SvXMLImport::GetChartImport() return mxChartImport; } -inline UniReference< ::xmloff::OFormLayerXMLImport > SvXMLImport::GetFormImport() +inline rtl::Reference< ::xmloff::OFormLayerXMLImport > SvXMLImport::GetFormImport() { if( !mxFormImport.is() ) mxFormImport = CreateFormImport(); diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx index bf493b201209..33679a1607da 100644 --- a/include/xmloff/xmlimppr.hxx +++ b/include/xmloff/xmlimppr.hxx @@ -19,6 +19,7 @@ #ifndef INCLUDED_XMLOFF_XMLIMPPR_HXX #define INCLUDED_XMLOFF_XMLIMPPR_HXX +#include <rtl/ref.hxx> #include <sal/config.h> #include <xmloff/dllapi.h> #include <sal/types.h> @@ -29,7 +30,7 @@ #include <com/sun/star/beans/XTolerantMultiPropertySet.hpp> #include <vector> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> struct XMLPropertyState; class XMLPropertySetMapper; @@ -50,9 +51,9 @@ struct _ContextID_Index_Pair sal_Int32 nIndex; }; -class XMLOFF_DLLPUBLIC SvXMLImportPropertyMapper : public UniRefBase +class XMLOFF_DLLPUBLIC SvXMLImportPropertyMapper : public salhelper::SimpleReferenceObject { - UniReference< SvXMLImportPropertyMapper> mxNextMapper; + rtl::Reference< SvXMLImportPropertyMapper> mxNextMapper; SvXMLImport& rImport; // access to error handling @@ -62,13 +63,13 @@ class XMLOFF_DLLPUBLIC SvXMLImportPropertyMapper : public UniRefBase protected: - UniReference< XMLPropertySetMapper > maPropMapper; + rtl::Reference< XMLPropertySetMapper > maPropMapper; SvXMLImport& GetImport() const { return rImport;} public: SvXMLImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImport); virtual ~SvXMLImportPropertyMapper(); @@ -76,7 +77,7 @@ public: // The added mapper MUST not be used outside the Mapper chain any longer, // because its PropertyMapper will be replaced. void ChainImportMapper( - const UniReference< SvXMLImportPropertyMapper>& rMapper ); + const rtl::Reference< SvXMLImportPropertyMapper>& rMapper ); /** fills the given itemset with the attributes in the given list * the map is only searched within the range @@ -121,7 +122,7 @@ public: ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues ) const; - inline const UniReference< XMLPropertySetMapper >& + inline const rtl::Reference< XMLPropertySetMapper >& getPropertySetMapper() const; @@ -134,7 +135,7 @@ public: ::com::sun::star::beans::XPropertySet> & rPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, SvXMLImport& rImport, // parameter for use by txtstyli.cxx; allows efficient @@ -149,7 +150,7 @@ public: ::com::sun::star::beans::XMultiPropertySet> & rMultiPropSet, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, // parameters for use by txtstyli.cxx; allows efficient // catching the combined characters property @@ -161,7 +162,7 @@ public: const ::std::vector<XMLPropertyState> & rProperties, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XTolerantMultiPropertySet> & rTolPropSet, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, SvXMLImport& rImport, // parameters for use by txtstyli.cxx; allows efficient @@ -173,14 +174,14 @@ public: const ::std::vector<XMLPropertyState> & rProperties, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> & rPropSetInfo, - const UniReference<XMLPropertySetMapper> & rPropMapper, + const rtl::Reference<XMLPropertySetMapper> & rPropMapper, _ContextID_Index_Pair* pSpecialContextIds, ::com::sun::star::uno::Sequence< OUString >& rNames, ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& rValues); }; -inline const UniReference< XMLPropertySetMapper >& +inline const rtl::Reference< XMLPropertySetMapper >& SvXMLImportPropertyMapper::getPropertySetMapper() const { return maPropMapper; diff --git a/include/xmloff/xmlprcon.hxx b/include/xmloff/xmlprcon.hxx index e7a9d1606143..1856d237a767 100644 --- a/include/xmloff/xmlprcon.hxx +++ b/include/xmloff/xmlprcon.hxx @@ -23,7 +23,6 @@ #include <xmloff/xmlictxt.hxx> #include <xmloff/xmlimppr.hxx> #include <xmloff/xmlprmap.hxx> -#include <xmloff/uniref.hxx> class SvXMLImportPropertyMapper; @@ -35,7 +34,7 @@ protected: sal_Int32 mnEndIdx; sal_uInt32 mnFamily; ::std::vector< XMLPropertyState > &mrProperties; - UniReference < SvXMLImportPropertyMapper > mxMapper; + rtl::Reference < SvXMLImportPropertyMapper > mxMapper; public: @@ -45,7 +44,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, sal_Int32 nStartIdx = -1, sal_Int32 nEndIdx = -1 ); virtual ~SvXMLPropertySetContext(); diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx index 5f6d52c497c6..e0d4fdbbd778 100644 --- a/include/xmloff/xmlprmap.hxx +++ b/include/xmloff/xmlprmap.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_XMLOFF_XMLPRMAP_HXX #define INCLUDED_XMLOFF_XMLPRMAP_HXX +#include <rtl/ref.hxx> #include <sal/config.h> #include <xmloff/dllapi.h> #include <com/sun/star/uno/Sequence.hxx> @@ -27,7 +28,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <vector> -#include <xmloff/uniref.hxx> +#include <salhelper/simplereferenceobject.hxx> #include <xmloff/maptype.hxx> #include <xmloff/xmltypes.hxx> #include <xmloff/prhdlfac.hxx> @@ -64,7 +65,7 @@ struct XMLPropertySetMapperEntry_Impl XMLPropertySetMapperEntry_Impl( const XMLPropertyMapEntry& rMapEntry, - const UniReference< XMLPropertyHandlerFactory >& rFactory ); + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory ); XMLPropertySetMapperEntry_Impl( const XMLPropertySetMapperEntry_Impl& rEntry ); @@ -72,10 +73,10 @@ struct XMLPropertySetMapperEntry_Impl sal_uInt32 GetPropType() const { return nType & XML_TYPE_PROP_MASK; } }; -class XMLOFF_DLLPUBLIC XMLPropertySetMapper : public UniRefBase +class XMLOFF_DLLPUBLIC XMLPropertySetMapper : public salhelper::SimpleReferenceObject { ::std::vector< XMLPropertySetMapperEntry_Impl > aMapEntries; - ::std::vector< UniReference < XMLPropertyHandlerFactory > > aHdlFactories; + ::std::vector< rtl::Reference < XMLPropertyHandlerFactory > > aHdlFactories; bool mbOnlyExportMappings; public: @@ -87,11 +88,11 @@ public: */ XMLPropertySetMapper( const XMLPropertyMapEntry* pEntries, - const UniReference< XMLPropertyHandlerFactory >& rFactory, + const rtl::Reference< XMLPropertyHandlerFactory >& rFactory, bool bForExport ); virtual ~XMLPropertySetMapper(); - void AddMapperEntry( const UniReference < XMLPropertySetMapper >& rMapper ); + void AddMapperEntry( const rtl::Reference < XMLPropertySetMapper >& rMapper ); /** Return number of entries in input-array */ sal_Int32 GetEntryCount() const { return aMapEntries.size(); } diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx index aaf6ce7f5c7e..369892520ab3 100644 --- a/include/xmloff/xmlstyle.hxx +++ b/include/xmloff/xmlstyle.hxx @@ -20,12 +20,12 @@ #ifndef INCLUDED_XMLOFF_XMLSTYLE_HXX #define INCLUDED_XMLOFF_XMLSTYLE_HXX +#include <rtl/ref.hxx> #include <sal/config.h> #include <xmloff/dllapi.h> #include <sal/types.h> #include <rsc/rscsfx.hxx> #include <tools/rtti.hxx> -#include <xmloff/uniref.hxx> #include <xmloff/xmltkmap.hxx> #include <xmloff/xmlictxt.hxx> @@ -178,11 +178,11 @@ class XMLOFF_DLLPUBLIC SvXMLStylesContext : public SvXMLImportContext ::com::sun::star::uno::Reference < ::com::sun::star::style::XAutoStyleFamily > mxTextAutoStyles; - UniReference < SvXMLImportPropertyMapper > mxParaImpPropMapper; - UniReference < SvXMLImportPropertyMapper > mxTextImpPropMapper; - UniReference < SvXMLImportPropertyMapper > mxShapeImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > mxChartImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > mxPageImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > mxParaImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > mxTextImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > mxShapeImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > mxChartImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > mxPageImpPropMapper; SAL_DLLPRIVATE const SvXMLTokenMap& GetStyleStylesElemTokenMap(); @@ -241,7 +241,7 @@ public: const OUString& rName, bool bCreateIndex = false ) const; virtual sal_uInt16 GetFamily( const OUString& rFamily ) const; - virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper( + virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( sal_uInt16 nFamily ) const; virtual ::com::sun::star::uno::Reference < |