[Libreoffice-commits] .: Branch 'libreoffice-4-0' - 3 commits - filter/source pyuno/source sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 11 10:47:49 PST 2012


 filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl |    2 -
 pyuno/source/module/pyuno_adapter.cxx                                   |   16 +++++-----
 sw/source/filter/html/css1atr.cxx                                       |   12 ++++++-
 sw/source/filter/html/css1kywd.cxx                                      |    2 +
 sw/source/filter/html/css1kywd.hxx                                      |    2 +
 sw/source/filter/html/htmlatr.cxx                                       |    3 +
 6 files changed, 26 insertions(+), 11 deletions(-)

New commits:
commit 71b4551ab80bd4f420b6284379bb9174fc93382c
Author: Arne de Bruijn <mail at arnedebruijn.nl>
Date:   Tue Dec 11 18:25:23 2012 +0100

    fdo#57320: sw: HTML export: hidden text should not be visible
    
    Change-Id: I974675b43b56d064a693bcb2d356580243c19393
    (cherry picked from commit 45ca417bf90ea7873c4d75cd0611fcf0cf7a33a9)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 938605a..79ff151 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -43,6 +43,7 @@
 #include <editeng/widwitem.hxx>
 #include <editeng/spltitem.hxx>
 #include <editeng/orphitem.hxx>
+#include <editeng/charhiddenitem.hxx>
 #include <svx/xoutbmp.hxx>
 #include <svx/svdobj.hxx>
 #include <editeng/langitem.hxx>
@@ -2822,6 +2823,15 @@ static Writer& OutCSS1_SvxOverline( Writer& rWrt, const SfxPoolItem& rHt )
     return rWrt;
 }
 
+static Writer& OutCSS1_SvxHidden( Writer& rWrt, const SfxPoolItem& rHt )
+{
+    SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
+
+    if ( ((const SvxCharHiddenItem&)rHt).GetValue() )
+        rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_display, sCSS1_PV_none );
+
+    return rWrt;
+}
 
 static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt )
 {
@@ -3751,7 +3761,7 @@ SwAttrFnTab aCSS1AttrFnTab = {
 /* RES_CHRATR_TWO_LINES */          0,
 /* RES_CHRATR_SCALEW */             0,
 /* RES_CHRATR_RELIEF */             0,
-/* RES_CHRATR_HIDDEN */             0,
+/* RES_CHRATR_HIDDEN */             OutCSS1_SvxHidden,
 /* RES_CHRATR_OVERLINE */           OutCSS1_SvxOverline,
 /* RES_CHRATR_RSID */               0,
 /* RES_CHRATR_DUMMY1 */             0,
diff --git a/sw/source/filter/html/css1kywd.cxx b/sw/source/filter/html/css1kywd.cxx
index a1aaaa2..4117052 100644
--- a/sw/source/filter/html/css1kywd.cxx
+++ b/sw/source/filter/html/css1kywd.cxx
@@ -265,4 +265,6 @@ sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_ltr, "ltr" );
 sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_rtl, "rtl" );
 sal_Char CSS1_CONSTASCII_DEF( sCSS1_PV_inherit, "inherit" );
 
+sal_Char CSS1_CONSTASCII_DEF( sCSS1_P_display, "display" );
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/css1kywd.hxx b/sw/source/filter/html/css1kywd.hxx
index d9e77b7..0b4bd5d 100644
--- a/sw/source/filter/html/css1kywd.hxx
+++ b/sw/source/filter/html/css1kywd.hxx
@@ -275,6 +275,8 @@ extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_ltr, "ltr" );
 extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_rtl, "rtl" );
 extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_PV_inherit, "inherit" );
 
+extern sal_Char CSS1_CONSTASCII_DECL( sCSS1_P_display, "display" );
+
 #endif
 
 
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 9492fef..99186e7 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -1344,6 +1344,7 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem )
         break;
 
     case RES_CHRATR_OVERLINE:
+    case RES_CHRATR_HIDDEN:
         if( IsHTMLMode(HTMLMODE_SOME_STYLES) )
             eState = HTML_STYLE_VALUE;
         break;
@@ -3235,7 +3236,7 @@ SwAttrFnTab aHTMLAttrFnTab = {
 /* RES_CHRATR_TWO_LINES */          0,
 /* RES_CHRATR_SCALEW */             0,
 /* RES_CHRATR_RELIEF */             0,
-/* RES_CHRATR_HIDDEN */             0,
+/* RES_CHRATR_HIDDEN */             OutHTML_CSS1Attr,
 /* RES_CHRATR_OVERLINE */           OutHTML_CSS1Attr,
 /* RES_CHRATR_RSID */               0,
 /* RES_CHRATR_DUMMY1 */             0,
commit 8944eaa774b64d4d903abc5c0b0631252c02a46d
Author: Arne de Bruijn <mail at arnedebruijn.nl>
Date:   Tue Dec 11 18:23:38 2012 +0100

    fdo#57254: XHTML export: hidden text should not be visible
    
    Change-Id: I7bcad8ba3dd84974a997849347965d7e43f1922a
    (cherry picked from commit 23dee56dca5cbbed4cf97180b8dcfe12a6a8fa8f)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
index 986dd3d..e56be28 100644
--- a/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
+++ b/filter/source/xslt/odf2xhtml/export/common/styles/style_mapping_css.xsl
@@ -79,7 +79,7 @@
 	</xsl:template>
 
 	<!-- text-shadow is a CSS2 feature and yet not common used in user-agents -->
-	<xsl:template match="@fo:color |@svg:font-family |@fo:font-size |@fo:font-style |@fo:font-weight |@fo:text-indent |@fo:text-shadow">
+	<xsl:template match="@fo:color |@svg:font-family |@fo:font-size |@fo:font-style |@fo:font-weight |@fo:text-indent |@fo:text-shadow |@text:display">
 		<xsl:value-of select="substring-after(name(), ':')"/>
 		<xsl:text>:</xsl:text>
 		<xsl:value-of select="."/>
commit 68086c59acd936d677dbc76473d34b484ec0b809
Author: Ariel Constenla-Haile <arielch at apache.org>
Date:   Mon Jan 16 19:27:22 2012 +0000

    i118798 - Fix Pyuno dead-lock
    
    Fixes fdo#57569, thanks to Miklós Prisznyák for the hint.
    
    git-svn-id: https://svn-master.apache.org/repos/asf/incubator/ooo/trunk@1232123 13f79535-47bb-0310-9956-ffa450edef68
    (cherry picked from commit 374c9af20d93029d999ca21beb2b989e0a428b98)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 2be265f..08b76ad 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -359,20 +359,20 @@ Any Adapter::invoke( const OUString &aFunctionName,
 void Adapter::setValue( const OUString & aPropertyName, const Any & value )
     throw( UnknownPropertyException, CannotConvertException, InvocationTargetException,RuntimeException)
 {
+    if( !hasProperty( aPropertyName ) )
+    {
+        OUStringBuffer buf;
+        buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
+        buf.appendAscii( " is unknown." );
+        throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
+    }
+
     PyThreadAttach guard( mInterpreter );
     try
     {
         Runtime runtime;
         PyRef obj = runtime.any2PyObject( value );
 
-        if( !hasProperty( aPropertyName ) )
-        {
-            OUStringBuffer buf;
-            buf.appendAscii( "pyuno::Adapater: Property " ).append( aPropertyName );
-            buf.appendAscii( " is unknown." );
-            throw UnknownPropertyException( buf.makeStringAndClear(), Reference< XInterface > () );
-        }
-
         PyObject_SetAttrString(
             mWrappedObject.get(), (char*)TO_ASCII(aPropertyName), obj.get() );
         raiseInvocationTargetExceptionWhenNeeded( runtime);


More information about the Libreoffice-commits mailing list