[Libreoffice-commits] core.git: sw/inc sw/source
Noel Grandin
noel at peralex.com
Fri Jul 4 02:53:08 PDT 2014
sw/inc/section.hxx | 7 +------
sw/inc/swserv.hxx | 5 -----
sw/inc/swtable.hxx | 7 +------
sw/source/core/docnode/section.cxx | 2 +-
sw/source/core/docnode/swbaslnk.cxx | 2 +-
sw/source/core/inc/bookmrk.hxx | 2 +-
6 files changed, 5 insertions(+), 20 deletions(-)
New commits:
commit dfeef9e970a69c5736a54619b96607899c57e9a1
Author: Noel Grandin <noel at peralex.com>
Date: Fri Jul 4 10:31:22 2014 +0200
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
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index c8756381..ba34359 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 fa74018..f483342 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 cda293b..6ac05e0 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 50ea9f6..9baceca 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 df2476c..d5b4d09 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 dc5cb5d..5b5e6e6 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
More information about the Libreoffice-commits
mailing list