[Libreoffice-commits] .: 2 commits - filter/Configuration_filter.mk filter/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed May 23 17:07:40 PDT 2012


 filter/Configuration_filter.mk                                       |    3 
 filter/source/config/cache/typedetection.cxx                         |   46 ----------
 filter/source/config/fragments/filters/MS_Excel_4_0__StarWriter_.xcu |   13 --
 filter/source/config/fragments/filters/MS_Excel_5_0__StarWriter_.xcu |   13 --
 filter/source/config/fragments/filters/MS_Excel_95__StarWriter_.xcu  |   13 --
 5 files changed, 88 deletions(-)

New commits:
commit 2398b9c207e73ac782011740e91f2ef1a0bfb695
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed May 23 19:58:20 2012 -0400

    Removed obsolete Excel filters for (Star)Writer, which we don't need.
    
    Change-Id: If4b946ef4407279f3b260a0f8a8d8309522aa594

diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk
index 01548f3..f143840 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -347,9 +347,6 @@ $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters.xcu,fi
 	HTML__StarWriter_ \
 	Lotus_1_2_3_1_0__DOS___StarWriter_ \
 	Lotus_1_2_3_1_0__WIN___StarWriter_ \
-	MS_Excel_4_0__StarWriter_ \
-	MS_Excel_5_0__StarWriter_ \
-	MS_Excel_95__StarWriter_ \
 	MS_WinWord_5 \
 	MS_WinWord_6_0 \
 	MS_Word_95 \
diff --git a/filter/source/config/fragments/filters/MS_Excel_4_0__StarWriter_.xcu b/filter/source/config/fragments/filters/MS_Excel_4_0__StarWriter_.xcu
deleted file mode 100644
index 47ad47c..0000000
--- a/filter/source/config/fragments/filters/MS_Excel_4_0__StarWriter_.xcu
+++ /dev/null
@@ -1,13 +0,0 @@
-    <node oor:name="MS Excel 4.0 (StarWriter)" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop>
-        <prop oor:name="UIComponent"/>
-        <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop>
-        <prop oor:name="UserData"><value>EXCEL</value></prop>
-        <prop oor:name="UIName">
-            <value xml:lang="x-default">Microsoft Excel 4.0 (Writer)</value>
-        </prop>
-        <prop oor:name="FileFormatVersion"><value>0</value></prop>
-        <prop oor:name="Type"><value>calc_MS_Excel_40</value></prop>
-        <prop oor:name="TemplateName"/>
-        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
-    </node>
diff --git a/filter/source/config/fragments/filters/MS_Excel_5_0__StarWriter_.xcu b/filter/source/config/fragments/filters/MS_Excel_5_0__StarWriter_.xcu
deleted file mode 100644
index 2138aa9..0000000
--- a/filter/source/config/fragments/filters/MS_Excel_5_0__StarWriter_.xcu
+++ /dev/null
@@ -1,13 +0,0 @@
-    <node oor:name="MS Excel 5.0 (StarWriter)" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop>
-        <prop oor:name="UIComponent"/>
-        <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop>
-        <prop oor:name="UserData"><value>CEXCEL</value></prop>
-        <prop oor:name="UIName">
-            <value xml:lang="x-default">Microsoft Excel 5.0 (Writer)</value>
-        </prop>
-        <prop oor:name="FileFormatVersion"><value>0</value></prop>
-        <prop oor:name="Type"><value>calc_MS_Excel_5095</value></prop>
-        <prop oor:name="TemplateName"/>
-        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
-    </node>
diff --git a/filter/source/config/fragments/filters/MS_Excel_95__StarWriter_.xcu b/filter/source/config/fragments/filters/MS_Excel_95__StarWriter_.xcu
deleted file mode 100644
index 766d8b7..0000000
--- a/filter/source/config/fragments/filters/MS_Excel_95__StarWriter_.xcu
+++ /dev/null
@@ -1,13 +0,0 @@
-    <node oor:name="MS Excel 95 (StarWriter)" oor:op="replace">
-        <prop oor:name="Flags"><value>IMPORT ALIEN NOTINFILEDIALOG NOTINCHOOSER 3RDPARTYFILTER</value></prop>
-        <prop oor:name="UIComponent"/>
-        <prop oor:name="FilterService"><value>com.sun.star.comp.office.BF_MigrateFilter</value></prop>
-        <prop oor:name="UserData"><value>CEXCEL</value></prop>
-        <prop oor:name="UIName">
-            <value xml:lang="x-default">Microsoft Excel 95 (Writer)</value>
-        </prop>
-        <prop oor:name="FileFormatVersion"><value>0</value></prop>
-        <prop oor:name="Type"><value>calc_MS_Excel_95</value></prop>
-        <prop oor:name="TemplateName"/>
-        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
-    </node>
commit 9613a480ceff548ec1f4fedd76e39a2a0c767942
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Wed May 23 12:46:19 2012 -0400

    These hacks no longer work.  Remove it and find a better solution.
    
    This already didn't work in 3.5.
    
    Change-Id: I12afc1bcdc5c20a7846833763080dac02214e01b

diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 47a06e1..0b7a887 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -51,17 +51,6 @@ namespace filter{
 
 namespace css = ::com::sun::star;
 
-//_______________________________________________
-// definitions
-
-// Use this switch to change the behaviour of preselection DocumentService ... (see using for further informations)
-#define IGNORE_NON_URLMATCHING_TYPES_FOR_PRESELECTION_DOCUMENTSERVICE
-
-// enable/disable special handling for CSV/TXT problem
-#define WORKAROUND_CSV_TXT_BUG_i60158
-
-
-
 TypeDetection::TypeDetection(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR)
 {
     BaseContainer::init(xSMGR                                         ,
@@ -253,25 +242,6 @@ void TypeDetection::impl_checkResultsAndAddBestFilter(::comphelper::MediaDescrip
         {
             ::rtl::OUString sRealType = sType;
 
-            #ifdef WORKAROUND_CSV_TXT_BUG_i60158
-            // Workaround for #i60158#
-            // We do not have right filter for Text_Ascii in calc nor a suitable filter for CSV in writer.
-            // So we must overrule our detection and make the right things. Normaly we should have
-            // one type TextAscii and two filters registered for these one type.
-            // But then we loose automatic opening of CSV files in calc instead of opening these files
-            // inside writer.
-            if ( sDocumentService == "com.sun.star.sheet.SpreadsheetDocument"
-                && ( sRealType == "writer_Text" || sRealType == "writer_Text_encoded" ) )
-            {
-                sRealType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc_Text_txt_csv_StarCalc" ));
-            }
-            else
-            if ( sDocumentService == "com.sun.star.text.TextDocument" && sRealType == "calc_Text_txt_csv_StarCalc" )
-            {
-                sRealType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer_Text" ));
-            }
-            #endif // WORKAROUND_CSV_TXT_BUG_i60158
-
             // SAFE ->
             ::osl::ResettableMutexGuard aLock(m_aLock);
 
@@ -637,22 +607,6 @@ sal_Bool TypeDetection::impl_getPreselectionForDocumentService(const ::rtl::OUSt
          ++pIt                          )
     {
         FlatDetectionInfo& rInfo = *pIt;
-
-        /*
-            #i60158#
-            Preselection by DocumentService ...
-            How many filters (and corresponding types) must be checked ?
-            All or only the list of filters/types, which match to the given URL too ?
-            There is no final decision about this currently. So we make it "configurable" .-)
-        */
-        #ifdef IGNORE_NON_URLMATCHING_TYPES_FOR_PRESELECTION_DOCUMENTSERVICE
-        if (
-            (!rInfo.bMatchByExtension) &&
-            (!rInfo.bMatchByPattern  )
-           )
-           continue;
-        #endif
-
         rInfo.bPreselectedAsType            = sal_False;
         rInfo.bPreselectedByFilter          = sal_False;
         rInfo.bPreselectedByDocumentService = sal_True ;


More information about the Libreoffice-commits mailing list