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

Caolán McNamara caolanm at redhat.com
Sat Apr 18 12:50:10 PDT 2015


 sc/source/filter/excel/xestyle.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit a5f76a11ec9eb9640e792056ef0629cffa1a2d12
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Apr 18 20:45:02 2015 +0100

    fix 500+ new assert failures on export
    
    soffice.bin: svl/source/config/languageoptions.cxx:167:
    
    static SvtScriptType SvtLanguageOptions::FromI18NToSvtScriptType(sal_Int16):
    Assertion `false && nI18NType && "Unknown i18n::ScriptType"' failed.
    
    assert is new since...
    
    commit a7b7c64afc523cfd9ff4e724b3efbec6567fc1c8
    Author: Noel Grandin <noel at peralex.com>
    Date:   Wed Apr 15 09:36:39 2015 +0200
    
        convert SCRIPTTYPE_ constants to scoped enum
    
    this fix seems sane.
    
    Change-Id: Ic308bd34ac4ac76dd9e679f4387eb3ccea7a46c1

diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 2ecc39d..f04240d 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -874,6 +874,15 @@ sal_Int16 XclExpFontHelper::GetFirstUsedScript( const XclExpRoot& rRoot, const S
         pCurrSet = pCurrSet->GetParent();
     }
 
+    if (nScript == 0)
+        nScript = nDefScript;
+
+    if (nScript == 0)
+    {
+        OSL_FAIL( "XclExpFontHelper::GetFirstUsedScript - unknown script type" );
+        nScript = ApiScriptType::LATIN;
+    }
+
     return nScript;
 }
 


More information about the Libreoffice-commits mailing list