[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - include/vcl vcl/source

Noel Grandin noel at peralex.com
Wed Aug 5 02:42:04 PDT 2015


 include/vcl/settings.hxx    |    3 ++-
 vcl/source/app/settings.cxx |   13 ++++++++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 1b556192d5cf43a2505755d98c96d48bf841e9da
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Aug 3 11:12:08 2015 +0200

    tdf#92788 - Middle Button on Mouse Paste Option Broken for X11
    
    cherry-pick from master
    
    caused by commit 5333782d090a9e147c0c431f0f741863d1d8cf8e
    "convert SETTINGS_ #defines to 'enum class'"
    
    Change-Id: Id0c2738a61f73223f6c8716f04a619c8cb84c0a9
    Reviewed-on: https://gerrit.libreoffice.org/17493
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 965d470..006e758 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -679,13 +679,14 @@ public:
 
 enum class AllSettingsFlags {
     NONE     = 0x0000,
+    MOUSE    = 0x0001,
     STYLE    = 0x0002,
     MISC     = 0x0004,
     LOCALE   = 0x0020,
 };
 namespace o3tl
 {
-    template<> struct typed_flags<AllSettingsFlags> : is_typed_flags<AllSettingsFlags, 0x026> {};
+    template<> struct typed_flags<AllSettingsFlags> : is_typed_flags<AllSettingsFlags, 0x0027> {};
 }
 
 class VCL_DLLPUBLIC AllSettings
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 3d6f3c1..638f9e8 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2706,7 +2706,8 @@ ImplAllSettingsData::ImplAllSettingsData()
         maLocale( LANGUAGE_SYSTEM ),
         maUILocale( LANGUAGE_SYSTEM )
 {
-    mnWindowUpdate              = AllSettingsFlags::STYLE | AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
+    mnWindowUpdate              = AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE |
+                                  AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
     mpLocaleDataWrapper         = NULL;
     mpUILocaleDataWrapper       = NULL;
     mpI18nHelper                = NULL;
@@ -2768,6 +2769,16 @@ AllSettingsFlags AllSettings::Update( AllSettingsFlags nFlags, const AllSettings
 
     AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE;
 
+    if ( nFlags & AllSettingsFlags::MOUSE )
+    {
+        if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
+        {
+            CopyData();
+            mxData->maMouseSettings = rSet.mxData->maMouseSettings;
+            nChangeFlags |= AllSettingsFlags::MOUSE;
+        }
+    }
+
     if ( nFlags & AllSettingsFlags::STYLE )
     {
         if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )


More information about the Libreoffice-commits mailing list