Kaydet (Commit) 2f2eba56 authored tarafından Sean Stangl's avatar Sean Stangl Kaydeden (comit) Markus Mohrhard

tdf#79304 - Handle CrossedOutItems in HTML export.

Change-Id: I766fedb34737a1a7815693bf496fa08c08f492b1
Reviewed-on: https://gerrit.libreoffice.org/39719Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst a758956b
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <editeng/boxitem.hxx> #include <editeng/boxitem.hxx>
#include <editeng/brushitem.hxx> #include <editeng/brushitem.hxx>
#include <editeng/colritem.hxx> #include <editeng/colritem.hxx>
#include <editeng/crossedoutitem.hxx>
#include <editeng/fhgtitem.hxx> #include <editeng/fhgtitem.hxx>
#include <editeng/fontitem.hxx> #include <editeng/fontitem.hxx>
#include <editeng/postitem.hxx> #include <editeng/postitem.hxx>
...@@ -971,6 +972,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) ...@@ -971,6 +972,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
const SvxUnderlineItem& rUnderlineItem = static_cast<const SvxUnderlineItem&>( const SvxUnderlineItem& rUnderlineItem = static_cast<const SvxUnderlineItem&>(
pAttr->GetItem( ATTR_FONT_UNDERLINE, pCondItemSet ) ); 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( const SvxColorItem& rColorItem = static_cast<const SvxColorItem&>( pAttr->GetItem(
ATTR_FONT_COLOR, pCondItemSet ) ); ATTR_FONT_COLOR, pCondItemSet ) );
...@@ -992,6 +996,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) ...@@ -992,6 +996,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() );
bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() );
bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() ); bool bUnderline = ( LINESTYLE_NONE != rUnderlineItem.GetLineStyle() );
bool bCrossedOut = ( STRIKEOUT_SINGLE <= rCrossedOutItem.GetStrikeout() );
bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now
bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() );
sal_uInt16 nSetFontSizeNumber = 0; sal_uInt16 nSetFontSizeNumber = 0;
...@@ -1094,6 +1099,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) ...@@ -1094,6 +1099,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold ); if ( bBold ) TAG_ON( OOO_STRING_SVTOOLS_HTML_bold );
if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic ); if ( bItalic ) TAG_ON( OOO_STRING_SVTOOLS_HTML_italic );
if ( bUnderline ) TAG_ON( OOO_STRING_SVTOOLS_HTML_underline ); if ( bUnderline ) TAG_ON( OOO_STRING_SVTOOLS_HTML_underline );
if ( bCrossedOut ) TAG_ON( OOO_STRING_SVTOOLS_HTML_strikethrough );
if ( bSetFont ) if ( bSetFont )
{ {
...@@ -1191,6 +1197,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) ...@@ -1191,6 +1197,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab )
WriteGraphEntry( pGraphEntry ); WriteGraphEntry( pGraphEntry );
if ( bSetFont ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_font ); 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 ( bUnderline ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_underline );
if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic ); if ( bItalic ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_italic );
if ( bBold ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold ); if ( bBold ) TAG_OFF( OOO_STRING_SVTOOLS_HTML_bold );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment