diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-08-31 19:17:33 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-09-06 12:12:28 +0200 |
commit | 04ee8ea4bd129fada31f91d7fa4784eab12894d0 (patch) | |
tree | c5f7a8e27daca414a167ddef6a8aed9361c655c2 /sw | |
parent | c49faa1447801a885fd0c25910a4a5d7ea24ed77 (diff) |
Remove unneeded local scope
Change-Id: I51fe6e130006fdca547abe99a44117f710d1e776
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/porfld.cxx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index aed4bc8c348e..80cde639a9e5 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -192,25 +192,22 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && g_pBreakIt->GetBreakIter().is() ) { sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual(); - sal_uInt16 nScript; + sal_uInt16 nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 ); + sal_Int32 nChg = 0; + if( i18n::ScriptType::WEAK == nScript ) { - nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, 0 ); - sal_Int32 nChg = 0; - if( i18n::ScriptType::WEAK == nScript ) - { - nChg = g_pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript); - if (nChg < aTxt.getLength() && nChg >= 0) - nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg ); - } + nChg = g_pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript); + if (nChg < aTxt.getLength() && nChg >= 0) + nScript = g_pBreakIt->GetBreakIter()->getScriptType( aTxt, nChg ); + } - // nNextScriptChg will be evaluated during SwFldPortion::Format() + // nNextScriptChg will be evaluated during SwFldPortion::Format() - if (nChg < aTxt.getLength() && nChg >= 0) - nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript ); - else - nNextScriptChg = aTxt.getLength(); + if (nChg < aTxt.getLength() && nChg >= 0) + nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript ); + else + nNextScriptChg = aTxt.getLength(); - } sal_uInt8 nTmp; switch ( nScript ) { case i18n::ScriptType::LATIN : nTmp = SW_LATIN; break; |