[ooo-build-commit] .: Branch 'ooo-build-3-2-1' - patches/dev300

Muthu Subramanian sumuthu at kemper.freedesktop.org
Fri Aug 6 03:06:47 PDT 2010


 patches/dev300/apply                    |    3 +++
 patches/dev300/sc-xml-with-xls-ext.diff |   23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+)

New commits:
commit 24a286f8d611f1ff48415a8e6bddb4603aeba94d
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Mon Aug 2 15:51:47 2010 +0530

    Flat MSO XML import when file extension is xls.
    
    * patches/dev300/apply:
    * patches/dev300/sc-xml-with-xls-ext.diff: n#527738

diff --git a/patches/dev300/apply b/patches/dev300/apply
index bb843ef..9860c0c 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -3878,6 +3878,9 @@ system-mdds.diff, rengelha
 # Fix poor performance on saving document with hidden rows.
 calc-perf-ods-export-hidden-rows.diff, deb#582785, kohei
 
+# Opening an xml file with xls extension
+sc-xml-with-xls-ext.diff, n#527738, muthusuba
+
 [ GentooExperimental ]
 SectionOwner => hmth
 # jemalloc, FreeBSD 7 allocator
diff --git a/patches/dev300/sc-xml-with-xls-ext.diff b/patches/dev300/sc-xml-with-xls-ext.diff
new file mode 100644
index 0000000..1415c3e
--- /dev/null
+++ b/patches/dev300/sc-xml-with-xls-ext.diff
@@ -0,0 +1,23 @@
+--- sc/source/ui/unoobj/scdetect.cxx	2010-07-16 21:20:23.000000000 +0530
++++ sc/source/ui/unoobj/scdetect.cxx	2010-07-29 19:15:55.000000000 +0530
+@@ -117,6 +117,7 @@ static const sal_Char __FAR_DATA pFilter
+ static const sal_Char __FAR_DATA pFilterEx95Temp[]	= "MS Excel 95 Vorlage/Template";
+ static const sal_Char __FAR_DATA pFilterExcel97[]	= "MS Excel 97";
+ static const sal_Char __FAR_DATA pFilterEx97Temp[]	= "MS Excel 97 Vorlage/Template";
++static const sal_Char __FAR_DATA pFilter2003XML[]   = "MS Excel 2003 XML";
+ static const sal_Char __FAR_DATA pFilterDBase[]		= "dBase";
+ static const sal_Char __FAR_DATA pFilterDif[]		= "DIF";
+ static const sal_Char __FAR_DATA pFilterSylk[]		= "SYLK";
+@@ -758,7 +759,11 @@ static BOOL lcl_IsAnyXMLFilter( const Sf
+                                 }
+                                 else if ( bIsXLS && bMaybeText )
+                                 {
+-                                    pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterAscii) );
++                                    aHeader.EraseLeadingChars();
++                                    if( aHeader.CompareTo( "<?xml", 5 ) == COMPARE_EQUAL )
++                                        pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilter2003XML) );
++                                    else
++                                        pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterAscii) );
+                                     bFakeXLS = true;
+                                 }
+                                 else if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL )


More information about the ooo-build-commit mailing list