summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/source/dialogs/linkdlg.cxx12
-rw-r--r--include/sfx2/linkmgr.hxx2
-rw-r--r--include/sfx2/lnkbase.hxx2
-rw-r--r--sc/source/ui/docshell/arealink.cxx2
-rw-r--r--sfx2/source/appl/linkmgr2.cxx10
-rw-r--r--sfx2/source/appl/linksrc.cxx8
-rw-r--r--sfx2/source/appl/lnkbase2.cxx4
-rw-r--r--sw/inc/ddefld.hxx2
-rw-r--r--sw/inc/ndgrf.hxx4
-rw-r--r--sw/inc/section.hxx2
-rw-r--r--sw/source/core/doc/DocumentLinksAdministrationManager.cxx4
-rw-r--r--sw/source/uibase/inc/swdtflvr.hxx4
12 files changed, 27 insertions, 29 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 0f25cc3fa6a2..ee7fb1f21161 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -297,7 +297,7 @@ IMPL_LINK_NOARG_TYPED(SvBaseLinksDlg, UpdateNowClickHdl, Button*, void)
{
for( size_t n = 0; n < aLnkArr.size(); ++n )
{
- SvBaseLinkRef xLink = aLnkArr[ n ];
+ tools::SvRef<SvBaseLink> xLink = aLnkArr[ n ];
// first look for the entry in the array
for( size_t i = 0; i < pLinkMgr->GetLinks().size(); ++i )
@@ -420,7 +420,7 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
if(m_pTbLinks->GetSelectionCount() <= 1)
{
sal_uLong nPos;
- SvBaseLinkRef xLink = GetSelEntry( &nPos );
+ tools::SvRef<SvBaseLink> xLink = GetSelEntry( &nPos );
if( !xLink.Is() )
return;
@@ -472,7 +472,7 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, BreakLinkClickHdl, Button*, void )
m_pTbLinks->RemoveSelection();
for( sal_uLong i = 0; i < aLinkList.size(); i++ )
{
- SvBaseLinkRef xLink = aLinkList[i];
+ tools::SvRef<SvBaseLink> xLink = aLinkList[i];
// tell the link that it will be resolved!
xLink->Closed();
@@ -507,7 +507,7 @@ IMPL_LINK_NOARG_TYPED( SvBaseLinksDlg, UpdateWaitingHdl, Idle*, void )
for( sal_uLong nPos = m_pTbLinks->GetEntryCount(); nPos; )
{
SvTreeListEntry* pBox = m_pTbLinks->GetEntry( --nPos );
- SvBaseLinkRef xLink( static_cast<SvBaseLink*>(pBox->GetUserData()) );
+ tools::SvRef<SvBaseLink> xLink( static_cast<SvBaseLink*>(pBox->GetUserData()) );
if( xLink.Is() )
{
OUString sCur( ImplGetStateStr( *xLink ) ),
@@ -594,7 +594,7 @@ void SvBaseLinksDlg::SetManager( LinkManager* pNewMgr )
SvBaseLinks& rLnks = (SvBaseLinks&)pLinkMgr->GetLinks();
for( size_t n = 0; n < rLnks.size(); ++n )
{
- SvBaseLinkRef* pLinkRef = rLnks[ n ];
+ tools::SvRef<SvBaseLink>* pLinkRef = rLnks[ n ];
if( !pLinkRef->Is() )
{
rLnks.erase( rLnks.begin() + n );
@@ -692,7 +692,7 @@ void SvBaseLinksDlg::SetActLink( SvBaseLink * pLink )
sal_uLong nSelect = 0;
for( size_t n = 0; n < rLnks.size(); ++n )
{
- SvBaseLinkRef* pLinkRef = rLnks[ n ];
+ tools::SvRef<SvBaseLink>* pLinkRef = rLnks[ n ];
// #109573# only visible links have been inserted into the TreeListBox,
// invisible ones have to be skipped here
if( (*pLinkRef)->IsVisible() )
diff --git a/include/sfx2/linkmgr.hxx b/include/sfx2/linkmgr.hxx
index ace7f8f401cf..f0941e221cec 100644
--- a/include/sfx2/linkmgr.hxx
+++ b/include/sfx2/linkmgr.hxx
@@ -44,7 +44,7 @@ namespace sfx2
// FormatID "RegisterStatusInfoId" and a string as the data container.
// This contains the following enum.
-typedef std::vector<SvBaseLinkRef*> SvBaseLinks;
+typedef std::vector<tools::SvRef<SvBaseLink>*> SvBaseLinks;
typedef std::set<SvLinkSource*> SvLinkSources;
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 2458c9b2a21a..438327d47fd7 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -168,8 +168,6 @@ public:
FileDialogHelper & GetInsertFileDialog(const OUString& rFactory) const;
};
-typedef tools::SvRef<SvBaseLink> SvBaseLinkRef;
-
}
#endif
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 314181a5fd05..5adb2108a3bd 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -132,7 +132,7 @@ void ScAreaLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /* rEn
SetName( aNewLinkName );
}
- sfx2::SvBaseLinkRef const xThis(this); // keep yourself alive
+ tools::SvRef<sfx2::SvBaseLink> const xThis(this); // keep yourself alive
Refresh( aFile, aFilter, aArea, GetRefreshDelay() );
}
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index d56c276e005f..a0f60fab23a6 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -74,7 +74,7 @@ LinkManager::~LinkManager()
{
for( size_t n = 0; n < aLinkTbl.size(); ++n)
{
- SvBaseLinkRef* pTmp = aLinkTbl[ n ];
+ tools::SvRef<SvBaseLink>* pTmp = aLinkTbl[ n ];
if( pTmp->Is() )
{
(*pTmp)->Disconnect();
@@ -111,7 +111,7 @@ void LinkManager::Remove( SvBaseLink *pLink )
bool bFound = false;
for( size_t n = 0; n < aLinkTbl.size(); )
{
- SvBaseLinkRef* pTmp = aLinkTbl[ n ];
+ tools::SvRef<SvBaseLink>* pTmp = aLinkTbl[ n ];
if( pLink == *pTmp )
{
(*pTmp)->Disconnect();
@@ -143,7 +143,7 @@ void LinkManager::Remove( size_t nPos, size_t nCnt )
for( size_t n = nPos; n < nPos + nCnt; ++n)
{
- SvBaseLinkRef* pTmp = aLinkTbl[ n ];
+ tools::SvRef<SvBaseLink>* pTmp = aLinkTbl[ n ];
if( pTmp->Is() )
{
(*pTmp)->Disconnect();
@@ -160,7 +160,7 @@ bool LinkManager::Insert( SvBaseLink* pLink )
{
for( size_t n = 0; n < aLinkTbl.size(); ++n )
{
- SvBaseLinkRef* pTmp = aLinkTbl[ n ];
+ tools::SvRef<SvBaseLink>* pTmp = aLinkTbl[ n ];
if( !pTmp->Is() )
{
delete pTmp;
@@ -170,7 +170,7 @@ bool LinkManager::Insert( SvBaseLink* pLink )
return false; // No duplicate links inserted
}
- SvBaseLinkRef* pTmp = new SvBaseLinkRef( pLink );
+ tools::SvRef<SvBaseLink>* pTmp = new tools::SvRef<SvBaseLink>( pLink );
pLink->SetLinkManager( this );
aLinkTbl.push_back( pTmp );
return true;
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index fde1879a9439..7b1359f5246f 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -69,10 +69,10 @@ static void StartTimer( SvLinkSourceTimer ** ppTimer, SvLinkSource * pOwner,
struct SvLinkSource_Entry_Impl
{
- SvBaseLinkRef xSink;
- OUString aDataMimeType;
- sal_uInt16 nAdviseModes;
- bool bIsDataSink;
+ tools::SvRef<SvBaseLink> xSink;
+ OUString aDataMimeType;
+ sal_uInt16 nAdviseModes;
+ bool bIsDataSink;
SvLinkSource_Entry_Impl( SvBaseLink* pLink, const OUString& rMimeType,
sal_uInt16 nAdvMode )
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 421abc7c1b1a..b956625cbdbd 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -569,7 +569,7 @@ ImplDdeItem::~ImplDdeItem()
{
bIsInDTOR = true;
// So that no-one gets the idea to delete the pointer when Disconnecting!
- SvBaseLinkRef aRef( pLink );
+ tools::SvRef<SvBaseLink> aRef( pLink );
aRef->Disconnect();
}
@@ -625,7 +625,7 @@ void ImplDdeItem::AdviseLoop( bool bOpen )
{
// So that no-one gets the idea to delete the pointer
// when Disconnecting!
- SvBaseLinkRef aRef( pLink );
+ tools::SvRef<SvBaseLink> aRef( pLink );
aRef->Disconnect();
}
}
diff --git a/sw/inc/ddefld.hxx b/sw/inc/ddefld.hxx
index 492421fe7f0e..0b8d206655ea 100644
--- a/sw/inc/ddefld.hxx
+++ b/sw/inc/ddefld.hxx
@@ -31,7 +31,7 @@ class SW_DLLPUBLIC SwDDEFieldType : public SwFieldType
OUString aName;
OUString aExpansion;
- ::sfx2::SvBaseLinkRef refLink;
+ tools::SvRef<sfx2::SvBaseLink> refLink;
SwDoc* pDoc;
sal_uInt16 nRefCnt;
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 7de4410e39b7..ffaa0f9f28be 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -38,7 +38,7 @@ class SW_DLLPUBLIC SwGrfNode: public SwNoTextNode
GraphicObject maGrfObj;
GraphicObject *mpReplacementGraphic;
- ::sfx2::SvBaseLinkRef refLink; ///< If graphics only as link then pointer is set.
+ tools::SvRef<sfx2::SvBaseLink> refLink; ///< If graphics only as link then pointer is set.
Size nGrfSize;
OUString aLowResGrf; ///< HTML: LowRes graphics (substitute until regular HighRes graphics is loaded).
bool bInSwapIn :1;
@@ -181,7 +181,7 @@ public:
bool IsGrfLink() const { return refLink.Is(); }
bool IsLinkedFile() const;
bool IsLinkedDDE() const;
- ::sfx2::SvBaseLinkRef GetLink() const { return refLink; }
+ tools::SvRef<sfx2::SvBaseLink> GetLink() const { return refLink; }
bool GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const;
void ReleaseLink();
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 0635a8d3f1ac..d72ab200a70d 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -150,7 +150,7 @@ private:
mutable SwSectionData m_Data;
tools::SvRef<SwServerObject> m_RefObj; // Set if DataServer.
- ::sfx2::SvBaseLinkRef m_RefLink;
+ tools::SvRef<sfx2::SvBaseLink> m_RefLink;
SAL_DLLPRIVATE void ImplSetHiddenFlag(
bool const bHidden, bool const bCondition);
diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
index 0a721e921fc7..84d346b71d07 100644
--- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
+++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx
@@ -72,7 +72,7 @@ namespace
OBJECT_CLIENT_FILE == pLnk->GetObjType() ) &&
dynamic_cast<const SwBaseLink*>( pLnk) != nullptr )
{
- ::sfx2::SvBaseLinkRef xLink = pLnk;
+ tools::SvRef<sfx2::SvBaseLink> xLink = pLnk;
OUString sFName;
sfx2::LinkManager::GetDisplayNames( xLink, 0, &sFName );
@@ -400,7 +400,7 @@ bool DocumentLinksAdministrationManager::EmbedAllLinks()
::sfx2::SvBaseLink* pLnk = 0;
while( 0 != (pLnk = lcl_FindNextRemovableLink( rLinks ) ) )
{
- ::sfx2::SvBaseLinkRef xLink = pLnk;
+ tools::SvRef<sfx2::SvBaseLink> xLink = pLnk;
// Tell the link that it's being destroyed!
xLink->Closed();
diff --git a/sw/source/uibase/inc/swdtflvr.hxx b/sw/source/uibase/inc/swdtflvr.hxx
index b2b791a9a212..b755b7bc9ef1 100644
--- a/sw/source/uibase/inc/swdtflvr.hxx
+++ b/sw/source/uibase/inc/swdtflvr.hxx
@@ -56,10 +56,10 @@ namespace nsTransferBufferType
class SW_DLLPUBLIC SwTransferable : public TransferableHelper
{
friend class SwView_Impl;
- SfxObjectShellLock m_aDocShellRef;
+ SfxObjectShellLock m_aDocShellRef;
TransferableDataHelper m_aOleData;
TransferableObjectDescriptor m_aObjDesc;
- ::sfx2::SvBaseLinkRef m_xDdeLink;
+ tools::SvRef<sfx2::SvBaseLink> m_xDdeLink;
SwWrtShell *m_pWrtShell;
/* #96392# Added pCreatorView to distinguish SwFrameShell from