summaryrefslogtreecommitdiff
path: root/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
diff options
context:
space:
mode:
authorBjörn Milcke <bm@openoffice.org>2003-12-11 13:07:23 +0000
committerBjörn Milcke <bm@openoffice.org>2003-12-11 13:07:23 +0000
commitbbe11da12e8c36bd899ec20f7a0623c771042d31 (patch)
treeb0eae4157dc379780c5bbf44f7ea69af9eb1baba /chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
parent62bb4680268e820ac5bafeb8eb2ce51852acf612 (diff)
delete RelativePosition if default position is selected in dialog
Diffstat (limited to 'chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx')
-rw-r--r--chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx45
1 files changed, 26 insertions, 19 deletions
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index b04de95a1..f5a1a1662 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: LegendItemConverter.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: bm $ $Date: 2003-11-27 14:00:33 $
+ * last change: $Author: bm $ $Date: 2003-12-11 14:07:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -210,27 +210,34 @@ bool LegendItemConverter::ApplySpecialItem(
break;
}
- sal_Bool bWasShown = sal_True;
- if( ! (GetPropertySet()->getPropertyValue( C2U("Show")) >>= bWasShown) ||
- ( bWasShown != bShow ))
+ try
{
- GetPropertySet()->setPropertyValue( C2U("Show"), uno::Any( &bShow, ::getBooleanCppuType() ));
- bChanged = true;
- }
-
- if( bShow )
- {
-
- if( ! ( GetPropertySet()->getPropertyValue( C2U( "AnchorPosition" )) >>= eOldPos ) ||
- ( eOldPos != eNewPos ))
+ sal_Bool bWasShown = sal_True;
+ if( ! (GetPropertySet()->getPropertyValue( C2U("Show")) >>= bWasShown) ||
+ ( bWasShown != bShow ))
{
- GetPropertySet()->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( eNewPos ));
- chart2::LegendExpansion eExp = bIsWide
- ? chart2::LegendExpansion_WIDE
- : chart2::LegendExpansion_HIGH;
- GetPropertySet()->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eExp ));
+ GetPropertySet()->setPropertyValue( C2U("Show"), uno::Any( &bShow, ::getBooleanCppuType() ));
bChanged = true;
}
+
+ if( bShow )
+ {
+ if( ! ( GetPropertySet()->getPropertyValue( C2U( "AnchorPosition" )) >>= eOldPos ) ||
+ ( eOldPos != eNewPos ))
+ {
+ GetPropertySet()->setPropertyValue( C2U( "AnchorPosition" ), uno::makeAny( eNewPos ));
+ chart2::LegendExpansion eExp = bIsWide
+ ? chart2::LegendExpansion_WIDE
+ : chart2::LegendExpansion_HIGH;
+ GetPropertySet()->setPropertyValue( C2U( "Expansion" ), uno::makeAny( eExp ));
+ GetPropertySet()->setPropertyValue( C2U( "RelativePosition" ), uno::Any());
+ bChanged = true;
+ }
+ }
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
}
}
break;