[Libreoffice-commits] .: basctl/source

August Sodora augsod at kemper.freedesktop.org
Fri Dec 9 22:37:04 PST 2011


 basctl/source/inc/bastypes.hxx |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

New commits:
commit 79a8567b422459d1ba42ce60e6cafea416441e75
Author: August Sodora <augsod at gmail.com>
Date:   Sat Dec 10 01:36:34 2011 -0500

    Avoid use of the preprocessor

diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx
index 1ab45fc..e61f311 100644
--- a/basctl/source/inc/bastypes.hxx
+++ b/basctl/source/inc/bastypes.hxx
@@ -105,11 +105,14 @@ public:
     void            Sort();
 };
 
-#define BASWIN_OK               0x00
-#define BASWIN_RUNNINGBASIC     0x01
-#define BASWIN_TOBEKILLED       0x02
-#define BASWIN_SUSPENDED        0x04
-#define BASWIN_INRESCHEDULE     0x08
+enum BasicWindowStatus
+{
+    BASWIN_OK           = 0x00,
+    BASWIN_RUNNINGBASIC = 0x01,
+    BASWIN_TOBEKILLED   = 0x02,
+    BASWIN_SUSPENDED    = 0x04,
+    BASWIN_INRESCHEDULE = 0x08
+};
 
 class Printer;
 class BasicEntryDescriptor;
@@ -126,7 +129,7 @@ private:
     ScrollBar*      pShellVScrollBar;
 
     DECL_LINK( ScrollHdl, ScrollBar * );
-    sal_uInt8           nStatus;
+    int nStatus;
 
     ScriptDocument      m_aDocument;
     ::rtl::OUString     m_aLibName;
@@ -173,10 +176,10 @@ public:
     virtual void    SetReadOnly( sal_Bool bReadOnly );
     virtual sal_Bool    IsReadOnly();
 
-    sal_uInt8           GetStatus()             { return nStatus; }
-    void            SetStatus( sal_uInt8 n )        { nStatus = n; }
-    void            AddStatus( sal_uInt8 n )        { nStatus = nStatus | n; }
-    void            ClearStatus( sal_uInt8 n )  { nStatus = nStatus & ~n; }
+    int GetStatus() { return nStatus; }
+    void SetStatus(int n) { nStatus = n; }
+    void AddStatus(int n) { nStatus |= n; }
+    void ClearStatus(int n) { nStatus &= ~n; }
 
     virtual Window* GetLayoutWindow();
 


More information about the Libreoffice-commits mailing list