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 | |
parent | 8635fa156ba63e5f63565b6d19ea798a61643b01 (diff) |
drop UniReference in favour of rtl::Reference
since they're doing the same thing.
Change-Id: I76134b6b848db8628f315fe5bd9eb972a6bf0cb6
141 files changed, 523 insertions, 786 deletions
diff --git a/dbaccess/source/filter/xml/xmlAutoStyle.cxx b/dbaccess/source/filter/xml/xmlAutoStyle.cxx index 976a0773c74e..2c1360f3c6ad 100644 --- a/dbaccess/source/filter/xml/xmlAutoStyle.cxx +++ b/dbaccess/source/filter/xml/xmlAutoStyle.cxx @@ -39,7 +39,7 @@ void OXMLAutoStylePoolP::exportStyleAttributes( SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap ); if ( nFamily == XML_STYLE_FAMILY_TABLE_COLUMN ) { - UniReference< XMLPropertySetMapper > aPropMapper = rODBExport.GetColumnStylesPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > aPropMapper = rODBExport.GetColumnStylesPropertySetMapper(); ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); ::std::vector< XMLPropertyState >::const_iterator aEnd = rProperties.end(); for ( ; i != aEnd ; ++i ) diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 2169f9b2db4f..d173fa2d9ef1 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -173,7 +173,7 @@ namespace dbaxml class OSpecialHanldeXMLExportPropertyMapper : public SvXMLExportPropertyMapper { public: - OSpecialHanldeXMLExportPropertyMapper(const UniReference< XMLPropertySetMapper >& rMapper) : SvXMLExportPropertyMapper(rMapper ) + OSpecialHanldeXMLExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper >& rMapper) : SvXMLExportPropertyMapper(rMapper ) { } /** this method is called for every item that has the @@ -1152,7 +1152,7 @@ void ODBExport::exportTables(bool _bExportContext) void ODBExport::exportAutoStyle(XPropertySet* _xProp) { typedef ::std::pair<TPropertyStyleMap*,sal_uInt16> TEnumMapperPair; - typedef ::std::pair< UniReference < SvXMLExportPropertyMapper> , TEnumMapperPair> TExportPropMapperPair; + typedef ::std::pair< rtl::Reference < SvXMLExportPropertyMapper> , TEnumMapperPair> TExportPropMapperPair; Reference<XColumnsSupplier> xSup(_xProp,UNO_QUERY); if ( xSup.is() ) { @@ -1215,7 +1215,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp) { ::std::vector< XMLPropertyState >::iterator aItr = aPropStates.begin(); ::std::vector< XMLPropertyState >::iterator aEnd = aPropStates.end(); - const UniReference < XMLPropertySetMapper >& pStyle = pExportHelper[i].first->getPropertySetMapper(); + const rtl::Reference < XMLPropertySetMapper >& pStyle = pExportHelper[i].first->getPropertySetMapper(); while ( aItr != aEnd ) { if ( aItr->mnIndex != -1 ) @@ -1396,7 +1396,7 @@ OUString ODBExport::implConvertAny(const Any& _rValue) return aBuffer.makeStringAndClear(); } -UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) { @@ -1405,7 +1405,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper return m_xTableStylesPropertySetMapper; } -UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) { @@ -1414,7 +1414,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper( return m_xCellStylesPropertySetMapper; } -UniReference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) { diff --git a/dbaccess/source/filter/xml/xmlExport.hxx b/dbaccess/source/filter/xml/xmlExport.hxx index fee482b8e85f..ca8bf7818fcd 100644 --- a/dbaccess/source/filter/xml/xmlExport.hxx +++ b/dbaccess/source/filter/xml/xmlExport.hxx @@ -100,15 +100,15 @@ class ODBExport : public SvXMLExport TPropertyStyleMap m_aRowAutoStyleNames; TTableColumnMap m_aTableDummyColumns; OUString m_sCharSet; - UniReference < SvXMLExportPropertyMapper> m_xExportHelper; - UniReference < SvXMLExportPropertyMapper> m_xColumnExportHelper; - UniReference < SvXMLExportPropertyMapper> m_xCellExportHelper; - UniReference < SvXMLExportPropertyMapper> m_xRowExportHelper; + rtl::Reference < SvXMLExportPropertyMapper> m_xExportHelper; + rtl::Reference < SvXMLExportPropertyMapper> m_xColumnExportHelper; + rtl::Reference < SvXMLExportPropertyMapper> m_xCellExportHelper; + rtl::Reference < SvXMLExportPropertyMapper> m_xRowExportHelper; - mutable UniReference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xRowStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xRowStylesPropertySetMapper; Reference<XPropertySet> m_xDataSource; ::dbaccess::ODsnTypeCollection m_aTypeCollection; @@ -153,7 +153,7 @@ class ODBExport : public SvXMLExport OUString implConvertAny(const Any& _rValue); - UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; private: ODBExport(); @@ -184,8 +184,8 @@ public: static css::uno::Reference<css::uno::XInterface> SAL_CALL Create( css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxORB); - UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; // XExporter virtual void SAL_CALL setSourceDocument( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& xDoc ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx index 6157ec37e155..c604f0524c94 100644 --- a/dbaccess/source/filter/xml/xmlHelper.cxx +++ b/dbaccess/source/filter/xml/xmlHelper.cxx @@ -68,17 +68,17 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 } #define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010, false} -UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper( bool bForExport ) +rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper( bool bForExport ) { static const XMLPropertyMapEntry s_aTableStylesProperties[] = { MAP_END() }; - UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac, bForExport); } -UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper( bool bForExport ) +rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper( bool bForExport ) { #define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010, false } static const XMLPropertyMapEntry s_aColumnStylesProperties[] = @@ -88,11 +88,11 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapp MAP_CONST_COLUMN( PROPERTY_NUMBERFORMAT, XML_NAMESPACE_STYLE, XML_DATA_STYLE_NAME, XML_TYPE_NUMBER|MID_FLAG_SPECIAL_ITEM, CTF_DB_NUMBERFORMAT), MAP_END() }; - UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac, bForExport); } -UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper( bool bForExport ) +rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper( bool bForExport ) { #define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false } #define MAP_CONST_TEXT( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false } @@ -129,11 +129,11 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper MAP_CONST_TEXT( PROPERTY_FONTWORDLINEMODE, XML_NAMESPACE_STYLE, XML_TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ), MAP_END() }; - UniReference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory(); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac, bForExport); } -UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport ) +rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport ) { #define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010, false } static const XMLPropertyMapEntry s_aStylesProperties[] = @@ -141,7 +141,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( MAP_CONST_ROW( PROPERTY_ROW_HEIGHT, XML_NAMESPACE_STYLE, XML_ROW_HEIGHT, XML_TYPE_MEASURE, 0), MAP_END() }; - UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory(); return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac, bForExport); } diff --git a/dbaccess/source/filter/xml/xmlHelper.hxx b/dbaccess/source/filter/xml/xmlHelper.hxx index 6d6d4a1d1938..1f536de7af0f 100644 --- a/dbaccess/source/filter/xml/xmlHelper.hxx +++ b/dbaccess/source/filter/xml/xmlHelper.hxx @@ -50,10 +50,10 @@ namespace dbaxml class OXMLHelper { public: - static UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport ); - static UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport ); - static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport ); - static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper( bool bForExport ); + static rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport ); + static rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport ); + static rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport ); + static rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper( bool bForExport ); }; } // dbaxml #endif // INCLUDED_DBACCESS_SOURCE_FILTER_XML_XMLHELPER_HXX diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index 7799cd291a9e..932f5cff057a 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -170,11 +170,11 @@ void OTableStylesContext::EndElement() GetImport().GetStyles()->CopyStylesToDoc(true); } -UniReference < SvXMLImportPropertyMapper > +rtl::Reference < SvXMLImportPropertyMapper > OTableStylesContext::GetImportPropertyMapper( sal_uInt16 nFamily ) const { - UniReference < SvXMLImportPropertyMapper > xMapper = SvXMLStylesContext::GetImportPropertyMapper(nFamily); + rtl::Reference < SvXMLImportPropertyMapper > xMapper = SvXMLStylesContext::GetImportPropertyMapper(nFamily); if (!xMapper.is()) { diff --git a/dbaccess/source/filter/xml/xmlStyleImport.hxx b/dbaccess/source/filter/xml/xmlStyleImport.hxx index 8c3b8b51f600..1f9440c4b81c 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.hxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.hxx @@ -83,9 +83,9 @@ namespace dbaxml sal_Int32 m_nMasterPageNameIndex; bool bAutoStyles : 1; - mutable UniReference < SvXMLImportPropertyMapper > m_xTableImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xCellImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xTableImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xCellImpPropMapper; ODBFilter& GetOwnImport(); @@ -110,7 +110,7 @@ namespace dbaxml virtual void EndElement() SAL_OVERRIDE; - virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper( + virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( sal_uInt16 nFamily ) const SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameContainer > diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 148ebc32fbb3..a8a8a3b56a26 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -842,7 +842,7 @@ SvXMLImportContext* ODBFilter::CreateScriptContext( const OUString& _rLocalName return new XMLScriptContext( *this, XML_NAMESPACE_OFFICE, _rLocalName, GetModel() ); } -UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper() const { if ( !m_xTableStylesPropertySetMapper.is() ) { @@ -851,7 +851,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper return m_xTableStylesPropertySetMapper; } -UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMapper() const { if ( !m_xColumnStylesPropertySetMapper.is() ) { @@ -860,7 +860,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe return m_xColumnStylesPropertySetMapper; } -UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const +rtl::Reference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper() const { if ( !m_xCellStylesPropertySetMapper.is() ) { diff --git a/dbaccess/source/filter/xml/xmlfilter.hxx b/dbaccess/source/filter/xml/xmlfilter.hxx index 5a7cfdf26c96..452fff80dc87 100644 --- a/dbaccess/source/filter/xml/xmlfilter.hxx +++ b/dbaccess/source/filter/xml/xmlfilter.hxx @@ -78,9 +78,9 @@ private: mutable ::std::auto_ptr<SvXMLTokenMap> m_pColumnElemTokenMap; SAL_WNODEPRECATED_DECLARATIONS_POP - mutable UniReference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; Reference<XPropertySet> m_xDataSource; sal_Int32 m_nPreviewMode; bool m_bNewFormat; @@ -142,9 +142,9 @@ public: const SvXMLTokenMap& GetQueryElemTokenMap() const; const SvXMLTokenMap& GetColumnElemTokenMap() const; - UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; - UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const; + rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const; /** add a Info to the sequence which will be appened to the data source @param _rInfo The property to append. diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx index 324dbccced9e..30aeaca37410 100644 --- a/editeng/source/xml/xmltxtexp.cxx +++ b/editeng/source/xml/xmltxtexp.cxx @@ -452,7 +452,7 @@ void SvxWriteXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& // methods without content: void SvxXMLTextExportComponent::_ExportAutoStyles() { - UniReference< XMLTextParagraphExport > xTextExport( GetTextParagraphExport() ); + rtl::Reference< XMLTextParagraphExport > xTextExport( GetTextParagraphExport() ); xTextExport->collectTextAutoStyles( mxText ); xTextExport->exportTextAutoStyles(); @@ -460,7 +460,7 @@ void SvxXMLTextExportComponent::_ExportAutoStyles() void SvxXMLTextExportComponent::_ExportContent() { - UniReference< XMLTextParagraphExport > xTextExport( GetTextParagraphExport() ); + rtl::Reference< XMLTextParagraphExport > xTextExport( GetTextParagraphExport() ); xTextExport->exportText( mxText ); } diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk index 8bbdd6051fc2..9d647b5c0a62 100644 --- a/filter/Library_svgfilter.mk +++ b/filter/Library_svgfilter.mk @@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\ tl \ i18nlangtag \ sax \ + salhelper \ comphelper \ basegfx \ cppuhelper \ diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx index 1f1fe1d4d168..2c42ff181a74 100644 --- a/filter/source/svg/svgexport.cxx +++ b/filter/source/svg/svgexport.cxx @@ -1184,7 +1184,7 @@ bool SVGFilter::implExportAnimations() mpSVGExport->AddAttribute( XML_NAMESPACE_NONE, "class", "Animations" ); SvXMLElementExport aDefsElem( *mpSVGExport, XML_NAMESPACE_NONE, "defs", true, true ); - UniReference< xmloff::AnimationsExporter > xAnimationsExporter; + rtl::Reference< xmloff::AnimationsExporter > xAnimationsExporter; xAnimationsExporter = new xmloff::AnimationsExporter( *mpSVGExport, xProps ); xAnimationsExporter->prepare( xRootNode ); xAnimationsExporter->exportAnimations( xRootNode ); 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 < diff --git a/reportdesign/source/filter/xml/xmlAutoStyle.cxx b/reportdesign/source/filter/xml/xmlAutoStyle.cxx index 01859585e6f9..500ca9715530 100644 --- a/reportdesign/source/filter/xml/xmlAutoStyle.cxx +++ b/reportdesign/source/filter/xml/xmlAutoStyle.cxx @@ -39,7 +39,7 @@ void OXMLAutoStylePoolP::exportStyleAttributes( SvXMLAutoStylePoolP::exportStyleAttributes( rAttrList, nFamily, rProperties, rPropExp, rUnitConverter, rNamespaceMap ); if ( nFamily == XML_STYLE_FAMILY_TABLE_CELL ) { - UniReference< XMLPropertySetMapper > aPropMapper = rORptExport.GetCellStylePropertyMapper(); + rtl::Reference< XMLPropertySetMapper > aPropMapper = rORptExport.GetCellStylePropertyMapper(); ::std::vector< XMLPropertyState >::const_iterator i = rProperties.begin(); ::std::vector< XMLPropertyState >::const_iterator aEnd = rProperties.end(); for (; i != aEnd ; ++i) diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx index 89c84f3c2562..fe00d4a2a06a 100644 --- a/reportdesign/source/filter/xml/xmlCell.cxx +++ b/reportdesign/source/filter/xml/xmlCell.cxx @@ -164,7 +164,7 @@ SvXMLImportContext* OXMLCell::CreateChildContext( { if ( !m_bContainsShape ) m_nCurrentCount = m_pContainer->getSection()->getCount(); - UniReference< XMLShapeImportHelper > xShapeImportHelper = rImport.GetShapeImport(); + rtl::Reference< XMLShapeImportHelper > xShapeImportHelper = rImport.GetShapeImport(); uno::Reference< drawing::XShapes > xShapes = m_pContainer->getSection().get(); pContext = xShapeImportHelper->CreateGroupChildContext(rImport,_nPrefix,_rLocalName,xAttrList,xShapes); m_bContainsShape = true; diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx index efa5d798e934..1ce52a1dfda2 100644 --- a/reportdesign/source/filter/xml/xmlExport.cxx +++ b/reportdesign/source/filter/xml/xmlExport.cxx @@ -164,7 +164,7 @@ namespace rptxml class OSpecialHanldeXMLExportPropertyMapper : public SvXMLExportPropertyMapper { public: - OSpecialHanldeXMLExportPropertyMapper(const UniReference< XMLPropertySetMapper >& rMapper) : SvXMLExportPropertyMapper(rMapper ) + OSpecialHanldeXMLExportPropertyMapper(const rtl::Reference< XMLPropertySetMapper >& rMapper) : SvXMLExportPropertyMapper(rMapper ) { } /** this method is called for every item that has the @@ -267,9 +267,9 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin m_xPropHdlFactory = new OXMLRptPropHdlFactory(); - UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); - UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac, true); - UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS, true ); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); + rtl::Reference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac, true); + rtl::Reference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS, true ); xTableStylesPropertySetMapper1->AddMapperEntry(xTableStylesPropertySetMapper2); m_xTableStylesExportPropertySetMapper = new SvXMLExportPropertyMapper(xTableStylesPropertySetMapper1); @@ -278,13 +278,13 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext, OUStrin m_xCellStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(m_xCellStylesPropertySetMapper); m_xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this)); - UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, true); + rtl::Reference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, true); m_xColumnStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xColumnStylesPropertySetMapper); - UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, true); + rtl::Reference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, true); m_xRowStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xRowStylesPropertySetMapper); - UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true )); + rtl::Reference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true )); m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper); OUString sFamily( GetXMLToken(XML_PARAGRAPH) ); @@ -671,7 +671,7 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr const Reference< report::XShape > xShape(xReportElement,uno::UNO_QUERY); if ( xShape.is() ) { - UniReference< XMLShapeExport > xShapeExport = GetShapeExport(); + rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport(); xShapeExport->seekShapes(_xProp.get()); SolarMutexGuard aGuard; xShapeExport->collectShapeAutoStyles(xShape.get()); @@ -1466,7 +1466,7 @@ XMLShapeExport* ORptExport::CreateShapeExport() void ORptExport::exportShapes(const Reference< XSection>& _xSection,bool _bAddParagraph) { - UniReference< XMLShapeExport > xShapeExport = GetShapeExport(); + rtl::Reference< XMLShapeExport > xShapeExport = GetShapeExport(); xShapeExport->seekShapes(_xSection.get()); const sal_Int32 nCount = _xSection->getCount(); SAL_WNODEPRECATED_DECLARATIONS_PUSH diff --git a/reportdesign/source/filter/xml/xmlExport.hxx b/reportdesign/source/filter/xml/xmlExport.hxx index 77f42bab770f..8916e43a376f 100644 --- a/reportdesign/source/filter/xml/xmlExport.hxx +++ b/reportdesign/source/filter/xml/xmlExport.hxx @@ -125,18 +125,18 @@ private: OUString m_sCellStyle; OUString m_sColumnStyle; Any m_aPreviewMode; - UniReference < SvXMLExportPropertyMapper> m_xExportHelper; - UniReference < SvXMLExportPropertyMapper> m_xSectionPropMapper; - UniReference < SvXMLExportPropertyMapper> m_xTableStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper> m_xCellStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper> m_xColumnStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper> m_xRowStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper > m_xParaPropMapper; - UniReference < XMLPropertyHandlerFactory > m_xPropHdlFactory; + rtl::Reference < SvXMLExportPropertyMapper> m_xExportHelper; + rtl::Reference < SvXMLExportPropertyMapper> m_xSectionPropMapper; + rtl::Reference < SvXMLExportPropertyMapper> m_xTableStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper> m_xCellStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper> m_xColumnStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper> m_xRowStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper > m_xParaPropMapper; + rtl::Reference < XMLPropertyHandlerFactory > m_xPropHdlFactory; - mutable UniReference < XMLPropertySetMapper > m_xControlStylePropertyMapper; - mutable UniReference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; - mutable UniReference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xControlStylePropertyMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; + mutable rtl::Reference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; Reference<XReportDefinition> m_xReportDefinition; bool m_bAllreadyFilled; @@ -196,7 +196,7 @@ public: inline Reference<XReportDefinition> getReportDefinition() const { return m_xReportDefinition; } - UniReference < XMLPropertySetMapper > GetCellStylePropertyMapper() const { return m_xCellStylesPropertySetMapper;} + rtl::Reference < XMLPropertySetMapper > GetCellStylePropertyMapper() const { return m_xCellStylesPropertySetMapper;} }; /** Exports only settings diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx index 4c16131f95e9..51c8dbe11240 100644 --- a/reportdesign/source/filter/xml/xmlHelper.cxx +++ b/reportdesign/source/filter/xml/xmlHelper.cxx @@ -106,7 +106,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32 #define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFVER_010, false } #define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFVER_010, false} -UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat, bool bForExport) +rtl::Reference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat, bool bForExport) { if ( _bOldFormat ) { diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx b/reportdesign/source/filter/xml/xmlHelper.hxx index 6f05ded3d3c1..e36506a6f0ae 100644 --- a/reportdesign/source/filter/xml/xmlHelper.hxx +++ b/reportdesign/source/filter/xml/xmlHelper.hxx @@ -56,7 +56,7 @@ namespace rptxml class OXMLHelper { public: - static UniReference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat, bool bForExport); + static rtl::Reference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat, bool bForExport); static const SvXMLEnumMapEntry* GetReportPrintOptions(); static const SvXMLEnumMapEntry* GetForceNewPageOptions(); diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx index 6c3a25447502..9e47479dcd0c 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.cxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx @@ -52,7 +52,7 @@ using namespace xmloff::token; class OSpecialHanldeXMLImportPropertyMapper : public SvXMLImportPropertyMapper { public: - OSpecialHanldeXMLImportPropertyMapper(const UniReference< XMLPropertySetMapper >& rMapper,SvXMLImport& _rImport) : SvXMLImportPropertyMapper(rMapper ,_rImport) + OSpecialHanldeXMLImportPropertyMapper(const rtl::Reference< XMLPropertySetMapper >& rMapper,SvXMLImport& _rImport) : SvXMLImportPropertyMapper(rMapper ,_rImport) { } /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set */ @@ -186,11 +186,11 @@ void OReportStylesContext::EndElement() } -UniReference < SvXMLImportPropertyMapper > +rtl::Reference < SvXMLImportPropertyMapper > OReportStylesContext::GetImportPropertyMapper( sal_uInt16 nFamily ) const { - UniReference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily)); + rtl::Reference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily)); if (!xMapper.is()) { @@ -229,7 +229,7 @@ UniReference < SvXMLImportPropertyMapper > { if( !m_xTableImpPropMapper.is() ) { - UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); + rtl::Reference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory(); m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac, false), m_rImport ); } xMapper = m_xTableImpPropMapper; diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx index ec549b3f6b3a..772a1e95fc00 100644 --- a/reportdesign/source/filter/xml/xmlStyleImport.hxx +++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx @@ -91,11 +91,11 @@ namespace rptxml sal_Int32 m_nNumberFormatIndex; bool bAutoStyles : 1; - //mutable UniReference < SvXMLImportPropertyMapper > m_xControlImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xCellImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xRowImpPropMapper; - mutable UniReference < SvXMLImportPropertyMapper > m_xTableImpPropMapper; + //mutable rtl::Reference < SvXMLImportPropertyMapper > m_xControlImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xCellImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xColumnImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xRowImpPropMapper; + mutable rtl::Reference < SvXMLImportPropertyMapper > m_xTableImpPropMapper; mutable ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameContainer > m_xCellStyles; @@ -137,7 +137,7 @@ namespace rptxml virtual void EndElement() SAL_OVERRIDE; - virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper( + virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( sal_uInt16 nFamily ) const SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameContainer > diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx index c94b76280798..4e270774469b 100644 --- a/reportdesign/source/filter/xml/xmlSubDocument.cxx +++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx @@ -79,7 +79,7 @@ SvXMLImportContext* OXMLSubDocument::_CreateChildContext( { if ( !m_bContainsShape ) m_nCurrentCount = m_pContainer->getSection()->getCount(); - UniReference< XMLShapeImportHelper > xShapeImportHelper = GetImport().GetShapeImport(); + rtl::Reference< XMLShapeImportHelper > xShapeImportHelper = GetImport().GetShapeImport(); uno::Reference< drawing::XShapes > xShapes = m_pContainer->getSection().get(); pContext = xShapeImportHelper->CreateGroupChildContext(GetImport(),_nPrefix,_rLocalName,xAttrList,xShapes); m_bContainsShape = true; diff --git a/reportdesign/source/filter/xml/xmlfilter.hxx b/reportdesign/source/filter/xml/xmlfilter.hxx index cf23bdb04b20..eb843b74e7cf 100644 --- a/reportdesign/source/filter/xml/xmlfilter.hxx +++ b/reportdesign/source/filter/xml/xmlfilter.hxx @@ -92,11 +92,11 @@ private: mutable ::std::auto_ptr<SvXMLTokenMap> m_pCellElemTokenMap; SAL_WNODEPRECATED_DECLARATIONS_POP - UniReference < XMLPropertyHandlerFactory > m_xPropHdlFactory; - UniReference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > m_xRowStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; + rtl::Reference < XMLPropertyHandlerFactory > m_xPropHdlFactory; + rtl::Reference < XMLPropertySetMapper > m_xCellStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > m_xColumnStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > m_xRowStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > m_xTableStylesPropertySetMapper; Reference<XReportDefinition> m_xReportDefinition; ::boost::shared_ptr<rptui::OReportModel> m_pReportModel; @@ -158,10 +158,10 @@ public: const SvXMLTokenMap& GetColumnTokenMap() const; const SvXMLTokenMap& GetCellElemTokenMap() const; - inline UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return m_xCellStylesPropertySetMapper; } - inline UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return m_xColumnStylesPropertySetMapper; } - inline UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return m_xRowStylesPropertySetMapper; } - inline UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return m_xTableStylesPropertySetMapper; } + inline rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return m_xCellStylesPropertySetMapper; } + inline rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return m_xColumnStylesPropertySetMapper; } + inline rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return m_xRowStylesPropertySetMapper; } + inline rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return m_xTableStylesPropertySetMapper; } static OUString convertFormula(const OUString& _sFormula); /** inserts a new function * diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 8ad56505672a..5a2e3aa174f0 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -381,7 +381,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons return; // Get the style information from xmloff. - UniReference<XMLPropertySetMapper> xMapper = GetImport().GetTextImport()->GetTextImportPropertySetMapper()->getPropertySetMapper(); + rtl::Reference<XMLPropertySetMapper> xMapper = GetImport().GetTextImport()->GetTextImportPropertySetMapper()->getPropertySetMapper(); if (!xMapper.is()) // We can't do anything without the mapper. return; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 32181cd6f7d9..11f8a9f427cd 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -1078,7 +1078,7 @@ namespace { void handleFont( std::vector<XMLPropertyState>& rPropStates, - const SfxPoolItem* p, const UniReference<XMLPropertySetMapper>& xMapper, const OUString& rXMLName ) + const SfxPoolItem* p, const rtl::Reference<XMLPropertySetMapper>& xMapper, const OUString& rXMLName ) { sal_Int32 nEntryCount = xMapper->GetEntryCount(); @@ -1099,7 +1099,7 @@ void handleFont( const SvxFieldData* toXMLPropertyStates( std::vector<XMLPropertyState>& rPropStates, const std::vector<const SfxPoolItem*>& rSecAttrs, - const UniReference<XMLPropertySetMapper>& xMapper, const ScXMLEditAttributeMap& rAttrMap ) + const rtl::Reference<XMLPropertySetMapper>& xMapper, const ScXMLEditAttributeMap& rAttrMap ) { const SvxFieldData* pField = NULL; sal_Int32 nEntryCount = xMapper->GetEntryCount(); @@ -1351,8 +1351,8 @@ void ScXMLExport::ExportCellTextAutoStyles(sal_Int32 nTable) if (!ValidTab(nTable)) return; - UniReference<XMLPropertySetMapper> xMapper = GetTextParagraphExport()->GetTextPropMapper()->getPropertySetMapper(); - UniReference<SvXMLAutoStylePoolP> xStylePool = GetAutoStylePool(); + rtl::Reference<XMLPropertySetMapper> xMapper = GetTextParagraphExport()->GetTextPropMapper()->getPropertySetMapper(); + rtl::Reference<SvXMLAutoStylePoolP> xStylePool = GetAutoStylePool(); const ScXMLEditAttributeMap& rAttrMap = GetEditAttributeMap(); sc::EditTextIterator aIter(*pDoc, nTable); @@ -2420,7 +2420,7 @@ void ScXMLExport::_ExportAutoStyles() // stored styles for notes - UniReference<SvXMLExportPropertyMapper> xShapeMapper = XMLShapeExport::CreateShapePropMapper( *this ); + rtl::Reference<SvXMLExportPropertyMapper> xShapeMapper = XMLShapeExport::CreateShapePropMapper( *this ); GetShapeExport(); // make sure the graphics styles family is added const std::vector<ScNoteStyleEntry>& rNoteEntries = pSheetData->GetNoteStyles(); @@ -2469,7 +2469,7 @@ void ScXMLExport::_ExportAutoStyles() // note paragraph styles - UniReference<SvXMLExportPropertyMapper> xParaPropMapper = GetTextParagraphExport()->GetParagraphPropertyMapper(); + rtl::Reference<SvXMLExportPropertyMapper> xParaPropMapper = GetTextParagraphExport()->GetParagraphPropertyMapper(); const std::vector<ScTextStyleEntry>& rNoteParaEntries = pSheetData->GetNoteParaStyles(); std::vector<ScTextStyleEntry>::const_iterator aNoteParaIter = rNoteParaEntries.begin(); @@ -2504,7 +2504,7 @@ void ScXMLExport::_ExportAutoStyles() // note text styles - UniReference<SvXMLExportPropertyMapper> xTextPropMapper = XMLTextParagraphExport::CreateCharExtPropMapper( *this ); + rtl::Reference<SvXMLExportPropertyMapper> xTextPropMapper = XMLTextParagraphExport::CreateCharExtPropMapper( *this ); const std::vector<ScTextStyleEntry>& rNoteTextEntries = pSheetData->GetNoteTextStyles(); std::vector<ScTextStyleEntry>::const_iterator aNoteTextIter = rNoteTextEntries.begin(); @@ -3145,7 +3145,7 @@ void writeContent( void flushParagraph( ScXMLExport& rExport, const OUString& rParaText, - UniReference<XMLPropertySetMapper> xMapper, UniReference<SvXMLAutoStylePoolP> xStylePool, + rtl::Reference<XMLPropertySetMapper> xMapper, rtl::Reference<SvXMLAutoStylePoolP> xStylePool, const ScXMLEditAttributeMap& rAttrMap, std::vector<editeng::Section>::const_iterator it, std::vector<editeng::Section>::const_iterator itEnd ) { @@ -3346,8 +3346,8 @@ void ScXMLExport::WriteCell(ScMyCell& aCell, sal_Int32 nEqualCellCount) void ScXMLExport::WriteEditCell(const EditTextObject* pText) { - UniReference<XMLPropertySetMapper> xMapper = GetTextParagraphExport()->GetTextPropMapper()->getPropertySetMapper(); - UniReference<SvXMLAutoStylePoolP> xStylePool = GetAutoStylePool(); + rtl::Reference<XMLPropertySetMapper> xMapper = GetTextParagraphExport()->GetTextPropMapper()->getPropertySetMapper(); + rtl::Reference<SvXMLAutoStylePoolP> xStylePool = GetAutoStylePool(); const ScXMLEditAttributeMap& rAttrMap = GetEditAttributeMap(); // Get raw paragraph texts first. diff --git a/sc/source/filter/xml/xmlexprt.hxx b/sc/source/filter/xml/xmlexprt.hxx index ef42111b0bc3..a6ed6899a930 100644 --- a/sc/source/filter/xml/xmlexprt.hxx +++ b/sc/source/filter/xml/xmlexprt.hxx @@ -83,15 +83,15 @@ class ScXMLExport : public SvXMLExport mutable boost::scoped_ptr<ScXMLEditAttributeMap> mpEditAttrMap; boost::scoped_ptr<ScMyNotEmptyCellsIterator> mpCellsItr; boost::scoped_ptr<sc::CompileFormulaContext> mpCompileFormulaCxt; - UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory; - UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper; - UniReference < SvXMLExportPropertyMapper > xCellStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper > xColumnStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper > xRowStylesExportPropertySetMapper; - UniReference < SvXMLExportPropertyMapper > xTableStylesExportPropertySetMapper; + rtl::Reference < XMLPropertyHandlerFactory > xScPropHdlFactory; + rtl::Reference < XMLPropertySetMapper > xCellStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xRowStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xTableStylesPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper > xCellStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper > xColumnStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper > xRowStylesExportPropertySetMapper; + rtl::Reference < SvXMLExportPropertyMapper > xTableStylesExportPropertySetMapper; XMLNumberFormatAttributesExportHelper* pNumberFormatAttributesExportHelper; typedef ::boost::unordered_map<sal_Int32, sal_Int32> NumberFormatIndexMap; NumberFormatIndexMap aNumFmtIndexMap; @@ -248,8 +248,8 @@ public: bool IsMatrix (const ScAddress& aCell, com::sun::star::table::CellRangeAddress& aCellAddress, bool& bIsFirst) const; - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() { return xCellStylesPropertySetMapper; } - UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() { return xTableStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() { return xCellStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() { return xTableStylesPropertySetMapper; } void SetSourceStream( const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& xNewStream ); diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 68851fe45bad..0d953431b1a4 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -840,11 +840,11 @@ class ScXMLImport: public SvXMLImport, boost::noncopyable OUString sStandardFormat; OUString sType; - UniReference < XMLPropertyHandlerFactory > xScPropHdlFactory; - UniReference < XMLPropertySetMapper > xCellStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper; - UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper; + rtl::Reference < XMLPropertyHandlerFactory > xScPropHdlFactory; + rtl::Reference < XMLPropertySetMapper > xCellStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xColumnStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xRowStylesPropertySetMapper; + rtl::Reference < XMLPropertySetMapper > xTableStylesPropertySetMapper; SvXMLTokenMap *pDocElemTokenMap; SvXMLTokenMap *pStylesElemTokenMap; @@ -1020,10 +1020,10 @@ public: sal_Int16 GetCellType(const OUString& rStrValue) const; - UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; } - UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; } - UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; } - UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetCellStylesPropertySetMapper() const { return xCellStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper() const { return xColumnStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetRowStylesPropertySetMapper() const { return xRowStylesPropertySetMapper; } + rtl::Reference < XMLPropertySetMapper > GetTableStylesPropertySetMapper() const { return xTableStylesPropertySetMapper; } const SvXMLTokenMap& GetDocElemTokenMap(); const SvXMLTokenMap& GetBodyElemTokenMap(); diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index 905719034495..9763f3d558fa 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -180,7 +180,7 @@ const XMLPropertyMapEntry aXMLScTableStylesProperties[] = }; ScXMLCellExportPropertyMapper::ScXMLCellExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ) + const rtl::Reference< XMLPropertySetMapper >& rMapper ) : SvXMLExportPropertyMapper(rMapper) { } @@ -548,7 +548,7 @@ void ScXMLCellExportPropertyMapper::handleElementItem( } ScXMLRowExportPropertyMapper::ScXMLRowExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ) + const rtl::Reference< XMLPropertySetMapper >& rMapper ) : SvXMLExportPropertyMapper(rMapper) { } @@ -566,7 +566,7 @@ void ScXMLRowExportPropertyMapper::ContextFilter( } ScXMLColumnExportPropertyMapper::ScXMLColumnExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ) + const rtl::Reference< XMLPropertySetMapper >& rMapper ) : SvXMLExportPropertyMapper(rMapper) { } @@ -588,7 +588,7 @@ void ScXMLColumnExportPropertyMapper::handleSpecialItem( } ScXMLTableExportPropertyMapper::ScXMLTableExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ) + const rtl::Reference< XMLPropertySetMapper >& rMapper ) : SvXMLExportPropertyMapper(rMapper) { } @@ -625,7 +625,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( ::std::vector< XMLPropertyState >::const_iterator endi(rProperties.end()); while (i != endi) { - UniReference< XMLPropertySetMapper > aPropMapper(rScXMLExport.GetCellStylesPropertySetMapper()); + rtl::Reference< XMLPropertySetMapper > aPropMapper(rScXMLExport.GetCellStylesPropertySetMapper()); sal_Int16 nContextID(aPropMapper->GetEntryContextId(i->mnIndex)); switch (nContextID) { @@ -655,7 +655,7 @@ void ScXMLAutoStylePoolP::exportStyleAttributes( ::std::vector< XMLPropertyState >::const_iterator endi(rProperties.end()); while(i != endi) { - UniReference< XMLPropertySetMapper > aPropMapper(rScXMLExport.GetTableStylesPropertySetMapper()); + rtl::Reference< XMLPropertySetMapper > aPropMapper(rScXMLExport.GetTableStylesPropertySetMapper()); sal_Int16 nContextID(aPropMapper->GetEntryContextId(i->mnIndex)); switch (nContextID) { diff --git a/sc/source/filter/xml/xmlstyle.hxx b/sc/source/filter/xml/xmlstyle.hxx index 8dca19fcecf2..a3f3f125780b 100644 --- a/sc/source/filter/xml/xmlstyle.hxx +++ b/sc/source/filter/xml/xmlstyle.hxx @@ -112,7 +112,7 @@ protected: ::com::sun::star::beans::XPropertySet > rPropSet ) const SAL_OVERRIDE; public: ScXMLCellExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ); + const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLCellExportPropertyMapper(); virtual void handleElementItem( SvXMLExport& rExport, @@ -142,7 +142,7 @@ protected: ::com::sun::star::beans::XPropertySet > rPropSet ) const SAL_OVERRIDE; public: ScXMLRowExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ); + const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLRowExportPropertyMapper(); }; @@ -150,7 +150,7 @@ class ScXMLColumnExportPropertyMapper : public SvXMLExportPropertyMapper { public: ScXMLColumnExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ); + const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLColumnExportPropertyMapper(); /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set */ @@ -168,7 +168,7 @@ class ScXMLTableExportPropertyMapper : public SvXMLExportPropertyMapper protected: public: ScXMLTableExportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper ); + const rtl::Reference< XMLPropertySetMapper >& rMapper ); virtual ~ScXMLTableExportPropertyMapper(); /** this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set */ diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index b9fead1a393a..d27af06b4c74 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -74,7 +74,7 @@ using com::sun::star::uno::Reference; using com::sun::star::uno::UNO_QUERY; ScXMLCellImportPropertyMapper::ScXMLCellImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImportP) : SvXMLImportPropertyMapper( rMapper, rImportP ) { @@ -217,7 +217,7 @@ void ScXMLCellImportPropertyMapper::finished(::std::vector< XMLPropertyState >& } ScXMLRowImportPropertyMapper::ScXMLRowImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImportP) : SvXMLImportPropertyMapper( rMapper, rImportP ) { @@ -286,7 +286,7 @@ class XMLTableCellPropsContext : public SvXMLPropertySetContext const uno::Reference< xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap); + const rtl::Reference < SvXMLImportPropertyMapper > &rMap); virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, @@ -301,7 +301,7 @@ XMLTableCellPropsContext::XMLTableCellPropsContext( const uno::Reference< xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap) + const rtl::Reference < SvXMLImportPropertyMapper > &rMap) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMap ) { @@ -478,7 +478,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext( else if ( ( XML_NAMESPACE_STYLE == nPrefix) && IsXMLToken(rLocalName, XML_TABLE_CELL_PROPERTIES ) ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = ((SvXMLStylesContext *)GetStyles())->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) @@ -596,8 +596,8 @@ void XMLTableStyleContext::AddProperty(const sal_Int16 nContextID, const uno::An XMLPropertyState* XMLTableStyleContext::FindProperty(const sal_Int16 nContextID) { XMLPropertyState* pRet = NULL; - UniReference < XMLPropertySetMapper > xPrMap; - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < XMLPropertySetMapper > xPrMap; + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pStyles->GetImportPropertyMapper( GetFamily() ); OSL_ENSURE( xImpPrMap.is(), "There is the import prop mapper" ); if( xImpPrMap.is() ) @@ -730,11 +730,11 @@ void XMLTableStylesContext::EndElement() ((ScXMLImport&)GetImport()).InsertStyles(); } -UniReference < SvXMLImportPropertyMapper > +rtl::Reference < SvXMLImportPropertyMapper > XMLTableStylesContext::GetImportPropertyMapper( sal_uInt16 nFamily ) const { - UniReference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily)); + rtl::Reference < SvXMLImportPropertyMapper > xMapper(SvXMLStylesContext::GetImportPropertyMapper(nFamily)); if (!xMapper.is()) { diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index 1b59c8ea18ab..9e68eda6dfba 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -42,7 +42,7 @@ protected: public: ScXMLCellImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImport); virtual ~ScXMLCellImportPropertyMapper(); @@ -58,7 +58,7 @@ protected: public: ScXMLRowImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImport); virtual ~ScXMLRowImportPropertyMapper(); @@ -141,10 +141,10 @@ class XMLTableStylesContext : public SvXMLStylesContext sal_Int32 nMasterPageNameIndex; bool bAutoStyles; - UniReference < SvXMLImportPropertyMapper > xCellImpPropMapper; - UniReference < SvXMLImportPropertyMapper > xColumnImpPropMapper; - UniReference < SvXMLImportPropertyMapper > xRowImpPropMapper; - UniReference < SvXMLImportPropertyMapper > xTableImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > xCellImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > xColumnImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > xRowImpPropMapper; + rtl::Reference < SvXMLImportPropertyMapper > xTableImpPropMapper; const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } @@ -174,7 +174,7 @@ public: virtual void EndElement() SAL_OVERRIDE; - virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper( + virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( sal_uInt16 nFamily ) const SAL_OVERRIDE; virtual ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameContainer > diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx index 98a172a1861f..99cf7a5b54d1 100644 --- a/sw/source/filter/xml/xmlexp.hxx +++ b/sw/source/filter/xml/xmlexp.hxx @@ -22,7 +22,6 @@ #include <xmloff/xmlexp.hxx> #include "xmlitmap.hxx" -#include <xmloff/uniref.hxx> #include <xmloff/xmltoken.hxx> #include <vector> @@ -55,7 +54,7 @@ class SwXMLExport : public SvXMLExport SvXMLItemMapEntriesRef xTableItemMap; SvXMLItemMapEntriesRef xTableRowItemMap; SvXMLItemMapEntriesRef xTableCellItemMap; - UniReference < XMLPropertySetMapper > xParaPropMapper; + rtl::Reference < XMLPropertySetMapper > xParaPropMapper; bool bBlock : 1; // export text block? bool bShowProgress : 1; @@ -130,7 +129,7 @@ public: void ExportTable( const SwTableNode& rTblNd ); SvXMLExportItemMapper& GetTableItemMapper() { return *pTableItemMapper; } - const UniReference < XMLPropertySetMapper >& GetParaPropMapper() + const rtl::Reference < XMLPropertySetMapper >& GetParaPropMapper() { return xParaPropMapper; } diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index aed582410b20..173ff562fc73 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -719,7 +719,7 @@ protected: sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList > & xAttrList ) SAL_OVERRIDE; // HACK - virtual UniReference < SvXMLImportPropertyMapper > GetImportPropertyMapper( + virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper( sal_uInt16 nFamily ) const SAL_OVERRIDE; virtual uno::Reference < container::XNameContainer > @@ -860,10 +860,10 @@ bool SwXMLStylesContext_Impl::InsertStyleFamily( sal_uInt16 nFamily ) const return bIns; } -UniReference < SvXMLImportPropertyMapper > SwXMLStylesContext_Impl::GetImportPropertyMapper( +rtl::Reference < SvXMLImportPropertyMapper > SwXMLStylesContext_Impl::GetImportPropertyMapper( sal_uInt16 nFamily ) const { - UniReference < SvXMLImportPropertyMapper > xMapper; + rtl::Reference < SvXMLImportPropertyMapper > xMapper; if( nFamily == XML_STYLE_FAMILY_TABLE_TABLE ) xMapper = XMLTextImportHelper::CreateTableDefaultExtPropMapper( const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() ); diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx index ad9a02197ecc..af3ce1488189 100644 --- a/sw/source/filter/xml/xmlimp.cxx +++ b/sw/source/filter/xml/xmlimp.cxx @@ -918,7 +918,7 @@ class SvTextShapeImportHelper : public XMLTextShapeImportHelper // stored in the superclass, from whom we originally got the // reference, is already destroyed when we want to use it in the // destructor - UniReference< ::xmloff::OFormLayerXMLImport > rFormImport; + rtl::Reference< ::xmloff::OFormLayerXMLImport > rFormImport; // hold reference to the one page (if it exists) for calling startPage() // and endPage. If !xPage.is(), then this document doesn't have a diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 09cb3f01f93b..d7caca108f2e 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -232,7 +232,7 @@ static void lcl_addURL ( SvXMLExport &rExport, const OUString &rURL, static void lcl_addAspect( const svt::EmbeddedObjectRef& rObj, const XMLPropertyState **pStates, - const UniReference < XMLPropertySetMapper >& rMapper ) + const rtl::Reference < XMLPropertySetMapper >& rMapper ) { { sal_Int64 nAspect = rObj.GetViewAspect(); @@ -248,7 +248,7 @@ static void lcl_addAspect( static void lcl_addOutplaceProperties( const svt::EmbeddedObjectRef& rObj, const XMLPropertyState **pStates, - const UniReference < XMLPropertySetMapper >& rMapper ) + const rtl::Reference < XMLPropertySetMapper >& rMapper ) { { MapMode aMode( MAP_100TH_MM ); // the API expects this map mode for the embedded objects @@ -279,7 +279,7 @@ static void lcl_addOutplaceProperties( static void lcl_addFrameProperties( const uno::Reference < embed::XEmbeddedObject >& xObj, const XMLPropertyState **pStates, - const UniReference < XMLPropertySetMapper >& rMapper ) + const rtl::Reference < XMLPropertySetMapper >& rMapper ) { if ( !::svt::EmbeddedObjectRef::TryRunningState( xObj ) ) return; diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx index c88007caf5fa..b6209acc4fb7 100644 --- a/sw/source/filter/xml/xmltexti.cxx +++ b/sw/source/filter/xml/xmltexti.cxx @@ -445,13 +445,13 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject( pStyle = FindAutoFrameStyle( rStyleName ); if( pStyle ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pStyle->GetStyles() ->GetImportPropertyMapper(pStyle->GetFamily()); OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" ); if( xImpPrMap.is() ) { - UniReference<XMLPropertySetMapper> rPropMapper = + rtl::Reference<XMLPropertySetMapper> rPropMapper = xImpPrMap->getPropertySetMapper(); sal_Int32 nCount = pStyle->GetProperties().size(); @@ -768,13 +768,13 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra pStyle = FindAutoFrameStyle( rStyleName ); if( pStyle ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pStyle->GetStyles() ->GetImportPropertyMapper(pStyle->GetFamily()); OSL_ENSURE( xImpPrMap.is(), "Where is the import prop mapper?" ); if( xImpPrMap.is() ) { - UniReference<XMLPropertySetMapper> rPropMapper = + rtl::Reference<XMLPropertySetMapper> rPropMapper = xImpPrMap->getPropertySetMapper(); sal_Int32 nCount = pStyle->GetProperties().size(); diff --git a/xmloff/Library_xo.mk b/xmloff/Library_xo.mk index 553fcc148d36..bbda1060f37b 100644 --- a/xmloff/Library_xo.mk +++ b/xmloff/Library_xo.mk @@ -257,7 +257,6 @@ $(eval $(call gb_Library_add_exception_objects,xo,\ xmloff/source/style/styleexp \ xmloff/source/style/tabsthdl \ xmloff/source/style/undlihdl \ - xmloff/source/style/uniref \ xmloff/source/style/weighhdl \ xmloff/source/style/xmlaustp \ xmloff/source/style/xmlbahdl \ diff --git a/xmloff/inc/SchXMLExport.hxx b/xmloff/inc/SchXMLExport.hxx index 779135c8b4d7..5ef7645da79e 100644 --- a/xmloff/inc/SchXMLExport.hxx +++ b/xmloff/inc/SchXMLExport.hxx @@ -22,7 +22,6 @@ #include <xmloff/SchXMLExportHelper.hxx> #include "SchXMLAutoStylePoolP.hxx" #include <xmloff/xmlexp.hxx> -#include <xmloff/uniref.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/prhdlfac.hxx> @@ -58,7 +57,7 @@ public: sal_uInt16 nExportFlags = EXPORT_ALL ); virtual ~SchXMLExport(); - UniReference< XMLPropertySetMapper > GetPropertySetMapper() const; + rtl::Reference< XMLPropertySetMapper > GetPropertySetMapper() const; }; #endif // INCLUDED_XMLOFF_INC_SCHXMLEXPORT_HXX diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx index 1507b162ab69..158bfcf47d7d 100644 --- a/xmloff/inc/XMLChartPropertySetMapper.hxx +++ b/xmloff/inc/XMLChartPropertySetMapper.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX #define INCLUDED_XMLOFF_INC_XMLCHARTPROPERTYSETMAPPER_HXX -#include <xmloff/uniref.hxx> #include <xmloff/xmlprmap.hxx> #include <xmloff/xmlexppr.hxx> #include <xmloff/xmlimppr.hxx> @@ -78,7 +77,7 @@ private: sal_uInt32 nIdx = 0 ) const SAL_OVERRIDE; public: - XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, + XMLChartExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); virtual ~XMLChartExportPropertyMapper(); @@ -94,7 +93,7 @@ private: SvXMLImport& mrImport; public: - XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, + XMLChartImportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, const SvXMLImport& rImport ); virtual ~XMLChartImportPropertyMapper(); diff --git a/xmloff/inc/XMLShapePropertySetContext.hxx b/xmloff/inc/XMLShapePropertySetContext.hxx index 215a4bc5ae6e..ccf49d53c5a0 100644 --- a/xmloff/inc/XMLShapePropertySetContext.hxx +++ b/xmloff/inc/XMLShapePropertySetContext.hxx @@ -37,7 +37,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 ); virtual ~XMLShapePropertySetContext(); diff --git a/xmloff/inc/anim.hxx b/xmloff/inc/anim.hxx index 6bd96bb6d70d..24385626b3dc 100644 --- a/xmloff/inc/anim.hxx +++ b/xmloff/inc/anim.hxx @@ -22,7 +22,6 @@ #include <com/sun/star/presentation/AnimationEffect.hpp> #include <com/sun/star/drawing/XShape.hpp> -#include <xmloff/uniref.hxx> #include <xmloff/xmlement.hxx> enum XMLEffect diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx index 4fe1c42ab05d..9ca27fdce217 100644 --- a/xmloff/qa/unit/uxmloff.cxx +++ b/xmloff/qa/unit/uxmloff.cxx @@ -60,11 +60,11 @@ void Test::tearDown() void Test::testAutoStylePool() { - UniReference< SvXMLAutoStylePoolP > xPool( + rtl::Reference< SvXMLAutoStylePoolP > xPool( new SvXMLAutoStylePoolP( *pExport ) ); - UniReference< XMLPropertySetMapper > xSetMapper( + rtl::Reference< XMLPropertySetMapper > xSetMapper( new XMLChartPropertySetMapper( true) ); - UniReference< XMLChartExportPropertyMapper > xExportPropMapper( + rtl::Reference< XMLChartExportPropertyMapper > xExportPropMapper( new XMLChartExportPropertyMapper( xSetMapper, *pExport ) ); xPool->AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 564241479bb5..cedcc8dfe752 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -171,7 +171,7 @@ XMLChartPropertySetMapper::~XMLChartPropertySetMapper() { } -XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, +XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport) : SvXMLExportPropertyMapper( rMapper ), msTrue( GetXMLToken( XML_TRUE )), @@ -499,7 +499,7 @@ void XMLChartExportPropertyMapper::setChartDoc( uno::Reference< chart2::XChartDo mxChartDoc = xChartDoc; } -XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, +XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, const SvXMLImport& _rImport ) : SvXMLImportPropertyMapper( rMapper, const_cast< SvXMLImport & >( _rImport )), mrImport( const_cast< SvXMLImport & > ( _rImport )) diff --git a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx index 5ea101713c01..a2c250e66c5e 100644 --- a/xmloff/source/chart/SchXMLAutoStylePoolP.cxx +++ b/xmloff/source/chart/SchXMLAutoStylePoolP.cxx @@ -56,7 +56,7 @@ void SchXMLAutoStylePoolP::exportStyleAttributes( if( iter->mnIndex == -1 ) continue; - UniReference< XMLPropertySetMapper > aPropMapper = + rtl::Reference< XMLPropertySetMapper > aPropMapper = mrSchXMLExport.GetPropertySetMapper(); sal_Int16 nContextID = aPropMapper->GetEntryContextId( iter->mnIndex ); if( nContextID == XML_SCH_CONTEXT_SPECIAL_NUMBER_FORMAT ) diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 5bda8cc55707..743db2a36d18 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -154,7 +154,7 @@ public: com::sun::star::chart::XChartDocument > rChartDoc, bool bIncludeTable ); - UniReference<XMLPropertySetMapper> GetPropertySetMapper() const; + rtl::Reference<XMLPropertySetMapper> GetPropertySetMapper() const; void SetChartRangeAddress( const OUString& rAddress ) { msChartAddress = rAddress; } @@ -252,8 +252,8 @@ public: public: SvXMLExport& mrExport; SvXMLAutoStylePoolP& mrAutoStylePool; - UniReference< XMLPropertySetMapper > mxPropertySetMapper; - UniReference< XMLChartExportPropertyMapper > mxExpPropMapper; + rtl::Reference< XMLPropertySetMapper > mxPropertySetMapper; + rtl::Reference< XMLChartExportPropertyMapper > mxExpPropMapper; OUString msTableName; OUStringBuffer msStringBuffer; @@ -1023,7 +1023,7 @@ void SchXMLExportHelper::SetDestinationShellID( const OUString& rShellID ) m_pImpl->maDestShellID = rShellID; } -UniReference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const +rtl::Reference< XMLPropertySetMapper > SchXMLExportHelper_Impl::GetPropertySetMapper() const { return mxPropertySetMapper; } @@ -1481,7 +1481,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // initialisation happened with the complete draw page and not // the XShapes object used here. Thus the shapes have to be // exported one by one - UniReference< XMLShapeExport > rShapeExport = mrExport.GetShapeExport(); + rtl::Reference< XMLShapeExport > rShapeExport = mrExport.GetShapeExport(); Reference< drawing::XShape > xShape; const sal_Int32 nShapeCount( mxAdditionalShapes->getCount()); for( sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++ ) @@ -1530,7 +1530,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument >& // the initialisation happened with the complete draw page and // not the XShapes object used here. Thus the shapes have to be // exported one by one - UniReference< XMLShapeExport > rShapeExport = mrExport.GetShapeExport(); + rtl::Reference< XMLShapeExport > rShapeExport = mrExport.GetShapeExport(); Reference< drawing::XShape > xShape; const sal_Int32 nShapeCount( mxAdditionalShapes->getCount()); for( sal_Int32 nShapeId = 0; nShapeId < nShapeCount; nShapeId++ ) @@ -1885,7 +1885,7 @@ void SchXMLExportHelper_Impl::exportPlotArea( } if( bExportContent ) { - UniReference< XMLShapeExport > rShapeExport; + rtl::Reference< XMLShapeExport > rShapeExport; // write style name AddAutoStyleAttribute( aPropertyStates ); @@ -2280,7 +2280,7 @@ bool lcl_exportAxisType( const Reference< chart2::XAxis > xChart2Axis, SvXMLExpo } void disableLinkedNumberFormat( - std::vector<XMLPropertyState>& rPropStates, const UniReference<XMLPropertySetMapper>& rMapper ) + std::vector<XMLPropertyState>& rPropStates, const rtl::Reference<XMLPropertySetMapper>& rMapper ) { for (size_t i = 0; i < rPropStates.size(); ++i) { @@ -3711,7 +3711,7 @@ void SchXMLExport::_ExportContent() } } -UniReference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const +rtl::Reference< XMLPropertySetMapper > SchXMLExport::GetPropertySetMapper() const { return maExportHelper.m_pImpl->GetPropertySetMapper(); } diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx index c9d3d9b1512c..05acf10f4607 100644 --- a/xmloff/source/chart/SchXMLTools.cxx +++ b/xmloff/source/chart/SchXMLTools.cxx @@ -538,7 +538,7 @@ uno::Any getPropertyFromContext( const OUString& rPropertyName, const XMLPropSty if( !pPropStyleContext || !pStylesCtxt ) return aRet; const ::std::vector< XMLPropertyState >& rProperties = pPropStyleContext->GetProperties(); - const UniReference< XMLPropertySetMapper >& rMapper = pStylesCtxt->GetImportPropertyMapper( pPropStyleContext->GetFamily()/*XML_STYLE_FAMILY_SCH_CHART_ID*/ )->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rMapper = pStylesCtxt->GetImportPropertyMapper( pPropStyleContext->GetFamily()/*XML_STYLE_FAMILY_SCH_CHART_ID*/ )->getPropertySetMapper(); ::std::vector< XMLPropertyState >::const_iterator aEnd( rProperties.end() ); ::std::vector< XMLPropertyState >::const_iterator aPropIter( rProperties.begin() ); for( aPropIter = rProperties.begin(); aPropIter != aEnd; ++aPropIter ) diff --git a/xmloff/source/chart/XMLChartPropertyContext.cxx b/xmloff/source/chart/XMLChartPropertyContext.cxx index a1290e557289..ce1b2ea5a22c 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.cxx +++ b/xmloff/source/chart/XMLChartPropertyContext.cxx @@ -34,7 +34,7 @@ XMLChartPropertyContext::XMLChartPropertyContext( const uno::Reference< xml::sax::XAttributeList > & xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState >& rProps, - const UniReference< SvXMLImportPropertyMapper >& rMapper ) : + const rtl::Reference< SvXMLImportPropertyMapper >& rMapper ) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMapper ) { } diff --git a/xmloff/source/chart/XMLChartPropertyContext.hxx b/xmloff/source/chart/XMLChartPropertyContext.hxx index f662c9f062a4..9144e494cb3f 100644 --- a/xmloff/source/chart/XMLChartPropertyContext.hxx +++ b/xmloff/source/chart/XMLChartPropertyContext.hxx @@ -32,7 +32,7 @@ public: ::com::sun::star::xml::sax::XAttributeList > & xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState >& rProps, - const UniReference< SvXMLImportPropertyMapper >& rMapper ); + const rtl::Reference< SvXMLImportPropertyMapper >& rMapper ); virtual ~XMLChartPropertyContext(); using SvXMLPropertySetContext::CreateChildContext; diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index 837d85298d43..7f33644dbbac 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -128,7 +128,7 @@ SvXMLImportContext *XMLChartStyleContext::CreateChildContext( nFamily = XML_TYPE_PROP_CHART; if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) pContext = new XMLChartPropertyContext( diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx index 9753a3fe0b8a..f7731dbd0850 100644 --- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx +++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx @@ -68,7 +68,7 @@ SvXMLImportContext *XMLGraphicsDefaultStyle::CreateChildContext( sal_uInt16 nPre nFamily = XML_TYPE_PROP_GRAPHIC; if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) pContext = new XMLShapePropertySetContext( GetImport(), nPrefix, rLocalName, xAttrList, nFamily, GetProperties(), xImpPrMap ); } @@ -142,7 +142,7 @@ void XMLGraphicsDefaultStyle::SetDefaults() // special handling since AOO still does _not_ write it into the file || bIsAOO4) { - UniReference<XMLPropertySetMapper> const pImpPrMap( + rtl::Reference<XMLPropertySetMapper> const pImpPrMap( GetStyles()->GetImportPropertyMapper(GetFamily()) ->getPropertySetMapper()); sal_Int32 const nStrokeIndex( diff --git a/xmloff/source/draw/XMLReplacementImageContext.cxx b/xmloff/source/draw/XMLReplacementImageContext.cxx index 8361fd2a76de..fb55d36fbd06 100644 --- a/xmloff/source/draw/XMLReplacementImageContext.cxx +++ b/xmloff/source/draw/XMLReplacementImageContext.cxx @@ -42,7 +42,7 @@ XMLReplacementImageContext::XMLReplacementImageContext( m_xPropSet( rPropSet ), m_sGraphicURL("GraphicURL") { - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); const SvXMLTokenMap& rTokenMap = xTxtImport->GetTextFrameAttrTokenMap(); @@ -74,7 +74,7 @@ void XMLReplacementImageContext::EndElement() { OSL_ENSURE( !m_sHRef.isEmpty() || m_xBase64Stream.is(), "neither URL nor base64 image data given" ); - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); OUString sHRef; if( !m_sHRef.isEmpty() ) diff --git a/xmloff/source/draw/XMLShapePropertySetContext.cxx b/xmloff/source/draw/XMLShapePropertySetContext.cxx index b8a1e8a5a39c..1aec8f5a6df3 100644 --- a/xmloff/source/draw/XMLShapePropertySetContext.cxx +++ b/xmloff/source/draw/XMLShapePropertySetContext.cxx @@ -36,7 +36,7 @@ XMLShapePropertySetContext::XMLShapePropertySetContext( const Reference< xml::sax::XAttributeList > & xAttrList, sal_uInt32 nFam, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap ) : + const rtl::Reference < SvXMLImportPropertyMapper > &rMap ) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFam, rProps, rMap ), mnBulletIndex(-1) diff --git a/xmloff/source/draw/XMLShapeStyleContext.cxx b/xmloff/source/draw/XMLShapeStyleContext.cxx index 5ee61370ebff..9068ceb42a8f 100644 --- a/xmloff/source/draw/XMLShapeStyleContext.cxx +++ b/xmloff/source/draw/XMLShapeStyleContext.cxx @@ -106,7 +106,7 @@ SvXMLImportContext *XMLShapeStyleContext::CreateChildContext( nFamily = XML_TYPE_PROP_GRAPHIC; if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) pContext = new XMLShapePropertySetContext( GetImport(), nPrefix, @@ -132,7 +132,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet // for compatibility to beta files, search for CTF_SD_NUMBERINGRULES_NAME to // import numbering rules from the style:properties element - const UniReference< XMLPropertySetMapper >&rMapper = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >&rMapper = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper(); ::std::vector< XMLPropertyState > &rProperties = GetProperties(); ::std::vector< XMLPropertyState >::iterator end( rProperties.end() ); @@ -190,9 +190,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet // ones are used when a FillStyle is defined if(!m_bIsFillStyleAlreadyConverted && GetProperties().size()) { - static ::rtl::OUString s_FillStyle(RTL_CONSTASCII_USTRINGPARAM("FillStyle")); - - if(doNewDrawingLayerFillStyleDefinitionsExist(s_FillStyle)) + if(doNewDrawingLayerFillStyleDefinitionsExist(OUString("FillStyle"))) { deactivateOldFillStyleDefinitions(getStandardSet()); } @@ -226,7 +224,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet XML_STYLE_FAMILY_SD_FILL_IMAGE_ID }; - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); if( xImpPrMap.is() ) @@ -234,7 +232,7 @@ void XMLShapeStyleContext::FillPropertySet( const Reference< beans::XPropertySet Reference< XPropertySetInfo > xInfo; // get property set mapper - UniReference<XMLPropertySetMapper> xPropMapper( xImpPrMap->getPropertySetMapper() ); + rtl::Reference<XMLPropertySetMapper> xPropMapper( xImpPrMap->getPropertySetMapper() ); for( sal_uInt16 i=0; aContextIDs[i].nContextID != -1; i++ ) { diff --git a/xmloff/source/draw/animexp.cxx b/xmloff/source/draw/animexp.cxx index 0bc68d3ea400..05c12cbb4d1a 100644 --- a/xmloff/source/draw/animexp.cxx +++ b/xmloff/source/draw/animexp.cxx @@ -225,7 +225,7 @@ class AnimExpImpl { public: list<XMLEffectHint> maEffects; - UniReference< XMLShapeExport > mxShapeExp; + rtl::Reference< XMLShapeExport > mxShapeExp; OUString msDimColor; OUString msDimHide; diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx index 00862123e194..d3c7e2b86c1c 100644 --- a/xmloff/source/draw/animimp.cxx +++ b/xmloff/source/draw/animimp.cxx @@ -554,7 +554,7 @@ void XMLAnimationsEffectContext::EndElement() try { - UniReference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() ); + rtl::Reference< XMLShapeImportHelper > xShapeImport( GetImport().GetShapeImport() ); Any aAny; if( !maShapeId.isEmpty() ) diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx index bf15e56a88e9..f24bd7e61b42 100644 --- a/xmloff/source/draw/sdpropls.cxx +++ b/xmloff/source/draw/sdpropls.cxx @@ -1167,7 +1167,7 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy return pHdl; } -XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, +XMLShapePropertySetMapper::XMLShapePropertySetMapper(const rtl::Reference< XMLPropertyHandlerFactory >& rFactoryRef, bool bForExport) : XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport ) { @@ -1177,7 +1177,7 @@ XMLShapePropertySetMapper::~XMLShapePropertySetMapper() { } -XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) +XMLShapeExportPropertyMapper::XMLShapeExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) : SvXMLExportPropertyMapper( rMapper ) , maNumRuleExp( rExport ) , mbIsInAutoStyles( true ) @@ -1562,7 +1562,7 @@ void XMLShapeExportPropertyMapper::handleElementItem( } } -XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) : +XMLPageExportPropertyMapper::XMLPageExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ) : SvXMLExportPropertyMapper( rMapper ), mrExport( rExport ), msCDATA( GetXMLToken(XML_CDATA)) diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx index d784a2f4c5c3..0293eec88952 100644 --- a/xmloff/source/draw/sdpropls.hxx +++ b/xmloff/source/draw/sdpropls.hxx @@ -69,7 +69,7 @@ public: class XMLShapePropertySetMapper : public XMLPropertySetMapper { public: - XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, bool bForExport); + XMLShapePropertySetMapper(const rtl::Reference< XMLPropertyHandlerFactory >& rFactoryRef, bool bForExport); virtual ~XMLShapePropertySetMapper(); }; @@ -90,7 +90,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rPropSet ) const SAL_OVERRIDE; public: - XMLShapeExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); + XMLShapeExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); virtual ~XMLShapeExportPropertyMapper(); virtual void handleElementItem( @@ -128,7 +128,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > rPropSet ) const SAL_OVERRIDE; public: - XMLPageExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); + XMLPageExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExport ); virtual ~XMLPageExportPropertyMapper(); virtual void handleElementItem( diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx index 90b7642a9339..607913500266 100644 --- a/xmloff/source/draw/sdxmlexp.cxx +++ b/xmloff/source/draw/sdxmlexp.cxx @@ -436,10 +436,10 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent mpSdPropHdlFactory->acquire(); // build one ref - const UniReference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory; + const rtl::Reference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory; // construct PropertySetMapper - UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef, true); + rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef, true); // get or create text paragraph export GetTextParagraphExport(); @@ -1659,7 +1659,7 @@ OUString SdXMLExport::ImpCreatePresPageStyleName( Reference<XDrawPage> xDrawPage xPropSet = xPropSet1; } - const UniReference< SvXMLExportPropertyMapper > aMapperRef( GetPresPagePropsMapper() ); + const rtl::Reference< SvXMLExportPropertyMapper > aMapperRef( GetPresPagePropsMapper() ); std::vector< XMLPropertyState > xPropStates( aMapperRef->Filter( xPropSet ) ); @@ -1724,7 +1724,7 @@ void SdXMLExport::ImpWritePresentationStyles() if(IsImpress() && mxDocStyleFamilies.is() && xNamed.is()) { XMLStyleExport aStEx(*this, OUString(), GetAutoStylePool().get()); - const UniReference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); + const rtl::Reference< SvXMLExportPropertyMapper > aMapperRef( GetPropertySetMapper() ); OUString aPrefix( xNamed->getName() ); @@ -1857,7 +1857,7 @@ void SdXMLExport::_ExportContent() if( !sNavigationOrder.isEmpty() ) AddAttribute ( XML_NAMESPACE_DRAW, XML_NAV_ORDER, sNavigationOrder ); - UniReference< xmloff::AnimationsExporter > xAnimationsExporter; + rtl::Reference< xmloff::AnimationsExporter > xAnimationsExporter; uno::Reference< ::com::sun::star::animations::XAnimationNodeSupplier > xAnimNodeSupplier; // prepare animation export @@ -1878,7 +1878,7 @@ void SdXMLExport::_ExportContent() else { // export old animations for ooo format - UniReference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() ); + rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() ); GetShapeExport()->setAnimationsExporter( xAnimExport ); } } @@ -1911,7 +1911,7 @@ void SdXMLExport::_ExportContent() else { // animations - UniReference< XMLAnimationsExporter > xAnimExport( GetShapeExport()->getAnimationsExporter() ); + rtl::Reference< XMLAnimationsExporter > xAnimExport( GetShapeExport()->getAnimationsExporter() ); if( xAnimExport.is() ) xAnimExport->exportAnimations( *this ); @@ -2291,7 +2291,7 @@ void SdXMLExport::_ExportAutoStyles() // prepare animations exporter if impress if(IsImpress() && ((getExportFlags() & EXPORT_OASIS) == 0) ) { - UniReference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() ); + rtl::Reference< XMLAnimationsExporter > xAnimExport = new XMLAnimationsExporter( GetShapeExport().get() ); GetShapeExport()->setAnimationsExporter( xAnimExport ); } @@ -2355,7 +2355,7 @@ void SdXMLExport::_ExportAutoStyles() } if(IsImpress()) { - UniReference< XMLAnimationsExporter > xAnimExport; + rtl::Reference< XMLAnimationsExporter > xAnimExport; GetShapeExport()->setAnimationsExporter( xAnimExport ); } } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index fff8f4a07825..7f33e5828a88 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -156,7 +156,7 @@ XMLShapeExport::XMLShapeExport(SvXMLExport& rExp, mxPropertySetMapper = CreateShapePropMapper( mrExport ); if( pExtMapper ) { - UniReference < SvXMLExportPropertyMapper > xExtMapper( pExtMapper ); + rtl::Reference < SvXMLExportPropertyMapper > xExtMapper( pExtMapper ); mxPropertySetMapper->ChainExportMapper( xExtMapper ); } @@ -1026,8 +1026,8 @@ void XMLShapeExport::exportAutoStyles() SvXMLExportPropertyMapper* XMLShapeExport::CreateShapePropMapper( SvXMLExport& rExport ) { - UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rExport.GetModel(), rExport ); - UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, true ); + rtl::Reference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rExport.GetModel(), rExport ); + rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, true ); rExport.GetTextParagraphExport(); // get or create text paragraph export SvXMLExportPropertyMapper* pResult = new XMLShapeExportPropertyMapper( xMapper, rExport ); @@ -1229,7 +1229,7 @@ void XMLShapeExport::ExportGraphicDefaults() XMLStyleExport aStEx(mrExport, OUString(), mrExport.GetAutoStylePool().get()); // construct PropertySetMapper - UniReference< SvXMLExportPropertyMapper > xPropertySetMapper( CreateShapePropMapper( mrExport ) ); + rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( CreateShapePropMapper( mrExport ) ); ((XMLShapeExportPropertyMapper*)xPropertySetMapper.get())->SetAutoStyles( false ); // chain text attributes @@ -1268,7 +1268,7 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport() if( !mxShapeTableExport.is() ) { rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ) ); - UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get(), true ) ); + rtl::Reference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get(), true ) ); mrExport.GetTextParagraphExport(); // get or create text paragraph export rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( new XMLShapeExportPropertyMapper( xMapper, mrExport ) ); mxShapeTableExport = new XMLTableExport( mrExport, xPropertySetMapper, xFactory ); diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index b220c22eae6f..d552b3f09800 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -148,14 +148,14 @@ XMLShapeImportHelper::XMLShapeImportHelper( mpSdPropHdlFactory->acquire(); // construct PropertySetMapper - UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory, false); + rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory, false); mpPropertySetMapper = new SvXMLImportPropertyMapper( xMapper, rImporter ); // set lock to avoid deletion mpPropertySetMapper->acquire(); if( pExtMapper ) { - UniReference < SvXMLImportPropertyMapper > xExtMapper( pExtMapper ); + rtl::Reference < SvXMLImportPropertyMapper > xExtMapper( pExtMapper ); mpPropertySetMapper->ChainImportMapper( xExtMapper ); } @@ -1015,8 +1015,8 @@ void XMLShapeImportHelper::restoreConnections() SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const uno::Reference< frame::XModel>& rModel, SvXMLImport& rImport ) { - UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rModel, rImport ); - UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, false ); + rtl::Reference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rModel, rImport ); + rtl::Reference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, false ); SvXMLImportPropertyMapper* pResult = new SvXMLImportPropertyMapper( xMapper, rImport ); // chain text attributes diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx index ec1a144ac331..11a5a166b05f 100644 --- a/xmloff/source/draw/ximppage.cxx +++ b/xmloff/source/draw/ximppage.cxx @@ -147,7 +147,7 @@ SvXMLImportContext * DrawAnnotationContext::CreateChildContext( sal_uInt16 nPref uno::Reference< text::XText > xText( mxAnnotation->getTextRange() ); if( xText.is() ) { - UniReference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); mxCursor = xText->createTextCursor(); if( mxCursor.is() ) xTxtImport->SetCursor( mxCursor ); diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index dee14cef6625..dc2d886bbeaf 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -216,7 +216,7 @@ SvXMLImportContext *SdXMLShapeContext::CreateChildContext( sal_uInt16 p_nPrefix, uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY ); if( xText.is() ) { - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); mxOldCursor = xTxtImport->GetCursor(); mxCursor = xText->createTextCursor(); @@ -438,7 +438,7 @@ void SdXMLShapeContext::AddShape(uno::Reference< drawing::XShape >& xShape) xNamed->setName( maShapeName ); } - UniReference< XMLShapeImportHelper > xImp( GetImport().GetShapeImport() ); + rtl::Reference< XMLShapeImportHelper > xImp( GetImport().GetShapeImport() ); xImp->addShape( xShape, mxAttrList, mxShapes ); if( mbClearDefaultAttributes ) @@ -973,7 +973,7 @@ void SdXMLShapeContext::onDemandRescueUsefulDataFromTemporary( const SvXMLImport uno::Sequence< sal_Int32 > aSourceIdSequence( xSourceGluePoints->getIdentifiers() ); const sal_Int32 nSourceCount(aSourceIdSequence.getLength()); - UniReference< XMLShapeImportHelper > xSourceShapeImportHelper(const_cast< SdXMLShapeContext* >(pCandidate)->GetImport().GetShapeImport()); + rtl::Reference< XMLShapeImportHelper > xSourceShapeImportHelper(const_cast< SdXMLShapeContext* >(pCandidate)->GetImport().GetShapeImport()); if(nSourceCount) { diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index d26b0b5e0164..b1e4c03bf473 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -61,7 +61,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap ); + const rtl::Reference < SvXMLImportPropertyMapper > &rMap ); virtual ~SdXMLDrawingPagePropertySetContext(); @@ -80,7 +80,7 @@ SdXMLDrawingPagePropertySetContext::SdXMLDrawingPagePropertySetContext( const OUString& rLName, const uno::Reference< xml::sax::XAttributeList > & xAttrList, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap ) : + const rtl::Reference < SvXMLImportPropertyMapper > &rMap ) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, XML_TYPE_PROP_DRAWING_PAGE, rProps, rMap ) { @@ -182,7 +182,7 @@ SvXMLImportContext *SdXMLDrawingPageStyleContext::CreateChildContext( if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_DRAWING_PAGE_PROPERTIES ) ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) pContext = new SdXMLDrawingPagePropertySetContext( GetImport(), nPrefix, @@ -204,7 +204,7 @@ void SdXMLDrawingPageStyleContext::Finish( bool bOverwrite ) ::std::vector< XMLPropertyState > &rProperties = GetProperties(); - const UniReference< XMLPropertySetMapper >& rImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper(); + const rtl::Reference< XMLPropertySetMapper >& rImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() )->getPropertySetMapper(); ::std::vector< XMLPropertyState >::iterator property = rProperties.begin(); for(; property != rProperties.end(); ++property) @@ -264,7 +264,7 @@ void SdXMLDrawingPageStyleContext::FillPropertySet( XML_STYLE_FAMILY_SD_FILL_IMAGE_ID }; - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); if( xImpPrMap.is() ) @@ -282,7 +282,7 @@ void SdXMLDrawingPageStyleContext::FillPropertySet( sStyleName = GetImport().GetStyleDisplayName( aFamilies[i], sStyleName ); // get property set mapper - UniReference<XMLPropertySetMapper> rPropMapper = + rtl::Reference<XMLPropertySetMapper> rPropMapper = xImpPrMap->getPropertySetMapper(); // set property @@ -1098,10 +1098,10 @@ sal_uInt16 SdXMLStylesContext::GetFamily( const OUString& rFamily ) const return SvXMLStylesContext::GetFamily(rFamily); } -UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyMapper( +rtl::Reference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyMapper( sal_uInt16 nFamily) const { - UniReference < SvXMLImportPropertyMapper > xMapper; + rtl::Reference < SvXMLImportPropertyMapper > xMapper; switch( nFamily ) { @@ -1109,7 +1109,7 @@ UniReference< SvXMLImportPropertyMapper > SdXMLStylesContext::GetImportPropertyM { if(!xPresImpPropMapper.is()) { - UniReference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport(); + rtl::Reference< XMLShapeImportHelper > aImpHelper = ((SvXMLImport&)GetImport()).GetShapeImport(); ((SdXMLStylesContext*)this)->xPresImpPropMapper = aImpHelper->GetPresPagePropsMapper(); } @@ -1268,7 +1268,7 @@ void SdXMLStylesContext::ImpSetCellStyles() const //enabled before having autoheight turned off again and getting stuck on that //autosized height static bool canSkipReset(const OUString &rName, const XMLPropStyleContext* pPropStyle, - const uno::Reference< beans::XPropertySet > &rPropSet, const UniReference < XMLPropertySetMapper >& rPrMap) + const uno::Reference< beans::XPropertySet > &rPropSet, const rtl::Reference < XMLPropertySetMapper >& rPrMap) { bool bCanSkipReset = false; if (pPropStyle && rName == "TextAutoGrowHeight") @@ -1353,8 +1353,8 @@ void SdXMLStylesContext::ImpSetGraphicStyles( uno::Reference< container::XNameAc if( xPropState.is() ) { - UniReference < XMLPropertySetMapper > xPrMap; - UniReference < SvXMLImportPropertyMapper > xImpPrMap = GetImportPropertyMapper( nFamily ); + rtl::Reference < XMLPropertySetMapper > xPrMap; + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetImportPropertyMapper( nFamily ); DBG_ASSERT( xImpPrMap.is(), "There is the import prop mapper" ); if( xImpPrMap.is() ) xPrMap = xImpPrMap->getPropertySetMapper(); diff --git a/xmloff/source/draw/ximpstyl.hxx b/xmloff/source/draw/ximpstyl.hxx index 2fcea98f1c64..6f88a0aed7c6 100644 --- a/xmloff/source/draw/ximpstyl.hxx +++ b/xmloff/source/draw/ximpstyl.hxx @@ -187,7 +187,7 @@ public: class SdXMLStylesContext : public SvXMLStylesContext { - UniReference< SvXMLImportPropertyMapper > xPresImpPropMapper; + rtl::Reference< SvXMLImportPropertyMapper > xPresImpPropMapper; bool mbIsAutoStyle; SvXMLNumFmtHelper* mpNumFmtHelper; SvNumberFormatter* mpNumFormatter; @@ -230,7 +230,7 @@ public: virtual sal_uInt16 GetFamily( const OUString& rFamily ) const SAL_OVERRIDE; virtual void EndElement() SAL_OVERRIDE; - virtual UniReference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const SAL_OVERRIDE; + virtual rtl::Reference< SvXMLImportPropertyMapper > GetImportPropertyMapper(sal_uInt16 nFamily) const SAL_OVERRIDE; void SetMasterPageStyles(SdXMLMasterPageContext& rMaster) const; diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx index 66f690e8bf1b..916b97e1e0fa 100644 --- a/xmloff/source/forms/controlpropertymap.cxx +++ b/xmloff/source/forms/controlpropertymap.cxx @@ -113,7 +113,7 @@ namespace xmloff } //= OFormComponentStyleExportMapper - OFormComponentStyleExportMapper::OFormComponentStyleExportMapper( const UniReference< XMLPropertySetMapper >& _rMapper ) + OFormComponentStyleExportMapper::OFormComponentStyleExportMapper( const rtl::Reference< XMLPropertySetMapper >& _rMapper ) :SvXMLExportPropertyMapper( _rMapper ) { } diff --git a/xmloff/source/forms/controlpropertymap.hxx b/xmloff/source/forms/controlpropertymap.hxx index 9fc871dfd6b8..bd9d258c612d 100644 --- a/xmloff/source/forms/controlpropertymap.hxx +++ b/xmloff/source/forms/controlpropertymap.hxx @@ -35,7 +35,7 @@ namespace xmloff class OFormComponentStyleExportMapper : public SvXMLExportPropertyMapper { public: - OFormComponentStyleExportMapper( const UniReference< XMLPropertySetMapper >& _rMapper ); + OFormComponentStyleExportMapper( const rtl::Reference< XMLPropertySetMapper >& _rMapper ); void handleSpecialItem( SvXMLAttributeList& _rAttrList, diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index 1d1dc065a0b7..dc461e8df8f8 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1370,7 +1370,7 @@ namespace xmloff Reference< XText > xTextElement( m_xElement, UNO_QUERY ); if ( xTextElement.is() ) { - UniReference < XMLTextImportHelper > xTextImportHelper( m_rContext.getGlobalContext().GetTextImport() ); + rtl::Reference < XMLTextImportHelper > xTextImportHelper( m_rContext.getGlobalContext().GetTextImport() ); if ( !m_xCursor.is() ) { @@ -1510,7 +1510,7 @@ namespace xmloff OControlImport::EndElement(); // some cleanups - UniReference < XMLTextImportHelper > xTextImportHelper( m_rContext.getGlobalContext().GetTextImport() ); + rtl::Reference < XMLTextImportHelper > xTextImportHelper( m_rContext.getGlobalContext().GetTextImport() ); if ( m_xCursor.is() ) { // delete the newline which has been imported errornously diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 5fca30d844ed..9693e7db6087 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -423,7 +423,7 @@ namespace xmloff void OPropertyExport::flagStyleProperties() { // flag all the properties which are part of the style as "handled" - UniReference< XMLPropertySetMapper > xStylePropertiesSupplier = m_rContext.getStylePropertyMapper()->getPropertySetMapper(); + rtl::Reference< XMLPropertySetMapper > xStylePropertiesSupplier = m_rContext.getStylePropertyMapper()->getPropertySetMapper(); for (sal_Int32 i=0; i<xStylePropertiesSupplier->GetEntryCount(); ++i) exportedProperty(xStylePropertiesSupplier->GetEntryAPIName(i)); 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(); } diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 015f2b2d3479..798a9e3f438f 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -184,10 +184,10 @@ XMLTableImport::XMLTableImport( SvXMLImport& rImport, const rtl::Reference< XMLP mxCellImportPropertySetMapper = new SvXMLImportPropertyMapper( xCellPropertySetMapper.get(), rImport ); mxCellImportPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(rImport)); - UniReference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), false ) ); + rtl::Reference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), false ) ); mxRowImportPropertySetMapper = new SvXMLImportPropertyMapper( xRowMapper, rImport ); - UniReference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), false ) ); + rtl::Reference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), false ) ); mxColumnImportPropertySetMapper = new SvXMLImportPropertyMapper( xColMapper, rImport ); } @@ -624,7 +624,7 @@ SvXMLImportContext * XMLCellImportContext::CreateChildContext( sal_uInt16 nPrefi Reference< XText > xText( mxCell, UNO_QUERY ); if( xText.is() ) { - UniReference < XMLTextImportHelper > xTxtImport( GetImport().GetTextImport() ); + rtl::Reference < XMLTextImportHelper > xTxtImport( GetImport().GetTextImport() ); mxOldCursor = xTxtImport->GetCursor(); mxCursor = xText->createTextCursor(); if( mxCursor.is() ) diff --git a/xmloff/source/text/XMLChangeImportContext.cxx b/xmloff/source/text/XMLChangeImportContext.cxx index a706ec20fb26..857809f0f24c 100644 --- a/xmloff/source/text/XMLChangeImportContext.cxx +++ b/xmloff/source/text/XMLChangeImportContext.cxx @@ -68,7 +68,7 @@ void XMLChangeImportContext::StartElement( // Id found! Now call RedlineImportHelper // prepare parameters - UniReference<XMLTextImportHelper> rHelper = + rtl::Reference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); OUString sID = xAttrList->getValueByIndex(nAttr); diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 856ee7f2a30c..0914e05c6a42 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -146,7 +146,7 @@ void XMLChangedRegionImportContext::EndElement() { // delete last paragraph // (one extra paragraph was inserted in the beginning) - UniReference<XMLTextImportHelper> rHelper = + rtl::Reference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); rHelper->DeleteParagraph(); @@ -175,7 +175,7 @@ void XMLChangedRegionImportContext::UseRedlineText() if (! xOldCursor.is()) { // get TextImportHelper and old Cursor - UniReference<XMLTextImportHelper> rHelper(GetImport().GetTextImport()); + rtl::Reference<XMLTextImportHelper> rHelper(GetImport().GetTextImport()); Reference<XTextCursor> xCursor( rHelper->GetCursor() ); // create Redline and new Cursor diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx index b7a2c902e268..0054d6e04d71 100644 --- a/xmloff/source/text/XMLIndexTOCContext.cxx +++ b/xmloff/source/text/XMLIndexTOCContext.cxx @@ -200,7 +200,7 @@ void XMLIndexTOCContext::StartElement( #else OUString sMarker("Y"); #endif - UniReference<XMLTextImportHelper> rImport = + rtl::Reference<XMLTextImportHelper> rImport = GetImport().GetTextImport(); // a) insert index @@ -263,7 +263,7 @@ void XMLIndexTOCContext::EndElement() { // preliminaries OUString sEmpty; - UniReference<XMLTextImportHelper> rHelper= GetImport().GetTextImport(); + rtl::Reference<XMLTextImportHelper> rHelper= GetImport().GetTextImport(); // get rid of last paragraph (unless it's the only paragraph) rHelper->GetCursor()->goRight(1, sal_False); diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx index 16f0f7e37299..18c4194a31a3 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx @@ -52,7 +52,7 @@ void XMLSectionFootnoteConfigExport::exportXML( nIdx #endif , - const UniReference<XMLPropertySetMapper> & rMapper) + const rtl::Reference<XMLPropertySetMapper> & rMapper) { // store and initialize the values bool bNumOwn = false; diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx index 6935bcad4eff..985f7c70a3c5 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.hxx @@ -28,7 +28,9 @@ class SvXMLExport; class XMLPropertySetMapper; struct XMLPropertyState; -template<class X> class UniReference; +namespace rtl { + template<class X> class Reference; +} /** * Export the footnote-/endnote-configuration element in section styles. @@ -45,7 +47,7 @@ public: bool bEndnote, const ::std::vector<XMLPropertyState> * pProperties, sal_uInt32 nIdx, - const UniReference<XMLPropertySetMapper> & rMapper); /// used only for debugging + const rtl::Reference<XMLPropertySetMapper> & rMapper); /// used only for debugging }; #endif diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx index a280dd9ab7a8..1ddce2b57cfe 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.cxx @@ -54,7 +54,7 @@ XMLSectionFootnoteConfigImport::XMLSectionFootnoteConfigImport( sal_uInt16 nPrefix, const OUString& rLocalName, vector<XMLPropertyState> & rProps, - const UniReference<XMLPropertySetMapper> & rMapperRef) : + const rtl::Reference<XMLPropertySetMapper> & rMapperRef) : SvXMLImportContext(rImport, nPrefix, rLocalName), rProperties(rProps), rMapper(rMapperRef) diff --git a/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx b/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx index bed2993bf4aa..5eab5365648c 100644 --- a/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx +++ b/xmloff/source/text/XMLSectionFootnoteConfigImport.hxx @@ -21,10 +21,8 @@ #ifndef INCLUDED_XMLOFF_SOURCE_TEXT_XMLSECTIONFOOTNOTECONFIGIMPORT_HXX #define INCLUDED_XMLOFF_SOURCE_TEXT_XMLSECTIONFOOTNOTECONFIGIMPORT_HXX - #include <xmloff/xmlictxt.hxx> -#include <xmloff/uniref.hxx> - +#include <rtl/ref.hxx> #include <vector> @@ -43,7 +41,7 @@ namespace com { namespace sun { namespace star { class XMLSectionFootnoteConfigImport : public SvXMLImportContext { ::std::vector<XMLPropertyState> & rProperties; - UniReference<XMLPropertySetMapper> rMapper; + rtl::Reference<XMLPropertySetMapper> rMapper; public: @@ -54,7 +52,7 @@ public: sal_uInt16 nPrefix, const OUString& rLocalName, ::std::vector<XMLPropertyState> & rProperties, - const UniReference<XMLPropertySetMapper> & rMapperRef); + const rtl::Reference<XMLPropertySetMapper> & rMapperRef); virtual ~XMLSectionFootnoteConfigImport(); diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx index 88a5e488310c..ea8ed959435a 100644 --- a/xmloff/source/text/XMLSectionImportContext.cxx +++ b/xmloff/source/text/XMLSectionImportContext.cxx @@ -130,7 +130,7 @@ void XMLSectionImportContext::StartElement( bValid = true; } - UniReference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); + rtl::Reference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); // valid? if (bValid) @@ -333,7 +333,7 @@ void XMLSectionImportContext::EndElement() { // get rid of last paragraph // (unless it's the only paragraph in the section) - UniReference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); + rtl::Reference<XMLTextImportHelper> rHelper = GetImport().GetTextImport(); rHelper->GetCursor()->goRight(1, sal_False); if (bHasContent) { diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index c16c38b23b49..62ea125e1253 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -477,7 +477,7 @@ TYPEINIT1( XMLTextFrameContext_Impl, SvXMLImportContext ); void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) { - UniReference < XMLTextImportHelper > xTextImportHelper = + rtl::Reference < XMLTextImportHelper > xTextImportHelper = GetImport().GetTextImport(); switch ( nType) @@ -717,7 +717,7 @@ void XMLTextFrameContext_Impl::Create( bool /*bHRefOrBase64*/ ) // URL OSL_ENSURE( !sHRef.isEmpty() || xBase64Stream.is(), "neither URL nor base64 image data given" ); - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); if( !sHRef.isEmpty() ) { @@ -895,7 +895,7 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( bCreateFailed = false; bOwnBase64Stream = false; - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); const SvXMLTokenMap& rTokenMap = xTxtImport->GetTextFrameAttrTokenMap(); @@ -1273,7 +1273,7 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef, if( !xPropSet.is() ) return; - UniReference< XMLTextImportHelper > xTxtImp = GetImport().GetTextImport(); + rtl::Reference< XMLTextImportHelper > xTxtImp = GetImport().GetTextImport(); Reference < XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo(); if( !xPropSetInfo.is() || @@ -1398,7 +1398,7 @@ XMLTextFrameContext::XMLTextFrameContext( OUString aStyleName = xAttrList->getValueByIndex( i ); if( !aStyleName.isEmpty() ) { - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); XMLPropStyleContext* pStyle( 0L ); pStyle = xTxtImport->FindAutoFrameStyle( aStyleName ); diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index ca59d826c79a..81c12bceb92a 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -162,7 +162,7 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext( xText->setString( aText ); } - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); xOldTextCursor = xTxtImport->GetCursor(); diff --git a/xmloff/source/text/XMLTextPropertySetContext.cxx b/xmloff/source/text/XMLTextPropertySetContext.cxx index 33cb64542399..2afbd9635c24 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.cxx +++ b/xmloff/source/text/XMLTextPropertySetContext.cxx @@ -37,7 +37,7 @@ XMLTextPropertySetContext::XMLTextPropertySetContext( const Reference< xml::sax::XAttributeList > & xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, OUString& rDCTextStyleName ) : SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMap ), diff --git a/xmloff/source/text/XMLTextPropertySetContext.hxx b/xmloff/source/text/XMLTextPropertySetContext.hxx index b66408e7e431..d7e15ed393bc 100644 --- a/xmloff/source/text/XMLTextPropertySetContext.hxx +++ b/xmloff/source/text/XMLTextPropertySetContext.hxx @@ -37,7 +37,7 @@ public: ::com::sun::star::xml::sax::XAttributeList >& xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap, + const rtl::Reference < SvXMLImportPropertyMapper > &rMap, OUString& rDopCapTextStyleName ); virtual ~XMLTextPropertySetContext(); diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx index 701cf1df920d..60aae4701189 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.cxx +++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx @@ -79,7 +79,7 @@ void XMLTextShapeImportHelper::addShape( sal_Int16 nPage = 0; sal_Int32 nY = 0; - UniReference < XMLTextImportHelper > xTxtImport = + rtl::Reference < XMLTextImportHelper > xTxtImport = rImport.GetTextImport(); const SvXMLTokenMap& rTokenMap = xTxtImport->GetTextFrameAttrTokenMap(); diff --git a/xmloff/source/text/XMLTextShapeStyleContext.cxx b/xmloff/source/text/XMLTextShapeStyleContext.cxx index 25d9a4ad2c6f..9a51d82b5b4f 100644 --- a/xmloff/source/text/XMLTextShapeStyleContext.cxx +++ b/xmloff/source/text/XMLTextShapeStyleContext.cxx @@ -46,7 +46,7 @@ public: const Reference< XAttributeList >& xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap ); + const rtl::Reference < SvXMLImportPropertyMapper > &rMap ); virtual ~XMLTextShapePropertySetContext_Impl(); @@ -64,7 +64,7 @@ XMLTextShapePropertySetContext_Impl::XMLTextShapePropertySetContext_Impl( const Reference< XAttributeList > & xAttrList, sal_uInt32 nFamily, ::std::vector< XMLPropertyState > &rProps, - const UniReference < SvXMLImportPropertyMapper > &rMap ) : + const rtl::Reference < SvXMLImportPropertyMapper > &rMap ) : XMLShapePropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMap ) { @@ -172,7 +172,7 @@ SvXMLImportContext *XMLTextShapeStyleContext::CreateChildContext( nFamily = XML_TYPE_PROP_GRAPHIC; if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) { diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx index 0cd2bb72f0e1..edc98a8fe57c 100644 --- a/xmloff/source/text/txtexppr.cxx +++ b/xmloff/source/text/txtexppr.cxx @@ -173,7 +173,7 @@ void XMLTextExportPropertySetMapper::handleSpecialItem( } XMLTextExportPropertySetMapper::XMLTextExportPropertySetMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExp ) : SvXMLExportPropertyMapper( rMapper ), rExport( rExp ), diff --git a/xmloff/source/text/txtexppr.hxx b/xmloff/source/text/txtexppr.hxx index 008b169f3866..209914fa92e8 100644 --- a/xmloff/source/text/txtexppr.hxx +++ b/xmloff/source/text/txtexppr.hxx @@ -66,7 +66,7 @@ protected: public: XMLTextExportPropertySetMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLExport& rExt ); virtual ~XMLTextExportPropertySetMapper(); diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index 3e8a8e718d5a..dbf3f0942d63 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -3664,7 +3664,7 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext( aAny >>= xText; if( xText.is() ) { - UniReference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); + rtl::Reference < XMLTextImportHelper > xTxtImport = GetImport().GetTextImport(); if( !mxCursor.is() ) { mxOldCursor = xTxtImport->GetCursor(); diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx index 5c5e17e09026..ebefde2cfcae 100644 --- a/xmloff/source/text/txtimp.cxx +++ b/xmloff/source/text/txtimp.cxx @@ -502,11 +502,11 @@ struct XMLTextImportHelper::Impl SvXMLImportContextRef m_xAutoStyles; SvXMLImportContextRef m_xFontDecls; - UniReference< SvXMLImportPropertyMapper > m_xParaImpPrMap; - UniReference< SvXMLImportPropertyMapper > m_xTextImpPrMap; - UniReference< SvXMLImportPropertyMapper > m_xFrameImpPrMap; - UniReference< SvXMLImportPropertyMapper > m_xSectionImpPrMap; - UniReference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; + rtl::Reference< SvXMLImportPropertyMapper > m_xParaImpPrMap; + rtl::Reference< SvXMLImportPropertyMapper > m_xTextImpPrMap; + rtl::Reference< SvXMLImportPropertyMapper > m_xFrameImpPrMap; + rtl::Reference< SvXMLImportPropertyMapper > m_xSectionImpPrMap; + rtl::Reference< SvXMLImportPropertyMapper > m_xRubyImpPrMap; boost::scoped_ptr<SvI18NMap> m_pRenameMap; @@ -693,25 +693,25 @@ XMLTextImportHelper::GetChapterNumbering() const return m_pImpl->m_xChapterNumbering; } -UniReference< SvXMLImportPropertyMapper > const& +rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetParaImportPropertySetMapper() const { return m_pImpl->m_xParaImpPrMap; } -UniReference< SvXMLImportPropertyMapper > const& +rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetTextImportPropertySetMapper() const { return m_pImpl->m_xTextImpPrMap; } -UniReference< SvXMLImportPropertyMapper > const& +rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetSectionImportPropertySetMapper() const { return m_pImpl->m_xSectionImpPrMap; } -UniReference< SvXMLImportPropertyMapper > const& +rtl::Reference< SvXMLImportPropertyMapper > const& XMLTextImportHelper::GetRubyImportPropertySetMapper() const { return m_pImpl->m_xRubyImpPrMap; @@ -1230,12 +1230,12 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars, sal_Int32 nCount = pStyle->_GetProperties().size(); if( nCount ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles) ->GetImportPropertyMapper(nFamily); if( xImpPrMap.is() ) { - UniReference<XMLPropertySetMapper> rPropMapper = + rtl::Reference<XMLPropertySetMapper> rPropMapper = xImpPrMap->getPropertySetMapper(); for( sal_Int32 i=0; i < nCount; i++ ) { diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx index 7ac8db5815da..36fb328eabc7 100644 --- a/xmloff/source/text/txtimppr.cxx +++ b/xmloff/source/text/txtimppr.cxx @@ -131,7 +131,7 @@ bool XMLTextImportPropertyMapper::handleSpecialItem( } XMLTextImportPropertyMapper::XMLTextImportPropertyMapper( - const UniReference< XMLPropertySetMapper >& rMapper, + const rtl::Reference< XMLPropertySetMapper >& rMapper, SvXMLImport& rImp ) : SvXMLImportPropertyMapper( rMapper, rImp ), nSizeTypeIndex( -2 ), @@ -257,7 +257,7 @@ namespace { //On import clear 100% all-margins relative sizes. static bool -isNotDefaultRelSize(const XMLPropertyState* pRelState, const UniReference<XMLPropertySetMapper>& rPrMap) +isNotDefaultRelSize(const XMLPropertyState* pRelState, const rtl::Reference<XMLPropertySetMapper>& rPrMap) { if (rPrMap->GetEntryContextId(pRelState->mnIndex) == CTF_PARAMARGINALL_REL) { @@ -281,7 +281,7 @@ static void lcl_SeparateBorder( XMLPropertyState* pNewBorders[4], XMLPropertyState* pAllBorderWidth, XMLPropertyState* pBorderWidths[4] #ifdef DBG_UTIL - , const UniReference< XMLPropertySetMapper >& rMapper + , const rtl::Reference< XMLPropertySetMapper >& rMapper #endif ) { diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 4475819a2acb..30f3f303ebc2 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -448,7 +448,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, const Reference < XPropertySet > & rPropSet, const XMLPropertyState** ppAddStates, bool bDontSeek ) { - UniReference < SvXMLExportPropertyMapper > xPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; switch( nFamily ) { case XML_STYLE_FAMILY_TEXT_PARAGRAPH: @@ -539,7 +539,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, case XML_STYLE_FAMILY_TEXT_TEXT: { // Get parent and remove hyperlinks (they aren't of interest) - UniReference< XMLPropertySetMapper > xPM(xPropMapper->getPropertySetMapper()); + rtl::Reference< XMLPropertySetMapper > xPM(xPropMapper->getPropertySetMapper()); for( ::std::vector< XMLPropertyState >::iterator i(xPropStates.begin()); nIgnoreProps < 2 && i != xPropStates.end(); ) { @@ -594,7 +594,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily, const Reference < XPropertySet > & rPropSet, const XMLPropertyState** ppAddStates) { - UniReference < SvXMLExportPropertyMapper > xPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; switch( nFamily ) { case XML_STYLE_FAMILY_TEXT_PARAGRAPH: @@ -689,7 +689,7 @@ OUString XMLTextParagraphExport::Find( const XMLPropertyState** ppAddStates) const { OUString sName( rParent ); - UniReference < SvXMLExportPropertyMapper > xPropMapper; + rtl::Reference < SvXMLExportPropertyMapper > xPropMapper; switch( nFamily ) { case XML_STYLE_FAMILY_TEXT_PARAGRAPH: @@ -730,14 +730,14 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink( bool& rbHasAutoStyle, const XMLPropertyState** ppAddStates ) const { - UniReference < SvXMLExportPropertyMapper > xPropMapper(GetTextPropMapper()); + rtl::Reference < SvXMLExportPropertyMapper > xPropMapper(GetTextPropMapper()); vector< XMLPropertyState > xPropStates(xPropMapper->Filter( rPropSet )); // Get parent and remove hyperlinks (they aren't of interest) OUString sName; rbHyperlink = rbHasCharStyle = rbHasAutoStyle = false; sal_uInt16 nIgnoreProps = 0; - UniReference< XMLPropertySetMapper > xPM(xPropMapper->getPropertySetMapper()); + rtl::Reference< XMLPropertySetMapper > xPM(xPropMapper->getPropertySetMapper()); ::std::vector< XMLPropertyState >::iterator aFirstDel = xPropStates.end(); ::std::vector< XMLPropertyState >::iterator aSecondDel = xPropStates.end(); @@ -1271,7 +1271,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( sTextFieldStartEnd( "TextFieldStartEnd" ), aCharStyleNamesPropInfoCache( sCharStyleNames ) { - UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true )); + rtl::Reference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true )); xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper, GetExport() ); @@ -1354,7 +1354,7 @@ XMLTextParagraphExport::~XMLTextParagraphExport() SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateShapeExtPropMapper( SvXMLExport& rExport ) { - UniReference < XMLPropertySetMapper > xPropMapper = + rtl::Reference < XMLPropertySetMapper > xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE, true ); return new XMLTextExportPropertySetMapper( xPropMapper, rExport ); } @@ -3766,7 +3766,7 @@ void XMLTextParagraphExport::exportMeta( void XMLTextParagraphExport::PreventExportOfControlsInMuteSections( const Reference<XIndexAccess> & rShapes, - UniReference<xmloff::OFormLayerXMLExport> xFormExport ) + rtl::Reference<xmloff::OFormLayerXMLExport> xFormExport ) { // check parameters ad pre-conditions if( ( ! rShapes.is() ) || ( ! xFormExport.is() ) ) diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index 5ab5c10b0c75..2cb66dc444d8 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -636,7 +636,7 @@ XMLImpRubyContext_Impl::XMLImpRubyContext_Impl( XMLImpRubyContext_Impl::~XMLImpRubyContext_Impl() { - const UniReference < XMLTextImportHelper > xTextImport( + const rtl::Reference < XMLTextImportHelper > xTextImport( GetImport().GetTextImport()); const Reference < XTextCursor > xAttrCursor( xTextImport->GetText()->createTextCursorByRange( m_xStart )); @@ -1944,7 +1944,7 @@ XMLParaContext::XMLParaContext( XMLParaContext::~XMLParaContext() { - UniReference < XMLTextImportHelper > xTxtImport( + rtl::Reference < XMLTextImportHelper > xTxtImport( GetImport().GetTextImport()); Reference < XTextRange > xCrsrRange( xTxtImport->GetCursorAsRange() ); if( !xCrsrRange.is() ) diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx index 7788331a5750..04e073ab4b48 100644 --- a/xmloff/source/text/txtstyli.cxx +++ b/xmloff/source/text/txtstyli.cxx @@ -174,7 +174,7 @@ SvXMLImportContext *XMLTextStyleContext::CreateChildContext( nFamily = XML_TYPE_PROP_TABLE_ROW; if( nFamily ) { - UniReference < SvXMLImportPropertyMapper > xImpPrMap = + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = GetStyles()->GetImportPropertyMapper( GetFamily() ); if( xImpPrMap.is() ) pContext = new XMLTextPropertySetContext( GetImport(), nPrefix, @@ -402,7 +402,7 @@ void XMLTextStyleContext::FillPropertySet( // imitate XMLPropStyleContext::FillPropertySet(...) SvXMLStylesContext* pSvXMLStylesContext = static_cast< SvXMLStylesContext* >(GetStyles()); - UniReference < SvXMLImportPropertyMapper > xImpPrMap = pSvXMLStylesContext->GetImportPropertyMapper(GetFamily()); + rtl::Reference < SvXMLImportPropertyMapper > xImpPrMap = pSvXMLStylesContext->GetImportPropertyMapper(GetFamily()); DBG_ASSERT(xImpPrMap.is(),"Where is the import prop mapper?"); if(xImpPrMap.is()) @@ -444,7 +444,7 @@ void XMLTextStyleContext::FillPropertySet( // get property set info Reference< XPropertySetInfo > xInfo; - UniReference< XMLPropertySetMapper > rPropMapper; + rtl::Reference< XMLPropertySetMapper > rPropMapper; bool bAutomatic = false; if(pSvXMLStylesContext->IsAutomaticStyle() && @@ -545,7 +545,7 @@ void XMLTextStyleContext::FillPropertySet( case CTF_FILLHATCHNAME: case CTF_FILLBITMAPNAME: { - // DrawingLayer FillStyle nameneeds to be mapped to DisplayName + // DrawingLayer FillStyle name needs to be mapped to DisplayName rtl::OUString sStyleName; rState.maValue >>= sStyleName; |