summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-09-14 19:33:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-09-14 20:05:29 +0000
commit0f33526ec27a3abcfa1ca9348a46238b1432e5e4 (patch)
tree07b13b44a6c106275593fa7351f12dda62be9b68 /basctl
parentbee4ff508a456a1552aacdf6fc838b8b7cffb9ec (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 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx5
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/inc/basidesh.hxx5
3 files changed, 5 insertions, 7 deletions
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 4546873632e3..5f41f798bc24 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -952,11 +952,12 @@ void Shell::GetState(SfxItemSet &rSet)
pCurWin->GetState( rSet );
}
-bool Shell::HasUIFeature( sal_uInt32 nFeature )
+bool Shell::HasUIFeature(SfxShellFeature nFeature) const
{
+ assert((nFeature & ~SfxShellFeature::BasicMask) == SfxShellFeature::NONE);
bool bResult = false;
- if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER )
+ if (nFeature & SfxShellFeature::BasicShowBrowser)
{
// fade out (in) property browser in module (dialog) windows
if (dynamic_cast<DialogWindow*>(pCurWin.get()) && !pCurWin->IsReadOnly())
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index e48d820e8f57..75a75c04c072 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -136,7 +136,7 @@ SFX_IMPL_INTERFACE(basctl_Shell, SfxViewShell)
void basctl_Shell::InitInterface_Impl()
{
GetStaticInterface()->RegisterChildWindow(SID_SEARCH_DLG);
- GetStaticInterface()->RegisterChildWindow(SID_SHOW_PROPERTYBROWSER, false, BASICIDE_UI_FEATURE_SHOW_BROWSER);
+ GetStaticInterface()->RegisterChildWindow(SID_SHOW_PROPERTYBROWSER, false, SfxShellFeature::BasicShowBrowser);
GetStaticInterface()->RegisterChildWindow(SfxInfoBarContainerChild::GetChildWindowId());
GetStaticInterface()->RegisterPopupMenu("dialog");
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 763ca12982f0..e756caa9f4f8 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -39,9 +39,6 @@ class StarBASIC;
namespace basctl
{
-
-const sal_uLong BASICIDE_UI_FEATURE_SHOW_BROWSER = 0x00000001;
-
class Layout;
class ModulWindow;
class ModulWindowLayout;
@@ -180,7 +177,7 @@ public:
void ExecuteBasic( SfxRequest& rReq );
void ExecuteDialog( SfxRequest& rReq );
- virtual bool HasUIFeature( sal_uInt32 nFeature ) override;
+ virtual bool HasUIFeature(SfxShellFeature nFeature) const override;
bool CallBasicErrorHdl( StarBASIC* pBasic );
long CallBasicBreakHdl( StarBASIC* pBasic );