Kaydet (Commit) 04ee8ea4 authored tarafından Matteo Casalin's avatar Matteo Casalin

Remove unneeded local scope

Change-Id: I51fe6e130006fdca547abe99a44117f710d1e776
üst c49faa14
...@@ -192,25 +192,22 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf ) ...@@ -192,25 +192,22 @@ void SwFldPortion::CheckScript( const SwTxtSizeInfo &rInf )
if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && g_pBreakIt->GetBreakIter().is() ) if( GetExpTxt( rInf, aTxt ) && !aTxt.isEmpty() && g_pBreakIt->GetBreakIter().is() )
{ {
sal_uInt8 nActual = pFnt ? pFnt->GetActual() : rInf.GetFont()->GetActual(); 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 ); nChg = g_pBreakIt->GetBreakIter()->endOfScript(aTxt,0,nScript);
sal_Int32 nChg = 0; if (nChg < aTxt.getLength() && nChg >= 0)
if( i18n::ScriptType::WEAK == nScript ) 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) if (nChg < aTxt.getLength() && nChg >= 0)
nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript ); nNextScriptChg = g_pBreakIt->GetBreakIter()->endOfScript( aTxt, nChg, nScript );
else else
nNextScriptChg = aTxt.getLength(); nNextScriptChg = aTxt.getLength();
}
sal_uInt8 nTmp; sal_uInt8 nTmp;
switch ( nScript ) { switch ( nScript ) {
case i18n::ScriptType::LATIN : nTmp = SW_LATIN; break; case i18n::ScriptType::LATIN : nTmp = SW_LATIN; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment