diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-25 14:57:35 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-05-25 14:57:35 -0400 |
commit | 58652054727a29701795f2849c87f320de05c4dd (patch) | |
tree | d33562745fd9156bb16278596c47f20ea0b476b4 | |
parent | 9036eea41fae3cc317cb71a6924995a0221ea371 (diff) |
The logic behind these two flags no longer makes sense.
Change-Id: Ie2fada1c641d2bc313ddb14903083beab08f8a98
-rw-r--r-- | filter/source/config/cache/cacheitem.hxx | 8 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 29 |
2 files changed, 0 insertions, 37 deletions
diff --git a/filter/source/config/cache/cacheitem.hxx b/filter/source/config/cache/cacheitem.hxx index d76aa92dd1ee..486b2994aec8 100644 --- a/filter/source/config/cache/cacheitem.hxx +++ b/filter/source/config/cache/cacheitem.hxx @@ -235,12 +235,6 @@ struct FlatDetectionInfo // this type was found by a matching URL Pattern sal_Bool bMatchByPattern; - // the user selected this type explicitly - sal_Bool bPreselectedAsType; - - // the user selected this type implicit by selecting a corresponding filter - sal_Bool bPreselectedByFilter; - // the user selected this type implicit by selecting a corresponding office module sal_Bool bPreselectedByDocumentService; @@ -248,8 +242,6 @@ struct FlatDetectionInfo : sType (::rtl::OUString()) , bMatchByExtension (sal_False ) , bMatchByPattern (sal_False ) - , bPreselectedAsType (sal_False ) - , bPreselectedByFilter (sal_False ) , bPreselectedByDocumentService(sal_False ) {} }; diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 303ebfcfeb7e..93e80151f538 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -505,7 +505,6 @@ sal_Bool TypeDetection::impl_getPreselectionForType(const ::rtl::OUString& sPreS aInfo.sType = sType; aInfo.bMatchByExtension = bMatchByExtension; aInfo.bMatchByPattern = bMatchByPattern; - aInfo.bPreselectedAsType = sal_True; if (bPreferredPreselection) rFlatTypes.push_front(aInfo); @@ -561,17 +560,6 @@ sal_Bool TypeDetection::impl_getPreselectionForFilter(const ::rtl::OUString& sPr sFilter = ::rtl::OUString(); } - // We have to mark all retrieved preselection items as "preselected by filter"! - FlatDetection::iterator pIt; - for ( pIt = rFlatTypes.begin(); - pIt != rFlatTypes.end() ; - ++pIt ) - { - FlatDetectionInfo& rInfo = *pIt; - rInfo.bPreselectedAsType = sal_False; - rInfo.bPreselectedByFilter = sal_True; - } - if (!sFilter.isEmpty()) return sal_True; else @@ -630,8 +618,6 @@ sal_Bool TypeDetection::impl_getPreselectionForDocumentService(const ::rtl::OUSt ++pIt ) { FlatDetectionInfo& rInfo = *pIt; - rInfo.bPreselectedAsType = sal_False; - rInfo.bPreselectedByFilter = sal_False; rInfo.bPreselectedByDocumentService = sal_True ; rFlatTypes.push_back(rInfo); } @@ -733,21 +719,6 @@ void TypeDetection::impl_getPreselection(const css::util::URL& aP // c) if (sDetectService.isEmpty()) { - // accept or not accept flat types without deep detection: that's the question :-) - // May be there exists some states, where we have to use our LastChance feature instead - // of using the flat type directly. - // Here the list of task ID's, which wasrelated to these lines of code: - // #i47159#, #i43404#, #i46494# - - // a flat detected type without the chance for a deep detection ... but preselected by the user - // explicitly (means preselected as type or filter ... not as documentservice!) - // should be accepted. So the user can overrule our detection. - if ( - (aFlatTypeInfo.bPreselectedAsType ) || - (aFlatTypeInfo.bPreselectedByFilter) - ) - return sFlatType; - // flat detected types without any registered deep detection service and not // preselected by the user can be used as LAST CHANCE in case no other type could // be detected. Of course only the first type without deep detector can be used. |