summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/unopage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/unoidl/unopage.cxx')
-rw-r--r--sd/source/ui/unoidl/unopage.cxx33
1 files changed, 15 insertions, 18 deletions
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index b612cc66ce46..8749fa94d287 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2809,29 +2809,26 @@ void SdMasterPage::setBackground( const Any& rValue )
{
Reference< container::XNameAccess > xFamilies( GetModel()->getStyleFamilies(), UNO_QUERY_THROW );
Reference< container::XNameAccess > xFamily( xFamilies->getByName( getName() ), UNO_QUERY_THROW ) ;
- if( xFamily.is() )
- {
- OUString aStyleName(sUNO_PseudoSheet_Background);
+ OUString aStyleName(sUNO_PseudoSheet_Background);
- Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( aStyleName ), UNO_QUERY_THROW );
+ Reference< beans::XPropertySet > xStyleSet( xFamily->getByName( aStyleName ), UNO_QUERY_THROW );
- Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_QUERY_THROW );
- Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY );
+ Reference< beans::XPropertySetInfo > xSetInfo( xInputSet->getPropertySetInfo(), UNO_QUERY_THROW );
+ Reference< beans::XPropertyState > xSetStates( xInputSet, UNO_QUERY );
- PropertyEntryVector_t aBackgroundProperties = ImplGetPageBackgroundPropertySet()->getPropertyMap().getPropertyEntries();
- PropertyEntryVector_t::const_iterator aIt = aBackgroundProperties.begin();
- while( aIt != aBackgroundProperties.end() )
+ PropertyEntryVector_t aBackgroundProperties = ImplGetPageBackgroundPropertySet()->getPropertyMap().getPropertyEntries();
+ PropertyEntryVector_t::const_iterator aIt = aBackgroundProperties.begin();
+ while( aIt != aBackgroundProperties.end() )
+ {
+ if( xSetInfo->hasPropertyByName( aIt->sName ) )
{
- if( xSetInfo->hasPropertyByName( aIt->sName ) )
- {
- if( !xSetStates.is() || xSetStates->getPropertyState( aIt->sName ) == beans::PropertyState_DIRECT_VALUE )
- xStyleSet->setPropertyValue( aIt->sName, xInputSet->getPropertyValue( aIt->sName ) );
- else
- xSetStates->setPropertyToDefault( aIt->sName );
- }
-
- ++aIt;
+ if( !xSetStates.is() || xSetStates->getPropertyState( aIt->sName ) == beans::PropertyState_DIRECT_VALUE )
+ xStyleSet->setPropertyValue( aIt->sName, xInputSet->getPropertyValue( aIt->sName ) );
+ else
+ xSetStates->setPropertyToDefault( aIt->sName );
}
+
+ ++aIt;
}
}
else