diff options
Diffstat (limited to 'svx/source/dialog/fntctrl.cxx')
-rw-r--r-- | svx/source/dialog/fntctrl.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index d520fff34bfd..d32ef0aa171d 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -656,6 +656,8 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) pImpl->aText = GetText(); else if ( !pImpl->bSelection && !pImpl->bTextInited ) { + using namespace com::sun::star::i18n::ScriptType; + SfxViewShell* pSh = SfxViewShell::Current(); if ( pSh && !pImpl->bGetSelection && !pImpl->bUseFontNameAsText ) @@ -668,8 +670,6 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) if ( !pImpl->bSelection || pImpl->bUseFontNameAsText ) { - using namespace com::sun::star::i18n::ScriptType; - //If we're showing multiple sample texts, then they're all //sample texts. If only showing Latin, continue to use //the fontname as the preview @@ -696,6 +696,11 @@ void SvxFontPrevWindow::Paint( const Rectangle& ) if ( !pImpl->aText.Len() ) pImpl->aText = GetText(); + if (!pImpl->aText.Len()) + { // fdo#58427: still no text? let's try that one... + pImpl->aText = makeRepresentativeTextForFont(LATIN, rFont); + } + // remove line feeds and carriage returns from string bool bNotEmpty = false; for ( xub_StrLen i = 0; i < pImpl->aText.Len(); ++i ) |