[Libreoffice-commits] core.git: sc/source

Julien Nabet serval2412 at yahoo.fr
Wed May 10 21:44:35 UTC 2017


 sc/source/core/tool/autoform.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 965494c544dd8f35ae83b7cf38549009da06c367
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon May 8 01:10:13 2017 +0200

    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 at yahoo.fr>      2015-09-15 19:41:48 (GMT)
    committer       Julien Nabet <serval2412 at 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 at libreoffice.org>
    Reviewed-by: Eike Rathke <erack at redhat.com>

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 ) )


More information about the Libreoffice-commits mailing list