convert ScaCategory to scoped enum
and drop unused AddIn constant Change-Id: I4422f34db756649cb08aa9aa7f975cef73ccfa91
This commit is contained in:
@@ -52,14 +52,14 @@ ScaResId::ScaResId( sal_uInt16 nId, ResMgr& rResMgr ) :
|
||||
|
||||
const ScaFuncDataBase pFuncDataArr[] =
|
||||
{
|
||||
FUNCDATA( DiffWeeks, 3, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DiffMonths, 3, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DiffYears, 3, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( IsLeapYear, 1, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DaysInMonth, 1, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DaysInYear, 1, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( WeeksInYear, 1, ScaCat_DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( Rot13, 1, ScaCat_Text, UNIQUE, STDPAR )
|
||||
FUNCDATA( DiffWeeks, 3, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DiffMonths, 3, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DiffYears, 3, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( IsLeapYear, 1, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DaysInMonth, 1, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( DaysInYear, 1, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( WeeksInYear, 1, ScaCategory::DateTime, UNIQUE, INTPAR ),
|
||||
FUNCDATA( Rot13, 1, ScaCategory::Text, UNIQUE, STDPAR )
|
||||
};
|
||||
|
||||
#undef FUNCDATA
|
||||
@@ -353,15 +353,12 @@ OUString SAL_CALL ScaDateAddIn::getProgrammaticCategoryName(
|
||||
{
|
||||
switch( fDataIt->GetCategory() )
|
||||
{
|
||||
case ScaCat_DateTime: aRet = STR_FROM_ANSI( "Date&Time" ); break;
|
||||
case ScaCat_Text: aRet = STR_FROM_ANSI( "Text" ); break;
|
||||
case ScaCat_Finance: aRet = STR_FROM_ANSI( "Financial" ); break;
|
||||
case ScaCat_Inf: aRet = STR_FROM_ANSI( "Information" ); break;
|
||||
case ScaCat_Math: aRet = STR_FROM_ANSI( "Mathematical" ); break;
|
||||
case ScaCat_Tech: aRet = STR_FROM_ANSI( "Technical" ); break;
|
||||
// coverity[dead_error_begin] - following conditions exist to avoid compiler warning
|
||||
default:
|
||||
break;
|
||||
case ScaCategory::DateTime: aRet = STR_FROM_ANSI( "Date&Time" ); break;
|
||||
case ScaCategory::Text: aRet = STR_FROM_ANSI( "Text" ); break;
|
||||
case ScaCategory::Finance: aRet = STR_FROM_ANSI( "Financial" ); break;
|
||||
case ScaCategory::Inf: aRet = STR_FROM_ANSI( "Information" ); break;
|
||||
case ScaCategory::Math: aRet = STR_FROM_ANSI( "Mathematical" ); break;
|
||||
case ScaCategory::Tech: aRet = STR_FROM_ANSI( "Technical" ); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -102,15 +102,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
enum ScaCategory
|
||||
enum class ScaCategory
|
||||
{
|
||||
ScaCat_AddIn,
|
||||
ScaCat_DateTime,
|
||||
ScaCat_Text,
|
||||
ScaCat_Finance,
|
||||
ScaCat_Inf,
|
||||
ScaCat_Math,
|
||||
ScaCat_Tech
|
||||
DateTime,
|
||||
Text,
|
||||
Finance,
|
||||
Inf,
|
||||
Math,
|
||||
Tech
|
||||
};
|
||||
|
||||
struct ScaFuncDataBase
|
||||
@@ -121,8 +120,8 @@ struct ScaFuncDataBase
|
||||
sal_uInt16 nCompListID; // resource ID to list of valid names
|
||||
sal_uInt16 nParamCount; // number of named / described parameters
|
||||
ScaCategory eCat; // function category
|
||||
bool bDouble; // name already exist in Calc
|
||||
bool bWithOpt; // first parameter is internal
|
||||
bool bDouble; // name already exist in Calc
|
||||
bool bWithOpt; // first parameter is internal
|
||||
};
|
||||
|
||||
class ScaFuncData final
|
||||
|
Reference in New Issue
Block a user