diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-04-07 12:31:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-04-07 12:38:27 +0200 |
commit | 8f6c55a839d790c9268c1d0686f3eaf2f23484cb (patch) | |
tree | 1b10a5e10b66c3c8dcf0a8bf295167563e0f6828 | |
parent | e0f6559776b515a7d51331c7e848ac785e751c6a (diff) |
Replace SV_DECL/IMPL_REF macros with SvRef template
Change-Id: I0ef2e67f6d61e0ce118c0f5e926b8194ef9d8058
91 files changed, 160 insertions, 250 deletions
diff --git a/basic/inc/sbprop.hxx b/basic/inc/sbprop.hxx index 678de56f472b..b736aee8311b 100644 --- a/basic/inc/sbprop.hxx +++ b/basic/inc/sbprop.hxx @@ -41,7 +41,7 @@ public: SbModule* GetModule() { return pMod; } }; -SV_DECL_IMPL_REF(SbProperty) +typedef tools::SvRef<SbProperty> SbPropertyRef; class BASIC_DLLPUBLIC SbProcedureProperty : public SbxProperty { diff --git a/basic/source/inc/sbjsmeth.hxx b/basic/source/inc/sbjsmeth.hxx index 8f790fa37b2e..2b744a0234ec 100644 --- a/basic/source/inc/sbjsmeth.hxx +++ b/basic/source/inc/sbjsmeth.hxx @@ -37,7 +37,7 @@ public: TYPEINFO_OVERRIDE(); }; -SV_DECL_IMPL_REF(SbJScriptMethod) +typedef tools::SvRef<SbJScriptMethod> SbJScriptMethodRef; #endif diff --git a/basic/source/inc/sbunoobj.hxx b/basic/source/inc/sbunoobj.hxx index ae9cb67ee3d3..dec4e34448ab 100644 --- a/basic/source/inc/sbunoobj.hxx +++ b/basic/source/inc/sbunoobj.hxx @@ -97,7 +97,7 @@ public: ::com::sun::star::uno::Any getUnoAny(); void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SbUnoStructRefObject); +typedef tools::SvRef<SbUnoStructRefObject> SbUnoStructRefObjectRef; class SbUnoObject: public SbxObject { @@ -143,7 +143,7 @@ public: bool isNativeCOMObject( void ) { return bNativeCOMObject; } }; -SV_DECL_IMPL_REF(SbUnoObject); +typedef tools::SvRef<SbUnoObject> SbUnoObjectRef; // #67781 delete return values of the uno-methods void clearUnoMethods( void ); @@ -240,7 +240,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass >& getUnoClass( void ) { return m_xClass; } }; -SV_DECL_IMPL_REF(SbUnoClass); +typedef tools::SvRef<SbUnoClass> SbUnoClassRef; // function to find a global identifier in @@ -267,7 +267,7 @@ public: void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SbUnoService); +typedef tools::SvRef<SbUnoService> SbUnoServiceRef; SbUnoService* findUnoService( const OUString& rName ); @@ -307,7 +307,7 @@ public: void SFX_NOTIFY( SfxBroadcaster&, const TypeId&, const SfxHint& rHint, const TypeId& ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SbUnoSingleton); +typedef tools::SvRef<SbUnoSingleton> SbUnoSingletonRef; SbUnoSingleton* findUnoSingleton( const OUString& rName ); diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 42ada7cb61ac..b00537a11f82 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -86,7 +86,8 @@ namespace connectivity // Index Page Pointer - SV_DECL_REF(ONDXPage) // Base class - because we need to store additional information + class ONDXPage; + typedef tools::SvRef<ONDXPage> ONDXPageRef; // Base class - because we need to store additional information class ONDXPagePtr : public ONDXPageRef @@ -188,8 +189,6 @@ namespace connectivity #endif }; - SV_IMPL_REF(ONDXPage); - SvStream& WriteONDXPagePtr(SvStream &rStream, const ONDXPagePtr&); SvStream& operator >> (SvStream &rStream, ONDXPagePtr&); diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx index 62fe8f8ca53c..fed5096429c0 100644 --- a/cppcanvas/source/mtfrenderer/emfplus.cxx +++ b/cppcanvas/source/mtfrenderer/emfplus.cxx @@ -1686,7 +1686,7 @@ namespace cppcanvas SAL_INFO("cppcanvas.emf", "EMF+ adjusted angles: start " << (360.0*startAngle/M_PI) << ", end: " << (360.0*endAngle/M_PI)); - B2DPolygon polygon = tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); + B2DPolygon polygon = basegfx::tools::createPolygonFromEllipseSegment (mappedCenter, mappedSize.getX (), mappedSize.getY (), startAngle, endAngle); polygon.append (mappedCenter); polygon.setClosed (true); diff --git a/dbaccess/source/ui/inc/HtmlReader.hxx b/dbaccess/source/ui/inc/HtmlReader.hxx index 283149f51242..8d158ce9b8d3 100644 --- a/dbaccess/source/ui/inc/HtmlReader.hxx +++ b/dbaccess/source/ui/inc/HtmlReader.hxx @@ -72,7 +72,7 @@ namespace dbaui ///< @attention recovers only valid data if 1. CTOR has been used }; - SV_DECL_IMPL_REF( OHTMLReader ); + typedef tools::SvRef<OHTMLReader> OHTMLReaderRef; } #endif diff --git a/dbaccess/source/ui/inc/RtfReader.hxx b/dbaccess/source/ui/inc/RtfReader.hxx index ad7381c4d912..533bf7721f55 100644 --- a/dbaccess/source/ui/inc/RtfReader.hxx +++ b/dbaccess/source/ui/inc/RtfReader.hxx @@ -61,7 +61,7 @@ namespace dbaui virtual void release() SAL_OVERRIDE; }; - SV_DECL_IMPL_REF( ORTFReader ); + typedef tools::SvRef<ORTFReader> ORTFReaderRef; } #endif diff --git a/editeng/source/editeng/eehtml.hxx b/editeng/source/editeng/eehtml.hxx index e17fcc55715f..9bb455de514d 100644 --- a/editeng/source/editeng/eehtml.hxx +++ b/editeng/source/editeng/eehtml.hxx @@ -77,8 +77,7 @@ public: const EditSelection& GetCurSelection() const { return aCurSel; } }; -SV_DECL_REF( EditHTMLParser ) -SV_IMPL_REF( EditHTMLParser ); +typedef tools::SvRef<EditHTMLParser> EditHTMLParserRef; #endif // INCLUDED_EDITENG_SOURCE_EDITENG_EEHTML_HXX diff --git a/editeng/source/editeng/eertfpar.hxx b/editeng/source/editeng/eertfpar.hxx index 4a5c3ca152ea..e662aad9246d 100644 --- a/editeng/source/editeng/eertfpar.hxx +++ b/editeng/source/editeng/eertfpar.hxx @@ -112,9 +112,7 @@ public: EditPaM GetCurPaM() const { return aCurSel.Max(); } }; -SV_DECL_REF( EditRTFParser ) -SV_IMPL_REF( EditRTFParser ); - +typedef tools::SvRef<EditRTFParser> EditRTFParserRef; #endif // INCLUDED_EDITENG_SOURCE_EDITENG_EERTFPAR_HXX diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index 623dedb72ca7..d09ef13d0abd 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -72,7 +72,7 @@ public: virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ); }; -SV_DECL_IMPL_REF(SvMetaObject) +typedef tools::SvRef<SvMetaObject> SvMetaObjectRef; class SvMetaObjectMemberList : public SvDeclPersistList<SvMetaObject *> {}; @@ -141,12 +141,12 @@ public: WriteType, WriteAttribute = 0) SAL_OVERRIDE; void WriteDescription( SvStream& rOutStm ); }; -SV_DECL_IMPL_REF(SvMetaName) +typedef tools::SvRef<SvMetaName> SvMetaNameRef; class SvMetaNameMemberList : public SvDeclPersistList<SvMetaName *> {}; - -SV_DECL_REF(SvMetaReference) +class SvMetaReference; +typedef tools::SvRef<SvMetaReference> SvMetaReferenceRef; class SvMetaReference : public SvMetaName { protected: @@ -190,7 +190,6 @@ public: void SetRef( SvMetaReference * pRef ) { aRef = pRef; } }; -SV_IMPL_REF(SvMetaReference) class SvMetaReferenceMemberList : public SvDeclPersistList<SvMetaReference *> {}; @@ -225,7 +224,7 @@ protected: virtual void WriteAttributes( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SvMetaExtern) +typedef tools::SvRef<SvMetaExtern> SvMetaExternRef; class SvMetaExternMemberList : public SvDeclPersistList<SvMetaExtern *> {}; diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index 5cf0b837edc4..267b514b84ff 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -92,7 +92,7 @@ public: } }; -SV_DECL_IMPL_REF(SvStringHashEntry) +typedef tools::SvRef<SvStringHashEntry> SvStringHashEntryRef; typedef ::std::vector< SvStringHashEntry* > SvStringHashList; diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index 5200a27aa983..ff76450609ee 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -89,7 +89,7 @@ public: virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, HelpIdTable& rTable ); }; -SV_DECL_IMPL_REF(SvMetaModule) +typedef tools::SvRef<SvMetaModule> SvMetaModuleRef; class SvMetaModuleMemberList : public SvDeclPersistList<SvMetaModule *> {}; diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx index 55f839dcd9c4..7f26446077e4 100644 --- a/idl/inc/object.hxx +++ b/idl/inc/object.hxx @@ -39,7 +39,7 @@ typedef std::vector< SvSlotElement* > SvSlotElementList; class SvMetaClass; typedef ::std::vector< SvMetaClass* > SvMetaClassList; -SV_DECL_REF(SvMetaClass) +typedef tools::SvRef<SvMetaClass> SvMetaClassRef; class SvClassElement : public SvPersistBase { SvBOOL aAutomation; @@ -65,7 +65,7 @@ public: { return xClass; } }; -SV_DECL_IMPL_REF(SvClassElement) +typedef tools::SvRef<SvClassElement> SvClassElementRef; class SvClassElementMemberList : public SvDeclPersistList<SvClassElement *> {}; @@ -134,8 +134,6 @@ public: virtual void WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm, HelpIdTable& rTable ); }; -SV_IMPL_REF(SvMetaClass) - #endif // _OBJECT_HXX diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx index c0041ef29de5..48a85c00c325 100644 --- a/idl/inc/slot.hxx +++ b/idl/inc/slot.hxx @@ -253,7 +253,7 @@ public: HelpIdTable& rIdTable ) SAL_OVERRIDE; virtual void WriteCSV( SvIdlDataBase&, SvStream& ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SvMetaSlot) +typedef tools::SvRef<SvMetaSlot> SvMetaSlotRef; class SvMetaSlotMemberList : public SvDeclPersistList<SvMetaSlot *> {}; diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index b127d70e13bb..ee0d363739a2 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -31,10 +31,8 @@ typedef std::vector< SvSlotElement* > SvSlotElementList; class SvMetaSlot; typedef std::map<sal_uLong, SvMetaSlot*> HelpIdTable; -SV_DECL_REF(SvMetaType) -SV_DECL_REF(SvMetaAttribute) - -class SvMetaAttributeMemberList : public SvDeclPersistList<SvMetaAttribute *> {}; +class SvMetaType; +typedef tools::SvRef<SvMetaType> SvMetaTypeRef; class SvMetaAttribute : public SvMetaReference { @@ -120,8 +118,10 @@ public: void FillIDTable(HelpIdTable& rIDTable); OString Compare( SvMetaAttribute *pAttr ); }; -SV_IMPL_REF(SvMetaAttribute) +typedef tools::SvRef<SvMetaAttribute> SvMetaAttributeRef; + +class SvMetaAttributeMemberList : public SvDeclPersistList<SvMetaAttribute *> {}; enum { CALL_VALUE, CALL_POINTER, CALL_REFERENCE }; enum { TYPE_METHOD, TYPE_STRUCT, TYPE_BASE, TYPE_ENUM, TYPE_UNION, @@ -236,7 +236,6 @@ public: void WriteParamNames( SvIdlDataBase & rBase, SvStream & rOutStm, const OString& rChief ); }; -SV_IMPL_REF(SvMetaType) class SvMetaTypeMemberList : public SvDeclPersistList<SvMetaType *> {}; @@ -246,7 +245,7 @@ public: SV_DECL_META_FACTORY1( SvMetaTypeString, SvMetaType, 19 ) SvMetaTypeString(); }; -SV_DECL_IMPL_REF(SvMetaTypeString) +typedef tools::SvRef<SvMetaTypeString> SvMetaTypeStringRef; class SvMetaTypeStringMemberList : public SvDeclPersistList<SvMetaTypeString *> {}; @@ -262,7 +261,7 @@ public: virtual void Write( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SvMetaEnumValue) +typedef tools::SvRef<SvMetaEnumValue> SvMetaEnumValueRef; class SvMetaEnumValueMemberList : public SvDeclPersistList<SvMetaEnumValue *> {}; @@ -293,7 +292,7 @@ public: sal_uInt16 nTab, WriteType, WriteAttribute = 0 ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SvMetaTypeEnum) +typedef tools::SvRef<SvMetaTypeEnum> SvMetaTypeEnumRef; class SvMetaTypeEnumMemberList : public SvDeclPersistList<SvMetaTypeEnum *> {}; @@ -303,7 +302,7 @@ public: SV_DECL_META_FACTORY1( SvMetaTypevoid, SvMetaName, 22 ) SvMetaTypevoid(); }; -SV_DECL_IMPL_REF(SvMetaTypevoid) +typedef tools::SvRef<SvMetaTypevoid> SvMetaTypevoidRef; class SvMetaTypevoidMemberList : public SvDeclPersistList<SvMetaTypevoid *> {}; diff --git a/include/basic/sbmeth.hxx b/include/basic/sbmeth.hxx index d38e652e1e1a..5ca27f676b94 100644 --- a/include/basic/sbmeth.hxx +++ b/include/basic/sbmeth.hxx @@ -67,7 +67,7 @@ public: virtual void Broadcast( sal_uIntPtr nHintId ) SAL_OVERRIDE; }; -SV_DECL_IMPL_REF(SbMethod) +typedef tools::SvRef<SbMethod> SbMethodRef; class BASIC_DLLPUBLIC SbIfaceMapperMethod : public SbMethod { diff --git a/include/basic/sbmod.hxx b/include/basic/sbmod.hxx index c5acf1594b0c..c65f05588ba7 100644 --- a/include/basic/sbmod.hxx +++ b/include/basic/sbmod.hxx @@ -139,7 +139,7 @@ public: OUString GetKeywordCase( const OUString& sKeyword ) const; }; -SV_DECL_IMPL_REF(SbModule) +typedef tools::SvRef<SbModule> SbModuleRef; // Object class for instances of class modules class BASIC_DLLPUBLIC SbClassModuleObject : public SbModule diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx index 5078c200d1f7..2eec72bae613 100644 --- a/include/basic/sbstar.hxx +++ b/include/basic/sbstar.hxx @@ -176,7 +176,7 @@ public: GetModelFromBasic( SbxObject* pBasic ); }; -SV_DECL_IMPL_REF(StarBASIC) +typedef tools::SvRef<StarBASIC> StarBASICRef; #endif diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx index a904bf3e6d25..1ab7ed3deabc 100644 --- a/include/basic/sbx.hxx +++ b/include/basic/sbx.hxx @@ -116,7 +116,6 @@ public: // declared datatype, if they are not SbxVARIANT. class SbxVarRefs; -class SbxVariableRef; class BASIC_DLLPUBLIC SbxArray : public SbxBase { @@ -256,24 +255,17 @@ public: const OUString& GetElementClass() const { return aElemClass; } }; -SV_IMPL_REF(SbxBase) - -SV_IMPL_REF(SbxVariable) - #ifndef SBX_ARRAY_DECL_DEFINED #define SBX_ARRAY_DECL_DEFINED -SV_DECL_REF(SbxArray) +typedef tools::SvRef<SbxArray> SbxArrayRef; #endif -SV_IMPL_REF(SbxArray) #ifndef SBX_INFO_DECL_DEFINED #define SBX_INFO_DECL_DEFINED -SV_DECL_REF(SbxInfo) +typedef tools::SvRef<SbxInfo> SbxInfoRef; #endif -SV_IMPL_REF(SbxInfo) -SV_DECL_REF(SbxDimArray) -SV_IMPL_REF(SbxDimArray) +typedef tools::SvRef<SbxDimArray> SbxDimArrayRef; #endif diff --git a/include/basic/sbxcore.hxx b/include/basic/sbxcore.hxx index 5bf2b2ec61db..079b9618f529 100644 --- a/include/basic/sbxcore.hxx +++ b/include/basic/sbxcore.hxx @@ -106,7 +106,7 @@ public: static SbxObject* CreateObject( const OUString& ); }; -SV_DECL_REF(SbxBase) +typedef tools::SvRef<SbxBase> SbxBaseRef; inline void SbxBase::SetFlags( sal_uInt16 n ) { nFlags = n; } diff --git a/include/basic/sbxobj.hxx b/include/basic/sbxobj.hxx index 586af9f4ff32..c6c09cf5ffe8 100644 --- a/include/basic/sbxobj.hxx +++ b/include/basic/sbxobj.hxx @@ -88,8 +88,7 @@ public: void Dump( SvStream&, bool bDumpAll=false ); }; -SV_DECL_REF(SbxObject) -SV_IMPL_REF(SbxObject) +typedef tools::SvRef<SbxObject> SbxObjectRef; #endif // INCLUDED_BASIC_SBXOBJ_HXX diff --git a/include/basic/sbxprop.hxx b/include/basic/sbxprop.hxx index 3a9cd23c2545..6587b7f64759 100644 --- a/include/basic/sbxprop.hxx +++ b/include/basic/sbxprop.hxx @@ -36,8 +36,7 @@ public: virtual SbxClassType GetClass() const SAL_OVERRIDE; }; -SV_DECL_REF(SbxProperty) -SV_IMPL_REF(SbxProperty) +typedef tools::SvRef<SbxProperty> SbxPropertyRef; #endif diff --git a/include/basic/sbxvar.hxx b/include/basic/sbxvar.hxx index 789cec6cd55d..1204df24546e 100644 --- a/include/basic/sbxvar.hxx +++ b/include/basic/sbxvar.hxx @@ -270,12 +270,12 @@ class SbxInfo; #ifndef SBX_ARRAY_DECL_DEFINED #define SBX_ARRAY_DECL_DEFINED -SV_DECL_REF(SbxArray) +typedef tools::SvRef<SbxArray> SbxArrayRef; #endif #ifndef SBX_INFO_DECL_DEFINED #define SBX_INFO_DECL_DEFINED -SV_DECL_REF(SbxInfo) +typedef tools::SvRef<SbxInfo> SbxInfoRef; #endif class SfxBroadcaster; @@ -349,7 +349,7 @@ public: static sal_uInt16 MakeHashCode( const OUString& rName ); }; -SV_DECL_REF(SbxVariable) +typedef tools::SvRef<SbxVariable> SbxVariableRef; #endif // INCLUDED_BASIC_SBXVAR_HXX diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index 72015b5cd92c..d4529a51623e 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -23,6 +23,7 @@ #include <com/sun/star/embed/XStorage.hpp> #include <o3tl/sorted_vector.hxx> +#include <sot/storage.hxx> #include <tools/rtti.hxx> #include <i18nlangtag/languagetag.hxx> #include <tools/time.hxx> @@ -39,8 +40,6 @@ class CharClass; class SfxPoolItem; class SvxAutoCorrect; class SfxObjectShell; -class SotStorageRef; -class SotStorage; class Window; struct CompareSvStringsISortDtor diff --git a/include/filter/msfilter/msdffimp.hxx b/include/filter/msfilter/msdffimp.hxx index add42ee86fa1..c290948e94ec 100644 --- a/include/filter/msfilter/msdffimp.hxx +++ b/include/filter/msfilter/msdffimp.hxx @@ -53,7 +53,6 @@ class Graphic; class SvStream; class SdrObject; class SdrOle2Obj; -class SotStorageRef; class Polygon; class PolyPolygon; class FmFormModel; diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index f3b72cd54c98..b628e95e9ccd 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -116,7 +116,7 @@ DECL_OBJHINT( SfxStringHint, OUString ); #ifndef SFX_DECL_OBJECTSHELL_DEFINED #define SFX_DECL_OBJECTSHELL_DEFINED -SV_DECL_REF(SfxObjectShell) +typedef tools::SvRef<SfxObjectShell> SfxObjectShellRef; #endif class SfxObjectShellLock; diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 2ed484a0e17c..ab8562727a01 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -272,7 +272,7 @@ public: static sal_uInt32 CreatePasswordToModifyHash( const OUString& aPasswd, bool bWriter ); }; -SV_DECL_IMPL_REF( SfxMedium ) +typedef tools::SvRef<SfxMedium> SfxMediumRef; typedef ::std::vector< SfxMedium* > SfxMediumList; diff --git a/include/sfx2/doctempl.hxx b/include/sfx2/doctempl.hxx index 36008bce373f..6ba3a180d871 100644 --- a/include/sfx2/doctempl.hxx +++ b/include/sfx2/doctempl.hxx @@ -31,14 +31,14 @@ class SfxObjectShell; #ifndef SFX_DECL_OBJECTSHELL_DEFINED #define SFX_DECL_OBJECTSHELL_DEFINED -SV_DECL_REF(SfxObjectShell) +typedef tools::SvRef<SfxObjectShell> SfxObjectShellRef; #endif class SfxDocTemplate_Impl; #ifndef SFX_DECL_DOCTEMPLATES_DEFINED #define SFX_DECL_DOCTEMPLATES_DEFINED -SV_DECL_REF(SfxDocTemplate_Impl) +typedef tools::SvRef<SfxDocTemplate_Impl> SfxDocTemplate_ImplRef; #endif // class SfxDocumentTemplates -------------------------------------------- diff --git a/include/sfx2/hintpost.hxx b/include/sfx2/hintpost.hxx index f840f9619b23..6b562a715a41 100644 --- a/include/sfx2/hintpost.hxx +++ b/include/sfx2/hintpost.hxx @@ -61,7 +61,7 @@ public: -SV_DECL_IMPL_REF(SfxHintPoster); +typedef tools::SvRef<SfxHintPoster> SfxHintPosterRef; #endif diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx index 3865594c49a2..37e0a0b50ab8 100644 --- a/include/sfx2/linkmgr.hxx +++ b/include/sfx2/linkmgr.hxx @@ -23,6 +23,7 @@ #include <sal/config.h> #include <sfx2/dllapi.h> #include <sfx2/linksrc.hxx> +#include <sfx2/lnkbase.hxx> #include <set> #include <vector> @@ -43,9 +44,6 @@ namespace sfx2 // FormatID "RegisterStatusInfoId" and a string as the data container. // This contains the following enum. -class SvBaseLink; -class SvBaseLinkRef; - typedef std::vector<SvBaseLinkRef*> SvBaseLinks; typedef std::set<SvLinkSource*> SvLinkSources; diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx index e9d5c9a58701..19ad30e8a81c 100644 --- a/include/sfx2/linksrc.hxx +++ b/include/sfx2/linksrc.hxx @@ -113,7 +113,7 @@ public: void clearStreamToLoadFrom(); }; -SV_DECL_IMPL_REF(SvLinkSource); +typedef tools::SvRef<SvLinkSource> SvLinkSourceRef; } #endif diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index c83adaa1419e..cd97ee341a88 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -168,7 +168,7 @@ public: FileDialogHelper & GetInsertFileDialog(const OUString& rFactory) const; }; -SV_DECL_IMPL_REF(SvBaseLink); +typedef tools::SvRef<SvBaseLink> SvBaseLinkRef; } diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index e35c618bd2df..84757d495015 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -717,7 +717,7 @@ public: #ifndef SFX_DECL_OBJECTSHELL_DEFINED #define SFX_DECL_OBJECTSHELL_DEFINED -SV_DECL_REF(SfxObjectShell) +typedef tools::SvRef<SfxObjectShell> SfxObjectShellRef; #endif class SfxObjectShellLock @@ -765,8 +765,6 @@ inline SfxObjectShellLock & SfxObjectShellLock:: inline SfxObjectShellLock & SfxObjectShellLock::operator = ( SfxObjectShell * pObjP ) { return *this = SfxObjectShellLock( pObjP ); } -SV_IMPL_REF(SfxObjectShell) - class AutoReloadTimer_Impl : public Timer { OUString aUrl; diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx index 289d11b073f2..86e6f0c5fd0a 100644 --- a/include/sfx2/viewfrm.hxx +++ b/include/sfx2/viewfrm.hxx @@ -59,7 +59,7 @@ namespace svtools #ifndef SFX_DECL_OBJECTSHELL_DEFINED #define SFX_DECL_OBJECTSHELL_DEFINED -SV_DECL_REF(SfxObjectShell) +typedef tools::SvRef<SfxObjectShell> SfxObjectShellRef; #endif class SFX2_DLLPUBLIC SfxViewFrame: public SfxShell, public SfxListener diff --git a/include/sot/object.hxx b/include/sot/object.hxx index fb3484624adc..164402b5bc49 100644 --- a/include/sot/object.hxx +++ b/include/sot/object.hxx @@ -138,7 +138,7 @@ private: }; //==================class SotObjectRef====================================== -SV_DECL_IMPL_REF(SotObject) +typedef tools::SvRef<SotObject> SotObjectRef; #endif // _IFACE_HXX diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx index a82efb1307ae..8a31d7f4eb0a 100644 --- a/include/sot/storage.hxx +++ b/include/sot/storage.hxx @@ -88,9 +88,8 @@ public: #ifndef SOT_DECL_SOTSTORAGESTREAM_DEFINED #define SOT_DECL_SOTSTORAGESTREAM_DEFINED -SV_DECL_REF(SotStorageStream) +typedef tools::SvRef<SotStorageStream> SotStorageStreamRef; #endif -SV_IMPL_REF(SotStorageStream) namespace ucbhelper { @@ -224,9 +223,8 @@ public: #ifndef SOT_DECL_SOTSTORAGE_DEFINED #define SOT_DECL_SOTSTORAGE_DEFINED -SV_DECL_REF(SotStorage) +typedef tools::SvRef<SotStorage> SotStorageRef; #endif -SV_IMPL_REF(SotStorage) #define SvStorage SotStorage #define SvStorageRef SotStorageRef diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx index 74b59041ea13..4ea02f9e5169 100644 --- a/include/svtools/editbrowsebox.hxx +++ b/include/svtools/editbrowsebox.hxx @@ -74,13 +74,6 @@ class FormattedField; namespace svt { - - - class CellControllerRef; - - - //= CellController - class SVT_DLLPUBLIC CellController : public SvRefBase { friend class EditBrowseBox; @@ -116,7 +109,7 @@ namespace svt virtual bool WantMouseEvent() const; }; - SV_DECL_IMPL_REF(CellController); + typedef tools::SvRef<CellController> CellControllerRef; //= IEditImplementation diff --git a/include/svtools/svparser.hxx b/include/svtools/svparser.hxx index c85d6d6cb983..3e21473e2f65 100644 --- a/include/svtools/svparser.hxx +++ b/include/svtools/svparser.hxx @@ -174,11 +174,8 @@ public: #ifndef GOODIES_DECL_SVPARSER_DEFINED #define GOODIES_DECL_SVPARSER_DEFINED -SV_DECL_REF(SvParser) +typedef tools::SvRef<SvParser> SvParserRef; #endif -SV_IMPL_REF(SvParser) - - inline sal_uLong SvParser::SetLineNr( sal_uLong nlNum ) { sal_uLong nlOld = nlLineNr; nlLineNr = nlNum; return nlOld; } @@ -201,8 +198,6 @@ inline sal_uInt16 SvParser::GetCharSize() const * *======================================================================*/ -SV_DECL_REF(SvKeyValueIterator) - class SvKeyValue { /** Representation. @@ -271,7 +266,7 @@ public: virtual void Append (const SvKeyValue &rKeyVal); }; -SV_IMPL_REF(SvKeyValueIterator); +typedef tools::SvRef<SvKeyValueIterator> SvKeyValueIteratorRef; #endif // INCLUDED_SVTOOLS_SVPARSER_HXX diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx index 49019eb27cdc..62e9a130e22c 100644 --- a/include/svtools/transfer.hxx +++ b/include/svtools/transfer.hxx @@ -24,6 +24,7 @@ #include <tools/globname.hxx> #include <tools/gen.hxx> #include <sot/formats.hxx> +#include <sot/storage.hxx> #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase4.hxx> #include <com/sun/star/frame/XTerminateListener.hpp> @@ -44,7 +45,6 @@ class BitmapEx; class GDIMetaFile; class Graphic; class ImageMap; -class SotStorageStreamRef; class INetBookmark; class INetImage; class FileList; diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx index d42cfa3fdf95..e222f0475c82 100644 --- a/include/svx/gridctrl.hxx +++ b/include/svx/gridctrl.hxx @@ -90,7 +90,7 @@ public: bool IsModified() const { return m_eStatus == GRS_MODIFIED; } }; -SV_DECL_REF(DbGridRow) +typedef tools::SvRef<DbGridRow> DbGridRowRef; // DbGridControl @@ -597,10 +597,6 @@ private: using BrowseBox::InsertHandleColumn; }; - -SV_IMPL_REF(DbGridRow); - - #endif // INCLUDED_SVX_GRIDCTRL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index 049e2f099f3f..3c1e6e598991 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -73,7 +73,6 @@ class SvxForbiddenCharactersTable; class SvNumberFormatter; class SotStorage; class SdrOutlinerCache; -class SotStorageRef; class SdrUndoFactory; class ImageMap; namespace comphelper diff --git a/include/tools/pstm.hxx b/include/tools/pstm.hxx index adfa1fb77510..fc5f65995bdf 100644 --- a/include/tools/pstm.hxx +++ b/include/tools/pstm.hxx @@ -51,7 +51,7 @@ class TOOLS_DLLPUBLIC SvRttiBase : public SvRefBase public: TYPEINFO(); }; -SV_DECL_IMPL_REF(SvRttiBase) +typedef tools::SvRef<SvRttiBase> SvRttiBaseRef; #define SV_DECL_PERSIST( Class, CLASS_ID ) \ TYPEINFO_OVERRIDE(); \ @@ -98,7 +98,7 @@ public: TOOLS_DLLPUBLIC friend SvPersistStream& operator >> ( SvPersistStream & rStm, SvPersistBase *& rpObj ); }; -SV_DECL_IMPL_REF(SvPersistBase) +typedef tools::SvRef<SvPersistBase> SvPersistBaseRef; class SvPersistListWriteable { diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index e66fbb4acec2..0bf519ecc094 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -22,58 +22,54 @@ #include <tools/toolsdllapi.h> #include <vector> -#define SV_DECL_REF( ClassName ) \ -class ClassName; \ -class ClassName##Ref \ -{ \ -protected: \ - ClassName * pObj; \ -public: \ - inline ClassName##Ref() { pObj = 0; } \ - inline ClassName##Ref( const ClassName##Ref & rObj ); \ - inline ClassName##Ref( ClassName * pObjP ); \ - inline void Clear(); \ - inline ~ClassName##Ref(); \ - inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \ - inline ClassName##Ref & operator = ( ClassName * pObj ); \ - inline bool Is() const { return pObj != NULL; } \ - inline ClassName * operator & () const { return pObj; } \ - inline ClassName * operator -> () const { return pObj; } \ - inline ClassName & operator * () const { return *pObj; } \ - inline operator ClassName * () const { return pObj; } \ +namespace tools { + +template<typename T> class SvRef { +public: + SvRef(): pObj(0) {} + + SvRef(SvRef const & rObj): pObj(rObj.pObj) + { if (pObj != 0) pObj->AddNextRef(); } + + SvRef(T * pObjP): pObj(pObjP) { if (pObj != 0) pObj->AddRef(); } + + ~SvRef() { if (pObj != 0) pObj->ReleaseReference(); } + + void Clear() { + if (pObj != 0) { + T * pRefObj = pObj; + pObj = 0; + pRefObj->ReleaseReference(); + } + } + + SvRef & operator =(SvRef const & rObj) { + if (rObj.pObj != 0) { + rObj.pObj->AddNextRef(); + } + T * pRefObj = pObj; + pObj = rObj.pObj; + if (pRefObj != 0) { + pRefObj->ReleaseReference(); + } + return *this; + } + + bool Is() const { return pObj != 0; } + + T * operator &() const { return pObj; } + + T * operator ->() const { return pObj; } + + T & operator *() const { return *pObj; } + + operator T *() const { return pObj; } + +protected: + T * pObj; }; -#define SV_IMPL_REF( ClassName ) \ -inline ClassName##Ref::ClassName##Ref( const ClassName##Ref & rObj ) \ - { pObj = rObj.pObj; if( pObj ) { pObj->AddNextRef(); } } \ -inline ClassName##Ref::ClassName##Ref( ClassName * pObjP ) \ -{ pObj = pObjP; if( pObj ) { pObj->AddRef(); } } \ -inline void ClassName##Ref::Clear() \ -{ \ - if( pObj ) \ - { \ - ClassName* const pRefObj = pObj; \ - pObj = 0; \ - pRefObj->ReleaseReference(); \ - } \ -} \ -inline ClassName##Ref::~ClassName##Ref() \ -{ if( pObj ) { pObj->ReleaseReference(); } } \ -inline ClassName##Ref & ClassName##Ref:: \ - operator = ( const ClassName##Ref & rObj ) \ -{ \ - if( rObj.pObj ) rObj.pObj->AddNextRef(); \ - ClassName* const pRefObj = pObj; \ - pObj = rObj.pObj; \ - if( pRefObj ) { pRefObj->ReleaseReference(); } \ - return *this; \ -} \ -inline ClassName##Ref & ClassName##Ref::operator = ( ClassName * pObjP ) \ -{ return *this = ClassName##Ref( pObjP ); } - -#define SV_DECL_IMPL_REF(ClassName) \ - SV_DECL_REF(ClassName) \ - SV_IMPL_REF(ClassName) +} template<typename T> class SvRefMemberList : private std::vector<T> @@ -174,7 +170,7 @@ public: sal_uIntPtr GetRefCount() const { return nRefCount; } }; -SV_DECL_IMPL_REF(SvRefBase) +typedef tools::SvRef<SvRefBase> SvRefBaseRef; class SvCompatWeakHdl : public SvRefBase { @@ -187,7 +183,7 @@ public: void* GetObj() { return _pObj; } }; -SV_DECL_IMPL_REF( SvCompatWeakHdl ) +typedef tools::SvRef<SvCompatWeakHdl> SvCompatWeakHdlRef; class SvCompatWeakBase { diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index bb0b392023b8..c823739670ae 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -134,7 +134,7 @@ public: virtual ErrCode Stat(SvLockBytesStat * pStat, SvLockBytesStatFlag) const; }; -SV_DECL_IMPL_REF(SvLockBytes); +typedef tools::SvRef<SvLockBytes> SvLockBytesRef; // SvOpenLockBytes @@ -157,7 +157,7 @@ public: virtual void Terminate() = 0; }; -SV_DECL_IMPL_REF(SvOpenLockBytes); +typedef tools::SvRef<SvOpenLockBytes> SvOpenLockBytesRef; // SvAsyncLockBytes @@ -187,7 +187,7 @@ public: virtual void Terminate() SAL_OVERRIDE { m_bTerminated = true; } }; -SV_DECL_IMPL_REF(SvAsyncLockBytes); +typedef tools::SvRef<SvAsyncLockBytes> SvAsyncLockBytesRef; // SvStream diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx index 8ebac8663d0a..a5a08751b20a 100644 --- a/include/unotools/ucblockbytes.hxx +++ b/include/unotools/ucblockbytes.hxx @@ -65,7 +65,8 @@ namespace com namespace utl { -SV_DECL_REF( UcbLockBytes ) +class UcbLockBytes; +typedef tools::SvRef<UcbLockBytes> UcbLockBytesRef; class UcbLockBytesHandler : public SvRefBase { @@ -87,7 +88,7 @@ public: bool IsActive() const { return m_bActive; } }; -SV_DECL_IMPL_REF( UcbLockBytesHandler ) +typedef tools::SvRef<UcbLockBytesHandler> UcbLockBytesHandlerRef; class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes { @@ -188,8 +189,6 @@ public: void SetStreamValid_Impl(); }; -SV_IMPL_REF( UcbLockBytes ); - } #endif diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx index afa9698a2be6..bd21e95436f6 100644 --- a/include/xmloff/xmlictxt.hxx +++ b/include/xmloff/xmlictxt.hxx @@ -96,9 +96,7 @@ public: virtual void onDemandRescueUsefulDataFromTemporary( const SvXMLImportContext& rCandidate ); }; -SV_DECL_REF( SvXMLImportContext ) -SV_IMPL_REF( SvXMLImportContext ) - +typedef tools::SvRef<SvXMLImportContext> SvXMLImportContextRef; #endif // INCLUDED_XMLOFF_XMLICTXT_HXX diff --git a/sc/inc/chartuno.hxx b/sc/inc/chartuno.hxx index 8eaffadff9f8..f5c5bb65cea5 100644 --- a/sc/inc/chartuno.hxx +++ b/sc/inc/chartuno.hxx @@ -21,6 +21,7 @@ #define SC_CHARTUNO_HXX #include "address.hxx" +#include "rangelst.hxx" #include <svl/lstner.hxx> #include <comphelper/proparrhlp.hxx> #include <comphelper/propertycontainer.hxx> @@ -37,7 +38,6 @@ class ScDocShell; -class ScRangeListRef; class ScChartObj; diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx index 0c3f0ec1a8e6..6764d0353ca2 100644 --- a/sc/inc/externalrefmgr.hxx +++ b/sc/inc/externalrefmgr.hxx @@ -44,7 +44,6 @@ class ScDocument; class ScTokenArray; -class SfxObjectShellRef; class Window; class ScFormulaCell; diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 0d94fb33539a..d950d3439b28 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -433,7 +433,6 @@ struct ScImportParam class ScDocument; class ScDocShell; -class ScDocShellRef; class SvxSearchItem; class ScAutoFormat; class FuncCollection; @@ -550,7 +549,7 @@ public: SC_DLLPUBLIC static double nScreenPPTX; SC_DLLPUBLIC static double nScreenPPTY; - static ScDocShellRef* pDrawClipDocShellRef; + static tools::SvRef<ScDocShell>* pDrawClipDocShellRef; static sal_uInt16 nDefFontHeight; SC_DLLPUBLIC static sal_uInt16 nStdRowHeight; diff --git a/sc/inc/rangelst.hxx b/sc/inc/rangelst.hxx index 2505e147aa01..4a35b91e59b2 100644 --- a/sc/inc/rangelst.hxx +++ b/sc/inc/rangelst.hxx @@ -96,7 +96,7 @@ private: typedef std::vector<ScRange*>::iterator iterator; typedef std::vector<ScRange*>::const_iterator const_iterator; }; -SV_DECL_IMPL_REF( ScRangeList ); +typedef tools::SvRef<ScRangeList> ScRangeListRef; // RangePairList: @@ -132,7 +132,7 @@ public: private: ::std::vector< ScRangePair* > maPairs; }; -SV_DECL_IMPL_REF( ScRangePairList ); +typedef tools::SvRef<ScRangePairList> ScRangePairListRef; extern "C" int SAL_CALL ScRangePairList_QsortNameCompare( const void*, const void* ); diff --git a/sc/qa/unit/helper/qahelper.hxx b/sc/qa/unit/helper/qahelper.hxx index f982f97f2c20..bb715d6eff72 100644 --- a/sc/qa/unit/helper/qahelper.hxx +++ b/sc/qa/unit/helper/qahelper.hxx @@ -12,6 +12,7 @@ #include "scdllapi.h" #include "debughelper.hxx" +#include "docsh.hxx" #include "address.hxx" #include <test/bootstrapfixture.hxx> @@ -169,9 +170,6 @@ struct assertion_traits<ScRange> } -class ScDocShellRef; -class ScDocShell; - class SCQAHELPER_DLLPUBLIC ScBootstrapFixture : public test::BootstrapFixture { protected: diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index fb2a5781005d..b1f833aeea92 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -81,7 +81,7 @@ #include "editutil.hxx" -ScDocShellRef* ScGlobal::pDrawClipDocShellRef = NULL; +tools::SvRef<ScDocShell>* ScGlobal::pDrawClipDocShellRef = NULL; SvxSearchItem* ScGlobal::pSearchItem = NULL; ScAutoFormat* ScGlobal::pAutoFormat = NULL; FuncCollection* ScGlobal::pFuncCollection = NULL; diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index 40431c2728f7..e2008b10c936 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -24,6 +24,7 @@ #include <map> #include <limits> #include <sal/macros.h> +#include <sot/storage.hxx> #include <boost/noncopyable.hpp> #include <boost/shared_ptr.hpp> #include <oox/helper/helper.hxx> @@ -123,8 +124,6 @@ class SfxPoolItem; class SfxItemSet; class ScStyleSheet; class ScStyleSheetPool; -class SotStorageRef; -class SotStorageStreamRef; class SvStream; /** Contains static methods used anywhere in the filters. */ diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx index ac564f552618..14eef005c269 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.hxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx @@ -105,7 +105,7 @@ public: void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* pDoc); void SetStylesToRanges(const OUString* pStyleName, ScXMLImport& rImport); }; -SV_DECL_IMPL_REF( ScMyStyleRanges ); +typedef tools::SvRef<ScMyStyleRanges> ScMyStyleRangesRef; struct ScMyStyle { diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 623a507ad432..60c2657b1ce4 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -439,10 +439,8 @@ public: void UpdateAcceptChangesDialog(); - -SV_DECL_REF(ScDocShell) -SV_IMPL_REF(ScDocShell) - +class ScDocShell; +typedef tools::SvRef<ScDocShell> ScDocShellRef; /** Create before modifications of the document and destroy thereafter. Call SetDocumentModified() at an instance of this class instead of at diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx index 0ec932d6b602..bc091add0f44 100644 --- a/sc/source/ui/inc/viewdata.hxx +++ b/sc/source/ui/inc/viewdata.hxx @@ -20,6 +20,7 @@ #define SC_VIEWDATA_HXX #include <sfx2/zoomitem.hxx> +#include "rangelst.hxx" #include "scdllapi.h" #include "viewopti.hxx" @@ -97,7 +98,6 @@ class SfxObjectShell; class SfxBindings; class SfxDispatcher; class ScPatternAttr; -class ScRangeListRef; class ScExtDocOptions; class ScViewData; class ScMarkData; diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx index 038ad6d83480..e110c016b487 100644 --- a/sd/inc/drawdoc.hxx +++ b/sd/inc/drawdoc.hxx @@ -81,11 +81,11 @@ class SdCustomShowList; namespace sd { +class DrawDocShell; #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED #define SV_DECL_DRAW_DOC_SHELL_DEFINED -SV_DECL_REF(DrawDocShell) +typedef ::tools::SvRef<DrawDocShell> DrawDocShellRef; #endif -class DrawDocShell; class UndoManager; class ShapeList; class FrameView; diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx index 2396e3ffa477..b34f7d44a194 100644 --- a/sd/source/ui/inc/DrawDocShell.hxx +++ b/sd/source/ui/inc/DrawDocShell.hxx @@ -231,11 +231,9 @@ public: #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED #define SV_DECL_DRAW_DOC_SHELL_DEFINED -SV_DECL_REF(DrawDocShell) +typedef ::tools::SvRef<DrawDocShell> DrawDocShellRef; #endif -SV_IMPL_REF (DrawDocShell) - } // end of namespace sd #endif diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx index 2fb67165ee60..b43366862474 100644 --- a/sd/source/ui/inc/sdtreelb.hxx +++ b/sd/source/ui/inc/sdtreelb.hxx @@ -49,7 +49,7 @@ class ViewShell; class DrawDocShell; #ifndef SV_DECL_DRAW_DOC_SHELL_DEFINED #define SV_DECL_DRAW_DOC_SHELL_DEFINED -SV_DECL_REF(DrawDocShell) +typedef ::tools::SvRef<DrawDocShell> DrawDocShellRef; #endif } diff --git a/sd/source/ui/inc/sdxfer.hxx b/sd/source/ui/inc/sdxfer.hxx index 76f724c3dfd2..01a97394c652 100644 --- a/sd/source/ui/inc/sdxfer.hxx +++ b/sd/source/ui/inc/sdxfer.hxx @@ -38,7 +38,6 @@ class DrawDocShell; class View; } -class SfxObjectShellRef; class SdTransferable : public TransferableHelper, public SfxListener { public: diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx index 91ebe2d291a8..f92ac47193b9 100644 --- a/sfx2/source/doc/doctempl.cxx +++ b/sfx2/source/doc/doctempl.cxx @@ -264,13 +264,9 @@ public: #ifndef SFX_DECL_DOCTEMPLATES_DEFINED #define SFX_DECL_DOCTEMPLATES_DEFINED -SV_DECL_REF(SfxDocTemplate_Impl) +typedef tools::SvRef<SfxDocTemplate_Impl> SfxDocTemplate_ImplRef; #endif -SV_IMPL_REF(SfxDocTemplate_Impl) - - - SfxDocTemplate_Impl *gpTemplateData = 0; diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index c955492748e7..ecdf6fb2fdc7 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -459,7 +459,7 @@ public: void PrepareCachedForReopen( StreamMode nMode ); }; -SV_DECL_IMPL_REF( UCBStorageStream_Impl ); +typedef tools::SvRef<UCBStorageStream_Impl> UCBStorageStream_ImplRef; struct UCBStorageElement_Impl; typedef ::std::vector< UCBStorageElement_Impl* > UCBStorageElementList_Impl; @@ -536,7 +536,7 @@ public: void SetError( long nError ); }; -SV_DECL_IMPL_REF( UCBStorage_Impl ); +typedef tools::SvRef<UCBStorage_Impl> UCBStorage_ImplRef; // this struct contains all necessary information on an element inside a UCBStorage struct UCBStorageElement_Impl diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx index 91cdd65ef6d2..e5c862600db7 100644 --- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx +++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx @@ -18,8 +18,7 @@ #include <visitors.hxx> #include <cursor.hxx> -SV_DECL_REF(SmDocShell) -SV_IMPL_REF(SmDocShell) +typedef tools::SvRef<SmDocShell> SmDocShellRef; using namespace ::com::sun::star; diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index f8cf43857202..deeade86e1ca 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -27,8 +27,7 @@ #include <sfx2/zoomitem.hxx> -SV_DECL_REF(SmDocShell) -SV_IMPL_REF(SmDocShell) +typedef tools::SvRef<SmDocShell> SmDocShellRef; using namespace ::com::sun::star; diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index d5e27725e7e2..d46f350e5f02 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -28,8 +28,7 @@ #include <svl/stritem.hxx> #include <sfx2/dispatch.hxx> -SV_DECL_REF(SmDocShell) -SV_IMPL_REF(SmDocShell) +typedef tools::SvRef<SmDocShell> SmDocShellRef; SmElement::SmElement(SmNodePointer pNode, const OUString& aText, const OUString& aHelpText) : mpNode(pNode), diff --git a/sw/inc/IMark.hxx b/sw/inc/IMark.hxx index ba2b0f4fb78f..7a03295a13b4 100644 --- a/sw/inc/IMark.hxx +++ b/sw/inc/IMark.hxx @@ -27,11 +27,6 @@ #include <map> #include "swdll.hxx" -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) -#endif - struct SwPosition; namespace sw { namespace mark diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index 21df9cdafbd5..f42b0c8c451a 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -43,7 +43,8 @@ class SwTOXBase; #ifndef SW_DECL_SWSERVEROBJECT_DEFINED #define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) +class SwServerObject; +typedef tools::SvRef<SwServerObject> SwServerObjectRef; #endif typedef std::vector<SwSection*> SwSections; diff --git a/sw/inc/shellio.hxx b/sw/inc/shellio.hxx index c28fb75f037a..bdb3aeaf5099 100644 --- a/sw/inc/shellio.hxx +++ b/sw/inc/shellio.hxx @@ -464,9 +464,8 @@ public: #ifndef SW_DECL_WRITER_DEFINED #define SW_DECL_WRITER_DEFINED -SV_DECL_REF(Writer) +typedef tools::SvRef<Writer> WriterRef; #endif -SV_IMPL_REF(Writer) // Base class for all storage writers. class SW_DLLPUBLIC StgWriter : public Writer diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx index 606dc10d2852..6ae30996e68f 100644 --- a/sw/inc/swserv.hxx +++ b/sw/inc/swserv.hxx @@ -78,7 +78,7 @@ public: #ifndef SW_DECL_SWSERVEROBJECT_DEFINED #define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) +typedef tools::SvRef<SwServerObject> SwServerObjectRef; #endif #endif // INCLUDED_SW_INC_SWSERV_HXX diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index e003e2ffbe38..c98cc0c666eb 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -61,7 +61,8 @@ struct Parm; #ifndef SW_DECL_SWSERVEROBJECT_DEFINED #define SW_DECL_SWSERVEROBJECT_DEFINED -SV_DECL_REF( SwServerObject ) +class SwServerObject; +typedef tools::SvRef<SwServerObject> SwServerObjectRef; #endif class SwTableLines : public std::vector<SwTableLine*> { diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index 9cd7d14783a9..22a4ff8528f3 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -34,7 +34,6 @@ namespace com { namespace sun { namespace star { namespace accessibility { class XAccessible; } } } } -class SfxObjectShellRef; class SwDoc; class IDocumentSettingAccess; class IDocumentDeviceAccess; diff --git a/sw/qa/core/filters-test.cxx b/sw/qa/core/filters-test.cxx index ca05576738c8..3cbad56dec20 100644 --- a/sw/qa/core/filters-test.cxx +++ b/sw/qa/core/filters-test.cxx @@ -31,8 +31,7 @@ #include "shellres.hxx" #include "docufld.hxx" -SV_DECL_REF(SwDocShell) -SV_IMPL_REF(SwDocShell) +typedef tools::SvRef<SwDocShell> SwDocShellRef; using namespace ::com::sun::star; diff --git a/sw/qa/core/macros-test.cxx b/sw/qa/core/macros-test.cxx index d21fb9e16e35..221f681a12be 100644 --- a/sw/qa/core/macros-test.cxx +++ b/sw/qa/core/macros-test.cxx @@ -39,8 +39,7 @@ #include <doc.hxx> #include "docsh.hxx" -SV_DECL_REF(SwDocShell) -SV_IMPL_REF(SwDocShell) +typedef tools::SvRef<SwDocShell> SwDocShellRef; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index b32e8241bbf6..b6d8dee0bdaf 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -52,8 +52,7 @@ #include "modeltoviewhelper.hxx" #include "scriptinfo.hxx" -SV_DECL_REF(SwDocShell) -SV_IMPL_REF(SwDocShell) +typedef tools::SvRef<SwDocShell> SwDocShellRef; using namespace ::com::sun::star; diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 1fb0b051732e..5bd6dc9b404d 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -31,8 +31,6 @@ #include <rtl/random.h> #include <xmloff/odffields.hxx> -SV_IMPL_REF( SwServerObject ) - using namespace ::sw::mark; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index e8c83b7c0e43..7d5e534cbc4e 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -33,8 +33,6 @@ using namespace ::com::sun::star; -SV_IMPL_REF( SwServerObject ) - SwServerObject::~SwServerObject() { } diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index e57287a3ff52..5895eb478a0a 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -60,8 +60,6 @@ using namespace ::com::sun::star; -SV_IMPL_REF( SwServerObject ) - class SwIntrnlSectRefLink : public SwBaseLink { SwSectionFmt& rSectFmt; diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index 633ef6153c19..d451b927667d 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -55,8 +55,6 @@ static bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pG TYPEINIT1( SwBaseLink, ::sfx2::SvBaseLink ); -SV_IMPL_REF( SwServerObject ) - static void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem ) { //call fist all not SwNoTxtFrames, then the SwNoTxtFrames. diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 3184a10ada16..dc5cb5d97d1a 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -27,6 +27,7 @@ #include <map> #include <rtl/ustring.hxx> #include <IMark.hxx> +#include <swserv.hxx> namespace com { namespace sun { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index a55b9a5eadd9..19f1c6110c2d 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -72,8 +72,6 @@ TYPEINIT1( SwTableFmt, SwFrmFmt ); TYPEINIT1( SwTableBoxFmt, SwFrmFmt ); TYPEINIT1( SwTableLineFmt, SwFrmFmt ); -SV_IMPL_REF( SwServerObject ) - #define COLFUZZY 20 void ChgTextToNum( SwTableBox& rBox, const OUString& rTxt, const Color* pCol, diff --git a/sw/source/core/uibase/dochdl/gloshdl.cxx b/sw/source/core/uibase/dochdl/gloshdl.cxx index e2cb03c15898..172a24f8dcb4 100644 --- a/sw/source/core/uibase/dochdl/gloshdl.cxx +++ b/sw/source/core/uibase/dochdl/gloshdl.cxx @@ -70,7 +70,6 @@ struct TextBlockInfo_Impl OUString sGroupName; }; typedef boost::ptr_vector<TextBlockInfo_Impl> TextBlockInfoArr; -SV_IMPL_REF( SwDocShell ) // Dialog for edit templates void SwGlossaryHdl::GlossaryDlg() diff --git a/sw/source/core/uibase/inc/glosdoc.hxx b/sw/source/core/uibase/inc/glosdoc.hxx index a5213b1179a1..4c2e63379199 100644 --- a/sw/source/core/uibase/inc/glosdoc.hxx +++ b/sw/source/core/uibase/inc/glosdoc.hxx @@ -28,7 +28,7 @@ class SwDocShell; #ifndef SW_DECL_SWDOCSHELL_DEFINED #define SW_DECL_SWDOCSHELL_DEFINED #include <tools/ref.hxx> -SV_DECL_REF( SwDocShell ) +typedef tools::SvRef<SwDocShell> SwDocShellRef; #endif #include <cppuhelper/weakref.hxx> diff --git a/sw/source/core/uibase/inc/unoatxt.hxx b/sw/source/core/uibase/inc/unoatxt.hxx index 1e65f7a0fa52..d3871bfa51aa 100644 --- a/sw/source/core/uibase/inc/unoatxt.hxx +++ b/sw/source/core/uibase/inc/unoatxt.hxx @@ -44,7 +44,7 @@ class SwXBodyText; #ifndef SW_DECL_SWDOCSHELL_DEFINED #define SW_DECL_SWDOCSHELL_DEFINED #include <tools/ref.hxx> -SV_DECL_REF( SwDocShell ) +typedef tools::SvRef<SwDocShell> SwDocShellRef; #endif ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > diff --git a/sw/source/core/uibase/misc/glshell.cxx b/sw/source/core/uibase/misc/glshell.cxx index dc26db2958c4..e78ca093bc85 100644 --- a/sw/source/core/uibase/misc/glshell.cxx +++ b/sw/source/core/uibase/misc/glshell.cxx @@ -194,8 +194,6 @@ bool SwWebGlosDocShell::Save() } } -SV_IMPL_REF ( SwDocShell ) - SwDocShellRef SwGlossaries::EditGroupDoc( const OUString& rGroup, const OUString& rShortName, sal_Bool bShow ) { SwDocShellRef xDocSh; diff --git a/sw/source/core/uibase/uno/unoatxt.cxx b/sw/source/core/uibase/uno/unoatxt.cxx index 5d5ebbd46d66..54e9c493b0b0 100644 --- a/sw/source/core/uibase/uno/unoatxt.cxx +++ b/sw/source/core/uibase/uno/unoatxt.cxx @@ -51,7 +51,6 @@ #include <boost/scoped_ptr.hpp> -SV_IMPL_REF ( SwDocShell ) using namespace ::com::sun::star; uno::Reference< uno::XInterface > SAL_CALL SwXAutoTextContainer_createInstance( diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 82598759628b..d607c8c4e3d8 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -20,6 +20,7 @@ #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX #define INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX +#include <sot/storage.hxx> #include <tools/solar.h> #include <tools/gen.hxx> #include <editeng/editdata.hxx> @@ -115,7 +116,6 @@ namespace com { namespace sun { namespace star { namespace embed { class XEmbeddedObject; } } } } typedef std::map<const com::sun::star::embed::XEmbeddedObject*, sal_Int32> WW8OleMap; -class SvStorageRef; struct WW8_PdAttrDesc; class SvxBrushItem; diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx index 031853f0a7a4..23fda32c2b23 100644 --- a/sw/source/filter/xml/xmlitmap.hxx +++ b/sw/source/filter/xml/xmlitmap.hxx @@ -74,8 +74,7 @@ public: sal_uInt16 getCount() const; }; -SV_DECL_REF( SvXMLItemMapEntries ) -SV_IMPL_REF( SvXMLItemMapEntries ) +typedef tools::SvRef<SvXMLItemMapEntries> SvXMLItemMapEntriesRef; #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLITMAP_HXX diff --git a/xmloff/source/forms/elementimport.hxx b/xmloff/source/forms/elementimport.hxx index 93014b3927eb..a1089083e37f 100644 --- a/xmloff/source/forms/elementimport.hxx +++ b/xmloff/source/forms/elementimport.hxx @@ -519,7 +519,7 @@ namespace xmloff void implSelectCurrentItem(); void implDefaultSelectCurrentItem(); }; - SV_DECL_IMPL_REF(OListAndComboImport); + typedef tools::SvRef<OListAndComboImport> OListAndComboImportRef; //= OListOptionImport /** helper class for importing a single <form:option> element. diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx index b640b2a0f8b1..16666864933c 100644 --- a/xmloff/source/forms/layerimport.cxx +++ b/xmloff/source/forms/layerimport.cxx @@ -53,8 +53,6 @@ #include <rtl/strbuf.hxx> #include <algorithm> -SV_IMPL_REF( SvXMLStylesContext ); - namespace xmloff { diff --git a/xmloff/source/forms/layerimport.hxx b/xmloff/source/forms/layerimport.hxx index 86beb9e282a2..dee6ad9e4efc 100644 --- a/xmloff/source/forms/layerimport.hxx +++ b/xmloff/source/forms/layerimport.hxx @@ -35,8 +35,9 @@ class SvXMLImport; class SvXMLImportContext; class SvXMLStyleContext; +class SvXMLStylesContext; -SV_DECL_REF( SvXMLStylesContext ) +typedef tools::SvRef<SvXMLStylesContext> SvXMLStylesContextRef; // unfortunately, we can't put this into our namespace, as the macro expands to (amongst others) a forward // declaration of the class name, which then would be in the namespace, too diff --git a/xmloff/source/forms/propertyimport.hxx b/xmloff/source/forms/propertyimport.hxx index e27fd52abe69..d67474d6bd89 100644 --- a/xmloff/source/forms/propertyimport.hxx +++ b/xmloff/source/forms/propertyimport.hxx @@ -146,7 +146,7 @@ namespace xmloff m_aGenericValues.push_back(_rProp); } }; - SV_DECL_IMPL_REF( OPropertyImport ) + typedef tools::SvRef<OPropertyImport> OPropertyImportRef; //= OPropertyElementsContext /** helper class for importing the <form:properties> element |