Kaydet (Commit) 3f1b1f7f authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Scope reduction by early bailout.

Change-Id: I3a5c944d6ed863c347da03e0a60ff653232b3e72
üst b5f6358c
...@@ -1643,22 +1643,37 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const ...@@ -1643,22 +1643,37 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName); const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(rPropertyName);
if( mpObj.is() && mpModel ) if (!mpObj.is() || !mpModel)
{
// Since we have no actual sdr object right now, remember all
// properties in a list. These properties will be set when the sdr
// object is created.
if (pMap && pMap->nWID)
{ {
if( pMap == NULL ) // FIXME: We should throw a UnknownPropertyException here.
// But since this class is aggregated from classes that
// support additional properties that we don't know here we
// silently store *all* properties, even if they may be not
// supported after creation.
mpPropSet->setPropertyValue( pMap, rVal );
}
return;
}
if (!pMap)
throw beans::UnknownPropertyException(); throw beans::UnknownPropertyException();
if( (pMap->nFlags & beans::PropertyAttribute::READONLY ) != 0 ) if ((pMap->nFlags & beans::PropertyAttribute::READONLY) != 0)
throw beans::PropertyVetoException( throw beans::PropertyVetoException(
( OUString( OUString("Readonly property can't be set: ") + rPropertyName,
"Readonly property can't be set: " ) uno::Reference<drawing::XShape>(this));
+ rPropertyName ),
uno::Reference< drawing::XShape >( this ) );
mpModel->SetChanged(); mpModel->SetChanged();
if(!setPropertyValueImpl( rPropertyName, pMap, rVal ) ) if (setPropertyValueImpl(rPropertyName, pMap, rVal))
{ return;
DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" ); DBG_ASSERT( pMap->nWID == SDRATTR_TEXTDIRECTION || pMap->nWID < SDRATTR_NOTPERSIST_FIRST || pMap->nWID > SDRATTR_NOTPERSIST_LAST, "Not persist item not handled!" );
DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" ); DBG_ASSERT( pMap->nWID < OWN_ATTR_VALUE_START || pMap->nWID > OWN_ATTR_VALUE_END, "Not item property not handled!" );
...@@ -1732,24 +1747,6 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const ...@@ -1732,24 +1747,6 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
delete pSet; delete pSet;
} }
} }
return;
}
}
else
{
// since we have no actual sdr object right now
// remember all properties in a list. These
// properties will be set when the sdr object is
// created
if(pMap && pMap->nWID)
// Fixme: We should throw a UnknownPropertyException here.
// But since this class is aggregated from classes
// that support additional properties that we don't
// know here we silently store *all* properties, even
// if they may be not supported after creation
mpPropSet->setPropertyValue( pMap, rVal );
}
} }
......
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