From f87e0957cdcbf9ee12e0615b55a1bb1de1d70efb Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 16 Apr 2015 14:51:57 +0200 Subject: convert SVX_SEARCHIN_ flags to scoped enum Change-Id: Iac7216c66afef6cbd355f7047655baaadc0f74db --- svl/source/items/srchitem.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'svl') diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx index 4a1f981611a5..e46d2557e7d9 100644 --- a/svl/source/items/srchitem.cxx +++ b/svl/source/items/srchitem.cxx @@ -116,7 +116,7 @@ SvxSearchItem::SvxSearchItem( const sal_uInt16 nId ) : TransliterationModules_IGNORE_CASE ), eFamily ( SFX_STYLE_FAMILY_PARA ), nCommand ( SvxSearchCmd::FIND ), - nCellType ( SVX_SEARCHIN_FORMULA ), + nCellType ( SvxSearchCellType::FORMULA ), nAppFlag ( SvxSearchApp::WRITER ), bRowDirection ( true ), bAllTables ( false ), @@ -378,7 +378,7 @@ bool SvxSearchItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMembe aSeq[2].Name = SRCH_PARA_COMMAND; aSeq[2].Value <<= static_cast(nCommand); aSeq[3].Name = SRCH_PARA_CELLTYPE; - aSeq[3].Value <<= nCellType; + aSeq[3].Value <<= static_cast(nCellType); aSeq[4].Name = SRCH_PARA_APPFLAG; aSeq[4].Value <<= static_cast(nAppFlag); aSeq[5].Name = SRCH_PARA_ROWDIR; @@ -495,8 +495,12 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM } else if ( aSeq[i].Name == SRCH_PARA_CELLTYPE ) { - if ( aSeq[i].Value >>= nCellType ) + sal_uInt16 nTmp; + if ( aSeq[i].Value >>= nTmp ) + { + nCellType = static_cast(nTmp); ++nConvertedCount; + } } else if ( aSeq[i].Name == SRCH_PARA_APPFLAG ) { @@ -553,7 +557,7 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM case MID_SEARCH_STYLEFAMILY: bRet = (rVal >>= nInt); eFamily = (SfxStyleFamily) (sal_Int16) nInt; break; case MID_SEARCH_CELLTYPE: - bRet = (rVal >>= nInt); nCellType = (sal_uInt16) nInt; break; + bRet = (rVal >>= nInt); nCellType = static_cast(nInt); break; case MID_SEARCH_ROWDIRECTION: bRet = (rVal >>= bRowDirection); break; case MID_SEARCH_ALLTABLES: -- cgit