diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-20 17:00:59 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-27 14:00:41 +0200 |
commit | eab5cb71c7b2800e221005c4ed39b2815e1f5487 (patch) | |
tree | 0e7e1bef6910b312948e5423b9f091c6dae432b7 /sw/source/ui/chrdlg | |
parent | 44fbecbfe297cefcc844ca2071fbf017777dd4c3 (diff) |
Simplify loop
Change-Id: I787f3bd98d3d32ba8a24c235a311d8d150d5bdd1
Diffstat (limited to 'sw/source/ui/chrdlg')
-rw-r--r-- | sw/source/ui/chrdlg/drpcps.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index 5a6f430d064e..9d485afbe4cd 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -424,16 +424,14 @@ void SwDropCapsPict::CheckScript( void ) nScript = css::i18n::ScriptType::LATIN; } - do + for(;;) { nChg = xBreak->endOfScript( maText, nChg, nScript ); maScriptChanges.push_back( _ScriptInfo(0, nScript, nChg) ); - - if( nChg < maText.getLength() ) - nScript = xBreak->getScriptType( maText, nChg ); - else + if( nChg >= maText.getLength() ) break; - } while( true ); + nScript = xBreak->getScriptType( maText, nChg ); + } } Size SwDropCapsPict::CalcTextSize( void ) |