diff options
author | Noel Grandin <noel@peralex.com> | 2014-07-04 10:31:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-07-04 11:49:09 +0200 |
commit | dfeef9e970a69c5736a54619b96607899c57e9a1 (patch) | |
tree | 1ba1ea08de763d23e08bd967387ca6633fc79875 /sw | |
parent | da36ded02c67bb7481cd4378ce5f7d779c1a3533 (diff) |
remove unnecessary header macro wizardry
using the #define SW_DECL_SWSERVEROBJECT_DEFINED to turn typedefs
on and off. Rather just use SvRef<T> everywhere, like we do for
other reference types.
Change-Id: Id939c46c5861cd7440b66c5a84122f900ddb882c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/section.hxx | 7 | ||||
-rw-r--r-- | sw/inc/swserv.hxx | 5 | ||||
-rw-r--r-- | sw/inc/swtable.hxx | 7 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/swbaslnk.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/bookmrk.hxx | 2 |
6 files changed, 5 insertions, 20 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index c87563812418..ba343599dd99 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -40,12 +40,7 @@ class SwDoc; class SwSection; class SwSectionNode; class SwTOXBase; - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED class SwServerObject; -typedef tools::SvRef<SwServerObject> SwServerObjectRef; -#endif typedef std::vector<SwSection*> SwSections; @@ -154,7 +149,7 @@ class SW_DLLPUBLIC SwSection private: mutable SwSectionData m_Data; - SwServerObjectRef m_RefObj; // Set if DataServer. + tools::SvRef<SwServerObject> m_RefObj; // Set if DataServer. ::sfx2::SvBaseLinkRef m_RefLink; SAL_DLLPRIVATE void ImplSetHiddenFlag( diff --git a/sw/inc/swserv.hxx b/sw/inc/swserv.hxx index fa74018084d9..f483342ade5d 100644 --- a/sw/inc/swserv.hxx +++ b/sw/inc/swserv.hxx @@ -76,11 +76,6 @@ public: void SetDdeBookmark( ::sw::mark::IMark& rBookmark); }; -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED -typedef tools::SvRef<SwServerObject> SwServerObjectRef; -#endif - #endif // INCLUDED_SW_INC_SWSERV_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx index cda293b94632..6ac05e0af07e 100644 --- a/sw/inc/swtable.hxx +++ b/sw/inc/swtable.hxx @@ -58,12 +58,7 @@ class SwUndoTblCpyTbl; class SwBoxSelection; struct SwSaveRowSpan; struct Parm; - -#ifndef SW_DECL_SWSERVEROBJECT_DEFINED -#define SW_DECL_SWSERVEROBJECT_DEFINED class SwServerObject; -typedef tools::SvRef<SwServerObject> SwServerObjectRef; -#endif class SwTableLines : public std::vector<SwTableLine*> { public: @@ -99,7 +94,7 @@ class SW_DLLPUBLIC SwTable: public SwClient //Client of FrmFmt. protected: SwTableLines aLines; SwTableSortBoxes m_TabSortContentBoxes; - SwServerObjectRef refObj; // In case DataServer -> pointer is set. + tools::SvRef<SwServerObject> refObj; // In case DataServer -> pointer is set. SwHTMLTableLayout *pHTMLLayout; diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 50ea9f60749d..9bacecaa7ae4 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1292,7 +1292,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) bool bRecursion = false; if( pSrcDoc == pDoc ) { - SwServerObjectRef refObj( (SwServerObject*) + tools::SvRef<SwServerObject> refObj( (SwServerObject*) pDoc->CreateLinkSource( sRange )); if( refObj.Is() ) { diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx index df2476cf5c79..d5b4d0989ecb 100644 --- a/sw/source/core/docnode/swbaslnk.cxx +++ b/sw/source/core/docnode/swbaslnk.cxx @@ -463,7 +463,7 @@ const SwNode* SwBaseLink::GetAnchor() const bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const { - SwServerObjectRef aRef( (SwServerObject*)GetObj() ); + tools::SvRef<SwServerObject> aRef( (SwServerObject*)GetObj() ); if( aRef.Is() ) { // As it's a ServerObject, we query all contained Links diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index dc5cb5d97d1a..5b5e6e62f610 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -155,7 +155,7 @@ namespace sw { virtual ~DdeBookmark(); private: - SwServerObjectRef m_aRefObj; + tools::SvRef<SwServerObject> m_aRefObj; }; class Bookmark |