diff options
author | Arne de Bruijn <mail@arnedebruijn.nl> | 2012-12-11 18:25:23 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-12-11 19:40:50 +0100 |
commit | 45ca417bf90ea7873c4d75cd0611fcf0cf7a33a9 (patch) | |
tree | 3d639abc888605acf607fa243f39848e7fd56677 | |
parent | 23dee56dca5cbbed4cf97180b8dcfe12a6a8fa8f (diff) |
fdo#57320: sw: HTML export: hidden text should not be visible
Change-Id: I974675b43b56d064a693bcb2d356580243c19393
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/html/css1kywd.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/css1kywd.hxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 3 |
4 files changed, 17 insertions, 2 deletions
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 938605a9a5cc..79ff151039d1 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -43,6 +43,7 @@ #include <editeng/widwitem.hxx> #include <editeng/spltitem.hxx> #include <editeng/orphitem.hxx> +#include <editeng/charhiddenitem.hxx> #include <svx/xoutbmp.hxx> #include <svx/svdobj.hxx> #include <editeng/langitem.hxx> @@ -2822,6 +2823,15 @@ static Writer& OutCSS1_SvxOverline( Writer& rWrt, const SfxPoolItem& rHt ) return rWrt; } +static Writer& OutCSS1_SvxHidden( Writer& rWrt, const SfxPoolItem& rHt ) +{ + SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; + + if ( ((const SvxCharHiddenItem&)rHt).GetValue() ) + rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_display, sCSS1_PV_none ); + + return rWrt; +} static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt ) { @@ -3751,7 +3761,7 @@ SwAttrFnTab aCSS1AttrFnTab = { /* RES_CHRATR_TWO_LINES */ 0, /* RES_CHRATR_SCALEW */ 0, /* RES_CHRATR_RELIEF */ 0, -/* RES_CHRATR_HIDDEN */ 0, +/* RES_CHRATR_HIDDEN */ OutCSS1_SvxHidden, /* RES_CHRATR_OVERLINE */ OutCSS1_SvxOverline, /* RES_CHRATR_RSID */ 0, /* RES_CHRATR_DUMMY1 */ 0, diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx index a1aaaa215ca5..4117052bcb6a 100644 --- a/sw/source/filter/html/css1kywd.cxx +++ b/sw/source/filter/html/css1kywd.cxx @@ -265,4 +265,6 @@ sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_ltr, "ltr" ); sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_rtl, "rtl" ); sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_inherit, "inherit" ); +sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_display, "display" ); + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx index d9e77b70c096..0b4bd5db1b44 100644 --- a/sw/source/filter/html/css1kywd.hxx +++ b/sw/source/filter/html/css1kywd.hxx @@ -275,6 +275,8 @@ extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_ltr, "ltr" ); extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_rtl, "rtl" ); extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_inherit, "inherit" ); +extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_display, "display" ); + #endif diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 9492fef4b26d..99186e7c228a 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1344,6 +1344,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_OVERLINE: + case RES_CHRATR_HIDDEN: if( IsHTMLMode(HTMLMODE_SOME_STYLES) ) eState = HTML_STYLE_VALUE; break; @@ -3235,7 +3236,7 @@ SwAttrFnTab aHTMLAttrFnTab = { /* RES_CHRATR_TWO_LINES */ 0, /* RES_CHRATR_SCALEW */ 0, /* RES_CHRATR_RELIEF */ 0, -/* RES_CHRATR_HIDDEN */ 0, +/* RES_CHRATR_HIDDEN */ OutHTML_CSS1Attr, /* RES_CHRATR_OVERLINE */ OutHTML_CSS1Attr, /* RES_CHRATR_RSID */ 0, /* RES_CHRATR_DUMMY1 */ 0, |