diff options
author | Jochen Nitschke <j.nitschke+logerrit@ok.de> | 2016-09-14 19:33:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-14 20:05:29 +0000 |
commit | 0f33526ec27a3abcfa1ca9348a46238b1432e5e4 (patch) | |
tree | 07b13b44a6c106275593fa7351f12dda62be9b68 /sw/source/uibase/uiview/viewstat.cxx | |
parent | bee4ff508a456a1552aacdf6fc838b8b7cffb9ec (diff) |
put all SfxShell feature flags in one typed_flags class
make values unique across modules.
check if flag used in correct module.
Change-Id: I656ffd3d527dd895777e14e1cc933c8b9b3f6e46
Reviewed-on: https://gerrit.libreoffice.org/28906
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/uiview/viewstat.cxx')
-rw-r--r-- | sw/source/uibase/uiview/viewstat.cxx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sw/source/uibase/uiview/viewstat.cxx b/sw/source/uibase/uiview/viewstat.cxx index 39121e85b426..da999bd04e25 100644 --- a/sw/source/uibase/uiview/viewstat.cxx +++ b/sw/source/uibase/uiview/viewstat.cxx @@ -555,17 +555,20 @@ void SwView::GetDrawState(SfxItemSet &rSet) } } -bool SwView::HasUIFeature( sal_uInt32 nFeature ) +bool SwView::HasUIFeature(SfxShellFeature nFeature) const { - bool bRet = false; + assert((nFeature & ~SfxShellFeature::SwMask) == SfxShellFeature::NONE); switch(nFeature) { - case CHILDWIN_LABEL : bRet = m_pWrtShell->IsLabelDoc(); break; + case SfxShellFeature::SwChildWindowLabel: + return m_pWrtShell->IsLabelDoc(); #if HAVE_FEATURE_DBCONNECTIVITY - case CHILDWIN_MAILMERGE : bRet = nullptr != GetMailMergeConfigItem(); break; + case SfxShellFeature::SwChildWindowMailmerge: + return (nullptr != GetMailMergeConfigItem()); #endif + default: + return false; } - return bRet; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |