diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-12-03 09:23:43 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-12-03 09:23:43 +0100 |
commit | 44a6eee8e0b7c62685ebabea1fd9baee17cf62a6 (patch) | |
tree | 33d0de19d12dc91864d0fb42bb559e914d724226 /vcl/source/gdi | |
parent | d20dff1409fc00e783519cfc0065c6311bb914fb (diff) |
Call getLineBreak with null XHyphenator unless TEXT_DRAW_WORDBREAK_HYPHENATION
So no longer instantiate XLinguServiceManager (which might e.g. bootstrap
Python) unless explicitly requested, which e.g. removes a noticable delay when
switching to the Options dialog's "Security" page (which causes size
calculations of FixedText controls that use TEXT_DRAW_WORDBREAK but not
TEXT_DRAW_WORDBREAK_HYPHENATION).
Change-Id: Ib0a28d3d7d7718faf6df7a138f5a86b8b2fd7713
Diffstat (limited to 'vcl/source/gdi')
-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 afe06f706b52..0543eb59332b 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -4679,8 +4679,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(); @@ -4712,7 +4714,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. |