diff options
author | Noel Grandin <noel@peralex.com> | 2020-03-30 15:11:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-03-31 09:34:38 +0200 |
commit | 7d6c67d323a87f1006d84c2a95b45dfbfb03c0c8 (patch) | |
tree | a706adf3e58f81b3838a95ccef4669d6d6f769ab /sw | |
parent | 1ec7b4ae86a9fe666fc1510636c483d8980d04f6 (diff) |
convert enum to scoped in SvBaseLink
Change-Id: Ief399381ac27764fce95ee053c322571a07b671c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91366
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/ndgrf.hxx | 4 | ||||
-rw-r--r-- | sw/inc/section.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentLinksAdministrationManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/swserv.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/section.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/graphic/ndgrf.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/ole/ndole.cxx | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx index 25b184cbd09f..c208552f23ff 100644 --- a/sw/inc/ndgrf.hxx +++ b/sw/inc/ndgrf.hxx @@ -162,12 +162,12 @@ inline const SwGrfNode *SwNode::GetGrfNode() const inline bool SwGrfNode::IsLinkedFile() const { - return mxLink.is() && OBJECT_CLIENT_GRF == mxLink->GetObjType(); + return mxLink.is() && sfx2::SvBaseLinkObjectType::ClientGraphic == mxLink->GetObjType(); } inline bool SwGrfNode::IsLinkedDDE() const { - return mxLink.is() && OBJECT_CLIENT_DDE == mxLink->GetObjType(); + return mxLink.is() && sfx2::SvBaseLinkObjectType::ClientDde == mxLink->GetObjType(); } #endif diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx index f911923ab41a..2b52eb6332cb 100644 --- a/sw/inc/section.hxx +++ b/sw/inc/section.hxx @@ -46,8 +46,8 @@ typedef std::vector<SwSection*> SwSections; enum class SectionType { Content, ToxHeader, ToxContent, - DdeLink = OBJECT_CLIENT_DDE, - FileLink = OBJECT_CLIENT_FILE + DdeLink = static_cast<int>(sfx2::SvBaseLinkObjectType::ClientDde), + FileLink = static_cast<int>(sfx2::SvBaseLinkObjectType::ClientFile) }; enum class LinkCreateType diff --git a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx index c5ad43e69bcc..83a1e8f81f8d 100644 --- a/sw/source/core/doc/DocumentLinksAdministrationManager.cxx +++ b/sw/source/core/doc/DocumentLinksAdministrationManager.cxx @@ -67,7 +67,7 @@ namespace for (const auto& rLinkIter : rLinks) { ::sfx2::SvBaseLink& rLnk = *rLinkIter; - if ((OBJECT_CLIENT_GRF == rLnk.GetObjType() || OBJECT_CLIENT_FILE == rLnk.GetObjType()) + if ((sfx2::SvBaseLinkObjectType::ClientGraphic == rLnk.GetObjType() || sfx2::SvBaseLinkObjectType::ClientFile == rLnk.GetObjType()) && dynamic_cast<const SwBaseLink*>(&rLnk) != nullptr) { tools::SvRef<sfx2::SvBaseLink> xLink(&rLnk); diff --git a/sw/source/core/doc/swserv.cxx b/sw/source/core/doc/swserv.cxx index bae7ae799856..95b3982ea860 100644 --- a/sw/source/core/doc/swserv.cxx +++ b/sw/source/core/doc/swserv.cxx @@ -224,7 +224,7 @@ bool SwServerObject::IsLinkInServer( const SwBaseLink* pChkLnk ) const for( size_t n = rLnks.size(); n; ) { const ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); - if (OBJECT_CLIENT_GRF != pLnk->GetObjType() && + if (sfx2::SvBaseLinkObjectType::ClientGraphic != pLnk->GetObjType() && dynamic_cast<const SwBaseLink*>( pLnk) != nullptr && !static_cast<const SwBaseLink*>(pLnk)->IsNoDataFlag() && static_cast<const SwBaseLink*>(pLnk)->IsInRange( nSttNd, nEndNd )) diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index 180b7b98c904..cf5b00a576ae 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -1141,7 +1141,7 @@ static void lcl_UpdateLinksInSect( SwBaseLink& rUpdLnk, SwSectionNode& rSectNd ) ::sfx2::SvBaseLink* pLnk = &(*rLnks[ --n ]); if( pLnk != &rUpdLnk && - OBJECT_CLIENT_FILE == pLnk->GetObjType() && + sfx2::SvBaseLinkObjectType::ClientFile == pLnk->GetObjType() && dynamic_cast< const SwBaseLink *>( pLnk ) != nullptr && ( pBLink = static_cast<SwBaseLink*>(pLnk) )->IsInRange( rSectNd.GetIndex(), rSectNd.EndOfSectionIndex() ) ) @@ -1526,7 +1526,7 @@ void SwSection::CreateLink( LinkCreateType eCreateType ) const OUString sFltr(sCmd.getToken( 0, sfx2::cTokenSeparator, nIndex )); const OUString sRange(sCmd.getToken( 0, sfx2::cTokenSeparator, nIndex )); pFormat->GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *pLnk, - static_cast<sal_uInt16>(m_Data.GetType()), + static_cast<sfx2::SvBaseLinkObjectType>(m_Data.GetType()), sFile, ( !sFltr.isEmpty() ? &sFltr : nullptr ), ( !sRange.isEmpty() ? &sRange : nullptr ) ); diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index ab9dec20c19d..6e042765ab7c 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -162,13 +162,13 @@ bool SwGrfNode::ReRead( OUString sCmd( sURLLink ); if( !rFltName.isEmpty() ) { - sal_uInt16 nNewType; + sfx2::SvBaseLinkObjectType nNewType; if( rFltName == "DDE" ) - nNewType = OBJECT_CLIENT_DDE; + nNewType = sfx2::SvBaseLinkObjectType::ClientDde; else { sfx2::MakeLnkName( sCmd, nullptr, sURLLink, OUString(), &rFltName ); - nNewType = OBJECT_CLIENT_GRF; + nNewType = sfx2::SvBaseLinkObjectType::ClientGraphic; } if( nNewType != mxLink->GetObjType() ) @@ -485,11 +485,11 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const bool bRet = false; if( mxLink.is() && mxLink->GetLinkManager() ) { - sal_uInt16 nType = mxLink->GetObjType(); - if( OBJECT_CLIENT_GRF == nType ) + sfx2::SvBaseLinkObjectType nType = mxLink->GetObjType(); + if( sfx2::SvBaseLinkObjectType::ClientGraphic == nType ) bRet = sfx2::LinkManager::GetDisplayNames( mxLink.get(), nullptr, pFileNm, nullptr, pFilterNm ); - else if( OBJECT_CLIENT_DDE == nType && pFileNm && pFilterNm ) + else if( sfx2::SvBaseLinkObjectType::ClientDde == nType && pFileNm && pFilterNm ) { OUString sApp; OUString sTopic; @@ -576,7 +576,7 @@ void SwGrfNode::InsertLink( const OUString& rGrfName, const OUString& rFltName ) mxLink->SetContentType( SotClipboardFormatId::SVXB ); rIDLA.GetLinkManager().InsertFileLink( *mxLink, - OBJECT_CLIENT_GRF, rGrfName, + sfx2::SvBaseLinkObjectType::ClientGraphic, rGrfName, (!bSync && !rFltName.isEmpty() ? &rFltName : nullptr) ); } } diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index e568c9159945..1927872ed0d9 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -614,7 +614,7 @@ void SwOLENode::CheckFileLink_Impl() // this is a file link so the model link manager should handle it mpObjectLink = new SwEmbedObjectLink( this ); maLinkURL = aLinkURL; - GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, OBJECT_CLIENT_OLE, aLinkURL ); + GetDoc()->getIDocumentLinksAdministration().GetLinkManager().InsertFileLink( *mpObjectLink, sfx2::SvBaseLinkObjectType::ClientOle, aLinkURL ); mpObjectLink->Connect(); } } |