diff options
author | Harri Pitkänen <hatapitk@iki.fi> | 2011-11-22 20:24:52 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-11-23 14:29:13 +0000 |
commit | 98761e3680bcb2268efd679330fa034e21ff2b9e (patch) | |
tree | 2a42421411459879bdb796be4d70f127979ce045 | |
parent | ff1b70c92aed555ecdbe424aac29373142c8fcb6 (diff) |
Enable :first-letter CSS pseudo-class for all browsers in HTML export
Previously when drop caps were specified in a paragraph style (not
as direct formatting) export to HTML was implemented with :first-letter
pseudo-class for "LibreOffice Writer" and through styling individual
characters for other browsers. Since all browsers used these days (even
obsolete ones like IE 5.5) support :first-letter there seems to be no
reason to maintain this difference. This patch unifies all export
modes to use :first-letter in such cases.
-rw-r--r-- | sfx2/inc/sfx2/htmlmode.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/html/css1atr.cxx | 6 | ||||
-rw-r--r-- | sw/source/filter/html/htmlatr.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/viewopt.cxx | 1 |
4 files changed, 3 insertions, 7 deletions
diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx index 65e41f65adc5..63b0bfee0bd1 100644 --- a/sfx2/inc/sfx2/htmlmode.hxx +++ b/sfx2/inc/sfx2/htmlmode.hxx @@ -35,7 +35,6 @@ #define HTMLMODE_SOME_STYLES 0x0020 /* mind. MS IE */ #define HTMLMODE_FULL_STYLES 0x0040 /* == SW */ #define HTMLMODE_PARA_BLOCK 0x0100 -#define HTMLMODE_DROPCAPS 0x0200 #define HTMLMODE_FIRSTLINE 0x0400 /* First-line intent with Spacer == NS 3.0 */ #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 69efd260f358..d3d81743d053 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1381,8 +1381,7 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector, sal_Bool bCheckForPseudo ) { sal_Bool bScriptDependent = sal_False; - if( SwHTMLWriter::HasScriptDependentItems( rItemSet, - rHTMLWrt.IsHTMLMode(HTMLMODE_DROPCAPS) && bHasClass ) ) + if( SwHTMLWriter::HasScriptDependentItems( rItemSet, bHasClass ) ) { bScriptDependent = sal_True; String aSelector( rSelector ); @@ -1778,8 +1777,7 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt, // Drop-Caps ausgeben const SfxPoolItem *pItem; - if( rHTMLWrt.IsHTMLMode(HTMLMODE_DROPCAPS) && - SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, sal_False, &pItem )) + if( SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, sal_False, &pItem )) { String sOut( aSelector ); sOut.Append( ':'); diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx index c7d2847ea23a..3259cc0d085e 100644 --- a/sw/source/filter/html/htmlatr.cxx +++ b/sw/source/filter/html/htmlatr.cxx @@ -648,7 +648,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt, pFmtInfo = new SwHTMLFmtInfo( &rFmt, rWrt.pDoc, rHWrt.pTemplate, rHWrt.bCfgOutStyles, rHWrt.eLang, rHWrt.nCSS1Script, - !rHWrt.IsHTMLMode(HTMLMODE_DROPCAPS) ); + false ); rHWrt.aTxtCollInfos.C40_PTR_INSERT( SwHTMLFmtInfo, pFmtInfo ); String aName( rFmt.GetName() ); if( 0 != rHWrt.aScriptParaStyles.count( aName ) ) diff --git a/sw/source/ui/config/viewopt.cxx b/sw/source/ui/config/viewopt.cxx index 0ac6f96b4bee..5524fe2c70fa 100644 --- a/sw/source/ui/config/viewopt.cxx +++ b/sw/source/ui/config/viewopt.cxx @@ -348,7 +348,6 @@ sal_uInt16 GetHtmlMode(const SwDocShell* pShell) break; case HTML_CFG_WRITER: nRet |= HTMLMODE_FRM_COLUMNS|HTMLMODE_FULL_STYLES| - HTMLMODE_DROPCAPS| HTMLMODE_SOME_ABS_POS; break; } |