From d4ae0d8d30e10f7e194a06c540cac1f33a4fe0ba Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Tue, 15 Oct 2013 11:47:11 +0200 Subject: HTML: always export CSS option for font size This removes some kind of a hack. Before this commit the CSS option was only exported if the size didn't fit any HTML size option. Maybe size could be dropped in the future. Old: Text 1 Text 2 New: Text 1 Text 2 Change-Id: I360038b01e0ccc5b408ff726646f91da5555db50 --- sw/source/filter/html/css1atr.cxx | 8 -------- sw/source/filter/html/htmlatr.cxx | 6 ++---- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'sw/source/filter') diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index ef3e6c5c108c..1aa393f98675 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2603,14 +2603,6 @@ static Writer& OutCSS1_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight(); - if( rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT) ) - { - // einen Hint nur dann ausgeben wenn es auch was bringt - sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight ); - if( rHTMLWrt.aFontHeights[nSize-1] == nHeight ) - return rWrt; - } - OString sHeight(OString::number(nHeight/20) + OString(sCSS1_UNIT_pt)); rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_font_size, sHeight); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 260ae531c1d1..de4aacd3bd1d 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -2783,11 +2783,9 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt ) append(static_cast(nSize)).append("\""); rWrt.Strm() << sOut.getStr(); - if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr && - rHTMLWrt.aFontHeights[nSize-1] != nHeight ) + if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr ) { - // wenn die Groesse keiner HTML-Groesse entspricht, - // wird sie noch zusatzlich als Style-Option exportiert + // always export font size as CSS option, too OutCSS1_HintStyleOpt( rWrt, rHt ); } rWrt.Strm() << '>'; -- cgit