Kaydet (Commit) f19b9144 authored tarafından Caolán McNamara's avatar Caolán McNamara

WaE: -Werror=shadow and -Werror=unused-but-set-variable

Change-Id: Ic42d506db8fe065cb8f01e17f18a1238d1eff651
üst d7374d48
...@@ -146,7 +146,7 @@ GL3DBarChart::GL3DBarChart( ...@@ -146,7 +146,7 @@ GL3DBarChart::GL3DBarChart(
if (mpWindow) if (mpWindow)
{ {
mpWindow->setRenderer(this); mpWindow->setRenderer(this);
Size aSize = mpWindow->GetSizePixel(); aSize = mpWindow->GetSizePixel();
} }
mpRenderer->SetSize(aSize); mpRenderer->SetSize(aSize);
mpRenderer->init(); mpRenderer->init();
...@@ -222,9 +222,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer ...@@ -222,9 +222,9 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
float nXEnd = 0.0; float nXEnd = 0.0;
float nYPos = 0.0; float nYPos = 0.0;
const Color aSeriesColor[] = { //const Color aSeriesColor[] = {
COL_RED, COL_GREEN, COL_YELLOW, COL_BROWN, COL_BLUE // COL_RED, COL_GREEN, COL_YELLOW, COL_BROWN, COL_BLUE
}; //};
maCategories.clear(); maCategories.clear();
maSeriesNames.clear(); maSeriesNames.clear();
...@@ -246,7 +246,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer ...@@ -246,7 +246,7 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
sal_Int32 nPointCount = rDataSeries.getTotalPointCount(); sal_Int32 nPointCount = rDataSeries.getTotalPointCount();
nMaxPointCount = std::max(nMaxPointCount, nPointCount); nMaxPointCount = std::max(nMaxPointCount, nPointCount);
bool bMappedFillProperty = rDataSeries.hasPropertyMapping("FillColor"); //bool bMappedFillProperty = rDataSeries.hasPropertyMapping("FillColor");
// Create series name text object. // Create series name text object.
OUString aSeriesName = OUString aSeriesName =
...@@ -271,22 +271,22 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer ...@@ -271,22 +271,22 @@ void GL3DBarChart::create3DShapes(const boost::ptr_vector<VDataSeries>& rDataSer
p->setPosition(aTopLeft, aTopRight, aBottomRight); p->setPosition(aTopLeft, aTopRight, aBottomRight);
} }
sal_Int32 nColor = aSeriesColor[nSeriesIndex % SAL_N_ELEMENTS(aSeriesColor)].GetColor(); //sal_Int32 nColor = aSeriesColor[nSeriesIndex % SAL_N_ELEMENTS(aSeriesColor)].GetColor();
for(sal_Int32 nIndex = 0; nIndex < nPointCount; ++nIndex) for(sal_Int32 nIndex = 0; nIndex < nPointCount; ++nIndex)
{ {
if(bMappedFillProperty) //if(bMappedFillProperty)
{ //{
double nPropVal = rDataSeries.getValueByProperty(nIndex, "FillColor"); // double nPropVal = rDataSeries.getValueByProperty(nIndex, "FillColor");
if(!rtl::math::isNan(nPropVal)) // if(!rtl::math::isNan(nPropVal))
nColor = static_cast<sal_uInt32>(nPropVal); // nColor = static_cast<sal_uInt32>(nPropVal);
} //}
float nVal = rDataSeries.getYValue(nIndex); float nVal = rDataSeries.getYValue(nIndex);
float nXPos = nIndex * (BAR_SIZE_X + BAR_DISTANCE_X) + BAR_DISTANCE_X; float nXPos = nIndex * (BAR_SIZE_X + BAR_DISTANCE_X) + BAR_DISTANCE_X;
glm::mat4 aScaleMatrix = glm::scale(glm::vec3(BAR_SIZE_X, BAR_SIZE_Y, float(nVal/nMaxVal))); //glm::mat4 aScaleMatrix = glm::scale(glm::vec3(BAR_SIZE_X, BAR_SIZE_Y, float(nVal/nMaxVal)));
glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(nXPos, nYPos, 0.0f)); //glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(nXPos, nYPos, 0.0f));
glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix; //glm::mat4 aBarPosition = aTranslationMatrix * aScaleMatrix;
maBarMap.insert(std::pair<sal_uInt32, BarInformation>(nId, maBarMap.insert(std::pair<sal_uInt32, BarInformation>(nId,
BarInformation(glm::vec3(nXPos, nYPos, float(nVal/nMaxVal)), BarInformation(glm::vec3(nXPos, nYPos, float(nVal/nMaxVal)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment