[Libreoffice-commits] .: sw/source
Caolán McNamara
caolan at kemper.freedesktop.org
Tue Jun 14 07:21:01 PDT 2011
sw/source/filter/html/css1atr.cxx | 21 +++++++++++++++------
sw/source/filter/html/css1kywd.cxx | 5 +++++
sw/source/filter/html/css1kywd.hxx | 5 +++++
3 files changed, 25 insertions(+), 6 deletions(-)
New commits:
commit e9fb1b8e82dfb10ad6947c35c91adea3e8c8b9ad
Author: Harri Pitkänen <hatapitk at iki.fi>
Date: Sun Jun 12 18:42:03 2011 +0300
Support font effects "Capitals", "Lowercase" and "Title" in HTML export
Export Writer font effects "Capitals", "Lowercase" and "Title" (see
Format -> Character -> Font effects) to HTML using CSS text-transform
property. Corresponding import code is not yet implemented.
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 9bf6ea4..92a149b 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -2564,18 +2564,27 @@ static Writer& OutCSS1_SvxCaseMap( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsHTMLMode(HTMLMODE_SMALL_CAPS) )
return rWrt;
- const sal_Char *pStr = 0;
switch( ((const SvxCaseMapItem&)rHt).GetCaseMap() )
{
- case SVX_CASEMAP_NOT_MAPPED: pStr = sCSS1_PV_normal; break;
- case SVX_CASEMAP_KAPITAELCHEN: pStr = sCSS1_PV_small_caps; break;
+ case SVX_CASEMAP_NOT_MAPPED:
+ rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_variant, sCSS1_PV_normal );
+ break;
+ case SVX_CASEMAP_KAPITAELCHEN:
+ rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_variant, sCSS1_PV_small_caps );
+ break;
+ case SVX_CASEMAP_VERSALIEN:
+ rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_transform, sCSS1_PV_uppercase );
+ break;
+ case SVX_CASEMAP_GEMEINE:
+ rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_transform, sCSS1_PV_lowercase );
+ break;
+ case SVX_CASEMAP_TITEL:
+ rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_text_transform, sCSS1_PV_capitalize );
+ break;
default:
;
}
- if( pStr )
- rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_variant, pStr );
-
return rWrt;
}
diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx
index ba7ab32..7874c6f 100644
--- a/sw/source/filter/html/css1kywd.cxx
+++ b/sw/source/filter/html/css1kywd.cxx
@@ -109,6 +109,11 @@ sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_extra_bold, "extra-bold" );
sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_lighter, "lighter" );
sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_bolder, "bolder" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_text_transform, "text-transform" );
+
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_capitalize, "capitalize" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_uppercase, "uppercase" );
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_lowercase, "lowercase" );
sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_font_size, "font-size" );
diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx
index e3f8f05..539ad90 100644
--- a/sw/source/filter/html/css1kywd.hxx
+++ b/sw/source/filter/html/css1kywd.hxx
@@ -102,6 +102,11 @@ extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_variant, "font-variant" );
//sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_normal, "normal" );
extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_small_caps, "small-caps" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_text_transform, "text-transform" );
+
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_capitalize, "capitalize" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_uppercase, "uppercase" );
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_lowercase, "lowercase" );
extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_font_weight, "font-weight" );
More information about the Libreoffice-commits
mailing list