diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/app/scmod.cxx | 1 |
2 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a444491d7c72..26b7f108717b 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -8512,9 +8512,8 @@ bool ScInterpreter::MayBeRegExp( const OUString& rStr, const ScDocument* pDoc, b bool ScInterpreter::MayBeWildcard( const OUString& rStr, const ScDocument* pDoc ) { - /* TODO: doc options will need a new enum (or a second bool that takes - * precedence over regex?) */ - (void)pDoc; + if ( pDoc && !pDoc->GetDocOptions().IsFormulaWildcardsEnabled() ) + return false; // Wildcards without '~' escape, if there are no wildcards then an escaped // character does not make sense. @@ -8537,8 +8536,7 @@ utl::SearchParam::SearchType ScInterpreter::DetectSearchType( const OUString& rS { if (pDoc) { - bool bWildcardEnabled = false; /* TODO: obtain doc option */ - if (bWildcardEnabled) + if (pDoc->GetDocOptions().IsFormulaWildcardsEnabled()) return MayBeWildcard( rStr, nullptr) ? utl::SearchParam::SRCH_WILDCARD : utl::SearchParam::SRCH_NORMAL; if (pDoc->GetDocOptions().IsFormulaRegexEnabled()) return MayBeRegExp( rStr, nullptr) ? utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL; diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 0ac43159c041..4d7e2d5105f9 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1115,6 +1115,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet ) || rOldOpt.IsMatchWholeCell() != rNewOpt.IsMatchWholeCell() || rOldOpt.GetYear2000() != rNewOpt.GetYear2000() || rOldOpt.IsFormulaRegexEnabled() != rNewOpt.IsFormulaRegexEnabled() + || rOldOpt.IsFormulaWildcardsEnabled() != rNewOpt.IsFormulaWildcardsEnabled() ); pDoc->SetDocOptions( rNewOpt ); pDocSh->SetDocumentModified(); |