summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-23 12:46:19 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-23 20:08:11 -0400
commit9613a480ceff548ec1f4fedd76e39a2a0c767942 (patch)
tree8c4dd1c4d96cd2f66dc84830d758cf2ff119be75 /filter
parent5b81e2df42dc5534b77fa3601c251530ffb7925e (diff)
These hacks no longer work. Remove it and find a better solution.
This already didn't work in 3.5. Change-Id: I12afc1bcdc5c20a7846833763080dac02214e01b
Diffstat (limited to 'filter')
-rw-r--r--filter/source/config/cache/typedetection.cxx46
1 files changed, 0 insertions, 46 deletions
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 47a06e197d95..0b7a8874a97f 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 ;