diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-05-08 01:10:13 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-05-10 23:43:56 +0200 |
commit | 965494c544dd8f35ae83b7cf38549009da06c367 (patch) | |
tree | 75e86a28b9d39b60685df4d6ea46c2ec9d5ee97c | |
parent | 2ba23eb0a1b3269b0ee6a4e50833000b20e65342 (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
Reviewed-on: https://gerrit.libreoffice.org/37362
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
-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 9a80710e404e..045581c3d4ba 100644 --- a/sc/source/core/tool/autoform.cxx +++ b/sc/source/core/tool/autoform.cxx @@ -911,6 +911,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 ) ) |