summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/macrodlg.hxx
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-09-02 16:21:08 +0200
committerAndras Timar <atimar@suse.com>2012-09-07 11:20:48 +0200
commit81f72a3c3a30ef00dfb03bd7fab148d2fcf3e4f8 (patch)
treed5586410e1f0d6b7413f1cab952c76c1978e0a7f /basctl/source/basicide/macrodlg.hxx
parent5764c51f2c9870c91727464c0d889d3554a5663e (diff)
Cleanup in basctl (raw pointers)
Lots of raw pointers have been converted to boost::scoped_ptr to reduce the number of 'delete's and the possibility of memory leaks. Some pointers have been converted to references, to reduce the needless checking for nullptrs, and so simplifying the code. Also some #define-s have been converted to C++ constants or enumerations. Change-Id: Ifbeb78f744bac7a96c8a446ff4db90dedf85fe26
Diffstat (limited to 'basctl/source/basicide/macrodlg.hxx')
-rw-r--r--basctl/source/basicide/macrodlg.hxx27
1 files changed, 16 insertions, 11 deletions
diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx
index c771ef9016d7..083cb2ef532a 100644
--- a/basctl/source/basicide/macrodlg.hxx
+++ b/basctl/source/basicide/macrodlg.hxx
@@ -32,17 +32,22 @@
namespace basctl
{
-#define MACRO_CLOSE 10
-#define MACRO_OK_RUN 11
-#define MACRO_NEW 12
-#define MACRO_EDIT 14
-
-#define MACROCHOOSER_ALL 1
-#define MACROCHOOSER_CHOOSEONLY 2
-#define MACROCHOOSER_RECORDING 3
+enum MacroExitCode {
+ Macro_Close = 10,
+ Macro_OkRun = 11,
+ Macro_New = 12,
+ Macro_Edit = 14,
+};
class MacroChooser : public SfxModalDialog
{
+public:
+ enum Mode {
+ All = 1,
+ ChooseOnly = 2,
+ Recording = 3,
+ };
+
private:
FixedText aMacroNameTxt;
Edit aMacroNameEdit;
@@ -66,7 +71,7 @@ private:
bool bNewDelIsDel;
bool bForceStoreBasic;
- sal_uInt16 nMode;
+ Mode nMode;
DECL_LINK( MacroSelectHdl, SvTreeListBox * );
DECL_LINK(MacroDoubleClickHdl, void *);
@@ -95,8 +100,8 @@ public:
virtual short Execute();
- void SetMode( sal_uInt16 nMode );
- sal_uInt16 GetMode() const { return nMode; }
+ void SetMode (Mode);
+ Mode GetMode () const { return nMode; }
};
} // namespace basctl