diff options
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 6 | ||||
-rw-r--r-- | include/sfx2/lnkbase.hxx | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 6a830e5580c1..bd6225ac89a1 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -184,7 +184,7 @@ void SvBaseLinksDlg::LinksSelectHdl(weld::TreeView* pSvTabListBox) OUString sType, sLink; OUString *pLinkNm = &sLink, *pFilter = nullptr; - if( isClientType(pLink->GetObjType()) ) + if( isClientFileType(pLink->GetObjType()) ) { m_xRbAutomatic->set_sensitive(false); m_xRbManual->set_active(true); @@ -226,7 +226,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, AutomaticClickHdl, weld::Button&, void ) { int nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); - if( pLink && !isClientType( pLink->GetObjType() ) && + if( pLink && !isClientFileType( pLink->GetObjType() ) && SfxLinkUpdateMode::ALWAYS != pLink->GetUpdateMode() ) SetType( *pLink, nPos, SfxLinkUpdateMode::ALWAYS ); } @@ -235,7 +235,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, ManualClickHdl, weld::Button&, void ) { int nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); - if( pLink && !isClientType( pLink->GetObjType() ) && + if( pLink && !isClientFileType( pLink->GetObjType() ) && SfxLinkUpdateMode::ONCALL != pLink->GetUpdateMode()) SetType( *pLink, nPos, SfxLinkUpdateMode::ONCALL ); } diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx index c3b981afebfe..ca29ebe3547e 100644 --- a/include/sfx2/lnkbase.hxx +++ b/include/sfx2/lnkbase.hxx @@ -65,7 +65,8 @@ constexpr bool isClientType(SvBaseLinkObjectType t) } constexpr bool isClientFileType(SvBaseLinkObjectType t) { - return static_cast<int>(t) & static_cast<int>(SvBaseLinkObjectType::ClientFile); + auto check = static_cast<int>(SvBaseLinkObjectType::ClientFile); + return (static_cast<int>(t) & check) == check; } struct BaseLink_Impl; |