summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-05-08 01:10:13 +0200
committerEike Rathke <erack@redhat.com>2017-05-11 16:17:09 +0200
commit9fd3f402e7a6dfe133433d05de7452f32e1c41ba (patch)
tree670feec4dd528aaa1717baf4d2e5c0d581cd97c8
parent2ff893426093652221a8602e71c7924c46d3386f (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>
-rw-r--r--sc/source/core/tool/autoform.cxx2
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 ) )