summaryrefslogtreecommitdiff
path: root/svx/source/dialog/srchdlg.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-04-16 14:51:57 +0200
committerNoel Grandin <noel@peralex.com>2015-04-22 10:28:39 +0200
commitf87e0957cdcbf9ee12e0615b55a1bb1de1d70efb (patch)
tree382b29377011cb05cf57f67cdecd607ab17cbbd9 /svx/source/dialog/srchdlg.cxx
parent8b98bc855d7436828553948a1d28d686848e139c (diff)
convert SVX_SEARCHIN_ flags to scoped enum
Change-Id: Iac7216c66afef6cbd355f7047655baaadc0f74db
Diffstat (limited to 'svx/source/dialog/srchdlg.cxx')
-rw-r--r--svx/source/dialog/srchdlg.cxx23
1 files changed, 12 insertions, 11 deletions
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index 72ad2758a269..1b48ab549043 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -765,23 +765,24 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern )
m_pColumnsBtn->SetClickHdl( aLink );
m_pAllSheetsCB->SetClickHdl( aLink );
+ sal_uIntPtr nModifyFlagCheck;
switch ( pSearchItem->GetCellType() )
{
- case SVX_SEARCHIN_FORMULA:
- if ( ( nModifyFlag & MODIFY_FORMULAS ) == 0 )
- m_pCalcSearchInLB->SelectEntryPos( SVX_SEARCHIN_FORMULA );
+ case SvxSearchCellType::FORMULA:
+ nModifyFlagCheck = MODIFY_FORMULAS;
break;
- case SVX_SEARCHIN_VALUE:
- if ( ( nModifyFlag & MODIFY_VALUES ) == 0 )
- m_pCalcSearchInLB->SelectEntryPos( SVX_SEARCHIN_VALUE );
+ case SvxSearchCellType::VALUE:
+ nModifyFlagCheck = MODIFY_VALUES;
break;
- case SVX_SEARCHIN_NOTE:
- if ( ( nModifyFlag & MODIFY_CALC_NOTES ) == 0 )
- m_pCalcSearchInLB->SelectEntryPos( SVX_SEARCHIN_NOTE );
+ case SvxSearchCellType::NOTE:
+ nModifyFlagCheck = MODIFY_CALC_NOTES;
break;
}
+ if ( ( nModifyFlag & MODIFY_FORMULAS ) == 0 )
+ m_pCalcSearchInLB->SelectEntryPos( static_cast<sal_Int32>(pSearchItem->GetCellType()) );
+
m_pWordBtn->SetText( aCalcStr.getToken( 0, '#' ) );
if ( pSearchItem->GetRowDirection() &&
@@ -1235,7 +1236,7 @@ IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
if ( !bWriter )
{
if ( m_pCalcSearchInLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
- pSearchItem->SetCellType( m_pCalcSearchInLB->GetSelectEntryPos() );
+ pSearchItem->SetCellType( static_cast<SvxSearchCellType>(m_pCalcSearchInLB->GetSelectEntryPos()) );
pSearchItem->SetRowDirection( m_pRowsBtn->IsChecked() );
pSearchItem->SetAllTables( m_pAllSheetsCB->IsChecked() );
@@ -2184,7 +2185,7 @@ void SvxSearchDialog::SaveToModule_Impl()
if ( !bWriter )
{
if ( m_pCalcSearchInLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND )
- pSearchItem->SetCellType( m_pCalcSearchInLB->GetSelectEntryPos() );
+ pSearchItem->SetCellType( static_cast<SvxSearchCellType>(m_pCalcSearchInLB->GetSelectEntryPos()) );
pSearchItem->SetRowDirection( m_pRowsBtn->IsChecked() );
pSearchItem->SetAllTables( m_pAllSheetsCB->IsChecked() );