Avoid undef out-of-range value -1 for XPropertyListType enum
Change-Id: If2dedafe6d8517eba4dd4921d15dd2d969d181dd
This commit is contained in:
parent
8dbe122315
commit
c05105151b
2 changed files with 3 additions and 2 deletions
|
@ -172,6 +172,7 @@ public:
|
|||
|
||||
|
||||
enum XPropertyListType {
|
||||
UNKNOWN_XPROPERTYLISTTYPE = -1,
|
||||
XCOLOR_LIST,
|
||||
XLINE_END_LIST,
|
||||
XDASH_LIST,
|
||||
|
|
|
@ -281,7 +281,7 @@ static XPropertyListType getTypeOfName( const OUString &aName )
|
|||
if( aName.equalsAscii( aURLPropertyNames[i].pName ) )
|
||||
return aURLPropertyNames[i].t;
|
||||
}
|
||||
return (XPropertyListType) -1;
|
||||
return UNKNOWN_XPROPERTYLISTTYPE;
|
||||
}
|
||||
|
||||
static OUString getNameOfType( XPropertyListType t )
|
||||
|
@ -306,7 +306,7 @@ uno::Sequence<beans::PropertyValue>
|
|||
for( sal_Int32 i = 0; i < aConfigProps.getLength(); i++ )
|
||||
{
|
||||
XPropertyListType t = getTypeOfName( aConfigProps[i].Name );
|
||||
if (t < 0)
|
||||
if (t == UNKNOWN_XPROPERTYLISTTYPE)
|
||||
aRet[nRet++] = aConfigProps[i];
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue