summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-23 14:23:01 +0200
committerNoel Grandin <noel@peralex.com>2015-03-24 09:36:57 +0200
commit23e0b0ba4b67a402a89b3752ae5aede1c5249cc8 (patch)
tree2046f70f5d2f47141267d47c192998228e8d41c2 /sfx2
parentffcfcd76d12a54e8a65a2b8d0ba7432d4c57f6ea (diff)
convert sfxlink to enum class
Change-Id: I4466af8d40e7860b20a26c5ccf2265ee40c5a9ab
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/impldde.cxx8
-rw-r--r--sfx2/source/appl/linkmgr2.cxx8
-rw-r--r--sfx2/source/appl/lnkbase2.cxx14
3 files changed, 15 insertions, 15 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 1d9617636c48..00efd456bd4e 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -186,13 +186,13 @@ bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/,
bool SvDDEObject::Connect( SvBaseLink * pSvLink )
{
- sal_uInt16 nLinkType = pSvLink->GetUpdateMode();
+ SfxLinkUpdateMode nLinkType = pSvLink->GetUpdateMode();
if( pConnection ) // Connection is already made
{
// well, then just add it as dependent
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
- LINKUPDATE_ONCALL == nLinkType
+ SfxLinkUpdateMode::ONCALL == nLinkType
? ADVISEMODE_ONLYONCE
: 0 );
AddConnectAdvise( pSvLink );
@@ -230,7 +230,7 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink )
nError = DDELINK_ERROR_APP;
}
- if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() )
+ if( SfxLinkUpdateMode::ALWAYS == nLinkType && !pLink && !pConnection->GetError() )
{
// Setting up Hot Link, Data will be available at some point later on
pLink = new DdeHotLink( *pConnection, sItem );
@@ -245,7 +245,7 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink )
AddDataAdvise( pSvLink,
SotExchange::GetFormatMimeType( pSvLink->GetContentType()),
- LINKUPDATE_ONCALL == nLinkType
+ SfxLinkUpdateMode::ONCALL == nLinkType
? ADVISEMODE_ONLYONCE
: 0 );
AddConnectAdvise( pSvLink );
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 9d910a92beff..65be6e6d74c3 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -179,7 +179,7 @@ bool LinkManager::Insert( SvBaseLink* pLink )
bool LinkManager::InsertLink( SvBaseLink * pLink,
sal_uInt16 nObjType,
- sal_uInt16 nUpdateMode,
+ SfxLinkUpdateMode nUpdateMode,
const OUString* pName )
{
// This First
@@ -454,7 +454,7 @@ void LinkManager::LinkServerShell(const OUString& rPath, SfxObjectShell& rServer
rLink.SetObj(pSrvSrc);
pSrvSrc->AddDataAdvise(
&rLink, aFl.MimeType,
- sfx2::LINKUPDATE_ONCALL == rLink.GetUpdateMode() ? ADVISEMODE_ONLYONCE : 0);
+ SfxLinkUpdateMode::ONCALL == rLink.GetUpdateMode() ? ADVISEMODE_ONLYONCE : 0);
}
}
@@ -479,7 +479,7 @@ bool LinkManager::InsertFileLink(
}
OUString aCmd = aBuf.makeStringAndClear();
- return InsertLink(&rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &aCmd);
+ return InsertLink(&rLink, nFileType, SfxLinkUpdateMode::ONCALL, &aCmd);
}
// A transfer is aborted, so cancel all download media
@@ -645,7 +645,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
pLink->SetObj( pNewSrc );
pNewSrc->AddDataAdvise( pLink, aFl.MimeType,
- sfx2::LINKUPDATE_ONCALL == pLink->GetUpdateMode()
+ SfxLinkUpdateMode::ONCALL == pLink->GetUpdateMode()
? ADVISEMODE_ONLYONCE
: 0 );
return true;
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index d75252df67c2..4f0aa7382a6b 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -70,7 +70,7 @@ struct ImplBaseLinkData
SotClipboardFormatId nCntntType; // Update Format
// Not Ole-Links
bool bIntrnlLnk; // It is an internal link
- sal_uInt16 nUpdateMode; // UpdateMode
+ SfxLinkUpdateMode nUpdateMode; // UpdateMode
};
struct tDDEType
@@ -86,7 +86,7 @@ struct ImplBaseLinkData
{
ClientType.nCntntType = SotClipboardFormatId::NONE;
ClientType.bIntrnlLnk = false;
- ClientType.nUpdateMode = 0;
+ ClientType.nUpdateMode = SfxLinkUpdateMode::NONE;
DDEType.pItem = NULL;
}
};
@@ -135,7 +135,7 @@ SvBaseLink::SvBaseLink()
-SvBaseLink::SvBaseLink( sal_uInt16 nUpdateMode, SotClipboardFormatId nContentType )
+SvBaseLink::SvBaseLink( SfxLinkUpdateMode nUpdateMode, SotClipboardFormatId nContentType )
: m_bIsReadOnly(false)
{
pImpl = new BaseLink_Impl();
@@ -311,7 +311,7 @@ void SvBaseLink::SetLinkSourceName( const OUString & rLnkNm )
-void SvBaseLink::SetUpdateMode( sal_uInt16 nMode )
+void SvBaseLink::SetUpdateMode( SfxLinkUpdateMode nMode )
{
if( ( OBJECT_CLIENT_SO & nObjType ) &&
pImplData->ClientType.nUpdateMode != nMode )
@@ -357,7 +357,7 @@ bool SvBaseLink::Update()
bool bSuccess = eRes == SUCCESS;
//for manual Updates there is no need to hold the ServerObject
if( OBJECT_CLIENT_DDE == nObjType &&
- LINKUPDATE_ONCALL == GetUpdateMode() && xObj.Is() )
+ SfxLinkUpdateMode::ONCALL == GetUpdateMode() && xObj.Is() )
xObj->RemoveAllDataAdvise( this );
return bSuccess;
}
@@ -378,11 +378,11 @@ bool SvBaseLink::Update()
}
-sal_uInt16 SvBaseLink::GetUpdateMode() const
+SfxLinkUpdateMode SvBaseLink::GetUpdateMode() const
{
return ( OBJECT_CLIENT_SO & nObjType )
? pImplData->ClientType.nUpdateMode
- : sal::static_int_cast< sal_uInt16 >( LINKUPDATE_ONCALL );
+ : SfxLinkUpdateMode::ONCALL;
}