diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-08-01 10:08:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-08-01 13:03:14 +0200 |
commit | 879c1c398ffdd00b7a9e9cc3cbe26e1aa263e00d (patch) | |
tree | c41e2fe73fcd16c7765afcd85e709e51e4cdb6d5 /svx/source | |
parent | 871035d72aa0d59b42997056b16d889dd1371ce8 (diff) |
Related: tdf#108655 only write to config if values changed
Change-Id: I6ba001745638dc2b8ce091d717915e334ece4b04
Reviewed-on: https://gerrit.libreoffice.org/40623
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index b9e14521af6e..6e77ff700521 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -206,9 +206,13 @@ void PaletteManager::SetPalette( sal_Int32 nPos ) } } } - std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context)); - officecfg::Office::Common::UserColors::PaletteName::set(GetPaletteName(), batch); - batch->commit(); + OUString aPaletteName(officecfg::Office::Common::UserColors::PaletteName::get()); + if (aPaletteName != GetPaletteName()) + { + std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create(m_context)); + officecfg::Office::Common::UserColors::PaletteName::set(GetPaletteName(), batch); + batch->commit(); + } } sal_Int32 PaletteManager::GetPalette() |