[Libreoffice-commits] .: oox/source

Muthu Subramanian sumuthu at kemper.freedesktop.org
Fri Dec 10 08:18:42 PST 2010


 oox/source/core/xmlfilterbase.cxx |    6 +++++-
 oox/source/export/vmlexport.cxx   |    4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 2d18ef93e9b3288782220ccdcf48b1d1afbe39f0
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Fri Dec 10 21:40:07 2010 +0530

    XLSX VML Export fixes.
    
    XML_v instead of XML_w10. Don't write xml headers for
    vml files.

diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index c07e3db..aad41b0 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -321,7 +321,11 @@ Reference< XOutputStream > XmlFilterBase::openFragmentStream( const OUString& rS
 
 FSHelperPtr XmlFilterBase::openFragmentStreamWithSerializer( const OUString& rStreamName, const OUString& rMediaType )
 {
-    return FSHelperPtr( new FastSerializerHelper( openFragmentStream( rStreamName, rMediaType ) ) );
+    bool bWriteHeader = true;
+    if( rMediaType.indexOfAsciiL( "vml", 3 ) >= 0 &&
+        rMediaType.indexOfAsciiL( "+xml", 4 ) < 0 )
+        bWriteHeader = false;
+    return FSHelperPtr( new FastSerializerHelper( openFragmentStream( rStreamName, rMediaType ), bWriteHeader ) );
 }
 
 TextFieldStack& XmlFilterBase::getTextFieldStack() const
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 78279d6..5f519c5 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -363,8 +363,8 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                         case ESCHER_WrapThrough:   pWrapType = "through"; break;
                     }
                     if ( pWrapType )
-                        m_pSerializer->singleElementNS( XML_w10, XML_wrap,
-                                FSNS( XML_w10, XML_type ), pWrapType,
+                        m_pSerializer->singleElementNS( XML_v, XML_wrap,
+                                FSNS( XML_v, XML_type ), pWrapType,
                                 FSEND );
                 }
                 bAlreadyWritten[ ESCHER_Prop_WrapText ] = true;


More information about the Libreoffice-commits mailing list