diff options
author | Harri Pitkänen <hatapitk@iki.fi> | 2011-10-26 21:48:17 +0300 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-10-28 10:07:17 +0100 |
commit | 89b3820c7b8c97480b556b3553cd78aaa12d07d8 (patch) | |
tree | b0de0a3475722ba637a46c940771c013bf0a79f9 | |
parent | 7661f0943d6286b7e7075c5f2e172f23d53ea47d (diff) |
Export blinking text attribute to HTML in all HTML export modes
Previously blinking was not exported in IE mode. IE still does not
support blinking (neither does Chrome or Safari) but the extra tag
does not make things any worse and allows importing the HTML back
to LibreOffice without loss of formatting.
Code is also simplified by removing conditionals for options that
no longer need to be disabled.
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 3 | ||||
-rw-r--r-- | sfx2/inc/sfx2/htmlmode.hxx | 3 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 7 | ||||
-rw-r--r-- | sw/source/ui/config/viewopt.cxx | 10 |
6 files changed, 9 insertions, 18 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 8d27b17701bc..b466ea8908b7 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -1086,8 +1086,6 @@ void SvxBackgroundTabPage::ShowSelector() if(nHtmlMode & HTMLMODE_ON) { - if(!(nHtmlMode & HTMLMODE_GRAPH_POS)) - aBtnPosition.Enable(sal_False); aBtnArea.Enable(sal_False); } } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index a92019eeeaa2..9d320b4410a1 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2686,8 +2686,7 @@ void SvxCharEffectsPage::DisableControls( sal_uInt16 nDisable ) void SvxCharEffectsPage::EnableFlash() { - if ( !( ( m_nHtmlMode & HTMLMODE_ON ) && !( m_nHtmlMode & HTMLMODE_BLINK ) ) ) - m_aBlinkingBtn.Show(); + m_aBlinkingBtn.Show(); } // ----------------------------------------------------------------------- diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx index f4db27ad3c3f..ce1af6feb970 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -31,15 +31,12 @@ #define HTMLMODE_ON 0x0001 #define HTMLMODE_PARA_DISTANCE 0x0004 -#define HTMLMODE_SMALL_CAPS 0x0008 #define HTMLMODE_FRM_COLUMNS 0x0010 #define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */ #define HTMLMODE_FULL_STYLES 0x0040 /* == SW */ -#define HTMLMODE_BLINK 0x0080 #define HTMLMODE_PARA_BLOCK 0x0100 #define HTMLMODE_DROPCAPS 0x0200 #define HTMLMODE_FIRSTLINE 0x0400 /* First-line intent with Spacer == NS 3.0 */ -#define HTMLMODE_GRAPH_POS 0x0800 #define HTMLMODE_FULL_ABS_POS 0x1000 #define HTMLMODE_SOME_ABS_POS 0x2000 #define HTMLMODE_RESERVED1 0x4000 diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 5905b72ca825..33bd07a8690f 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -2510,7 +2510,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt, } const sal_Char *pBStr = 0; - if( pBItem && rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) ) + if( pBItem ) { if( !pBItem->GetValue() ) { diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index 2d560707fbb0..7354b6c6b296 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -1475,9 +1475,8 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem ) break; case RES_CHRATR_BLINK: - if( IsHTMLMode(HTMLMODE_BLINK) ) - eState = ((const SvxBlinkItem&)rItem).GetValue() ? HTML_ON_VALUE - : HTML_OFF_VALUE; + eState = ((const SvxBlinkItem&)rItem).GetValue() ? HTML_ON_VALUE + : HTML_OFF_VALUE; break; case RES_CHRATR_COLOR: @@ -3030,7 +3029,7 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt ) static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt ) { SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt; - if( rHTMLWrt.bOutOpts || !rHTMLWrt.IsHTMLMode(HTMLMODE_BLINK) ) + if( rHTMLWrt.bOutOpts ) return rWrt; if( ((const SvxBlinkItem&)rHt).GetValue() ) diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index 4d5023632f05..a34679c5191a 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -339,18 +339,16 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell) switch ( rHtmlOpt.GetExportMode() ) { case HTML_CFG_MSIE: - nRet |= HTMLMODE_SMALL_CAPS| - HTMLMODE_FULL_STYLES|HTMLMODE_GRAPH_POS| + nRet |= HTMLMODE_FULL_STYLES| HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS; break; case HTML_CFG_NS40: - nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_BLINK|HTMLMODE_GRAPH_POS| + nRet |= HTMLMODE_FRM_COLUMNS| HTMLMODE_SOME_ABS_POS; break; case HTML_CFG_WRITER: - nRet |= HTMLMODE_SMALL_CAPS| - HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES| - HTMLMODE_BLINK|HTMLMODE_DROPCAPS|HTMLMODE_GRAPH_POS| + nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES| + HTMLMODE_DROPCAPS| HTMLMODE_FULL_ABS_POS|HTMLMODE_SOME_ABS_POS; break; } |