diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 4 | ||||
-rw-r--r-- | chart2/qa/extras/chart2import.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 18 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 52 |
4 files changed, 38 insertions, 38 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx index 11f37235835b..d9050f858c2c 100644 --- a/chart2/qa/extras/chart2export.cxx +++ b/chart2/qa/extras/chart2export.cxx @@ -596,7 +596,7 @@ void Chart2ExportTest::testEmbeddingsGrabBag() xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; - const char* testEmbeddedFileNames[3] = {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", + const char* const testEmbeddedFileNames[] {"word/embeddings/Microsoft_Excel_Worksheet3.xlsx", "word/embeddings/Microsoft_Excel_Worksheet2.xlsx", "word/embeddings/Microsoft_Excel_Worksheet1.xlsx"}; for(int i = 0; i < aGrabBag.getLength(); ++i) @@ -1121,7 +1121,7 @@ void Chart2ExportTest::testEmbeddingsOleObjectGrabBag() xTextDocumentPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; CPPUNIT_ASSERT(aGrabBag.hasElements()); // Grab Bag not empty bool bEmbeddings = false; - const char* testEmbeddedFileNames[1] = {"word/embeddings/oleObject1.bin"}; + const char* const testEmbeddedFileNames[] = {"word/embeddings/oleObject1.bin"}; for(int i = 0; i < aGrabBag.getLength(); ++i) { if (aGrabBag[i].Name == "OOXEmbeddings") diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx index 2399cf7f5034..e81a6e4d347d 100644 --- a/chart2/qa/extras/chart2import.cxx +++ b/chart2/qa/extras/chart2import.cxx @@ -268,7 +268,7 @@ void Chart2ImportTest::testErrorBarFormatting() void Chart2ImportTest::testSteppedLines() { const sal_Int32 MAXSHEET = 14; - chart2::CurveStyle curveStyle[] = { + chart2::CurveStyle const curveStyle[] = { chart2::CurveStyle_LINES, chart2::CurveStyle_CUBIC_SPLINES, chart2::CurveStyle_B_SPLINES, diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 3ff7939aba2f..5ab1f6b73d44 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -840,9 +840,9 @@ void OpenGL3DRenderer::RenderLine3D(const Polygon3DInfo& polygon) { CHECK_GL_ERROR(); glUseProgram(maResources.m_CommonProID); - PosVecf3 trans = {0.0f, 0, 0.0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0f, 1.0f, 1.0f}; + PosVecf3 const trans = {0.0f, 0, 0.0}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0f, 1.0f, 1.0f}; MoveModelf(trans, angle, scale); m_Model = m_GlobalScaleMatrix * m_Model; m_3DMVP = m_3DProjection * m_3DView * m_Model; @@ -959,9 +959,9 @@ void OpenGL3DRenderer::RenderPolygon3D(const Polygon3DInfo& polygon) //move the circle to the pos, and scale using the xScale and Y scale Vertices3D *pointList = polygon.verticesList[i]; Normals3D *normalList = polygon.normalsList[i]; - PosVecf3 trans = {0.0f, 0.0f, 0.0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0f, 1.0f, 1.0f}; + PosVecf3 const trans = {0.0f, 0.0f, 0.0}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0f, 1.0f, 1.0f}; MoveModelf(trans, angle, scale); m_Model = m_GlobalScaleMatrix * m_Model; glm::mat3 normalMatrix(m_Model); @@ -2059,9 +2059,9 @@ void OpenGL3DRenderer::RenderTextShape() CHECK_GL_ERROR(); for (TextInfo & textInfo : m_TextInfoList) { - PosVecf3 trans = {0, 0, 0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0, 1.0, 1.0f}; + PosVecf3 const trans = {0, 0, 0}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0, 1.0, 1.0f}; MoveModelf(trans, angle, scale); m_Model = m_GlobalScaleMatrix * m_Model; glm::mat4 aMVP = m_3DProjection * m_3DView * m_Model; diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index c3a2c489efb5..42e716496f1c 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -159,8 +159,8 @@ int OpenGLRender::InitOpenGL() glBindBuffer(GL_ARRAY_BUFFER, 0); glEnable(GL_LIGHTING); - GLfloat light_direction[] = { 0.0 , 0.0 , 1.0 }; - GLfloat materialDiffuse[] = { 1.0 , 1.0 , 1.0 , 1.0}; + GLfloat const light_direction[] = { 0.0 , 0.0 , 1.0 }; + GLfloat const materialDiffuse[] = { 1.0 , 1.0 , 1.0 , 1.0}; glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, light_direction); glMaterialfv(GL_FRONT,GL_DIFFUSE,materialDiffuse); glEnable(GL_LIGHT0); @@ -192,9 +192,9 @@ int OpenGLRender::RenderLine2FBO() CHECK_GL_ERROR(); glLineWidth(m_fLineWidth); size_t listNum = m_Line2DShapePointList.size(); - PosVecf3 trans = {0.0f, 0.0f, 0.0f}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0f, 1.0f, 1.0f}; + PosVecf3 const trans = {0.0f, 0.0f, 0.0f}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0f, 1.0f, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; for (size_t i = 0; i < listNum; i++) @@ -421,9 +421,9 @@ int OpenGLRender::RenderBubble2FBO() { //move the circle to the pos, and scale using the xScale and Y scale Bubble2DPointList &pointList = m_Bubble2DShapePointList.front(); - PosVecf3 trans = {pointList.x, pointList.y, m_fZStep}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {pointList.xScale / 2, pointList.yScale / 2 , 1.0f}; + PosVecf3 const trans = {pointList.x, pointList.y, m_fZStep}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {pointList.xScale / 2, pointList.yScale / 2 , 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; //render to fbo @@ -520,9 +520,9 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) //move the circle to the pos, and scale using the xScale and Y scale RectanglePointList &pointList = m_RectangleShapePointList.front(); { - PosVecf3 trans = {0, 0, 0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1, 1, 1.0f}; + PosVecf3 const trans = {0, 0, 0}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1, 1, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; } @@ -570,9 +570,9 @@ int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill) { if(bFill) { - PosVecf3 trans = {0.0, 0.0, Z_STEP }; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1, 1, 1.0f}; + PosVecf3 const trans = {0.0, 0.0, Z_STEP }; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1, 1, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; @@ -704,9 +704,9 @@ int OpenGLRender::RenderTextShape() for (size_t i = 0; i < listNum; i++) { TextInfo &textInfo = m_TextInfoList.front(); - PosVecf3 trans = { textInfo.nDx, textInfo.nDy, 0}; - PosVecf3 angle = {0.0f, 0.0f, float(textInfo.rotation)}; - PosVecf3 scale = {1.0, 1.0, 1.0f}; + PosVecf3 const trans = { textInfo.nDx, textInfo.nDy, 0}; + PosVecf3 const angle = {0.0f, 0.0f, float(textInfo.rotation)}; + PosVecf3 const scale = {1.0, 1.0, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; glBindBuffer(GL_ARRAY_BUFFER, m_VertexBuffer); @@ -813,9 +813,9 @@ int OpenGLRender::RenderArea2DShape() glDisable(GL_MULTISAMPLE); size_t listNum = m_Area2DShapePointList.size(); - PosVecf3 trans = {0.0f, 0.0f, 0.0f}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0f, 1.0f, 1.0f}; + PosVecf3 const trans = {0.0f, 0.0f, 0.0f}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0f, 1.0f, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; for (size_t i = 0; i < listNum; ++i) @@ -945,9 +945,9 @@ void OpenGLRender::GeneratePieSegment2D(double fInnerRadius, double fOutterRadiu int OpenGLRender::RenderPieSegment2DShape(float fSize, float fPosX, float fPosY) { int listNum = m_PieSegment2DShapePointList.size(); - PosVecf3 trans = {fPosX, fPosY, 0.0f}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {fSize, fSize, 1.0f}; + PosVecf3 const trans = {fPosX, fPosY, 0.0f}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {fSize, fSize, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; @@ -994,9 +994,9 @@ int OpenGLRender::RenderSymbol2DShape(float x, float y, sal_Int32 nSymbol) glPointSize(20.f); CHECK_GL_ERROR(); - PosVecf3 trans = {0.0, 0.0, 0.0}; - PosVecf3 angle = {0.0f, 0.0f, 0.0f}; - PosVecf3 scale = {1.0, 1.0, 1.0f}; + PosVecf3 const trans = {0.0, 0.0, 0.0}; + PosVecf3 const angle = {0.0f, 0.0f, 0.0f}; + PosVecf3 const scale = {1.0, 1.0, 1.0f}; MoveModelf(trans, angle, scale); m_MVP = m_Projection * m_View * m_Model; |