Kaydet (Commit) c0510515 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid undef out-of-range value -1 for XPropertyListType enum

Change-Id: If2dedafe6d8517eba4dd4921d15dd2d969d181dd
üst 8dbe1223
...@@ -172,6 +172,7 @@ public: ...@@ -172,6 +172,7 @@ public:
enum XPropertyListType { enum XPropertyListType {
UNKNOWN_XPROPERTYLISTTYPE = -1,
XCOLOR_LIST, XCOLOR_LIST,
XLINE_END_LIST, XLINE_END_LIST,
XDASH_LIST, XDASH_LIST,
......
...@@ -281,7 +281,7 @@ static XPropertyListType getTypeOfName( const OUString &aName ) ...@@ -281,7 +281,7 @@ static XPropertyListType getTypeOfName( const OUString &aName )
if( aName.equalsAscii( aURLPropertyNames[i].pName ) ) if( aName.equalsAscii( aURLPropertyNames[i].pName ) )
return aURLPropertyNames[i].t; return aURLPropertyNames[i].t;
} }
return (XPropertyListType) -1; return UNKNOWN_XPROPERTYLISTTYPE;
} }
static OUString getNameOfType( XPropertyListType t ) static OUString getNameOfType( XPropertyListType t )
...@@ -306,7 +306,7 @@ uno::Sequence<beans::PropertyValue> ...@@ -306,7 +306,7 @@ uno::Sequence<beans::PropertyValue>
for( sal_Int32 i = 0; i < aConfigProps.getLength(); i++ ) for( sal_Int32 i = 0; i < aConfigProps.getLength(); i++ )
{ {
XPropertyListType t = getTypeOfName( aConfigProps[i].Name ); XPropertyListType t = getTypeOfName( aConfigProps[i].Name );
if (t < 0) if (t == UNKNOWN_XPROPERTYLISTTYPE)
aRet[nRet++] = aConfigProps[i]; aRet[nRet++] = aConfigProps[i];
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment