[Libreoffice-commits] .: patches/dev300

Muthu Subramanian sumuthu at kemper.freedesktop.org
Sat Oct 16 09:25:10 PDT 2010


 patches/dev300/apply                    |    3 
 patches/dev300/sc-xml-with-xls-ext.diff |  110 --------------------------------
 2 files changed, 113 deletions(-)

New commits:
commit a2c98e4f7eab879d33394fd45cb235c3605304ce
Author: Muthu Subramanian K <sumuthu at novell.com>
Date:   Fri Oct 15 14:42:39 2010 +0530

    Removing entries which are merged.

diff --git a/patches/dev300/apply b/patches/dev300/apply
index f1ceac0..618918e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -2398,9 +2398,6 @@ calc-pdf-export-allow-filtered-range-filter.diff, n#585028, kohei
 # Fix handling of DB functions.
 calc-formula-db-function-fix.diff, n#594332, n#595713, kohei
 
-# Opening an xml file with xls extension
-sc-xml-with-xls-ext.diff, n#527738, muthusuba
-
 [ GentooExperimental ]
 SectionOwner => hmth
 # make Python2 optional
diff --git a/patches/dev300/sc-xml-with-xls-ext.diff b/patches/dev300/sc-xml-with-xls-ext.diff
deleted file mode 100644
index 5d1b225..0000000
--- a/patches/dev300/sc-xml-with-xls-ext.diff
+++ /dev/null
@@ -1,110 +0,0 @@
---- sc/source/ui/unoobj/scdetect.cxx	2010-08-02 15:35:29.000000000 +0530
-+++ sc/source/ui/unoobj/scdetect.cxx	2010-09-21 20:49:13.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";
-@@ -440,7 +441,8 @@ static BOOL lcl_IsAnyXMLFilter( const Sf
-                 bool bIsXLS = false;
-                 SvStream* pStream = aMedium.GetInStream();
-                 const SfxFilter* pPreselectedFilter = pFilter;
--                if ( pPreselectedFilter && pPreselectedFilter->GetName().SearchAscii("Excel") != STRING_NOTFOUND )
-+                if ( ( pPreselectedFilter && pPreselectedFilter->GetName().SearchAscii("Excel") != STRING_NOTFOUND ) ||
-+                    ( !aPreselectedFilterName.Len() && pPreselectedFilter->GetFilterName().EqualsAscii( pFilterAscii ) ) )
-                     bIsXLS = true;
-                 pFilter = 0;
-                 if ( pStream )
-@@ -723,52 +725,51 @@ static BOOL lcl_IsAnyXMLFilter( const Sf
-                             // without the preselection other filters (Writer) take precedence
-                             // DBase can't be detected reliably, so it also needs preselection
-                             bool bMaybeText = lcl_MayBeAscii( rStr );
--                            if ( pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText )
--                            {
--                                // Text filter is accepted if preselected
--                                pFilter = pPreselectedFilter;
-+
-+                            // get file header
-+                            rStr.Seek( 0 );
-+                            const int nTrySize = 80;
-+                            ByteString aHeader;
-+                            for ( int j = 0; j < nTrySize && !rStr.IsEof(); j++ )
-+                            {
-+                                sal_Char c;
-+                                rStr >> c;
-+                                aHeader += c;
-                             }
--                            else
-+                            aHeader += '\0';
-+
-+                            if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
-                             {
--                                // get file header
--                                rStr.Seek( 0 );
--                                const int nTrySize = 80;
--                                ByteString aHeader;
--                                for ( int j = 0; j < nTrySize && !rStr.IsEof(); j++ )
-+                                // test for HTML
-+                                if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
-                                 {
--                                    sal_Char c;
--                                    rStr >> c;
--                                    aHeader += c;
-+                                    pFilter = pPreselectedFilter;
-                                 }
--                                aHeader += '\0';
--
--                                if ( HTMLParser::IsHTMLFormat( aHeader.GetBuffer() ) )
-+                                else
-                                 {
--                                    // test for HTML
--                                    if ( pPreselectedFilter->GetName().EqualsAscii(pFilterHtml) )
--                                    {
--                                        pFilter = pPreselectedFilter;
--                                    }
--                                    else
--                                    {
--                                        pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterHtmlWeb) );
--                                        if ( bIsXLS )
--                                            bFakeXLS = true;
--                                    }
-+                                    pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterHtmlWeb) );
-+                                    if ( bIsXLS )
-+                                        bFakeXLS = true;
-                                 }
--                                else if ( bIsXLS && bMaybeText )
--                                {
-+                            }
-+                            else if ( aHeader.CompareTo( "{\\rtf", 5 ) == COMPARE_EQUAL )
-+                            {
-+                                // test for RTF
-+                                pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) );
-+                            }
-+                            else if ( bIsXLS && bMaybeText )
-+                            {
-+                                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 )
--                                {
--                                    // test for RTF
--                                    pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterRtf) );
--                                }
--                                else if ( pPreselectedFilter->GetName().EqualsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
--                                    pFilter = pPreselectedFilter;
-+                                bFakeXLS = true;
-                             }
-+                            else if ( pPreselectedFilter->GetName().EqualsAscii(pFilterDBase) && lcl_MayBeDBase( rStr ) )
-+                                pFilter = pPreselectedFilter;
-+                            else if ( pPreselectedFilter->GetFilterName().EqualsAscii(pFilterAscii) && bMaybeText )
-+                                pFilter = pPreselectedFilter;
-                         }
-                     }
-                 }


More information about the Libreoffice-commits mailing list