From e63a0d5657c7b9c7431525ba669b3edab0e56af3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 18 Oct 2013 15:36:28 +0100 Subject: Related: rhbz#1020712 wrong default font shown in editengine Only in editengine could we have this fiasco. There are two ImpEditEngine::GetScriptType's a) sal_uInt16 ImpEditEngine::GetScriptType(const EditPaM& rPaM, sal_uInt16* pEndPos) const this one returns i18n::ScriptType b) sal_uInt16 ImpEditEngine::GetScriptType(const EditSelection& rSel) const this one returns SCRIPTTYPE Could there be a better way to ensure that mistakes will be made. Anyway, within variant b, with an empty edit engine ImpEditEngine::GetScriptType calls GetI18NScriptTypeOfLanguage but *that* returns i18n::ScriptType's not SCRIPTTYPEs but when there is content then a SCRIPTTYPE is truly returned. Change-Id: I3a4a7c8746728e0fdfb25d961004c8339a24c93d --- editeng/source/editeng/impedit2.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 515842ee9360..e7dbdc65b546 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -1828,7 +1828,7 @@ sal_uInt16 ImpEditEngine::GetScriptType( const EditSelection& rSel ) const } } } - return nScriptType ? nScriptType : GetI18NScriptTypeOfLanguage( GetDefaultLanguage() ); + return nScriptType ? nScriptType : SvtLanguageOptions::GetScriptTypeOfLanguage( GetDefaultLanguage() ); } sal_Bool ImpEditEngine::IsScriptChange( const EditPaM& rPaM ) const -- cgit