summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2016-02-18 23:48:17 +0100
committerEike Rathke <erack@redhat.com>2016-02-19 00:10:14 +0100
commit06fa2a521b49afe44a387dbfcb65198382f6c57a (patch)
treea56f669b5dd23c16666e461f3b35a34083800b30 /sc/source/ui
parent92173313eae76d721580120b0de2c98fd83c5384 (diff)
change all bool bRegExp to utl::SearchParam::SearchType enum, tdf#72196
Later inspect all places that use utl::SearchParam::SRCH_REGEXP if and how to use utl::SearchParam::SRCH_WILDCARD as well. Change-Id: I6ad4e5dea3cd656fd670f2281aaceec817953211
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/dbgui/filtdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/foptmgr.cxx2
-rw-r--r--sc/source/ui/dbgui/pfiltdlg.cxx4
-rw-r--r--sc/source/ui/dbgui/sfiltdlg.cxx3
-rw-r--r--sc/source/ui/unoobj/datauno.cxx5
-rw-r--r--sc/source/ui/view/gridwin.cxx4
6 files changed, 11 insertions, 9 deletions
diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index eda750709393..79fe8ab38db0 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -688,7 +688,7 @@ ScQueryItem* ScFilterDlg::GetOutputItem()
theParam.bByRow = true;
theParam.bDuplicate = !pBtnUnique->IsChecked();
theParam.bCaseSens = pBtnCase->IsChecked();
- theParam.bRegExp = pBtnRegExp->IsChecked();
+ theParam.eSearchType = pBtnRegExp->IsChecked() ? utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL;
theParam.bDestPers = pBtnDestPers->IsChecked();
// only set the three - reset everything else
diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index e5ae0ec42c9a..db56b77a200c 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -85,7 +85,7 @@ void ScFilterOptionsMgr::Init()
pBtnCase ->Check( rQueryData.bCaseSens );
pBtnHeader ->Check( rQueryData.bHasHeader );
- pBtnRegExp ->Check( rQueryData.bRegExp );
+ pBtnRegExp ->Check( rQueryData.eSearchType == utl::SearchParam::SRCH_REGEXP );
pBtnUnique ->Check( !rQueryData.bDuplicate );
if ( pViewData && pDoc )
diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx
index d7ce3490cad5..0ad42d05c965 100644
--- a/sc/source/ui/dbgui/pfiltdlg.cxx
+++ b/sc/source/ui/dbgui/pfiltdlg.cxx
@@ -127,7 +127,7 @@ void ScPivotFilterDlg::Init( const SfxItemSet& rArgSet )
m_pLbConnect2->SetSelectHdl( LINK( this, ScPivotFilterDlg, LbSelectHdl ) );
m_pBtnCase->Check( theQueryData.bCaseSens );
- m_pBtnRegExp->Check( theQueryData.bRegExp );
+ m_pBtnRegExp->Check( theQueryData.eSearchType == utl::SearchParam::SRCH_REGEXP );
m_pBtnUnique->Check( !theQueryData.bDuplicate );
pViewData = rQueryItem.GetViewData();
@@ -419,7 +419,7 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem()
theParam.bDuplicate = !m_pBtnUnique->IsChecked();
theParam.bCaseSens = m_pBtnCase->IsChecked();
- theParam.bRegExp = m_pBtnRegExp->IsChecked();
+ theParam.eSearchType = m_pBtnRegExp->IsChecked() ? utl::SearchParam::SRCH_REGEXP : utl::SearchParam::SRCH_NORMAL;
if ( pOutItem ) DELETEZ( pOutItem );
pOutItem = new ScQueryItem( nWhichQuery, &theParam );
diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index a631c537b92b..990939dca7ff 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -363,7 +363,8 @@ IMPL_LINK_TYPED( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn, void )
theOutParam.bHasHeader = pBtnHeader->IsChecked();
theOutParam.bByRow = true;
theOutParam.bCaseSens = pBtnCase->IsChecked();
- theOutParam.bRegExp = pBtnRegExp->IsChecked();
+ theOutParam.eSearchType = pBtnRegExp->IsChecked() ? utl::SearchParam::SRCH_REGEXP :
+ utl::SearchParam::SRCH_NORMAL;
theOutParam.bDuplicate = !pBtnUnique->IsChecked();
theOutParam.bDestPers = pBtnDestPers->IsChecked();
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 70921f106245..ba4858f10903 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -1471,7 +1471,8 @@ void SAL_CALL ScFilterDescriptorBase::setPropertyValue(
else if (aString == SC_UNONAME_SKIPDUP)
aParam.bDuplicate = !(ScUnoHelpFunctions::GetBoolFromAny( aValue ));
else if (aString == SC_UNONAME_USEREGEX)
- aParam.bRegExp = ScUnoHelpFunctions::GetBoolFromAny( aValue );
+ aParam.eSearchType = ScUnoHelpFunctions::GetBoolFromAny( aValue ) ? utl::SearchParam::SRCH_REGEXP :
+ utl::SearchParam::SRCH_NORMAL;
PutData(aParam);
}
@@ -1514,7 +1515,7 @@ uno::Any SAL_CALL ScFilterDescriptorBase::getPropertyValue( const OUString& aPro
else if (aString == SC_UNONAME_SKIPDUP )
ScUnoHelpFunctions::SetBoolInAny( aRet, !(aParam.bDuplicate) );
else if (aString == SC_UNONAME_USEREGEX )
- ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.bRegExp );
+ ScUnoHelpFunctions::SetBoolInAny( aRet, aParam.eSearchType == utl::SearchParam::SRCH_REGEXP );
return aRet;
}
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 303391516aee..1191c664d8c4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -1434,7 +1434,7 @@ void ScGridWindow::ExecFilter( sal_uLong nSel,
bool bFound = false;
if (!aParam.bInplace)
bDeleteOld = true;
- if (aParam.bRegExp)
+ if (aParam.eSearchType != utl::SearchParam::SRCH_NORMAL)
bDeleteOld = true;
SCSIZE nCount = aParam.GetEntryCount();
for (SCSIZE i = 0; i < nCount && !bDeleteOld; ++i) // current filter settings
@@ -1465,7 +1465,7 @@ void ScGridWindow::ExecFilter( sal_uLong nSel,
aParam.GetEntry(i).Clear();
nQueryPos = 0;
aParam.bInplace = true;
- aParam.bRegExp = false;
+ aParam.eSearchType = utl::SearchParam::SRCH_NORMAL;
}
if ( nQueryPos < nCount || SC_AUTOFILTER_ALL == nSel ) // delete is always possible