From 99dafea3e56e5d2b559352896a509bf7fa0fdab5 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Wed, 22 Jan 2014 18:24:55 +1100 Subject: 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 --- desktop/source/app/app.cxx | 9 +-------- include/vcl/settings.hxx | 6 ++++-- vcl/source/app/settings.cxx | 5 +---- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 8c0fe6aa0654..9b32f6cf1b68 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 6f670fd11c79..ed9e617f3810 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 8f2d0c17f90f..fe1456bdef07 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; -- cgit