From 65b6070a183557276d5cb29e82e6c8125a79fb26 Mon Sep 17 00:00:00 2001 From: Ingrid Halama Date: Wed, 3 Mar 2010 14:53:22 +0100 Subject: #i109771# no black borders around symbols + #i74910# very thick borders protrude over the legend --- chart2/source/tools/DataSeriesHelper.cxx | 2 +- chart2/source/view/main/VDataSeries.cxx | 4 ++-- chart2/source/view/main/VLegendSymbolFactory.cxx | 14 ++++++++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'chart2/source') diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx index 538f2966105f..acff332d4229 100644 --- a/chart2/source/tools/DataSeriesHelper.cxx +++ b/chart2/source/tools/DataSeriesHelper.cxx @@ -595,7 +595,7 @@ void makeLinesThickOrThin( const Reference< beans::XPropertySet > & xSeriesPrope if( !xSeriesProperties.is() ) return; - sal_Int32 nNewValue = bThick ? 88 : 0; + sal_Int32 nNewValue = bThick ? 80 : 0; sal_Int32 nOldValue = 0; if( (xSeriesProperties->getPropertyValue( C2U( "LineWidth" )) >>= nOldValue ) && nOldValue != nNewValue ) diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx index c94193c5a7c8..8bb6a11b4baf 100644 --- a/chart2/source/view/main/VDataSeries.cxx +++ b/chart2/source/view/main/VDataSeries.cxx @@ -734,10 +734,10 @@ double VDataSeries::getYMeanValue() const { if( xProp->getPropertyValue( C2U( "Symbol" ) ) >>= *apSymbolProps ) { - // border of symbols always black - apSymbolProps->BorderColor = 0x000000; //use main color to fill symbols xProp->getPropertyValue( C2U( "Color" ) ) >>= apSymbolProps->FillColor; + // border of symbols always same as fill color + apSymbolProps->BorderColor = apSymbolProps->FillColor; } else apSymbolProps.reset(); diff --git a/chart2/source/view/main/VLegendSymbolFactory.cxx b/chart2/source/view/main/VLegendSymbolFactory.cxx index 682ff7fb7a5b..958a8defe0b6 100644 --- a/chart2/source/view/main/VLegendSymbolFactory.cxx +++ b/chart2/source/view/main/VLegendSymbolFactory.cxx @@ -85,6 +85,16 @@ void lcl_setPropetiesToShape( ::chart::tNameSequence aPropNames; ::chart::tAnySequence aPropValues; ::chart::PropertyMapper::getMultiPropertyListsFromValueMap( aPropNames, aPropValues, aValueMap ); + + uno::Any* pLineWidthAny = ::chart::PropertyMapper::getValuePointer(aPropValues,aPropNames,C2U("LineWidth")); + sal_Int32 nLineWidth = 0; + if( pLineWidthAny && (*pLineWidthAny>>=nLineWidth) ) + { + const sal_Int32 nMaxLineWidthForLegend = 50;/*1/100 mm*///todo: make this dependent from legend entry height + if( nLineWidth>nMaxLineWidthForLegend ) + *pLineWidthAny = uno::makeAny( nMaxLineWidthForLegend ); + } + ::chart::PropertyMapper::setMultiProperties( aPropNames, aPropValues, xShapeProp ); } } @@ -316,10 +326,10 @@ Reference< drawing::XShape > VLegendSymbolFactory::createSymbol( ShapeFactory aFactory( xShapeFactory ); if( aSymbol.Style == chart2::SymbolStyle_STANDARD ) { - // border of symbols always black - aSymbol.BorderColor = 0x000000; // take series color as fill color xLegendEntryProperties->getPropertyValue( C2U("Color")) >>= aSymbol.FillColor; + // border of symbols always same as fill color + aSymbol.BorderColor = aSymbol.FillColor; xSymbol.set( aFactory.createSymbol2D( xResultGroup, -- cgit v1.2.3