diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-20 15:58:24 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-22 17:53:24 +0000 |
commit | 84c7efb4aebbfcd2526e9f73f023bbda3c11a75c (patch) | |
tree | b644c0618dd8ead61902e28741bc6d64a9b2d892 /svtools | |
parent | ae033e72144645bb86e70071acc6bf7e2f0dda80 (diff) |
Convert DragMode to scoped enum
Change-Id: I68dafefc74bad355047738605defd97f3c6bebcd
Reviewed-on: https://gerrit.libreoffice.org/25209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/apearcfg.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/svtools/source/config/apearcfg.cxx b/svtools/source/config/apearcfg.cxx index 378eb7f38ab8..dffd584c2d23 100644 --- a/svtools/source/config/apearcfg.cxx +++ b/svtools/source/config/apearcfg.cxx @@ -25,7 +25,7 @@ #include <vcl/svapp.hxx> #include <sal/macros.h> -#define DEFAULT_DRAGMODE 2 +#define DEFAULT_DRAGMODE DragMode::SystemDep #define DEFAULT_SNAPMODE 0 #define DEFAULT_SCALEFACTOR 100 #if defined UNX @@ -64,7 +64,13 @@ SvtTabAppearanceCfg::SvtTabAppearanceCfg() switch(nProp) { case 0: *pValues >>= nScaleFactor; break; //"FontScaling", - case 1: *pValues >>= nDragMode; break; //"Window/Drag", + case 1: //"Window/Drag" + { + short nTmp; + if (*pValues >>= nTmp) + nDragMode = (DragMode)nTmp; + break; + } case 2: bMenuMouseFollow = *static_cast<sal_Bool const *>(pValues->getValue()); break; //"Menu/FollowMouse", case 3: *pValues >>= nSnapMode; break; //"Dialog/MousePositioning", case 4: { short nTmp = 0; *pValues >>= nTmp; nMiddleMouse = static_cast<MouseMiddleButtonAction>(nTmp); break; } //"Dialog/MiddleMouseButton", @@ -121,7 +127,7 @@ void SvtTabAppearanceCfg::ImplCommit() switch(nProp) { case 0: pValues[nProp] <<= nScaleFactor; break; // "FontScaling", - case 1: pValues[nProp] <<= nDragMode; break; //"Window/Drag", + case 1: pValues[nProp] <<= (short)nDragMode; break; //"Window/Drag", case 2: pValues[nProp] <<= bMenuMouseFollow; break; //"Menu/FollowMouse", case 3: pValues[nProp] <<= nSnapMode; break; //"Dialog/MousePositioning", case 4: pValues[nProp] <<= static_cast<short>(nMiddleMouse); break; //"Dialog/MiddleMouseButton", |