diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-10-15 11:47:11 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-10-16 03:29:30 +0200 |
commit | d4ae0d8d30e10f7e194a06c540cac1f33a4fe0ba (patch) | |
tree | 418541c719ee0c4b7e60c239db020ca3a7fff285 /sw/source | |
parent | 1204d2ff819300c17770d4cc84d2b63372963f65 (diff) |
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:
<font size=7 style="font-size: 66pt">Text 1</font>
<font size=5>Text 2</font>
New:
<font size=7 style="font-size: 66pt">Text 1</font>
<font size=5 style="font-size: 18pt">Text 2</font>
Change-Id: I360038b01e0ccc5b408ff726646f91da5555db50
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 6 |
2 files changed, 2 insertions, 12 deletions
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<sal_Int32>(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() << '>'; |