diff options
author | Eike Rathke <erack@redhat.com> | 2016-02-20 01:20:12 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2016-02-20 01:21:03 +0100 |
commit | 1684e347cd16ce91ecf27d94691b185a0110cc34 (patch) | |
tree | 3fe69af3997db7f704cae8e1d47958f365754b33 | |
parent | 59a175b692fd26200bf2dfbe411a969eef3e00f5 (diff) |
add missing IsFormulaWildcardsEnabled() calls, tdf#72196
Change-Id: Ia684cfe93c6a0e71a0fbbe22974501bf610e9190
-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(); |