Kaydet (Commit) dfeef9e9 authored tarafından Noel Grandin's avatar Noel Grandin

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
üst da36ded0
...@@ -40,12 +40,7 @@ class SwDoc; ...@@ -40,12 +40,7 @@ class SwDoc;
class SwSection; class SwSection;
class SwSectionNode; class SwSectionNode;
class SwTOXBase; class SwTOXBase;
#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
#define SW_DECL_SWSERVEROBJECT_DEFINED
class SwServerObject; class SwServerObject;
typedef tools::SvRef<SwServerObject> SwServerObjectRef;
#endif
typedef std::vector<SwSection*> SwSections; typedef std::vector<SwSection*> SwSections;
...@@ -154,7 +149,7 @@ class SW_DLLPUBLIC SwSection ...@@ -154,7 +149,7 @@ class SW_DLLPUBLIC SwSection
private: private:
mutable SwSectionData m_Data; mutable SwSectionData m_Data;
SwServerObjectRef m_RefObj; // Set if DataServer. tools::SvRef<SwServerObject> m_RefObj; // Set if DataServer.
::sfx2::SvBaseLinkRef m_RefLink; ::sfx2::SvBaseLinkRef m_RefLink;
SAL_DLLPRIVATE void ImplSetHiddenFlag( SAL_DLLPRIVATE void ImplSetHiddenFlag(
......
...@@ -76,11 +76,6 @@ public: ...@@ -76,11 +76,6 @@ public:
void SetDdeBookmark( ::sw::mark::IMark& rBookmark); 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 #endif // INCLUDED_SW_INC_SWSERV_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -58,12 +58,7 @@ class SwUndoTblCpyTbl; ...@@ -58,12 +58,7 @@ class SwUndoTblCpyTbl;
class SwBoxSelection; class SwBoxSelection;
struct SwSaveRowSpan; struct SwSaveRowSpan;
struct Parm; struct Parm;
#ifndef SW_DECL_SWSERVEROBJECT_DEFINED
#define SW_DECL_SWSERVEROBJECT_DEFINED
class SwServerObject; class SwServerObject;
typedef tools::SvRef<SwServerObject> SwServerObjectRef;
#endif
class SwTableLines : public std::vector<SwTableLine*> { class SwTableLines : public std::vector<SwTableLine*> {
public: public:
...@@ -99,7 +94,7 @@ class SW_DLLPUBLIC SwTable: public SwClient //Client of FrmFmt. ...@@ -99,7 +94,7 @@ class SW_DLLPUBLIC SwTable: public SwClient //Client of FrmFmt.
protected: protected:
SwTableLines aLines; SwTableLines aLines;
SwTableSortBoxes m_TabSortContentBoxes; SwTableSortBoxes m_TabSortContentBoxes;
SwServerObjectRef refObj; // In case DataServer -> pointer is set. tools::SvRef<SwServerObject> refObj; // In case DataServer -> pointer is set.
SwHTMLTableLayout *pHTMLLayout; SwHTMLTableLayout *pHTMLLayout;
......
...@@ -1292,7 +1292,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) ...@@ -1292,7 +1292,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd )
bool bRecursion = false; bool bRecursion = false;
if( pSrcDoc == pDoc ) if( pSrcDoc == pDoc )
{ {
SwServerObjectRef refObj( (SwServerObject*) tools::SvRef<SwServerObject> refObj( (SwServerObject*)
pDoc->CreateLinkSource( sRange )); pDoc->CreateLinkSource( sRange ));
if( refObj.Is() ) if( refObj.Is() )
{ {
......
...@@ -463,7 +463,7 @@ const SwNode* SwBaseLink::GetAnchor() const ...@@ -463,7 +463,7 @@ const SwNode* SwBaseLink::GetAnchor() const
bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const bool SwBaseLink::IsRecursion( const SwBaseLink* pChkLnk ) const
{ {
SwServerObjectRef aRef( (SwServerObject*)GetObj() ); tools::SvRef<SwServerObject> aRef( (SwServerObject*)GetObj() );
if( aRef.Is() ) if( aRef.Is() )
{ {
// As it's a ServerObject, we query all contained Links // As it's a ServerObject, we query all contained Links
......
...@@ -155,7 +155,7 @@ namespace sw { ...@@ -155,7 +155,7 @@ namespace sw {
virtual ~DdeBookmark(); virtual ~DdeBookmark();
private: private:
SwServerObjectRef m_aRefObj; tools::SvRef<SwServerObject> m_aRefObj;
}; };
class Bookmark class Bookmark
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment