diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-29 08:39:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-08-29 11:07:39 +0200 |
commit | 7cdefb880ed6fd413b9e31fa45352cdeb074a24f (patch) | |
tree | fe217d6fc554d8c2c93704b16ff7242267cfc3fe /oox | |
parent | 5eea6974d937148a9a1f3d078c2174fe8d420d31 (diff) |
supplement setting SYMBOL encoded charset with SymbolFont flag
as well as using the well-known symbol font names
Change-Id: I2d0eb28ca89a74ae467f29a1173807b3b83bf4a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156234
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/textparagraphproperties.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/oox/source/drawingml/textparagraphproperties.cxx b/oox/source/drawingml/textparagraphproperties.cxx index 9dd3a6c3c181..f011878f3dbf 100644 --- a/oox/source/drawingml/textparagraphproperties.cxx +++ b/oox/source/drawingml/textparagraphproperties.cxx @@ -314,19 +314,22 @@ void BulletList::pushToPropMap( const ::oox::core::XmlFilterBase* pFilterBase, P if( pFilterBase) { bool bFollowTextFont = false; mbBulletFontFollowText >>= bFollowTextFont; - if (!bFollowTextFont && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, nullptr, *pFilterBase ) ) + if (!bFollowTextFont && maBulletFont.getFontData( aBulletFontName, nBulletFontPitch, nBulletFontFamily, &bSymbolFont, *pFilterBase ) ) { FontDescriptor aFontDesc; sal_Int16 nFontSize = 0; if( mnFontSize >>= nFontSize ) aFontDesc.Height = nFontSize; - // TODO either use getFontData encoding hint, or move this to the TextFont struct. + // TODO It is likely that bSymbolFont from getFontData is sufficient to check here + // and looking at the font name is not necessary, if it is necessary then moving + // the name lookup into getFontData is likely the best fix aFontDesc.Name = aBulletFontName; aFontDesc.Pitch = nBulletFontPitch; aFontDesc.Family = nBulletFontFamily; aFontDesc.Weight = nBulletFontWeight; - if ( aBulletFontName.equalsIgnoreAsciiCase("Wingdings") || + if ( bSymbolFont || + aBulletFontName.equalsIgnoreAsciiCase("Wingdings") || aBulletFontName.equalsIgnoreAsciiCase("Wingdings 2") || aBulletFontName.equalsIgnoreAsciiCase("Wingdings 3") || aBulletFontName.equalsIgnoreAsciiCase("Monotype Sorts") || |