diff options
author | Rüdiger Timm <rt@openoffice.org> | 2007-07-25 07:27:11 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2007-07-25 07:27:11 +0000 |
commit | 9d4626945134158863b7d4b6a3accfbdf35e84b9 (patch) | |
tree | 022610f303c1eb30fb52fc170cb7eefc9024c0e9 /chart2/source/controller/chartapiwrapper | |
parent | 82abb2dde15aeb439d166fdfd71f6f82e52786be (diff) |
INTEGRATION: CWS chart07 (1.6.4); FILE MERGED
2007/07/07 11:55:52 bm 1.6.4.1: #i79349# set Expansion correctly
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/LegendWrapper.cxx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx index ec40297cc22b..c1eb524ff916 100644 --- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: LegendWrapper.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: rt $ $Date: 2007-07-03 13:36:32 $ + * last change: $Author: rt $ $Date: 2007-07-25 08:27:11 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -168,14 +168,17 @@ void WrappedLegendAlignmentProperty::setPropertyValue( const Any& rOuterValue, c chart2::LegendPosition eNewInnerPos(chart2::LegendPosition_LINE_END); if( aInnerValue >>= eNewInnerPos ) { - chart2::LegendExpansion eNewExpansion = chart2::LegendExpansion_WIDE; - if( eNewInnerPos == chart2::LegendPosition_LINE_END || eNewInnerPos == chart2::LegendPosition_LINE_START ) - eNewExpansion = chart2::LegendExpansion_HIGH; + chart2::LegendExpansion eNewExpansion = + ( eNewInnerPos == chart2::LegendPosition_LINE_END || + eNewInnerPos == chart2::LegendPosition_LINE_START ) + ? chart2::LegendExpansion_HIGH + : chart2::LegendExpansion_WIDE; - chart2::LegendExpansion eOldExpansion( chart2::LegendExpansion_WIDE ); - xInnerPropertySet->getPropertyValue( C2U( "Expansion" ) ) >>= eOldExpansion; + chart2::LegendExpansion eOldExpansion( chart2::LegendExpansion_HIGH ); + bool bExpansionWasSet( + xInnerPropertySet->getPropertyValue( C2U( "Expansion" ) ) >>= eOldExpansion ); - if(eOldExpansion != eNewExpansion) + if( !bExpansionWasSet || (eOldExpansion != eNewExpansion)) xInnerPropertySet->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eNewExpansion )); } |