diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/outdev3.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index a8cb7fc5e674..d7078881b8ca 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -4729,8 +4729,10 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, // get service provider uno::Reference< uno::XComponentContext > xContext( comphelper::getProcessComponentContext() ); + bool bHyphenate = (nStyle & TEXT_DRAW_WORDBREAK_HYPHENATION) + == TEXT_DRAW_WORDBREAK_HYPHENATION; uno::Reference< linguistic2::XHyphenator > xHyph; - if ( nStyle & TEXT_DRAW_WORDBREAK ) + if ( bHyphenate ) { uno::Reference< linguistic2::XLinguServiceManager2> xLinguMgr = linguistic2::LinguServiceManager::create(xContext); xHyph = xLinguMgr->getHyphenator(); @@ -4762,7 +4764,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, nBreakPos = (xub_StrLen)aLBR.breakIndex; if ( nBreakPos <= nPos ) nBreakPos = nSoftBreak; - if ( (nStyle & TEXT_DRAW_WORDBREAK_HYPHENATION) == TEXT_DRAW_WORDBREAK_HYPHENATION ) + if ( bHyphenate ) { // Whether hyphen or not: Put the word after the hyphen through // word boundary. |