diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index e9928a85f1e5..42f5cf81cfae 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5591,7 +5591,9 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T } if ( GetAttrib( PPT_CharAttr_FontHeight, nVal, nDestinationInstance ) ) // Font size in Point { - sal_uInt32 nHeight = rManager.ScalePoint( nVal ); + constexpr sal_uInt32 MIN_FONT_HEIGHT_PT = 2; + sal_uInt32 nHeight = rManager.ScalePoint(std::max(nVal, MIN_FONT_HEIGHT_PT)); + rSet.Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT ) ); rSet.Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CJK ) ); rSet.Put( SvxFontHeightItem( nHeight, 100, EE_CHAR_FONTHEIGHT_CTL ) ); diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7bbc068a7eb5..6f1a75ee9b10 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2681,6 +2681,8 @@ void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool } } + assert(nSize >= 200 && "Minimum accepted value for fontsize(ST_TextFontSize) is 200"); + mpFS->startElementNS( XML_a, nElement, XML_lang, sax_fastparser::UseIf(usLanguage, !usLanguage.isEmpty()), XML_sz, OString::number(nSize),