diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-12 12:58:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-12 13:31:18 +0100 |
commit | a3c43e21114289ee4d5c5331ff62daefc789fc19 (patch) | |
tree | bc66433eda2fde8a829d2ebd61b5c7dc54abb1e0 /svtools | |
parent | b3ec98dea6e59dcc0c94aeece0e4f8e35430a86a (diff) |
only suggest text samples we can render
Change-Id: Iebeb98ed2959bd4424f3f271f01a5809a03fdd70
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index cf07a2a33267..94ec4d7c460d 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -476,7 +476,6 @@ rtl::OUString makeRepresentativeTextForScript(UScriptCode eScript) if (sSampleText.isEmpty()) sSampleText = makeShortRepresentativeTextForScript(eScript); return sSampleText; - } rtl::OUString makeShortMinimalTextForScript(UScriptCode eScript) @@ -1497,9 +1496,9 @@ rtl::OUString makeRepresentativeTextForFont(sal_Int16 nScriptType, const Font &r { rtl::OUString sRet(makeRepresentativeTextForLanguage(rFont.GetLanguage())); - if (sRet.isEmpty()) + VirtualDevice aDevice; + if (sRet.isEmpty() || (STRING_LEN != aDevice.HasGlyphs(rFont, sRet))) { - VirtualDevice aDevice; aDevice.SetFont(rFont); vcl::FontCapabilities aFontCapabilities; if (aDevice.GetFontCapabilities(aFontCapabilities)) |