diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/dlg_DataEditor.cxx | 2 | ||||
-rw-r--r-- | chart2/source/controller/inc/dlg_DataEditor.hxx | 6 | ||||
-rw-r--r-- | chart2/source/view/charttypes/GL3DBarChart.cxx | 6 | ||||
-rw-r--r-- | chart2/source/view/inc/GL3DBarChart.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/inc/GL3DRenderer.hxx | 19 | ||||
-rw-r--r-- | chart2/source/view/main/GL3DRenderer.cxx | 35 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.cxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/OpenGLRender.hxx | 2 | ||||
-rw-r--r-- | chart2/source/view/main/VLegend.cxx | 8 |
9 files changed, 42 insertions, 40 deletions
diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index 4183aaf6b503..502579f539af 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -202,7 +202,7 @@ bool DataEditor::ApplyChangesToModel() // TaskPaneList::AddWindow or TaskPaneList::RemoveWindow void DataEditor::notifySystemWindow( vcl::Window* pWindow, vcl::Window* pToRegister, - ::comphelper::mem_fun1_t< TaskPaneList, vcl::Window* > rMemFunc ) + const ::comphelper::mem_fun1_t<TaskPaneList, vcl::Window*>& rMemFunc ) { OSL_ENSURE( pWindow, "Window must not be null!" ); if( !pWindow ) diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx index 997cdad006b3..cd21f372e9ca 100644 --- a/chart2/source/controller/inc/dlg_DataEditor.hxx +++ b/chart2/source/controller/inc/dlg_DataEditor.hxx @@ -102,9 +102,9 @@ private: @note this code is taken from dbaccess/source/ui/inc/UITools.hxx */ - void notifySystemWindow( vcl::Window* pWindow, - vcl::Window* pToRegister, - ::comphelper::mem_fun1_t< TaskPaneList, vcl::Window* > rMemFunc ); + void notifySystemWindow(vcl::Window* pWindow, + vcl::Window* pToRegister, + const ::comphelper::mem_fun1_t<TaskPaneList, vcl::Window*>& rMemFunc); }; } // namespace chart diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 0701b8ca5627..63081117c333 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -1133,7 +1133,7 @@ void GL3DBarChart::contextDestroyed() mbValidContext = false; } -float GL3DBarChart::addScreenTextShape(OUString &nStr, glm::vec2 aLeftOrRightTop, float nTextHeight, bool bLeftTopFlag, +float GL3DBarChart::addScreenTextShape(OUString &nStr, const glm::vec2& rLeftOrRightTop, float nTextHeight, bool bLeftTopFlag, const glm::vec4& rColor, const glm::vec3& rPos, sal_uInt32 nEvent) { maScreenTextShapes.push_back(new opengl3D::ScreenText(mpRenderer.get(), *mpTextCache, nStr, rColor, nEvent)); @@ -1141,9 +1141,9 @@ float GL3DBarChart::addScreenTextShape(OUString &nStr, glm::vec2 aLeftOrRightTop float nRectWidth = (float)rTextCache.maSize.Width() / (float)rTextCache.maSize.Height() * nTextHeight / 2.0f; opengl3D::ScreenText* pScreenText = static_cast<opengl3D::ScreenText*>(&maScreenTextShapes.back()); if (bLeftTopFlag) - pScreenText->setPosition(aLeftOrRightTop, glm::vec2(aLeftOrRightTop.x + nRectWidth, aLeftOrRightTop.y - nTextHeight), rPos); + pScreenText->setPosition(rLeftOrRightTop, glm::vec2(rLeftOrRightTop.x + nRectWidth, rLeftOrRightTop.y - nTextHeight), rPos); else - pScreenText->setPosition(glm::vec2(aLeftOrRightTop.x - nRectWidth, aLeftOrRightTop.y), glm::vec2(aLeftOrRightTop.x, aLeftOrRightTop.y - nTextHeight), rPos); + pScreenText->setPosition(glm::vec2(rLeftOrRightTop.x - nRectWidth, rLeftOrRightTop.y), glm::vec2(rLeftOrRightTop.x, rLeftOrRightTop.y - nTextHeight), rPos); return nRectWidth; } diff --git a/chart2/source/view/inc/GL3DBarChart.hxx b/chart2/source/view/inc/GL3DBarChart.hxx index 0daeed0192a8..f02f98ed5978 100644 --- a/chart2/source/view/inc/GL3DBarChart.hxx +++ b/chart2/source/view/inc/GL3DBarChart.hxx @@ -103,7 +103,7 @@ private: void updateDataUpdateFPS(); DECL_LINK(UpdateTimerHdl, void*); int calcTimeInterval(TimeValue &startTime, TimeValue &endTime); - float addScreenTextShape(OUString &nStr, glm::vec2 aLeftOrRightTop, float nTextHeight, bool bLeftTopFlag = true, + float addScreenTextShape(OUString &nStr, const glm::vec2& rLeftOrRightTop, float nTextHeight, bool bLeftTopFlag = true, const glm::vec4& rColor = glm::vec4(0.0f, 1.0f, 1.0f, 0.0f), const glm::vec3& rPos = glm::vec3(0.0f, 0.0f, 0.0f), sal_uInt32 nEvent = 0); diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx index b4597a14b816..69eabae5b78d 100644 --- a/chart2/source/view/inc/GL3DRenderer.hxx +++ b/chart2/source/view/inc/GL3DRenderer.hxx @@ -194,13 +194,14 @@ public: void SetSize(const Size& rSize); void SetCameraInfo(const glm::vec3& pos, const glm::vec3& direction, const glm::vec3& up); void CreateTextTexture(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, + const ::Size& rSizePixels, const glm::vec3& vTopLeft, const glm::vec3& vTopRight, const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId); void CreateScreenTextTexture(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, const glm::vec2& vTopLeft, - const glm::vec2& vBottomRight, glm::vec3 vPos, glm::vec4 vScreenTextColor, sal_uInt32 nUniqueId); + const ::Size& rSizePixels, const glm::vec2& vTopLeft, + const glm::vec2& vBottomRight, const glm::vec3& vPos, const glm::vec4& vScreenTextColor, + sal_uInt32 nUniqueId); void ProcessUnrenderedShape(bool bNewScene); void SetPickingMode(bool bPickingMode); @@ -274,14 +275,14 @@ private: void RenderTextShapeBatch(); void ReleaseTextShapesBatch(); void CreateTextTextureSingle(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, - glm::vec3 vTopLeft,glm::vec3 vTopRight, - glm::vec3 vBottomRight, glm::vec3 vBottomLeft, + const ::Size& rSizePixels, + const glm::vec3& vTopLeft, const glm::vec3& vTopRight, + const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId); void CreateTextTextureBatch(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, - glm::vec3 vTopLeft,glm::vec3 vTopRight, - glm::vec3 vBottomRight, glm::vec3 vBottomLeft, + const ::Size& rSizePixels, + const glm::vec3& vTopLeft, const glm::vec3& vTopRight, + const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId); void SetHighLightBar(BatchBarInfo &barInfo); void DisableHighLightBar(BatchBarInfo &barInfo); diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index c64d8093c590..0abfa5860d5b 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -1723,11 +1723,12 @@ void OpenGL3DRenderer::RenderExtrude3DObject() void OpenGL3DRenderer::CreateScreenTextTexture( const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, const glm::vec2& vTopLeft, - const glm::vec2& vBottomRight, glm::vec3 vPos, glm::vec4 vScreenTextColor, sal_uInt32 nUniqueId) + const ::Size& rSizePixels, const glm::vec2& vTopLeft, + const glm::vec2& vBottomRight, const glm::vec3& vPos, + const glm::vec4& vScreenTextColor, sal_uInt32 nUniqueId) { - long bmpWidth = maSizePixels.Width(); - long bmpHeight = maSizePixels.Height(); + long bmpWidth = rSizePixels.Width(); + long bmpHeight = rSizePixels.Height(); TextInfo aTextInfo; aTextInfo.id = getColorAsVector(nUniqueId); @@ -1772,13 +1773,13 @@ void OpenGL3DRenderer::CreateScreenTextTexture( } void OpenGL3DRenderer::CreateTextTextureSingle(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, - glm::vec3 vTopLeft,glm::vec3 vTopRight, - glm::vec3 vBottomRight, glm::vec3 vBottomLeft, + const ::Size& rSizePixels, + const glm::vec3& vTopLeft, const glm::vec3& vTopRight, + const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId) { - long bmpWidth = maSizePixels.Width(); - long bmpHeight = maSizePixels.Height(); + long bmpWidth = rSizePixels.Width(); + long bmpHeight = rSizePixels.Height(); TextInfo aTextInfo; aTextInfo.id = getColorAsVector(nUniqueId); @@ -1817,13 +1818,13 @@ void OpenGL3DRenderer::CreateTextTextureSingle(const boost::shared_array<sal_uIn } void OpenGL3DRenderer::CreateTextTextureBatch(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, - glm::vec3 vTopLeft,glm::vec3 vTopRight, - glm::vec3 vBottomRight, glm::vec3 vBottomLeft, + const ::Size& rSizePixels, + const glm::vec3& vTopLeft, const glm::vec3& vTopRight, + const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId) { - long bmpWidth = maSizePixels.Width(); - long bmpHeight = maSizePixels.Height(); + long bmpWidth = rSizePixels.Width(); + long bmpHeight = rSizePixels.Height(); glm::vec4 id = getColorAsVector(nUniqueId); m_TextInfoBatch.idList.push_back(id); m_TextInfoBatch.vertexList.push_back(glm::vec3(vBottomRight.x, vBottomRight.y, vBottomRight.z)); @@ -1885,18 +1886,18 @@ void OpenGL3DRenderer::CreateTextTextureBatch(const boost::shared_array<sal_uInt } void OpenGL3DRenderer::CreateTextTexture(const boost::shared_array<sal_uInt8> &bitmapBuf, - ::Size maSizePixels, + const ::Size& rSizePixels, const glm::vec3& vTopLeft, const glm::vec3& vTopRight, const glm::vec3& vBottomRight, const glm::vec3& vBottomLeft, sal_uInt32 nUniqueId) { if (maResources.mbTexBatchSupport) { - CreateTextTextureBatch(bitmapBuf, maSizePixels, vTopLeft, vTopRight, vBottomRight, vBottomLeft, nUniqueId); + CreateTextTextureBatch(bitmapBuf, rSizePixels, vTopLeft, vTopRight, vBottomRight, vBottomLeft, nUniqueId); } else { - CreateTextTextureSingle(bitmapBuf, maSizePixels, vTopLeft, vTopRight, vBottomRight, vBottomLeft, nUniqueId); + CreateTextTextureSingle(bitmapBuf, rSizePixels, vTopLeft, vTopRight, vBottomRight, vBottomLeft, nUniqueId); } } diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx index 09256b49a72f..19f6f933a677 100644 --- a/chart2/source/view/main/OpenGLRender.cxx +++ b/chart2/source/view/main/OpenGLRender.cxx @@ -278,7 +278,7 @@ void OpenGLRender::prepareToRender() m_fZStep = 0; } -int OpenGLRender::MoveModelf(PosVecf3 trans, PosVecf3 angle, PosVecf3 scale) +int OpenGLRender::MoveModelf(const PosVecf3& trans, const PosVecf3& angle, const PosVecf3& scale) { glm::mat4 aTranslationMatrix = glm::translate(glm::vec3(trans.x, trans.y, trans.z)); glm::mat4 aScaleMatrix = glm::scale(glm::vec3(scale.x, scale.y, scale.z)); diff --git a/chart2/source/view/main/OpenGLRender.hxx b/chart2/source/view/main/OpenGLRender.hxx index dddf1c8cb8ed..c11653df4710 100644 --- a/chart2/source/view/main/OpenGLRender.hxx +++ b/chart2/source/view/main/OpenGLRender.hxx @@ -68,7 +68,7 @@ public: OpenGLRender(); ~OpenGLRender(); int InitOpenGL(); - int MoveModelf(PosVecf3 trans, PosVecf3 angle, PosVecf3 scale); + int MoveModelf(const PosVecf3& trans, const PosVecf3& angle, const PosVecf3& scale); void SetSize(int width, int height); void SetSizePixel(int width, int height); void Release(); diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx index 1df4e748e462..acf9b48803bd 100644 --- a/chart2/source/view/main/VLegend.cxx +++ b/chart2/source/view/main/VLegend.cxx @@ -681,17 +681,17 @@ chart2::RelativePosition lcl_getDefaultPosition( LegendPosition ePos, const awt: awt::Point lcl_calculatePositionAndRemainingSpace( awt::Rectangle & rRemainingSpace, const awt::Size & rPageSize, - chart2::RelativePosition aRelPos, + const chart2::RelativePosition& rRelPos, LegendPosition ePos, const awt::Size& aLegendSize ) { // calculate position awt::Point aResult( - static_cast< sal_Int32 >( aRelPos.Primary * rPageSize.Width ), - static_cast< sal_Int32 >( aRelPos.Secondary * rPageSize.Height )); + static_cast< sal_Int32 >( rRelPos.Primary * rPageSize.Width ), + static_cast< sal_Int32 >( rRelPos.Secondary * rPageSize.Height )); aResult = RelativePositionHelper::getUpperLeftCornerOfAnchoredObject( - aResult, aLegendSize, aRelPos.Anchor ); + aResult, aLegendSize, rRelPos.Anchor ); // adapt rRemainingSpace if LegendPosition is not CUSTOM // #i109336# Improve auto positioning in chart |