diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-23 14:23:01 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-24 09:36:57 +0200 |
commit | 23e0b0ba4b67a402a89b3752ae5aede1c5249cc8 (patch) | |
tree | 2046f70f5d2f47141267d47c192998228e8d41c2 /cui | |
parent | ffcfcd76d12a54e8a65a2b8d0ba7432d4c57f6ea (diff) |
convert sfxlink to enum class
Change-Id: I4466af8d40e7860b20a26c5ccf2265ee40c5a9ab
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/linkdlg.cxx | 14 | ||||
-rw-r--r-- | cui/source/inc/linkdlg.hxx | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx index 3535828b8553..2e60a3d6d0e8 100644 --- a/cui/source/dialogs/linkdlg.cxx +++ b/cui/source/dialogs/linkdlg.cxx @@ -218,7 +218,7 @@ IMPL_LINK( SvBaseLinksDlg, LinksSelectHdl, SvTabListBox *, pSvTabListBox ) m_pRbAutomatic->Enable(); m_pRbManual->Enable(); - if( LINKUPDATE_ALWAYS == pLink->GetUpdateMode() ) + if( SfxLinkUpdateMode::ALWAYS == pLink->GetUpdateMode() ) m_pRbAutomatic->Check(); else m_pRbManual->Check(); @@ -250,8 +250,8 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadio sal_uLong nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && - LINKUPDATE_ALWAYS != pLink->GetUpdateMode() ) - SetType( *pLink, nPos, LINKUPDATE_ALWAYS ); + SfxLinkUpdateMode::ALWAYS != pLink->GetUpdateMode() ) + SetType( *pLink, nPos, SfxLinkUpdateMode::ALWAYS ); return 0; } IMPL_LINK_INLINE_END( SvBaseLinksDlg, AutomaticClickHdl, RadioButton *, pRadioButton ) @@ -263,8 +263,8 @@ IMPL_LINK_INLINE_START( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioBut sal_uLong nPos; SvBaseLink* pLink = GetSelEntry( &nPos ); if( pLink && !( FILEOBJECT & pLink->GetObjType() ) && - LINKUPDATE_ONCALL != pLink->GetUpdateMode()) - SetType( *pLink, nPos, LINKUPDATE_ONCALL ); + SfxLinkUpdateMode::ONCALL != pLink->GetUpdateMode()) + SetType( *pLink, nPos, SfxLinkUpdateMode::ONCALL ); return 0; } IMPL_LINK_INLINE_END( SvBaseLinksDlg, ManualClickHdl, RadioButton *, pRadioButton ) @@ -579,7 +579,7 @@ OUString SvBaseLinksDlg::ImplGetStateStr( const SvBaseLink& rLnk ) sRet = Waitinglink(); StartUpdateTimer(); } - else if( LINKUPDATE_ALWAYS == rLnk.GetUpdateMode() ) + else if( SfxLinkUpdateMode::ALWAYS == rLnk.GetUpdateMode() ) sRet = Autolink(); else sRet = Manuallink(); @@ -684,7 +684,7 @@ SvBaseLink* SvBaseLinksDlg::GetSelEntry( sal_uLong* pPos ) void SvBaseLinksDlg::SetType( SvBaseLink& rLink, sal_uLong nSelPos, - sal_uInt16 nType ) + SfxLinkUpdateMode nType ) { rLink.SetUpdateMode( nType ); rLink.Update(); diff --git a/cui/source/inc/linkdlg.hxx b/cui/source/inc/linkdlg.hxx index 4dbda382452e..89491007d919 100644 --- a/cui/source/inc/linkdlg.hxx +++ b/cui/source/inc/linkdlg.hxx @@ -38,6 +38,8 @@ namespace sfx2 class SvBaseLink; } +enum class SfxLinkUpdateMode; + class SvBaseLinksDlg : public ModalDialog { using Window::SetType; @@ -76,7 +78,7 @@ class SvBaseLinksDlg : public ModalDialog DECL_LINK( EndEditHdl, sfx2::SvBaseLink* ); sfx2::SvBaseLink* GetSelEntry( sal_uLong* pPos ); OUString ImplGetStateStr( const sfx2::SvBaseLink& ); - void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, sal_uInt16 nType ); + void SetType( sfx2::SvBaseLink& rLink, sal_uLong nPos, SfxLinkUpdateMode nType ); void InsertEntry( const sfx2::SvBaseLink& rLink, sal_uLong nPos = TREELIST_APPEND, bool bSelect = false); void StartUpdateTimer() { aUpdateIdle.Start(); } |