summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/animations/CustomAnimationPane.cxx9
-rw-r--r--sd/source/ui/presenter/PresenterTextView.cxx8
-rw-r--r--sd/source/ui/table/TableDesignPane.cxx35
-rw-r--r--sd/source/ui/unoidl/unopage.cxx33
4 files changed, 36 insertions, 49 deletions
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index e7f8c553d6a2..cca48273915f 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -859,12 +859,9 @@ void CustomAnimationPane::onSelectionChanged()
if( mxView.is() ) try
{
Reference< XSelectionSupplier > xSel( mxView, UNO_QUERY_THROW );
- if (xSel.is())
- {
- maViewSelection = xSel->getSelection();
- mpCustomAnimationList->onSelectionChanged( maViewSelection );
- updateControls();
- }
+ maViewSelection = xSel->getSelection();
+ mpCustomAnimationList->onSelectionChanged( maViewSelection );
+ updateControls();
}
catch( Exception& )
{
diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx
index 42406d994f55..a1b7ca35ba8f 100644
--- a/sd/source/ui/presenter/PresenterTextView.cxx
+++ b/sd/source/ui/presenter/PresenterTextView.cxx
@@ -123,12 +123,8 @@ void SAL_CALL PresenterTextView::initialize (const Sequence<Any>& rArguments)
}
Reference<rendering::XCanvas> xCanvas (rArguments[0], UNO_QUERY_THROW);
- if (xCanvas.is())
- {
- mpImplementation->SetCanvas(
- cppcanvas::VCLFactory::createCanvas(xCanvas));
- }
-
+ mpImplementation->SetCanvas(
+ cppcanvas::VCLFactory::createCanvas(xCanvas));
}
Any PresenterTextView::GetPropertyValue (const OUString& rsPropertyName)
diff --git a/sd/source/ui/table/TableDesignPane.cxx b/sd/source/ui/table/TableDesignPane.cxx
index 23a8dd2499e4..a752b7407a70 100644
--- a/sd/source/ui/table/TableDesignPane.cxx
+++ b/sd/source/ui/table/TableDesignPane.cxx
@@ -246,27 +246,24 @@ void TableDesignWidget::onSelectionChanged()
if( mxView.is() ) try
{
Reference< XSelectionSupplier > xSel( mxView, UNO_QUERY_THROW );
- if (xSel.is())
+ Any aSel( xSel->getSelection() );
+ Sequence< XShape > xShapeSeq;
+ if( aSel >>= xShapeSeq )
{
- Any aSel( xSel->getSelection() );
- Sequence< XShape > xShapeSeq;
- if( aSel >>= xShapeSeq )
- {
- if( xShapeSeq.getLength() == 1 )
- aSel <<= xShapeSeq[0];
- }
- else
- {
- Reference< XShapes > xShapes( aSel, UNO_QUERY );
- if( xShapes.is() && (xShapes->getCount() == 1) )
- aSel = xShapes->getByIndex(0);
- }
+ if( xShapeSeq.getLength() == 1 )
+ aSel <<= xShapeSeq[0];
+ }
+ else
+ {
+ Reference< XShapes > xShapes( aSel, UNO_QUERY );
+ if( xShapes.is() && (xShapes->getCount() == 1) )
+ aSel = xShapes->getByIndex(0);
+ }
- Reference< XShapeDescriptor > xDesc( aSel, UNO_QUERY );
- if( xDesc.is() && ( xDesc->getShapeType() == "com.sun.star.drawing.TableShape" || xDesc->getShapeType() == "com.sun.star.presentation.TableShape" ) )
- {
- xNewSelection.set( xDesc, UNO_QUERY );
- }
+ Reference< XShapeDescriptor > xDesc( aSel, UNO_QUERY );
+ if( xDesc.is() && ( xDesc->getShapeType() == "com.sun.star.drawing.TableShape" || xDesc->getShapeType() == "com.sun.star.presentation.TableShape" ) )
+ {
+ xNewSelection.set( xDesc, UNO_QUERY );
}
}
catch( Exception& )
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