[Libreoffice-commits] .: 2 commits - basic/source

Takeshi Abe tabe at kemper.freedesktop.org
Sat Jan 28 08:29:31 PST 2012


 basic/source/inc/iosys.hxx       |    1 -
 basic/source/inc/runtime.hxx     |    1 +
 basic/source/runtime/methods.cxx |   14 +++++++-------
 basic/source/sbx/sbxvar.cxx      |    1 -
 4 files changed, 8 insertions(+), 9 deletions(-)

New commits:
commit 9fedf7bcfa4cb3e0064e68b96b12c7f4a43f17a6
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Jan 29 01:15:09 2012 +0900

    Removed unused define and extern

diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx
index f9e7319..4cc0f9b 100644
--- a/basic/source/inc/iosys.hxx
+++ b/basic/source/inc/iosys.hxx
@@ -38,7 +38,6 @@ class SvStream;
 // implemented at the moment.
 
 #define CHANNELS 256
-#define CONSOLE  0
 
 #define SBSTRM_INPUT    0x0001
 #define SBSTRM_OUTPUT   0x0002
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index e4ad651..d00115a 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -45,7 +45,6 @@ using namespace com::sun::star::uno;
 TYPEINIT1(SbxVariable,SbxValue)
 TYPEINIT1(SbxHint,SfxSimpleHint)
 
-extern sal_uInt32 nVarCreator;          // in SBXBASE.CXX, for LoadData()
 #ifdef DBG_UTIL
 static sal_uIntPtr nVar = 0;
 #endif
commit b6ca3a8287ac10c6877d5e7dd43622dbd138cde5
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sun Jan 29 00:44:01 2012 +0900

    Use defined macro instead of magic number
    
    This also added a missing READONLY entry

diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx
index 890b658..8c9064d 100644
--- a/basic/source/inc/runtime.hxx
+++ b/basic/source/inc/runtime.hxx
@@ -116,6 +116,7 @@ struct SbiGosubStack {              // GOSUB-Stack:
 #define MAXRECURSION 500
 
 #define Sb_ATTR_NORMAL      0x0000
+#define Sb_ATTR_READONLY    0x0001
 #define Sb_ATTR_HIDDEN      0x0002
 #define Sb_ATTR_SYSTEM      0x0004
 #define Sb_ATTR_VOLUME      0x0008
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e457b2e..efcf67f 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2877,11 +2877,11 @@ RTLFUNC(GetAttr)
                     sal_Bool bHidden = xSFI->isHidden( aPath );
                     sal_Bool bDirectory = xSFI->isFolder( aPath );
                     if( bReadOnly )
-                        nFlags |= 0x0001; // ATTR_READONLY
+                        nFlags |= Sb_ATTR_READONLY;
                     if( bHidden )
-                        nFlags |= 0x0002; // ATTR_HIDDEN
+                        nFlags |= Sb_ATTR_HIDDEN;
                     if( bDirectory )
-                        nFlags |= 0x0010; // ATTR_DIRECTORY
+                        nFlags |= Sb_ATTR_DIRECTORY;
                 }
                 catch(const Exception & )
                 {
@@ -2901,9 +2901,9 @@ RTLFUNC(GetAttr)
             FileStatus::Type aType = aFileStatus.getFileType();
             sal_Bool bDirectory = isFolder( aType );
             if( bReadOnly )
-                nFlags |= 0x0001; // ATTR_READONLY
+                nFlags |= Sb_ATTR_READONLY;
             if( bDirectory )
-                nFlags |= 0x0010; // ATTR_DIRECTORY
+                nFlags |= Sb_ATTR_DIRECTORY;
         }
         rPar.Get(0)->PutInteger( nFlags );
     }
@@ -4259,9 +4259,9 @@ RTLFUNC(SetAttr)
             {
                 try
                 {
-                    sal_Bool bReadOnly = (nFlags & 0x0001) != 0; // ATTR_READONLY
+                    sal_Bool bReadOnly = (nFlags & Sb_ATTR_READONLY) != 0;
                     xSFI->setReadOnly( aStr, bReadOnly );
-                    sal_Bool bHidden   = (nFlags & 0x0002) != 0; // ATTR_HIDDEN
+                    sal_Bool bHidden   = (nFlags & Sb_ATTR_HIDDEN) != 0;
                     xSFI->setHidden( aStr, bHidden );
                 }
                 catch(const Exception & )


More information about the Libreoffice-commits mailing list