don't try to set property mapping if there is no value
Change-Id: I422d651e303553e2ce30895b44b8d96664418c19
This commit is contained in:
@@ -808,9 +808,12 @@ void BarChart::createShapes()
|
|||||||
|
|
||||||
if(bHasFillColorMapping)
|
if(bHasFillColorMapping)
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
|
||||||
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(
|
if(!rtl::math::isNan(nPropVal))
|
||||||
pSeries->getValueByProperty(nPointIndex, "FillColor"))));
|
{
|
||||||
|
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
||||||
|
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(nPropVal)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//set name/classified ObjectID (CID)
|
//set name/classified ObjectID (CID)
|
||||||
ShapeFactory::setShapeName(xShape
|
ShapeFactory::setShapeName(xShape
|
||||||
|
@@ -324,15 +324,21 @@ void BubbleChart::createShapes()
|
|||||||
|
|
||||||
if(bHasFillColorMapping)
|
if(bHasFillColorMapping)
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
double nPropVal = pSeries->getValueByProperty(nIndex, "FillColor");
|
||||||
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(
|
if(!rtl::math::isNan(nPropVal))
|
||||||
pSeries->getValueByProperty(nIndex, "FillColor"))));
|
{
|
||||||
|
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
||||||
|
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(nPropVal)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(bHasBorderColorMapping)
|
if(bHasBorderColorMapping)
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
double nPropVal = pSeries->getValueByProperty(nIndex, "LineColor");
|
||||||
xProps->setPropertyValue("LineColor", uno::makeAny(static_cast<sal_Int32>(
|
if(!rtl::math::isNan(nPropVal))
|
||||||
pSeries->getValueByProperty(nIndex, "LineColor"))));
|
{
|
||||||
|
uno::Reference< beans::XPropertySet > xProps( xShape, uno::UNO_QUERY_THROW );
|
||||||
|
xProps->setPropertyValue("LineColor", uno::makeAny(static_cast<sal_Int32>(nPropVal)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
|
::chart::AbstractShapeFactory::setShapeName( xShape, "MarkHandles" );
|
||||||
|
@@ -169,7 +169,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
|
|||||||
{
|
{
|
||||||
if(bMappedFillProperty)
|
if(bMappedFillProperty)
|
||||||
{
|
{
|
||||||
nColor = static_cast<sal_uInt32>(rDataSeries.getValueByProperty(nIndex, "FillColor"));
|
double nPropVal = rDataSeries.getValueByProperty(nIndex, "FillColor");
|
||||||
|
if(!rtl::math::isNan(nPropVal))
|
||||||
|
nColor = static_cast<sal_uInt32>(nPropVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
float nVal = rDataSeries.getYValue(nIndex);
|
float nVal = rDataSeries.getYValue(nIndex);
|
||||||
|
@@ -436,9 +436,12 @@ void PieChart::createShapes()
|
|||||||
|
|
||||||
if(bHasFillColorMapping)
|
if(bHasFillColorMapping)
|
||||||
{
|
{
|
||||||
uno::Reference< beans::XPropertySet > xProps( xPointShape, uno::UNO_QUERY_THROW );
|
double nPropVal = pSeries->getValueByProperty(nPointIndex, "FillColor");
|
||||||
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>(
|
if(!rtl::math::isNan(nPropVal))
|
||||||
pSeries->getValueByProperty(nPointIndex, "FillColor"))));
|
{
|
||||||
|
uno::Reference< beans::XPropertySet > xProps( xPointShape, uno::UNO_QUERY_THROW );
|
||||||
|
xProps->setPropertyValue("FillColor", uno::makeAny(static_cast<sal_Int32>( nPropVal)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//create label
|
//create label
|
||||||
|
@@ -1065,7 +1065,7 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropN
|
|||||||
if(itr == maPropertyMap.end())
|
if(itr == maPropertyMap.end())
|
||||||
{
|
{
|
||||||
double fNan;
|
double fNan;
|
||||||
::rtl::math::setNan( & fNan );
|
::rtl::math::setNan( &fNan );
|
||||||
return fNan;
|
return fNan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user