Kaydet (Commit) 1ed454c7 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Make GetProperty more clear

Change-Id: I23ba7950364fa402f1337e8557c3cf8cd9c810cc
üst d22a4d94
...@@ -118,32 +118,37 @@ void DrawingML::ResetCounters() ...@@ -118,32 +118,37 @@ void DrawingML::ResetCounters()
maWdpCache.clear(); maWdpCache.clear();
} }
bool DrawingML::GetProperty( Reference< XPropertySet > rXPropSet, const OUString& aName ) bool DrawingML::GetProperty( Reference< XPropertySet > rXPropertySet, const OUString& aName )
{ {
bool bRetValue = false; try
{
try { mAny = rXPropertySet->getPropertyValue(aName);
mAny = rXPropSet->getPropertyValue( aName ); if (mAny.hasValue())
if ( mAny.hasValue() ) return true;
bRetValue = true; }
} catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", USS(aName)); */ } catch( const Exception& )
{
return bRetValue; /* printf ("exception when trying to get value of property: %s\n", USS(aName)); */
}
return false;
} }
bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropSet, Reference< XPropertyState > rXPropState, const OUString& aName, PropertyState& eState ) bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropertySet, Reference< XPropertyState > rXPropertyState, const OUString& aName, PropertyState& eState )
{ {
bool bRetValue = false; try
{
try { mAny = rXPropertySet->getPropertyValue(aName);
mAny = rXPropSet->getPropertyValue( aName ); if (mAny.hasValue())
if ( mAny.hasValue() ) { {
bRetValue = true; eState = rXPropertyState->getPropertyState(aName);
eState = rXPropState->getPropertyState( aName ); return true;
} }
} catch( const Exception& ) { /* printf ("exception when trying to get value of property: %s\n", USS(aName)); */ } }
catch( const Exception& )
return bRetValue; {
/* printf ("exception when trying to get value of property: %s\n", USS(aName)); */
}
return false;
} }
void DrawingML::WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha ) void DrawingML::WriteColor( sal_uInt32 nColor, sal_Int32 nAlpha )
......
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