summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Stangl <sean.stangl@gmail.com>2017-07-08 22:33:48 -0700
committerAndras Timar <andras.timar@collabora.com>2017-07-12 10:53:26 +0200
commit236bfad12b2f7718713e751fe06cb87c735b0e8b (patch)
tree185a13a314706343b51824475c914190a6a6b0e7
parentb6b565a6e9cea0a3b13678d29004a5b6771e1d89 (diff)
tdf#79304 - Handle CrossedOutItems in HTML export.
Change-Id: I766fedb34737a1a7815693bf496fa08c08f492b1 Reviewed-on: https://gerrit.libreoffice.org/39719 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 2f2eba56d1f8ec5cdcadb4852e8856858477c008) Reviewed-on: https://gerrit.libreoffice.org/39722 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 884979ebe7d464e8b29d331a58ddf943bc9030df)
-rw-r--r--sc/source/filter/html/htmlexp.cxx15
1 files changed, 11 insertions, 4 deletions
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 4177226146fc..c376672332bf 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -28,6 +28,7 @@
#include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/colritem.hxx>
+#include <editeng/crossedoutitem.hxx>
#include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx>
#include <editeng/postitem.hxx>
@@ -979,6 +980,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
const SvxUnderlineItem& rUnderlineItem = static_cast<const SvxUnderlineItem&>(
pAttr->GetItem( ATTR_FONT_UNDERLINE, pCondItemSet ) );
+ const SvxCrossedOutItem& rCrossedOutItem = static_cast<const SvxCrossedOutItem&>(
+ pAttr->GetItem( ATTR_FONT_CROSSEDOUT, pCondItemSet ) );
+
const SvxColorItem& rColorItem = static_cast<const SvxColorItem&>( pAttr->GetItem(
ATTR_FONT_COLOR, pCondItemSet ) );
@@ -997,10 +1001,11 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
else
aBgColor = rBrushItem.GetColor();
- bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
- bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
- bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() );
- bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now
+ bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
+ bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
+ bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() );
+ bool bCrossedOut = ( STRIKEOUT_SINGLE <= rCrossedOutItem.GetStrikeout() );
+ bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now
bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
sal_uInt16 nSetFontSizeNumber = 0;
sal_uInt32 nFontHeight = rFontHeightItem.GetHeight();
@@ -1102,6 +1107,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic );
if ( bUnderline ) TAG_ON( OOO_STRING_SVTOOLS_HTML_underline );
+ if ( bCrossedOut ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strikethrough );
if ( bSetFont )
{
@@ -1199,6 +1205,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
WriteGraphEntry( pGraphEntry );
if ( bSetFont ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_font );
+ if ( bCrossedOut ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_strikethrough );
if ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline );
if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic );
if ( bBold ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );