diff options
Diffstat (limited to 'chart2/source/view/main')
-rw-r--r-- | chart2/source/view/main/ChartView.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx index 549ef0273595..c5ba0c38ab05 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2829,7 +2829,11 @@ void ChartView::impl_notifyModeChangeListener( const rtl::OUString& rNewMode ) util::ModeChangeEvent aEvent( static_cast< uno::XWeak* >( this ), rNewMode ); ::cppu::OInterfaceIteratorHelper aIt( *pIC ); while( aIt.hasMoreElements() ) - (static_cast< util::XModeChangeListener*>(aIt.next()))->modeChanged( aEvent ); + { + uno::Reference< util::XModeChangeListener > xListener( aIt.next(), uno::UNO_QUERY ); + if( xListener.is() ) + xListener->modeChanged( aEvent ); + } } } catch( uno::Exception& ex) diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index f0bcc12c0440..7101a984ee24 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -714,11 +714,16 @@ void VLegend::createShapes( LegendExpansion eExpansion = LegendExpansion_HIGH; if( xLegendProp.is()) { - lcl_getProperties( xLegendProp, aLineFillProperties, aTextProperties, nMaxLabelWidth, - rPageSize ); - // get Expansion property xLegendProp->getPropertyValue( C2U( "Expansion" )) >>= eExpansion; + if( eExpansion == LegendExpansion_WIDE ) + { + //#i80377# + nMaxLabelWidth = (rAvailableSpace.Width * 5) / 6;//completely correct would be available width minus symbol size minus distances to page ... + } + + lcl_getProperties( xLegendProp, aLineFillProperties, aTextProperties, nMaxLabelWidth, + rPageSize ); } if( xBorder.is()) |