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 (or can be) disabled.
Harri
From a481b25e03c4e72fdcf4a565859d98fe1244b451 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Harri=20Pitk=C3=A4nen?= <hatapitk@iki.fi>
Date: Wed, 26 Oct 2011 21:48:17 +0300
Subject: [PATCH] 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.
---
cui/source/tabpages/backgrnd.cxx | 2 --
cui/source/tabpages/chardlg.cxx | 3 +--
sfx2/inc/sfx2/htmlmode.hxx | 3 ---
sw/source/filter/html/css1atr.cxx | 2 +-
sw/source/filter/html/htmlatr.cxx | 7 +++----
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 8d27b17..b466ea8 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 a92019e..9d320b4 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 f4db27a..ce1af6f 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 5905b72..33bd07a 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 2d56070..7354b6c 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 4d50236..a34679c 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;
}
--
1.7.7
Context
- [Libreoffice] [PATCH] Export blinking text attribute to HTML in all HTML export modes · Harri Pitkänen
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.