diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-16 15:20:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-17 07:57:52 +0200 |
commit | 14fb8f7960249271fd73123c056057ce49980667 (patch) | |
tree | e6c456da0373f2685d2da9d1fb785711055d5855 /basctl | |
parent | f1421a3e12167fafc966d069b3a4f7eb84ffda05 (diff) |
convert ObjectMode to scoped enum
and drop unused Method enumerator
Change-Id: I5ba25fbeaf67280f748acf8d84ab903a4c71e40b
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/inc/basidesh.hrc | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 7 | ||||
-rw-r--r-- | basctl/source/basicide/moduldlg.hxx | 20 |
3 files changed, 11 insertions, 18 deletions
diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc index fea24c038ef6..66a5b67ba27d 100644 --- a/basctl/inc/basidesh.hrc +++ b/basctl/inc/basidesh.hrc @@ -92,7 +92,7 @@ #define RID_STR_NOIMPORT ( RID_BASICIDE_START + 68 ) #define RID_STR_ENTERPASSWORD ( RID_BASICIDE_START + 69 ) -#define RID_STR_NEWMETH ( RID_BASICIDE_START + 71 ) +// free #define RID_STR_USERMACROS ( RID_BASICIDE_START + 72 ) #define RID_STR_USERDIALOGS ( RID_BASICIDE_START + 73 ) #define RID_STR_USERMACROSDIALOGS ( RID_BASICIDE_START + 74 ) diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index efeab6380792..38f326d28fb5 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -189,7 +189,7 @@ void CheckBox::Init() SetHighlightRange(); } -void CheckBox::SetMode (ObjectMode::Mode e) +void CheckBox::SetMode (ObjectMode e) { eMode = e; @@ -356,7 +356,7 @@ IMPL_LINK_NOARG(NewObjectDialog, OkButtonHandler, Button*, void) } } -NewObjectDialog::NewObjectDialog(vcl::Window * pParent, ObjectMode::Mode eMode, +NewObjectDialog::NewObjectDialog(vcl::Window * pParent, ObjectMode eMode, bool bCheckName) : ModalDialog(pParent, "NewLibDialog", "modules/BasicIDE/ui/newlibdialog.ui") { @@ -373,9 +373,6 @@ NewObjectDialog::NewObjectDialog(vcl::Window * pParent, ObjectMode::Mode eMode, case ObjectMode::Module: SetText( IDE_RESSTR(RID_STR_NEWMOD) ); break; - case ObjectMode::Method: - SetText( IDE_RESSTR(RID_STR_NEWMETH) ); - break; case ObjectMode::Dialog: SetText( IDE_RESSTR(RID_STR_NEWDLG) ); break; diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index c196c48f002b..500dc04db821 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -34,16 +34,12 @@ class SvxPasswordDialog; namespace basctl { -namespace ObjectMode +enum class ObjectMode { - enum Mode - { - Library = 1, - Module = 2, - Dialog = 3, - Method = 4, - }; -} + Library = 1, + Module = 2, + Dialog = 3, +}; class NewObjectDialog : public ModalDialog { @@ -53,7 +49,7 @@ private: DECL_LINK(OkButtonHandler, Button*, void); public: - NewObjectDialog (vcl::Window* pParent, ObjectMode::Mode, bool bCheckName = false); + NewObjectDialog (vcl::Window* pParent, ObjectMode, bool bCheckName = false); virtual ~NewObjectDialog() override; virtual void dispose() override; OUString GetObjectName() const { return m_pEdit->GetText(); } @@ -118,7 +114,7 @@ public: class CheckBox : public SvTabListBox { private: - ObjectMode::Mode eMode; + ObjectMode eMode; SvLBoxButtonData* pCheckButton; ScriptDocument m_aDocument; void Init(); @@ -140,7 +136,7 @@ public: void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; } - void SetMode (ObjectMode::Mode); + void SetMode(ObjectMode); }; class LibDialog: public ModalDialog |