Kaydet (Commit) 227be0d8 authored tarafından Michael Stahl's avatar Michael Stahl

xmloff: convert legacy asserts in MultiPropertySetHelper

Change-Id: Ie4fb04d1c8d29eb5c7d9da4076c793a69954ab29
üst 42773c66
...@@ -172,11 +172,9 @@ public: ...@@ -172,11 +172,9 @@ public:
const ::com::sun::star::uno::Any& MultiPropertySetHelper::getValue( const ::com::sun::star::uno::Any& MultiPropertySetHelper::getValue(
sal_Int16 nValueNo ) sal_Int16 nValueNo )
{ {
DBG_ASSERT( pValues != NULL, assert(pValues && "called getValue() without calling getValues()");
"called getValue() without calling getValues() before"); assert(pSequenceIndex && "called getValue() without calling hasProperties()");
DBG_ASSERT( pSequenceIndex != NULL, assert(nValueNo < nLength);
"called getValue() without calling hasProperties() before" );
DBG_ASSERT( nValueNo < nLength, "index out of range" );
sal_Int16 nIndex = pSequenceIndex[ nValueNo ]; sal_Int16 nIndex = pSequenceIndex[ nValueNo ];
return ( nIndex != -1 ) ? pValues[ nIndex ] : aEmptyAny; return ( nIndex != -1 ) ? pValues[ nIndex ] : aEmptyAny;
...@@ -184,9 +182,8 @@ const ::com::sun::star::uno::Any& MultiPropertySetHelper::getValue( ...@@ -184,9 +182,8 @@ const ::com::sun::star::uno::Any& MultiPropertySetHelper::getValue(
bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo ) bool MultiPropertySetHelper::hasProperty( sal_Int16 nValueNo )
{ {
DBG_ASSERT( pSequenceIndex != NULL, assert(pSequenceIndex && "called hasProperty() without calling hasProperties()");
"called getValue() without calling hasProperties() before" ); assert(nValueNo < nLength);
DBG_ASSERT( nValueNo < nLength, "index out of range" );
return pSequenceIndex[ nValueNo ] != -1; return pSequenceIndex[ nValueNo ] != -1;
} }
......
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