[Libreoffice-commits] .: sfx2/inc sw/source
Michael Meeks
michael at kemper.freedesktop.org
Wed Nov 23 06:28:55 PST 2011
sfx2/inc/sfx2/htmlmode.hxx | 1 -
sw/source/filter/html/css1atr.cxx | 6 ++----
sw/source/filter/html/htmlatr.cxx | 2 +-
sw/source/ui/config/viewopt.cxx | 1 -
4 files changed, 3 insertions(+), 7 deletions(-)
New commits:
commit 98761e3680bcb2268efd679330fa034e21ff2b9e
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Tue Nov 22 20:24:52 2011 +0200
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.
diff --git a/sfx2/inc/sfx2/htmlmode.hxx b/sfx2/inc/sfx2/htmlmode.hxx
index 65e41f6..63b0bfe 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 69efd26..d3d8174 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 c7d2847..3259cc0 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 0ac6f96..5524fe2 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;
}
More information about the Libreoffice-commits
mailing list