[Libreoffice-commits] .: fpicker/source vcl/inc

Lubos Lunak llunak at kemper.freedesktop.org
Fri Mar 9 07:04:28 PST 2012


 fpicker/source/unx/kde4/KDE4FilePicker.cxx |   15 ---------------
 vcl/inc/vcl/settings.hxx                   |   26 +++++++++++++-------------
 2 files changed, 13 insertions(+), 28 deletions(-)

New commits:
commit 77ee92a6bd8f40022ab03325d158de4b67a41dd0
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Fri Mar 9 15:50:17 2012 +0100

    change vcl's SETTINGS_* #define's to const int
    
    They pollute not only the global namespace, but all namespaces,
    given they're are #define's. I bet they'd eventually all conflict
    with the namespaced enum in kdelibs headers.

diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 8e8b3e8..d8df515 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -55,14 +55,6 @@
 /* ********* Hack, but needed because of conflicting types... */
 #define Region QtXRegion
 
-//kde has an enum that uses this...OO does too
-#define LO_SETTINGS_MOUSE SETTINGS_MOUSE
-#undef SETTINGS_MOUSE
-#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
-#undef SETTINGS_LOCALE
-#define LO_SETTINGS_STYLE SETTINGS_STYLE
-#undef SETTINGS_STYLE
-
 #include <kfiledialog.h>
 #include <kwindowsystem.h>
 #include <kapplication.h>
@@ -75,13 +67,6 @@
 
 #undef Region
 
-#define SETTINGS_MOUSE LO_SETTINGS_MOUSE
-#undef LO_SETTINGS_MOUSE
-#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
-#undef LO_SETTINGS_LOCALE
-#define SETTINGS_STYLE LO_SETTINGS_STYLE
-#undef LO_SETTINGS_STYLE
-
 using namespace ::com::sun::star;
 
 using namespace ::com::sun::star::ui::dialogs;
diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx
index 2f333ca..f69f91f 100644
--- a/vcl/inc/vcl/settings.hxx
+++ b/vcl/inc/vcl/settings.hxx
@@ -990,19 +990,19 @@ private:
 // - AllSettings -
 // ---------------
 
-#define SETTINGS_MOUSE              ((sal_uLong)0x00000001)
-#define SETTINGS_STYLE              ((sal_uLong)0x00000002)
-#define SETTINGS_MISC               ((sal_uLong)0x00000004)
-#define SETTINGS_SOUND              ((sal_uLong)0x00000008)
-#define SETTINGS_HELP               ((sal_uLong)0x00000010)
-#define SETTINGS_LOCALE             ((sal_uLong)0x00000020)
-#define SETTINGS_UILOCALE           ((sal_uLong)0x00000040)
-#define SETTINGS_ALLSETTINGS        (SETTINGS_MOUSE |\
-                                     SETTINGS_STYLE | SETTINGS_MISC |\
-                                     SETTINGS_SOUND |\
-                                     SETTINGS_HELP |\
-                                     SETTINGS_LOCALE | SETTINGS_UILOCALE )
-#define SETTINGS_IN_UPDATE_SETTINGS ((sal_uLong)0x00000800)   // this flag indicates that the data changed event was created
+const int SETTINGS_MOUSE = 0x00000001;
+const int SETTINGS_STYLE = 0x00000002;
+const int SETTINGS_MISC = 0x00000004;
+const int SETTINGS_SOUND = 0x00000008;
+const int SETTINGS_HELP = 0x00000010;
+const int SETTINGS_LOCALE = 0x00000020;
+const int SETTINGS_UILOCALE = 0x00000040;
+const int SETTINGS_ALLSETTINGS =   ( SETTINGS_MOUSE |
+                                     SETTINGS_STYLE | SETTINGS_MISC |
+                                     SETTINGS_SOUND |
+                                     SETTINGS_HELP |
+                                     SETTINGS_LOCALE | SETTINGS_UILOCALE );
+const int SETTINGS_IN_UPDATE_SETTINGS = 0x00000800;   // this flag indicates that the data changed event was created
                                                           // in Windows::UpdateSettings probably because of a global
                                                           // settings changed
 


More information about the Libreoffice-commits mailing list