diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-08 16:15:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-09 08:41:12 +0200 |
commit | 502a7662555bfa66ab6be84b7d2d11b049ed7a4e (patch) | |
tree | 1eca2e4c51ee25624a9fe93ead88b75326acbf86 /sfx2/source/doc | |
parent | 68b35c75588f5702a142c8232d5e805bfe276c72 (diff) |
convert SFX_LOAD constants to scoped enum
Change-Id: If0a2eeeabbb0bea48d2f2f86dc04266812c0ecd2
Diffstat (limited to 'sfx2/source/doc')
-rw-r--r-- | sfx2/source/doc/new.cxx | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index 8a718b99338f..e62676bca661 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -165,8 +165,8 @@ public: bool IsTemplate() const; OUString GetTemplateFileName() const; - sal_uInt16 GetTemplateFlags()const; - void SetTemplateFlags(sal_uInt16 nSet); + SfxTemplateFlags GetTemplateFlags() const; + void SetTemplateFlags(SfxTemplateFlags nSet); }; IMPL_LINK_NOARG(SfxNewFileDialog_Impl, Update) @@ -340,27 +340,27 @@ OUString SfxNewFileDialog_Impl::GetTemplateFileName() const GetSelectedTemplatePos()-1); } -sal_uInt16 SfxNewFileDialog_Impl::GetTemplateFlags()const +SfxTemplateFlags SfxNewFileDialog_Impl::GetTemplateFlags()const { - sal_uInt16 nRet = m_pTextStyleCB->IsChecked() ? SFX_LOAD_TEXT_STYLES : 0; + SfxTemplateFlags nRet = m_pTextStyleCB->IsChecked() ? SfxTemplateFlags::LOAD_TEXT_STYLES : SfxTemplateFlags::NONE; if(m_pFrameStyleCB->IsChecked()) - nRet |= SFX_LOAD_FRAME_STYLES; + nRet |= SfxTemplateFlags::LOAD_FRAME_STYLES; if(m_pPageStyleCB->IsChecked()) - nRet |= SFX_LOAD_PAGE_STYLES; + nRet |= SfxTemplateFlags::LOAD_PAGE_STYLES; if(m_pNumStyleCB->IsChecked()) - nRet |= SFX_LOAD_NUM_STYLES; + nRet |= SfxTemplateFlags::LOAD_NUM_STYLES; if(m_pMergeStyleCB->IsChecked()) - nRet |= SFX_MERGE_STYLES; + nRet |= SfxTemplateFlags::MERGE_STYLES; return nRet; } -void SfxNewFileDialog_Impl::SetTemplateFlags(sal_uInt16 nSet) +void SfxNewFileDialog_Impl::SetTemplateFlags(SfxTemplateFlags nSet) { - m_pTextStyleCB->Check( 0 != (nSet&SFX_LOAD_TEXT_STYLES )); - m_pFrameStyleCB->Check( 0 != (nSet&SFX_LOAD_FRAME_STYLES)); - m_pPageStyleCB->Check( 0 != (nSet&SFX_LOAD_PAGE_STYLES )); - m_pNumStyleCB->Check( 0 != (nSet&SFX_LOAD_NUM_STYLES )); - m_pMergeStyleCB->Check( 0 != (nSet&SFX_MERGE_STYLES )); + m_pTextStyleCB->Check( bool(nSet & SfxTemplateFlags::LOAD_TEXT_STYLES )); + m_pFrameStyleCB->Check( bool(nSet & SfxTemplateFlags::LOAD_FRAME_STYLES)); + m_pPageStyleCB->Check( bool(nSet & SfxTemplateFlags::LOAD_PAGE_STYLES )); + m_pNumStyleCB->Check( bool(nSet & SfxTemplateFlags::LOAD_NUM_STYLES )); + m_pMergeStyleCB->Check( bool(nSet & SfxTemplateFlags::MERGE_STYLES )); } @@ -467,13 +467,12 @@ OUString SfxNewFileDialog::GetTemplateFileName() const return pImpl->GetTemplateFileName(); } -sal_uInt16 SfxNewFileDialog::GetTemplateFlags()const +SfxTemplateFlags SfxNewFileDialog::GetTemplateFlags()const { return pImpl->GetTemplateFlags(); - } -void SfxNewFileDialog::SetTemplateFlags(sal_uInt16 nSet) +void SfxNewFileDialog::SetTemplateFlags(SfxTemplateFlags nSet) { pImpl->SetTemplateFlags(nSet); } |