diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-05-08 01:10:13 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-05-16 10:16:36 +0200 |
commit | e19336c7cb806b76488b0522c52519601635061a (patch) | |
tree | b2f4d55fe1c51e2e7f4201999389850942390c9c /sc/source | |
parent | ed508772174055041b409af25c5168f021cc1cad (diff) |
tdf#107572: retrieve Default autoformat
by fixing DefaultFirstEntry comparison operator.
From http://www.cplusplus.com/reference/map/map/key_comp/:
"...
Two keys are considered equivalent if key_comp returns false reflexively
(i.e., no matter the order in which the keys are passed as arguments).
..."
Certainly regression from:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=652158c3f2c9cd0d6f71ecd14bf5d5cc02a71b50
author Julien Nabet <serval2412@yahoo.fr> 2015-09-15 19:41:48 (GMT)
committer Julien Nabet <serval2412@yahoo.fr> 2015-09-30 12:11:35 (GMT)
commit 652158c3f2c9cd0d6f71ecd14bf5d5cc02a71b50 (patch)
tree 13ad29a110565f24e7010a68d902cadf1c441b62
parent 8727afe771a3e4d585e98ca9cceff2504e500bb0 (diff)
tdf#94173: Calc doesn't save your own created autoformat presets
This new patch has also been tested for tdf#94173
Change-Id: I60de5fffe39be9b3615c32a317611812b42bafc7
(cherry picked from commit 965494c544dd8f35ae83b7cf38549009da06c367)
Reviewed-on: https://gerrit.libreoffice.org/37487
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit 9fd3f402e7a6dfe133433d05de7452f32e1c41ba)
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/autoform.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx index 4966475d3180..9708daa13dcb 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -912,6 +912,8 @@ ScAutoFormat::ScAutoFormat() : bool DefaultFirstEntry::operator() (const OUString& left, const OUString& right) const { OUString aStrStandard(ScGlobal::GetRscString(STR_STYLENAME_STANDARD)); + if (ScGlobal::GetpTransliteration()->isEqual( left, right ) ) + return false; if ( ScGlobal::GetpTransliteration()->isEqual( left, aStrStandard ) ) return true; if ( ScGlobal::GetpTransliteration()->isEqual( right, aStrStandard ) ) |