[Libreoffice-commits] core.git: desktop/source include/vcl vcl/source

Chris Sherlock chris.sherlock79 at gmail.com
Thu Jan 23 01:38:00 PST 2014


 desktop/source/app/app.cxx  |    9 +--------
 include/vcl/settings.hxx    |    6 ++++--
 vcl/source/app/settings.cxx |    5 +----
 3 files changed, 6 insertions(+), 14 deletions(-)

New commits:
commit 99dafea3e56e5d2b559352896a509bf7fa0fdab5
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date:   Wed Jan 22 18:24:55 2014 +1100

    Move defines into settings.hxx
    
    For some unknown reason, there are a bunch of defines in the middle of
    Desktop::SystemSettingsChanging() that should really be in
    include/vcl/settings.hxx. I have now moved DRAG_OPTIONS_ALL into
    settings.hxx but entirely removed DRAG_OPTIONS_NONE because it is
    confusing. I also removed it in the one place this combination of options
    is used in the Desktop class.
    
    I have also removed the options DRAG_OPTIONS_OBJECT_* from settings.hxx
    because they are used nowhere in the code. I have carefully looked
    through the code and nothing flips bits 0x00000004 or 0x00000008 on
    the private member of ImplStyleData's mnDragFullOptions in any way.
    Basically, it is safe to remove.
    
    Change-Id: Icf6268f940cfaed271bd43c977473fecfc726949
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 8c0fe6a..9b32f6c 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1938,13 +1938,6 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings )
     if ( !SvtTabAppearanceCfg::IsInitialized () )
         return;
 
-#   define DRAGFULL_OPTION_ALL \
-         ( DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE  \
-         | DRAGFULL_OPTION_OBJECTMOVE  | DRAGFULL_OPTION_OBJECTSIZE \
-         | DRAGFULL_OPTION_DOCKING     | DRAGFULL_OPTION_SPLIT      \
-         | DRAGFULL_OPTION_SCROLL )
-#   define DRAGFULL_OPTION_NONE ((sal_uInt32)~DRAGFULL_OPTION_ALL)
-
     StyleSettings hStyleSettings   = rSettings.GetStyleSettings();
     MouseSettings hMouseSettings = rSettings.GetMouseSettings();
 
@@ -1958,7 +1951,7 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings )
         nDragFullOptions |= DRAGFULL_OPTION_ALL;
         break;
     case DragFrame:
-        nDragFullOptions &= DRAGFULL_OPTION_NONE;
+        nDragFullOptions &= ((sal_uInt32)~DRAGFULL_OPTION_ALL);
         break;
     case DragSystemDep:
     default:
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 6f670fd..ed9e617 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -388,11 +388,13 @@ private:
 
 #define DRAGFULL_OPTION_WINDOWMOVE  ((sal_uLong)0x00000001)
 #define DRAGFULL_OPTION_WINDOWSIZE  ((sal_uLong)0x00000002)
-#define DRAGFULL_OPTION_OBJECTMOVE  ((sal_uLong)0x00000004)
-#define DRAGFULL_OPTION_OBJECTSIZE  ((sal_uLong)0x00000008)
 #define DRAGFULL_OPTION_DOCKING     ((sal_uLong)0x00000010)
 #define DRAGFULL_OPTION_SPLIT       ((sal_uLong)0x00000020)
 #define DRAGFULL_OPTION_SCROLL      ((sal_uLong)0x00000040)
+#define DRAGFULL_OPTION_ALL \
+    ( DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE  \
+    | DRAGFULL_OPTION_DOCKING     | DRAGFULL_OPTION_SPLIT      \
+    | DRAGFULL_OPTION_SCROLL )
 
 #define LOGO_DISPLAYTIME_STARTTIME  ((sal_uLong)0xFFFFFFFF)
 
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 8f2d0c1..fe1456b 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -221,10 +221,7 @@ ImplStyleData::ImplStyleData() :
     mnScreenZoom                = 100;
     mnScreenFontZoom            = 100;
     mnLogoDisplayTime           = LOGO_DISPLAYTIME_STARTTIME;
-    mnDragFullOptions           = DRAGFULL_OPTION_WINDOWMOVE | DRAGFULL_OPTION_WINDOWSIZE |
-                                  DRAGFULL_OPTION_OBJECTMOVE | DRAGFULL_OPTION_OBJECTSIZE |
-                                  DRAGFULL_OPTION_DOCKING    | DRAGFULL_OPTION_SPLIT      |
-                                  DRAGFULL_OPTION_SCROLL;
+    mnDragFullOptions           = DRAGFULL_OPTION_ALL;
     mnAnimationOptions          = 0;
     mnSelectionOptions          = 0;
     mnDisplayOptions            = 0;


More information about the Libreoffice-commits mailing list