[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Sat Aug 17 04:08:45 PDT 2013
vcl/source/edit/texteng.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 28bff60322098e0238f369feefc50ee524ba66f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Aug 17 12:06:24 2013 +0100
defer GetBreakIterator as long as possible
Change-Id: Ib149c5cfd20e63b60c997eaa8ae2e6fa2c172beb
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 65660ec..0de2ffd 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -641,7 +641,6 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque
sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const
{
- uno::Reference< i18n::XBreakIterator > xBI = ((TextEngine *) this)->GetBreakIterator();
SvtCTLOptions aCTLOptions;
// get the index that really is first
@@ -650,11 +649,16 @@ sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextS
if (nMaxPos < nFirstPos)
nFirstPos = nMaxPos;
- sal_Bool bIsSequenceChecking =
+ bool bIsSequenceChecking =
aCTLOptions.IsCTLFontEnabled() &&
aCTLOptions.IsCTLSequenceChecking() &&
- nFirstPos != 0 && /* first char needs not to be checked */
- xBI.is() && i18n::ScriptType::COMPLEX == xBI->getScriptType( OUString( c ), 0 );
+ nFirstPos != 0; /* first char needs not to be checked */
+
+ if (bIsSequenceChecking)
+ {
+ uno::Reference< i18n::XBreakIterator > xBI = const_cast<TextEngine *>(this)->GetBreakIterator();
+ bIsSequenceChecking = xBI.is() && i18n::ScriptType::COMPLEX == xBI->getScriptType( OUString( c ), 0 );
+ }
return bIsSequenceChecking;
}
More information about the Libreoffice-commits
mailing list