summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2014-01-22 18:45:19 +1100
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-01-22 14:19:55 +0000
commit4959f369d9bdcc2ab50cd4a70ad96a4a4fa17c76 (patch)
treeeac2987b3598fc898af73aa033a1cf0181aa776c /desktop
parent930202b0b239636532bda471cc51d4750e09536f (diff)
Improve settings code reability
Application::SetSettings relies on Application::GetSettings to initialize the application's settings if this hasn't happened. This means that GetSettings is being used not to get the app's settings, but to initialize the settings! I have corrected this by introducing a private static function InitSettings(). Note that I assert if it attempts to initialize already initialized settings, because the (Get|Set)Settings does the check for you. Also changed a local variable from nGet to nDragMode in Desktop::SystemSettingsChanging to make it easier to read the code. Whilst this is minor, a variable name of "nGet" seems very sloppy. Change-Id: I04975217c2028b3489179997db4287957578cc93 Reviewed-on: https://gerrit.libreoffice.org/7586 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 962e2b4e1984..8c0fe6aa0654 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1951,8 +1951,8 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings )
sal_uInt32 nDragFullOptions = hStyleSettings.GetDragFullOptions();
SvtTabAppearanceCfg aAppearanceCfg;
- sal_uInt16 nGet = aAppearanceCfg.GetDragMode();
- switch ( nGet )
+ sal_uInt16 nDragMode = aAppearanceCfg.GetDragMode();
+ switch ( nDragMode )
{
case DragFullWindow:
nDragFullOptions |= DRAGFULL_OPTION_ALL;