[Libreoffice-commits] core.git: Branch 'libreoffice-4-1' - editeng/source
Caolán McNamara
caolanm at redhat.com
Tue Oct 29 01:22:17 CET 2013
editeng/source/editeng/impedit2.cxx | 2 +-
editeng/source/editeng/impedit4.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit f046aec9ea6bfe1f1fe2c5b2ecebe05d15a5176e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Oct 18 15:36:28 2013 +0100
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
(cherry picked from commit e63a0d5657c7b9c7431525ba669b3edab0e56af3)
Related: rhbz#1020712 more i18n::ScriptType being compared against SCRIPTTYPE
Change-Id: I5da9114a3fd8330df2b63dc9187323765d305791
(cherry picked from commit b57ffef61afd61b57087150b1a9245e21079e15b)
Reviewed-on: https://gerrit.libreoffice.org/6363
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 4bc6d70..c613e8d 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1813,7 +1813,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
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 39e8156..5e0fa09 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2124,7 +2124,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
rEditView.pImpEditView->SetEditSelection( aCurrentOldPosition->Max() );
}
- sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE;
switch(nScriptType)
{
@@ -2171,7 +2171,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
LanguageType eCurLanguage = GetLanguage( aCurrentPaM );
if(eCurLanguage != aCurrentNewPortion->eLanguage)
{
- sal_uInt16 nScriptType = GetI18NScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
+ sal_uInt16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( aCurrentNewPortion->eLanguage );
sal_uInt16 nLangWhichId = EE_CHAR_LANGUAGE;
switch(nScriptType)
{
More information about the Libreoffice-commits
mailing list