diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-28 20:54:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-29 09:26:34 +0200 |
commit | 7f1c2b6ccf318d3b6bbf46f6559b2a3017a72821 (patch) | |
tree | 0ba4b4a50e5744c6eb9ff7783ae904c69bd02245 /oox/source/drawingml/textfont.cxx | |
parent | 16d43b7c5396d6382926d514dc9ce10b3ce94cba (diff) |
pptx using Wingdings didn't fallback to OpenSymbol
<a:sym typeface="Wingdings" pitchFamily="2" charset="2"/>
^
The charset indicating that it was symbol encoded wasn't
applied.
There are quite a few uses of GetFontData so make this
an optional request and only apply it right now to the
problematic case.
Change-Id: Ie1c4b9ac38c2bf5f0867d64eddea853a6dd05aad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156230
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'oox/source/drawingml/textfont.cxx')
-rw-r--r-- | oox/source/drawingml/textfont.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/oox/source/drawingml/textfont.cxx b/oox/source/drawingml/textfont.cxx index 1ac57258a7da..40cd842f945a 100644 --- a/oox/source/drawingml/textfont.cxx +++ b/oox/source/drawingml/textfont.cxx @@ -76,18 +76,20 @@ void TextFont::assignIfUsed( const TextFont& rTextFont ) *this = rTextFont; } -bool TextFont::getFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily, const XmlFilterBase& rFilter ) const +bool TextFont::getFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily, bool* pbSymbol, const XmlFilterBase& rFilter ) const { if( const Theme* pTheme = rFilter.getCurrentTheme() ) if( const TextFont* pFont = pTheme->resolveFont( maTypeface ) ) - return pFont->implGetFontData( rFontName, rnFontPitch, rnFontFamily ); - return implGetFontData( rFontName, rnFontPitch, rnFontFamily ); + return pFont->implGetFontData( rFontName, rnFontPitch, rnFontFamily, pbSymbol ); + return implGetFontData( rFontName, rnFontPitch, rnFontFamily, pbSymbol ); } -bool TextFont::implGetFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily ) const +bool TextFont::implGetFontData( OUString& rFontName, sal_Int16& rnFontPitch, sal_Int16& rnFontFamily, bool* pbSymbol ) const { rFontName = maTypeface; resolvePitch(mnPitchFamily, rnFontPitch, rnFontFamily); + if (pbSymbol) + *pbSymbol = mnCharset == WINDOWS_CHARSET_SYMBOL; return !rFontName.isEmpty(); } |