summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-27 10:08:03 +0200
committerNoel Grandin <noel@peralex.com>2015-03-02 08:59:18 +0200
commit3c866bb8e42554ac96d3588208e167e7786e2d00 (patch)
tree9214124ed0b7d8274c5609725ed72a97466bbfce /svl
parentf9ba16e44b2813dd1fc9b0e06994f67c6350f050 (diff)
replace SVX_SEARCHCMD_ constants with enum class
Change-Id: I675c488742219cc19624a21d1fc8e5033e7cbefa
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/srchitem.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 0c69751c66cf..9e9a045d851e 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -112,7 +112,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) :
2, 2, 2,
TransliterationModules_IGNORE_CASE ),
eFamily ( SFX_STYLE_FAMILY_PARA ),
- nCommand ( 0 ),
+ nCommand ( SvxSearchCmd::FIND ),
nCellType ( SVX_SEARCHIN_FORMULA ),
nAppFlag ( SVX_SEARCHAPP_WRITER ),
bRowDirection ( true ),
@@ -373,7 +373,7 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe
aSeq[1].Name = SRCH_PARA_FAMILY;
aSeq[1].Value <<= sal_Int16( eFamily );
aSeq[2].Name = SRCH_PARA_COMMAND;
- aSeq[2].Value <<= nCommand;
+ aSeq[2].Value <<= static_cast<sal_uInt16>(nCommand);
aSeq[3].Name = SRCH_PARA_CELLTYPE;
aSeq[3].Value <<= nCellType;
aSeq[4].Name = SRCH_PARA_APPFLAG;
@@ -483,8 +483,12 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
}
else if ( aSeq[i].Name == SRCH_PARA_COMMAND )
{
- if ( aSeq[i].Value >>= nCommand )
+ sal_uInt16 nTmp;
+ if ( aSeq[i].Value >>= nTmp )
+ {
+ nCommand = static_cast<SvxSearchCmd>(nTmp);
++nConvertedCount;
+ }
}
else if ( aSeq[i].Name == SRCH_PARA_CELLTYPE )
{
@@ -538,7 +542,7 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
break;
}
case MID_SEARCH_COMMAND:
- bRet = (rVal >>= nInt); nCommand = (sal_uInt16) nInt; break;
+ bRet = (rVal >>= nInt); nCommand = static_cast<SvxSearchCmd>(nInt); break;
case MID_SEARCH_STYLEFAMILY:
bRet = (rVal >>= nInt); eFamily = (SfxStyleFamily) (sal_Int16) nInt; break;
case MID_SEARCH_CELLTYPE: