diff options
57 files changed, 223 insertions, 239 deletions
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index ac18baeff86b..4b41ee3eed3a 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -188,14 +188,14 @@ OUString implCreatePureResourceId // anyway only one language should exist when calling this method then, // either the first one for mode SET_IDS or the last one for mode RESET_IDS sal_Int32 LocalizationMgr::implHandleControlResourceProperties - ( Any aControlAny, const OUString& aDialogName, const OUString& aCtrlName, + (const Any& rControlAny, const OUString& aDialogName, const OUString& aCtrlName, Reference< XStringResourceManager > xStringResourceManager, Reference< XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode ) { sal_Int32 nChangedCount = 0; Reference< XPropertySet > xPropertySet; - aControlAny >>= xPropertySet; + rControlAny >>= xPropertySet; if( xPropertySet.is() && xStringResourceManager.is()) { Sequence< Locale > aLocaleSeq = xStringResourceManager->getLocales(); @@ -736,13 +736,13 @@ void LocalizationMgr::handleRemoveLocales( const Sequence< Locale >& aLocaleSeq (void)bConsistant; } -void LocalizationMgr::handleSetDefaultLocale( Locale aLocale ) +void LocalizationMgr::handleSetDefaultLocale(const Locale& rLocale) { if( m_xStringResourceManager.is() ) { try { - m_xStringResourceManager->setDefaultLocale( aLocale ); + m_xStringResourceManager->setDefaultLocale(rLocale); } catch(const IllegalArgumentException&) { @@ -755,13 +755,13 @@ void LocalizationMgr::handleSetDefaultLocale( Locale aLocale ) } } -void LocalizationMgr::handleSetCurrentLocale( ::com::sun::star::lang::Locale aLocale ) +void LocalizationMgr::handleSetCurrentLocale(const css::lang::Locale& rLocale) { if( m_xStringResourceManager.is() ) { try { - m_xStringResourceManager->setCurrentLocale( aLocale, false ); + m_xStringResourceManager->setCurrentLocale(rLocale, false); } catch(const IllegalArgumentException&) { @@ -815,7 +815,7 @@ DialogWindow* FindDialogWindowForEditor( DlgEditor* pEditor ) void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEditor, - Any aControlAny, const OUString& aCtrlName ) + const Any& rControlAny, const OUString& aCtrlName ) { // Get library for DlgEditor DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor ); @@ -837,7 +837,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito OUString aDialogName = pDlgWin->GetName(); Reference< XStringResourceResolver > xDummyStringResolver; sal_Int32 nChangedCount = implHandleControlResourceProperties - ( aControlAny, aDialogName, aCtrlName, xStringResourceManager, + ( rControlAny, aDialogName, aCtrlName, xStringResourceManager, xDummyStringResolver, SET_IDS ); if( nChangedCount ) @@ -845,7 +845,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito } void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEditor, - ::com::sun::star::uno::Any aControlAny, const OUString& aNewCtrlName ) + const css::uno::Any& rControlAny, const OUString& aNewCtrlName ) { // Get library for DlgEditor DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor ); @@ -867,13 +867,13 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito OUString aDialogName = pDlgWin->GetName(); Reference< XStringResourceResolver > xDummyStringResolver; implHandleControlResourceProperties - ( aControlAny, aDialogName, aNewCtrlName, xStringResourceManager, + ( rControlAny, aDialogName, aNewCtrlName, xStringResourceManager, xDummyStringResolver, RENAME_CONTROL_IDS ); } void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor, - Any aControlAny, const OUString& aCtrlName ) + const Any& rControlAny, const OUString& aCtrlName ) { // Get library for DlgEditor DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor ); @@ -891,7 +891,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* OUString aDialogName = pDlgWin->GetName(); Reference< XStringResourceResolver > xDummyStringResolver; sal_Int32 nChangedCount = implHandleControlResourceProperties - ( aControlAny, aDialogName, aCtrlName, xStringResourceManager, + ( rControlAny, aDialogName, aCtrlName, xStringResourceManager, xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE ); if( nChangedCount ) @@ -1047,7 +1047,7 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai } void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor, - Any aControlAny, const OUString& aCtrlName, + const Any& rControlAny, const OUString& aCtrlName, Reference< XStringResourceResolver > xSourceStringResolver ) { // Get library for DlgEditor @@ -1069,7 +1069,7 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor, OUString aDialogName = pDlgWin->GetName(); implHandleControlResourceProperties - ( aControlAny, aDialogName, aCtrlName, xStringResourceManager, + ( rControlAny, aDialogName, aCtrlName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES ); } diff --git a/basctl/source/inc/localizationmgr.hxx b/basctl/source/inc/localizationmgr.hxx index a23c6c8486cd..54376cc44a10 100644 --- a/basctl/source/inc/localizationmgr.hxx +++ b/basctl/source/inc/localizationmgr.hxx @@ -52,7 +52,7 @@ class LocalizationMgr MOVE_RESOURCES, COPY_RESOURCES }; - static sal_Int32 implHandleControlResourceProperties( ::com::sun::star::uno::Any aControlAny, + static sal_Int32 implHandleControlResourceProperties(const css::uno::Any& rControlAny, const OUString& aDialogName, const OUString& aCtrlName, ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager, ::com::sun::star::uno::Reference< ::com::sun::star::resource:: @@ -88,22 +88,22 @@ public: void handleRemoveLocales( const ::com::sun::star::uno::Sequence < ::com::sun::star::lang::Locale >& aLocaleSeq ); - void handleSetDefaultLocale( ::com::sun::star::lang::Locale aLocale ); + void handleSetDefaultLocale(const css::lang::Locale& rLocale); - void handleSetCurrentLocale( ::com::sun::star::lang::Locale aLocale ); + void handleSetCurrentLocale(const css::lang::Locale& rLocale); void handleBasicStarted( void ); void handleBasicStopped( void ); - static void setControlResourceIDsForNewEditorObject( DlgEditor* pEditor, - ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName ); + static void setControlResourceIDsForNewEditorObject(DlgEditor* pEditor, + const css::uno::Any& rControlAny, const OUString& aCtrlName); - static void renameControlResourceIDsForEditorObject( DlgEditor* pEditor, - ::com::sun::star::uno::Any aControlAny, const OUString& aNewCtrlName ); + static void renameControlResourceIDsForEditorObject(DlgEditor* pEditor, + const css::uno::Any& rControlAny, const OUString& aNewCtrlName); - static void deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor, - ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName ); + static void deleteControlResourceIDsForDeletedEditorObject(DlgEditor* pEditor, + const css::uno::Any& rControlAny, const OUString& aCtrlName); static void setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName, const OUString& aDlgName, ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > xDialogModel ); @@ -128,7 +128,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::resource::XStringResourceManager > xStringResourceManager ); static void copyResourcesForPastedEditorObject( DlgEditor* pEditor, - ::com::sun::star::uno::Any aControlAny, const OUString& aCtrlName, + const css::uno::Any& rControlAny, const OUString& aCtrlName, ::com::sun::star::uno::Reference< ::com::sun::star::resource:: XStringResourceResolver > xSourceStringResolver ); 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 diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx index 69ebc3a696c2..1421e83a7295 100644 --- a/cui/source/factory/dlgfact.cxx +++ b/cui/source/factory/dlgfact.cxx @@ -1186,9 +1186,9 @@ AbstractTakeProgress * AbstractDialogFactory_Impl::CreateTakeProgressDialog( vcl VclAbstractDialog* AbstractDialogFactory_Impl::CreateScriptErrorDialog( - vcl::Window* pParent, ::com::sun::star::uno::Any aException ) + vcl::Window* pParent, const ::com::sun::star::uno::Any& rException) { - return new SvxScriptErrorDialog( pParent, aException ); + return new SvxScriptErrorDialog(pParent, rException); } AbstractScriptSelectorDialog* diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx index 6737b94803b0..da68f13ea245 100644 --- a/cui/source/factory/dlgfact.hxx +++ b/cui/source/factory/dlgfact.hxx @@ -688,7 +688,7 @@ public: ) SAL_OVERRIDE; virtual VclAbstractDialog* CreateScriptErrorDialog( - vcl::Window* pParent, ::com::sun::star::uno::Any aException) SAL_OVERRIDE; + vcl::Window* pParent, const css::uno::Any& rException) SAL_OVERRIDE; virtual VclAbstractDialog* CreateSvxMacroAssignDlg( vcl::Window* _pParent, diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 0bcaa384de05..bacff3989c16 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -764,14 +764,14 @@ public: bool IsFormatting() const { return bIsFormatting; } void SetText(const OUString& rText); - EditPaM DeleteSelected( EditSelection aEditSelection); + EditPaM DeleteSelected(const EditSelection& rEditSelection); EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, bool bIsUserInput = false ); EditPaM InsertText(const EditSelection& aCurEditSelection, const OUString& rStr); EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, vcl::Window* pFrameWin = NULL ); EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, sal_uInt8 nMode, sal_uInt8 nDelMode = DELMODE_SIMPLE ); - EditPaM InsertParaBreak( EditSelection aEditSelection ); + EditPaM InsertParaBreak(const EditSelection& rEditSelection); EditPaM InsertLineBreak(const EditSelection& aEditSelection); - EditPaM InsertTab( EditSelection aEditSelection ); + EditPaM InsertTab(const EditSelection& rEditSelection); EditPaM InsertField(const EditSelection& rCurSel, const SvxFieldItem& rFld); bool UpdateFields(); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index d294ef377111..3fd9a7000249 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -261,9 +261,9 @@ void ImpEditEngine::InitDoc(bool bKeepParaAttribs) aEditDoc.GetObject( 0 )->CreateWrongList(); } -EditPaM ImpEditEngine::DeleteSelected( EditSelection aSel ) +EditPaM ImpEditEngine::DeleteSelected(const EditSelection& rSel) { - EditPaM aPaM ( ImpDeleteSelection( aSel ) ); + EditPaM aPaM (ImpDeleteSelection(rSel)); return aPaM; } @@ -2881,9 +2881,9 @@ EditPaM ImpEditEngine::ImpFastInsertParagraph( sal_Int32 nPara ) return EditPaM( pNode, 0 ); } -EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel ) +EditPaM ImpEditEngine::InsertParaBreak(const EditSelection& rCurSel) { - EditPaM aPaM( ImpInsertParaBreak( aCurSel ) ); + EditPaM aPaM(ImpInsertParaBreak(rCurSel)); if ( aStatus.DoAutoIndenting() ) { sal_Int32 nPara = aEditDoc.GetPos( aPaM.GetNode() ); @@ -2904,9 +2904,9 @@ EditPaM ImpEditEngine::InsertParaBreak( EditSelection aCurSel ) return aPaM; } -EditPaM ImpEditEngine::InsertTab( EditSelection aCurSel ) +EditPaM ImpEditEngine::InsertTab(const EditSelection& rCurSel) { - EditPaM aPaM( ImpInsertFeature( aCurSel, SfxVoidItem( EE_FEATURE_TAB ) ) ); + EditPaM aPaM( ImpInsertFeature(rCurSel, SfxVoidItem(EE_FEATURE_TAB ))); return aPaM; } diff --git a/extensions/source/propctrlr/formbrowsertools.hxx b/extensions/source/propctrlr/formbrowsertools.hxx index 5dd9a8f4036c..97c038265b0e 100644 --- a/extensions/source/propctrlr/formbrowsertools.hxx +++ b/extensions/source/propctrlr/formbrowsertools.hxx @@ -70,7 +70,7 @@ namespace pcr bool > { - bool operator() (::com::sun::star::beans::Property _rLhs, ::com::sun::star::beans::Property _rRhs) const + bool operator() (const css::beans::Property& _rLhs, const css::beans::Property& _rRhs) const { return _rLhs.Name < _rRhs.Name; } @@ -83,7 +83,7 @@ namespace pcr bool > { - bool operator() (::com::sun::star::uno::Type _rLhs, ::com::sun::star::uno::Type _rRhs) const + bool operator() (const css::uno::Type& _rLhs, const css::uno::Type& _rRhs) const { return _rLhs.getTypeName() < _rRhs.getTypeName(); } diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index 668e9a197cfc..8fbf9c87371f 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -166,7 +166,7 @@ private: bool bYError); void exportAxes( ); - void exportAxis( AxisIdPair aAxisIdPair ); + void exportAxis(const AxisIdPair& rAxisIdPair); void _exportAxis( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xAxisProp, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& xAxisTitle, @@ -174,7 +174,7 @@ private: const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xMinorGrid, sal_Int32 nAxisType, const char* sAxisPos, - AxisIdPair aAxisIdPair ); + const AxisIdPair& rAxisIdPair ); void exportAxesId( sal_Int32 nAttachedAxis ); void exportView3D(); bool isDeep3dChart(); diff --git a/include/sfx2/sfxdlg.hxx b/include/sfx2/sfxdlg.hxx index d5b8352dd062..31aa37ae12a7 100644 --- a/include/sfx2/sfxdlg.hxx +++ b/include/sfx2/sfxdlg.hxx @@ -151,7 +151,7 @@ public: ) = 0; virtual VclAbstractDialog* CreateScriptErrorDialog( - vcl::Window* pParent, com::sun::star::uno::Any aException ) = 0; + vcl::Window* pParent, const css::uno::Any& rException ) = 0; virtual VclAbstractDialog* CreateOptionsDialog( vcl::Window* pParent, const OUString& rExtensionId, const OUString& rApplicationContext ) = 0; diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 5882adb9f4fd..080c807aa562 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -449,7 +449,7 @@ public: ) SAL_OVERRIDE = 0; virtual VclAbstractDialog* CreateScriptErrorDialog( - vcl::Window* pParent, com::sun::star::uno::Any aException) SAL_OVERRIDE = 0; + vcl::Window* pParent, const css::uno::Any& rException) SAL_OVERRIDE = 0; virtual VclAbstractDialog* CreateSvxMacroAssignDlg( vcl::Window* _pParent, diff --git a/include/svx/view3d.hxx b/include/svx/view3d.hxx index 6cb641e1fc3d..3cbec6289432 100644 --- a/include/svx/view3d.hxx +++ b/include/svx/view3d.hxx @@ -106,7 +106,7 @@ public: bool ImpCloneAll3DObjectsToDestScene(E3dScene* pSrcScene, E3dScene* pDstScene, Point aOffset); bool IsConvertTo3DObjPossible() const; - void ConvertMarkedObjTo3D(bool bExtrude=true, basegfx::B2DPoint aPnt1 = basegfx::B2DPoint(0.0, 0.0), basegfx::B2DPoint aPnt2 = basegfx::B2DPoint(0.0, 1.0)); + void ConvertMarkedObjTo3D(bool bExtrude=true, const basegfx::B2DPoint& rPnt1 = basegfx::B2DPoint(0.0, 0.0), const basegfx::B2DPoint& rPnt2 = basegfx::B2DPoint(0.0, 1.0)); // Means to create all Extrudes in a certain depth order. void DoDepthArrange(E3dScene* pScene, double fDepth); diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx index f514348f3c62..05b09350518d 100644 --- a/include/vbahelper/vbashapes.hxx +++ b/include/vbahelper/vbashapes.hxx @@ -43,8 +43,8 @@ protected: virtual css::uno::Sequence<OUString> getServiceNames() SAL_OVERRIDE; css::uno::Reference< css::container::XIndexAccess > getShapesByArrayIndices( const css::uno::Any& Index ) throw (css::uno::RuntimeException); css::uno::Reference< css::drawing::XShape > createShape( const OUString& service ) throw (css::uno::RuntimeException); - css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException); - css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, css::uno::Any aRange ) throw (css::uno::RuntimeException); + css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange ) throw (css::uno::RuntimeException); + css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange ) throw (css::uno::RuntimeException); css::uno::Any AddTextboxInWriter( sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (css::uno::RuntimeException); OUString createName( const OUString& sName ); //TODO helperapi using a writer document diff --git a/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx b/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx index 300b15ca4d43..7dcfa32c0bb8 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawobj.hxx @@ -91,7 +91,12 @@ public: /** * @descr Set drawing object rotate. */ - void SetRotate(double degree, XFPoint aRotatePoint=XFPoint(0,0)); + void SetRotate(double degree, const XFPoint& rRotatePoint=XFPoint(0,0)) + { + m_nFlag |= XFDRAWOBJECT_FLAG_ROTATE; + m_fRotate = degree*2*PI/360; + m_aRotatePoint = rRotatePoint; + } /** * @descr Set drawing object scale. @@ -130,13 +135,6 @@ inline void XFDrawObject::SetTextStyleName(const OUString& style) m_strTextStyle = style; } -inline void XFDrawObject::SetRotate(double degree, XFPoint aRotatePoint) -{ - m_nFlag |= XFDRAWOBJECT_FLAG_ROTATE; - m_fRotate = degree*2*PI/360; - m_aRotatePoint = aRotatePoint; -} - inline void XFDrawObject::SetScale(double cx, double cy) { m_nFlag |= XFDRAWOBJECT_FLAG_SCALE; diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx index f567d902953b..283768f98b56 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpath.hxx @@ -81,7 +81,10 @@ public: /** * @descr Set svg path point. */ - void AddPoint(XFPoint pt); + void AddPoint(const XFPoint& pt) + { + m_aPoints.push_back(pt); + } OUString ToString(); @@ -132,11 +135,6 @@ inline void XFSvgPathEntry::SetCommand(const OUString& cmd) m_strCommand = cmd; } -inline void XFSvgPathEntry::AddPoint(XFPoint pt) -{ - m_aPoints.push_back(pt); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx index d7b7b994ba35..52968d40257c 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawpolyline.hxx @@ -69,9 +69,17 @@ public: XFDrawPolyline(); public: - void AddPoint(double x, double y); + void AddPoint(double x, double y) + { + assert(x>=0&&y>=0); + m_aPoints.push_back( XFPoint(x,y) ); + } - void AddPoint(XFPoint pt); + void AddPoint(const XFPoint& pt) + { + assert(pt.GetX()>=0&&pt.GetY()>=0); + m_aPoints.push_back(pt); + } XFRect CalcViewBox(); @@ -81,17 +89,5 @@ protected: std::vector<XFPoint> m_aPoints; }; -inline void XFDrawPolyline::AddPoint(double x, double y) -{ - assert(x>=0&&y>=0); - m_aPoints.push_back( XFPoint(x,y) ); -} - -inline void XFDrawPolyline::AddPoint(XFPoint pt) -{ - assert(pt.GetX()>=0&&pt.GetY()>=0); - m_aPoints.push_back(pt); -} - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx b/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx index 0dab2ef81873..d67a51c9ea9d 100644 --- a/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx +++ b/lotuswordpro/source/filter/xfilter/xfdrawrect.hxx @@ -68,7 +68,10 @@ public: XFDrawRect(); public: - void SetStartPoint(XFPoint pt); + void SetStartPoint(const XFPoint& pt) + { + m_aRect.SetStartPoint(pt); + } void SetSize(double width, double height); @@ -84,11 +87,6 @@ private: double m_fCornerRadius; }; -inline void XFDrawRect::SetStartPoint(XFPoint pt) -{ - m_aRect.SetStartPoint(pt); -} - inline void XFDrawRect::SetSize(double width, double height) { m_aRect.SetSize(width,height); diff --git a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx index c903c5a8f560..a4e36800df04 100644 --- a/lotuswordpro/source/filter/xfilter/xfinputlist.hxx +++ b/lotuswordpro/source/filter/xfilter/xfinputlist.hxx @@ -69,24 +69,22 @@ class XFInputList : public XFContent { public: - void SetName(const OUString& sName); - void SetLabels(std::vector<OUString> list); + void SetName(const OUString& sName) + { + m_strName = sName; + } + + void SetLabels(const std::vector<OUString>& list) + { + m_list=list; + } + virtual void ToXml(IXFStream *pStrm) SAL_OVERRIDE; private: OUString m_strName; std::vector<OUString> m_list; }; -inline void XFInputList::SetName(const OUString& sName) -{ - m_strName = sName; -} - -inline void XFInputList::SetLabels(std::vector<OUString> list) -{ - m_list=list; -} - inline void XFInputList::ToXml(IXFStream *pStrm) { IXFAttrList *pAttrList = pStrm->GetAttrList(); diff --git a/lotuswordpro/source/filter/xfilter/xfrect.hxx b/lotuswordpro/source/filter/xfilter/xfrect.hxx index 7c1636424fc7..5c2905969883 100644 --- a/lotuswordpro/source/filter/xfilter/xfrect.hxx +++ b/lotuswordpro/source/filter/xfilter/xfrect.hxx @@ -117,7 +117,7 @@ public: return m_fHeight; } - void SetStartPoint(XFPoint pt) + void SetStartPoint(const XFPoint& pt) { m_aPoint = pt; } diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx index 94146804e2d9..dbd28ebed128 100644 --- a/oox/source/export/chartexport.cxx +++ b/oox/source/export/chartexport.cxx @@ -2096,7 +2096,7 @@ void ChartExport::exportAxes( ) } } -void ChartExport::exportAxis( AxisIdPair aAxisIdPair ) +void ChartExport::exportAxis(const AxisIdPair& rAxisIdPair) { // get some properties from document first bool bHasXAxisTitle = false, @@ -2145,7 +2145,7 @@ void ChartExport::exportAxis( AxisIdPair aAxisIdPair ) sal_Int32 nAxisType = XML_catAx; const char* sAxPos = NULL; - switch( aAxisIdPair.nAxisType ) + switch( rAxisIdPair.nAxisType ) { case AXIS_PRIMARY_X: { @@ -2226,7 +2226,7 @@ void ChartExport::exportAxis( AxisIdPair aAxisIdPair ) } } - _exportAxis( xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, aAxisIdPair ); + _exportAxis(xAxisProp, xAxisTitle, xMajorGrid, xMinorGrid, nAxisType, sAxPos, rAxisIdPair); } void ChartExport::_exportAxis( @@ -2236,13 +2236,13 @@ void ChartExport::_exportAxis( const Reference< XPropertySet >& xMinorGrid, sal_Int32 nAxisType, const char* sAxisPos, - AxisIdPair aAxisIdPair ) + const AxisIdPair& rAxisIdPair ) { FSHelperPtr pFS = GetFS(); pFS->startElement( FSNS( XML_c, nAxisType ), FSEND ); pFS->singleElement( FSNS( XML_c, XML_axId ), - XML_val, I32S( aAxisIdPair.nAxisId ), + XML_val, I32S( rAxisIdPair.nAxisId ), FSEND ); pFS->startElement( FSNS( XML_c, XML_scaling ), @@ -2414,7 +2414,7 @@ void ChartExport::_exportAxis( exportShapeProps( xAxisProp ); pFS->singleElement( FSNS( XML_c, XML_crossAx ), - XML_val, I32S( aAxisIdPair.nCrossAx ), + XML_val, I32S( rAxisIdPair.nCrossAx ), FSEND ); // crosses & crossesAt diff --git a/reportdesign/source/ui/inc/UITools.hxx b/reportdesign/source/ui/inc/UITools.hxx index 1471152e99a1..3fa94d7b06d5 100644 --- a/reportdesign/source/ui/inc/UITools.hxx +++ b/reportdesign/source/ui/inc/UITools.hxx @@ -116,17 +116,17 @@ namespace rptui ); /** notifySystemWindow adds or remove the given window _pToRegister at the Systemwindow found when search _pWindow. - @param _pWindow + @param pWindow The window which is used to search for the SystemWindow. - @param _pToRegister + @param pToRegister The window which should be added or removed on the TaskPaneList. - @param _rMemFunc + @param rMemFunc The member function which should be called at the SystemWindow when found. Possible values are: ::comphelper::mem_fun(&TaskPaneList::AddWindow) ::comphelper::mem_fun(&TaskPaneList::RemoveWindow) */ - 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); const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES = 1; diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx index 59733116c6d8..41cc15eaf948 100644 --- a/reportdesign/source/ui/misc/UITools.cxx +++ b/reportdesign/source/ui/misc/UITools.cxx @@ -831,14 +831,13 @@ void applyCharacterSettings( const uno::Reference< report::XReportControlFormat } } - -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) { OSL_ENSURE(_pWindow,"Window can not be null!"); SystemWindow* pSystemWindow = _pWindow ? _pWindow->GetSystemWindow() : NULL; if ( pSystemWindow ) { - _rMemFunc( pSystemWindow->GetTaskPaneList(), _pToRegister ); + rMemFunc( pSystemWindow->GetTaskPaneList(), _pToRegister ); } } diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx index d448e8fd43b4..b7128e277560 100644 --- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx +++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx @@ -45,9 +45,9 @@ const OUString& FormulaTemplate::getTemplate() return mTemplate; } -void FormulaTemplate::autoReplaceRange(const OUString& aVariable, ScRange aRange) +void FormulaTemplate::autoReplaceRange(const OUString& aVariable, const ScRange& rRange) { - mRangeReplacementMap.insert ( std::pair<OUString, ScRange>(aVariable, aRange) ); + mRangeReplacementMap.insert ( std::pair<OUString, ScRange>(aVariable, rRange) ); } void FormulaTemplate::autoReplaceAddress(const OUString& aVariable, ScAddress aAddress) diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index 1aae189e4672..71a1ce4f4c84 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -32,7 +32,7 @@ using namespace com::sun::star::uno; #define SEP_PATH "Office.Calc/Dialogs/CSVImport" #define FIXED_WIDTH_LIST "FixedWidthList" -static void load_FixedWidthList(ScCsvSplits &aSplits) +static void load_FixedWidthList(ScCsvSplits &rSplits) { OUString sSplits; OUString sFixedWidthLists; @@ -49,7 +49,7 @@ static void load_FixedWidthList(ScCsvSplits &aSplits) if( pProperties[0].hasValue() ) { - aSplits.Clear(); + rSplits.Clear(); pProperties[0] >>= sFixedWidthLists; sSplits = sFixedWidthLists; @@ -57,17 +57,17 @@ static void load_FixedWidthList(ScCsvSplits &aSplits) // String ends with a semi-colon so there is no 'int' after the last one. sal_Int32 n = comphelper::string::getTokenCount(sSplits, ';') - 1; for (sal_Int32 i = 0; i < n; ++i) - aSplits.Insert( sSplits.getToken(i, ';').toInt32() ); + rSplits.Insert( sSplits.getToken(i, ';').toInt32() ); } } -static void save_FixedWidthList(ScCsvSplits aSplits) +static void save_FixedWidthList(const ScCsvSplits& rSplits) { OUStringBuffer sSplits; // Create a semi-colon separated string to save the splits - sal_uInt32 n = aSplits.Count(); + sal_uInt32 n = rSplits.Count(); for (sal_uInt32 i = 0; i < n; ++i) { - sSplits.append( OUString::number( aSplits[i] ) ); + sSplits.append(OUString::number(rSplits[i])); sSplits.append(";"); } diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx index 6aceb0b8d8c5..2009261d51a5 100644 --- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx +++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx @@ -40,7 +40,7 @@ public: void setTemplate(const char* aTemplate); const OUString& getTemplate(); - void autoReplaceRange(const OUString& aVariable, ScRange aRange); + void autoReplaceRange(const OUString& aVariable, const ScRange& rRange); void autoReplaceAddress(const OUString& aVariable, ScAddress aAddress); void applyRange(const OUString& aVariable, const ScRange& aRange, bool b3D = true); diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx index 6c7fabbbb69f..e415989c979f 100644 --- a/sd/inc/CustomAnimationEffect.hxx +++ b/sd/inc/CustomAnimationEffect.hxx @@ -110,8 +110,8 @@ public: SAL_DLLPRIVATE bool hasAfterEffect() const { return mbHasAfterEffect; } SAL_DLLPRIVATE void setHasAfterEffect( bool bHasAfterEffect ) { mbHasAfterEffect = bHasAfterEffect; } - SAL_DLLPRIVATE ::com::sun::star::uno::Any getDimColor() const { return maDimColor; } - SAL_DLLPRIVATE void setDimColor( ::com::sun::star::uno::Any aDimColor ) { maDimColor = aDimColor; } + SAL_DLLPRIVATE css::uno::Any getDimColor() const { return maDimColor; } + SAL_DLLPRIVATE void setDimColor( const css::uno::Any& rDimColor ) { maDimColor = rDimColor; } SAL_DLLPRIVATE bool IsAfterEffectOnNext() const { return mbAfterEffectOnNextEffect; } SAL_DLLPRIVATE void setAfterEffectOnNext( bool bOnNextEffect ) { mbAfterEffectOnNextEffect = bOnNextEffect; } diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx index 96df5f8d4827..87d2e7ee7ba2 100644 --- a/sd/inc/sdpage.hxx +++ b/sd/inc/sdpage.hxx @@ -200,7 +200,7 @@ public: void SetAutoLayout(AutoLayout eLayout, bool bInit=false, bool bCreate=false); AutoLayout GetAutoLayout() const { return meAutoLayout; } void CreateTitleAndLayout(bool bInit=false, bool bCreate=false); - SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit ); + SdrObject* InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit); virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE, const SdrInsertReason* pReason=NULL) SAL_OVERRIDE; diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 7ceb101b14a2..c04884f3ba23 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2070,7 +2070,7 @@ void SdPage::ScaleObjects(const Size& rNewPageSize, const Rectangle& rNewBorderR } } -SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, Rectangle aRect ) +SdrObject* convertPresentationObjectImpl(SdPage& rPage, SdrObject* pSourceObj, PresObjKind& eObjKind, bool bVertical, const Rectangle& rRect) { SdDrawDocument* pModel = static_cast< SdDrawDocument* >( rPage.GetModel() ); DBG_ASSERT( pModel, "sd::convertPresentationObjectImpl(), no model on page!" ); @@ -2083,7 +2083,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, SdrObject* pNewObj = pSourceObj; if((eObjKind == PRESOBJ_OUTLINE) && (pSourceObj->GetObjIdentifier() == OBJ_TEXT) ) { - pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, aRect); + pNewObj = rPage.CreatePresObj(PRESOBJ_OUTLINE, bVertical, rRect); // Set text of the subtitle into PRESOBJ_OUTLINE OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject(); @@ -2141,7 +2141,7 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, else if((eObjKind == PRESOBJ_TEXT) && (pSourceObj->GetObjIdentifier() == OBJ_OUTLINETEXT) ) { // is there an outline shape we can use to replace empty subtitle shape? - pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, aRect); + pNewObj = rPage.CreatePresObj(PRESOBJ_TEXT, bVertical, rRect); // Set text of the outline object into PRESOBJ_TITLE OutlinerParaObject* pOutlParaObj = pSourceObj->GetOutlinerParaObject(); @@ -2206,27 +2206,27 @@ SdrObject* convertPresentationObjectImpl( SdPage& rPage, SdrObject* pSourceObj, looking for an existing presentation shape @param bVertical If true, the shape is created vertical if bInit is true - @param aRect + @param rRect The rectangle that should be used to transform the shape @param bInit If true the shape is created if not found @returns A presentation shape that was either found or created with the given parameters */ -SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, bool bVertical, Rectangle aRect, bool bInit ) +SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind, bool bVertical, const Rectangle& rRect, bool bInit) { ::svl::IUndoManager* pUndoManager = static_cast<SdDrawDocument*>(pModel)->GetUndoManager(); const bool bUndo = pUndoManager && pUndoManager->IsInListAction() && IsInserted(); if (!pObj && bInit) { - pObj = CreatePresObj(eObjKind, bVertical, aRect); + pObj = CreatePresObj(eObjKind, bVertical, rRect); } else if ( pObj && (pObj->GetUserCall() || bInit) ) { // convert object if shape type does not match kind (f.e. converting outline text to subtitle text) if( bInit ) - pObj = convertPresentationObjectImpl( *this, pObj, eObjKind, bVertical, aRect ); + pObj = convertPresentationObjectImpl(*this, pObj, eObjKind, bVertical, rRect); if( bUndo ) { @@ -2235,7 +2235,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, pUndoManager->AddUndoAction( new UndoObjectUserCall( *pObj ) ); } - ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect( aRect ); + ( /*(SdrGrafObj*)*/ pObj)->AdjustToMaxRect(rRect); pObj->SetUserCall(this); @@ -2258,11 +2258,11 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, { // switch off AutoGrowHeight, set new MinHeight SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() ); - SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(aRect.GetSize().Height()) ); + SdrMetricItem aMinHeight( makeSdrTextMinFrameHeightItem(rRect.GetSize().Height()) ); aTempAttr.Put( aMinHeight ); aTempAttr.Put( makeSdrTextAutoGrowHeightItem(false) ); pTextObject->SetMergedItemSet(aTempAttr); - pTextObject->SetLogicRect(aRect); + pTextObject->SetLogicRect(rRect); // switch on AutoGrowHeight SfxItemSet aAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() ); @@ -2275,11 +2275,11 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, { // switch off AutoGrowWidth , set new MinWidth SfxItemSet aTempAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() ); - SdrMetricItem aMinWidth( makeSdrTextMinFrameWidthItem(aRect.GetSize().Width()) ); + SdrMetricItem aMinWidth( makeSdrTextMinFrameWidthItem(rRect.GetSize().Width()) ); aTempAttr.Put( aMinWidth ); aTempAttr.Put( makeSdrTextAutoGrowWidthItem(false) ); pTextObject->SetMergedItemSet(aTempAttr); - pTextObject->SetLogicRect(aRect); + pTextObject->SetLogicRect(rRect); // switch on AutoGrowWidth SfxItemSet aAttr( static_cast<SdDrawDocument*>(pModel)->GetPool() ); @@ -2316,7 +2316,7 @@ SdrObject* SdPage::InsertAutoLayoutShape( SdrObject* pObj, PresObjKind eObjKind, } if ( pObj && (pObj->GetUserCall() || bInit) && ( pObj->IsEmptyPresObj() || !pObj->ISA(SdrGrafObj) ) ) - pObj->AdjustToMaxRect( aRect ); + pObj->AdjustToMaxRect(rRect); return pObj; } diff --git a/sd/source/filter/eppt/epptooxml.hxx b/sd/source/filter/eppt/epptooxml.hxx index fae879dbcbc7..9c977fe77562 100644 --- a/sd/source/filter/eppt/epptooxml.hxx +++ b/sd/source/filter/eppt/epptooxml.hxx @@ -100,7 +100,7 @@ protected: virtual ::oox::ole::VbaProject* implCreateVbaProject() const SAL_OVERRIDE; bool WriteNotesMaster(); - void WriteAnimateTo( ::sax_fastparser::FSHelperPtr pFS, const ::com::sun::star::uno::Any aValue, const OUString& rAttributeName ); + void WriteAnimateTo( ::sax_fastparser::FSHelperPtr pFS, const css::uno::Any& rValue, const OUString& rAttributeName ); void WriteAnimateValues( ::sax_fastparser::FSHelperPtr pFS, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimate >& rXAnimate ); void WriteAnimationCondition( ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Any& rAny, bool bWriteEvent, bool bMainSeqChild ); void WriteAnimationCondition( ::sax_fastparser::FSHelperPtr pFS, const char* pDelay, const char* pEvent, double fDelay, bool bHasFDelay ); @@ -113,7 +113,7 @@ protected: void WriteAnimationNodeEffect( ::sax_fastparser::FSHelperPtr pFS, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rXNode, sal_Int32 nXmlNodeType, bool bMainSeqChild ); void WriteAnimationNodeCommonPropsStart( ::sax_fastparser::FSHelperPtr pFS, const ::com::sun::star::uno::Reference< ::com::sun::star::animations::XAnimationNode >& rXNode, bool bSingle, bool bMainSeqChild ); void WriteAnimationProperty( ::sax_fastparser::FSHelperPtr pFS, const ::com::sun::star::uno::Any& rAny ); - void WriteAnimationTarget( ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Any aTarget ); + void WriteAnimationTarget( ::sax_fastparser::FSHelperPtr pFS, const css::uno::Any& rTarget ); bool WriteComments( sal_uInt32 nPageNum ); void ImplWriteBackground( ::sax_fastparser::FSHelperPtr pFS, ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > aXBackgroundPropSet ); void WriteTransition( ::sax_fastparser::FSHelperPtr pFS ); diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx index 46d49aec2c81..e0acfbbabb78 100644 --- a/sd/source/filter/eppt/pptx-epptooxml.cxx +++ b/sd/source/filter/eppt/pptx-epptooxml.cxx @@ -704,16 +704,16 @@ void PowerPointExport::WriteAnimateValues( FSHelperPtr pFS, const Reference< XAn pFS->endElementNS( XML_p, XML_tavLst ); } -void PowerPointExport::WriteAnimateTo( FSHelperPtr pFS, Any aValue, const OUString& rAttributeName ) +void PowerPointExport::WriteAnimateTo( FSHelperPtr pFS, const Any& rValue, const OUString& rAttributeName ) { - if( !aValue.hasValue() ) + if( !rValue.hasValue() ) return; DBG(printf("to attribute name: %s\n", USS( rAttributeName ))); pFS->startElementNS( XML_p, XML_to, FSEND ); - WriteAnimationProperty( pFS, AnimationExporter::convertAnimateValue( aValue, rAttributeName ) ); + WriteAnimationProperty(pFS, AnimationExporter::convertAnimateValue(rValue, rAttributeName)); pFS->endElementNS( XML_p, XML_to ); } @@ -743,11 +743,11 @@ void PowerPointExport::WriteAnimationAttributeName( FSHelperPtr pFS, const OUStr pFS->endElementNS( XML_p, XML_attrNameLst ); } -void PowerPointExport::WriteAnimationTarget( FSHelperPtr pFS, Any aTarget ) +void PowerPointExport::WriteAnimationTarget( FSHelperPtr pFS, const Any& rTarget ) { sal_Int32 nBegin = -1, nEnd = -1; bool bParagraphTarget; - Reference< XShape > rXShape = AnimationExporter::getTargetElementShape( aTarget, nBegin, nEnd, bParagraphTarget ); + Reference< XShape > rXShape = AnimationExporter::getTargetElementShape( rTarget, nBegin, nEnd, bParagraphTarget ); if( rXShape.is() ) { pFS->startElementNS( XML_p, XML_tgtEl, FSEND ); diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx index c29cd2e7b85e..c7f62dad3a59 100644 --- a/sd/source/ui/animations/CustomAnimationList.cxx +++ b/sd/source/ui/animations/CustomAnimationList.cxx @@ -756,15 +756,15 @@ void selectShape( SvTreeListBox* pTreeList, Reference< XShape > xShape ) } } -void CustomAnimationList::onSelectionChanged( Any aSelection ) +void CustomAnimationList::onSelectionChanged(const Any& rSelection) { try { SelectAll(false); - if( aSelection.hasValue() ) + if (rSelection.hasValue()) { - Reference< XIndexAccess > xShapes( aSelection, UNO_QUERY ); + Reference< XIndexAccess > xShapes(rSelection, UNO_QUERY); if( xShapes.is() ) { sal_Int32 nCount = xShapes->getCount(); @@ -778,7 +778,7 @@ void CustomAnimationList::onSelectionChanged( Any aSelection ) } else { - Reference< XShape > xShape( aSelection, UNO_QUERY ); + Reference< XShape > xShape(rSelection, UNO_QUERY); if( xShape.is() ) selectShape( this, xShape ); } diff --git a/sd/source/ui/animations/CustomAnimationList.hxx b/sd/source/ui/animations/CustomAnimationList.hxx index a8a022e15020..b28f4cf138c5 100644 --- a/sd/source/ui/animations/CustomAnimationList.hxx +++ b/sd/source/ui/animations/CustomAnimationList.hxx @@ -63,7 +63,7 @@ public: EffectSequence getSelection() const; // events - void onSelectionChanged( ::com::sun::star::uno::Any aSelection ); + void onSelectionChanged(const css::uno::Any& rSelection); // overrides virtual void SelectHdl() SAL_OVERRIDE; diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx index 5549e5ebd213..7e76377a4c97 100644 --- a/slideshow/source/engine/slide/slideimpl.cxx +++ b/slideshow/source/engine/slide/slideimpl.cxx @@ -187,7 +187,7 @@ private: void startIntrinsicAnimations(); /// Add Polygons to the member maPolygons - void addPolygons(PolyPolygonVector aPolygons); + void addPolygons(const PolyPolygonVector& rPolygons); // Types // ===== @@ -874,12 +874,12 @@ void SlideImpl::drawPolygons() const mpPaintOverlay->drawPolygons(); } -void SlideImpl::addPolygons(PolyPolygonVector aPolygons) +void SlideImpl::addPolygons(const PolyPolygonVector& rPolygons) { - if(!aPolygons.empty()) + if(!rPolygons.empty()) { - for( PolyPolygonVector::iterator aIter=aPolygons.begin(), - aEnd=aPolygons.end(); + for( PolyPolygonVector::const_iterator aIter = rPolygons.begin(), + aEnd = rPolygons.end(); aIter!=aEnd; ++aIter ) { diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index 2b951b46e409..762df16364e6 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -61,13 +61,13 @@ public: long GetTop() const {return _top;} long GetLeft() const {return _left;} long GetHeight() const {return _height;} - long SquaredDistanceX(SmCaretLine line) const{ + long SquaredDistanceX(const SmCaretLine& line) const{ return (GetLeft() - line.GetLeft()) * (GetLeft() - line.GetLeft()); } long SquaredDistanceX(Point pos) const{ return (GetLeft() - pos.X()) * (GetLeft() - pos.X()); } - long SquaredDistanceY(SmCaretLine line) const{ + long SquaredDistanceY(const SmCaretLine& line) const{ long d = GetTop() - line.GetTop(); if(d < 0) d = (d * -1) - GetHeight(); diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index 1a506e05081c..399bd234a602 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -833,7 +833,7 @@ void E3dView::ImpCreate3DObject(E3dScene* pScene, SdrObject* pObj, bool bExtrude } } -void E3dView::ConvertMarkedObjTo3D(bool bExtrude, basegfx::B2DPoint aPnt1, basegfx::B2DPoint aPnt2) +void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1, const basegfx::B2DPoint& rPnt2) { if(AreObjectsMarked()) { @@ -867,11 +867,11 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, basegfx::B2DPoint aPnt1, baseg if(!bExtrude) { // Create transformation for the polygons rotating body - if(aPnt1 != aPnt2) + if (rPnt1 != rPnt2) { // Rotation around control point #1 with set angle // for 3D coordinates - basegfx::B2DPoint aDiff(aPnt1 - aPnt2); + basegfx::B2DPoint aDiff(rPnt1 - rPnt2); fRot3D = atan2(aDiff.getY(), aDiff.getX()) - F_PI2; if(basegfx::fTools::equalZero(fabs(fRot3D))) @@ -879,15 +879,15 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, basegfx::B2DPoint aPnt1, baseg if(fRot3D != 0.0) { - aLatheMat = basegfx::tools::createRotateAroundPoint(aPnt2, -fRot3D) + aLatheMat = basegfx::tools::createRotateAroundPoint(rPnt2, -fRot3D) * aLatheMat; } } - if(aPnt2.getX() != 0.0) + if (rPnt2.getX() != 0.0) { // Translation to Y=0 - axis - aLatheMat.translate(-aPnt2.getX(), 0.0); + aLatheMat.translate(-rPnt2.getX(), 0.0); } else { diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 4a3cb0fc81a5..4f1a758d40b6 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1445,18 +1445,18 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const return aRetSet; } -Point ImpGetPoint(Rectangle aRect, RECT_POINT eRP) +Point ImpGetPoint(const Rectangle& rRect, RECT_POINT eRP) { switch(eRP) { - case RP_LT: return aRect.TopLeft(); - case RP_MT: return aRect.TopCenter(); - case RP_RT: return aRect.TopRight(); - case RP_LM: return aRect.LeftCenter(); - case RP_MM: return aRect.Center(); - case RP_RM: return aRect.RightCenter(); - case RP_LB: return aRect.BottomLeft(); - case RP_MB: return aRect.BottomCenter(); - case RP_RB: return aRect.BottomRight(); + case RP_LT: return rRect.TopLeft(); + case RP_MT: return rRect.TopCenter(); + case RP_RT: return rRect.TopRight(); + case RP_LM: return rRect.LeftCenter(); + case RP_MM: return rRect.Center(); + case RP_RM: return rRect.RightCenter(); + case RP_LB: return rRect.BottomLeft(); + case RP_MB: return rRect.BottomCenter(); + case RP_RB: return rRect.BottomRight(); } return Point(); // Should not happen! } diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx index 15cf821cfea3..30bcfd2b6cad 100644 --- a/sw/inc/fmtpdsc.hxx +++ b/sw/inc/fmtpdsc.hxx @@ -73,7 +73,7 @@ public: const SwPageDesc *GetPageDesc() const { return static_cast<const SwPageDesc*>(GetRegisteredIn()); } ::boost::optional<sal_uInt16> GetNumOffset() const { return oNumOffset; } - void SetNumOffset( ::boost::optional<sal_uInt16> oNum ) { oNumOffset = oNum; } + void SetNumOffset( const ::boost::optional<sal_uInt16>& oNum ) { oNumOffset = oNum; } /// Query / set where attribute is anchored. inline const SwModify* GetDefinedIn() const { return pDefinedIn; } diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index e23dd07179b0..1eaf7a7dee71 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -226,7 +226,7 @@ ScVbaShapes::createShape( const OUString& service ) throw (css::uno::RuntimeExce } uno::Any -ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException) +ScVbaShapes::AddRectangle(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange) throw (css::uno::RuntimeException) { OUString sCreateShapeName( "com.sun.star.drawing.RectangleShape" ); sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX ); @@ -253,12 +253,12 @@ ScVbaShapes::AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWi xShape->setSize( size ); ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) ); - pScVbaShape->setRange( aRange ); + pScVbaShape->setRange(rRange); return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) ); } uno::Any -ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, uno::Any aRange ) throw (css::uno::RuntimeException) +ScVbaShapes::AddEllipse(sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const uno::Any& rRange) throw (css::uno::RuntimeException) { OUString sCreateShapeName( "com.sun.star.drawing.EllipseShape" ); sal_Int32 nXPos = Millimeter::getInHundredthsOfOneMillimeter( startX ); @@ -297,7 +297,7 @@ ScVbaShapes::AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidt xShape->setSize(size); ScVbaShape *pScVbaShape = new ScVbaShape( getParent(), mxContext, xShape, m_xShapes, m_xModel, ScVbaShape::getType( xShape ) ); - pScVbaShape->setRange( aRange ); + pScVbaShape->setRange(rRange); return uno::makeAny( uno::Reference< msforms::XShape > ( pScVbaShape ) ); } diff --git a/writerfilter/source/dmapper/CellColorHandler.cxx b/writerfilter/source/dmapper/CellColorHandler.cxx index 7d4ce2bc8bc8..98a4e5e2b0f3 100644 --- a/writerfilter/source/dmapper/CellColorHandler.cxx +++ b/writerfilter/source/dmapper/CellColorHandler.cxx @@ -284,14 +284,14 @@ TablePropertyMapPtr CellColorHandler::getProperties() return pPropertyMap; } -void CellColorHandler::createGrabBag(const OUString& aName, uno::Any aAny) +void CellColorHandler::createGrabBag(const OUString& aName, const uno::Any& rAny) { if (m_aInteropGrabBagName.isEmpty()) return; beans::PropertyValue aValue; aValue.Name = aName; - aValue.Value = aAny; + aValue.Value = rAny; m_aInteropGrabBag.push_back(aValue); } diff --git a/writerfilter/source/dmapper/CellColorHandler.hxx b/writerfilter/source/dmapper/CellColorHandler.hxx index 36ac6fa5c66f..c55d280d0b79 100644 --- a/writerfilter/source/dmapper/CellColorHandler.hxx +++ b/writerfilter/source/dmapper/CellColorHandler.hxx @@ -46,7 +46,7 @@ private: virtual void lcl_attribute(Id Name, Value & val) SAL_OVERRIDE; virtual void lcl_sprm(Sprm & sprm) SAL_OVERRIDE; - void createGrabBag(const OUString& aName, css::uno::Any aValue); + void createGrabBag(const OUString& aName, const css::uno::Any& rValue); public: CellColorHandler( ); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 60ea3d6aa2be..de9467eea2d2 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -962,7 +962,7 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() // Apply paragraph property to each paragraph within a cell. static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell, - uno::Any aBottomMargin) + const uno::Any& rBottomMargin) { uno::Reference<container::XEnumerationAccess> xEnumerationAccess(xCell, uno::UNO_QUERY); uno::Reference<container::XEnumeration> xEnumeration = xEnumerationAccess->createEnumeration(); @@ -973,7 +973,7 @@ static void lcl_ApplyCellParaProps(uno::Reference<table::XCell> const& xCell, // Don't apply in case direct formatting is already present. // TODO: probably paragraph style has priority over table style here. if (xPropertyState.is() && xPropertyState->getPropertyState("ParaBottomMargin") == beans::PropertyState_DEFAULT_VALUE) - xParagraph->setPropertyValue("ParaBottomMargin", aBottomMargin); + xParagraph->setPropertyValue("ParaBottomMargin", rBottomMargin); } } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 31e828b227bc..62b98aaa74a2 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -5034,7 +5034,7 @@ SectionPropertyMap * DomainMapper_Impl::GetSectionContext() return pSectionContext; } -void DomainMapper_Impl::deferCharacterProperty( sal_Int32 id, com::sun::star::uno::Any value ) +void DomainMapper_Impl::deferCharacterProperty(sal_Int32 id, const css::uno::Any& value) { deferredCharacterProperties[ id ] = value; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx index 956e461502e5..a19af0dcc7dd 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx @@ -768,7 +768,7 @@ public: on another one that comes in the same CONTEXT_CHARACTER). The property will be processed again in DomainMapper::processDeferredCharacterProperties(). */ - void deferCharacterProperty( sal_Int32 id, com::sun::star::uno::Any value ); + void deferCharacterProperty(sal_Int32 id, const css::uno::Any& value); /** Processes properties deferred using deferCharacterProperty(). To be called whenever the top CONTEXT_CHARACTER is going to be used (e.g. by appendText()). diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index f1f3a65c9ac6..63995b88a901 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -688,7 +688,7 @@ void SectionPropertyMap::ApplyBorderToPageStyles( } } -table::ShadowFormat PropertyMap::getShadowFromBorder(table::BorderLine2 aBorder) +table::ShadowFormat PropertyMap::getShadowFromBorder(const table::BorderLine2& rBorder) { // In Word UI, shadow is a boolean property, in OOXML, it's a boolean // property of each 4 border type, finally in Writer the border is a @@ -697,7 +697,7 @@ table::ShadowFormat PropertyMap::getShadowFromBorder(table::BorderLine2 aBorder) table::ShadowFormat aFormat; aFormat.Color = COL_BLACK; aFormat.Location = table::ShadowLocation_BOTTOM_RIGHT; - aFormat.ShadowWidth = aBorder.LineWidth; + aFormat.ShadowWidth = rBorder.LineWidth; return aFormat; } diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx index 58908334bbd5..a1bb5c63dd5e 100644 --- a/writerfilter/source/dmapper/PropertyMap.hxx +++ b/writerfilter/source/dmapper/PropertyMap.hxx @@ -174,7 +174,7 @@ public: #ifdef DEBUG_WRITERFILTER void dumpXml( const TagLogger::Pointer_t pLogger ) const; #endif - static com::sun::star::table::ShadowFormat getShadowFromBorder(com::sun::star::table::BorderLine2 aBorder); + static com::sun::star::table::ShadowFormat getShadowFromBorder(const css::table::BorderLine2& rBorder); }; typedef std::shared_ptr<PropertyMap> PropertyMapPtr; diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx index 1c98e6f03382..673293d1e7b3 100644 --- a/writerfilter/source/dmapper/SdtHelper.cxx +++ b/writerfilter/source/dmapper/SdtHelper.cxx @@ -90,7 +90,7 @@ void SdtHelper::createDropDownControl() m_aDropDownItems.clear(); } -void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue aCharFormat) +void SdtHelper::createDateControl(OUString& rContentText, const beans::PropertyValue& rCharFormat) { uno::Reference<awt::XControlModel> xControlModel; try @@ -138,7 +138,7 @@ void SdtHelper::createDateControl(OUString& rContentText, beans::PropertyValue a aGrabBag["OriginalContent"] <<= rContentText; aGrabBag["DateFormat"] <<= sDateFormat; aGrabBag["Locale"] <<= m_sLocale.makeStringAndClear(); - aGrabBag["CharFormat"] <<= aCharFormat.Value; + aGrabBag["CharFormat"] <<= rCharFormat.Value; // merge in properties like ooxml:CT_SdtPr_alias and friends. aGrabBag.update(comphelper::SequenceAsHashMap(comphelper::containerToSequence(m_aGrabBag))); // and empty the property list, so they won't end up on the next sdt as well @@ -170,13 +170,7 @@ void SdtHelper::createControlShape(awt::Size aSize, uno::Reference<awt::XControl m_bHasElements = true; } - - - - - - -void SdtHelper::appendToInteropGrabBag(com::sun::star::beans::PropertyValue rValue) +void SdtHelper::appendToInteropGrabBag(const com::sun::star::beans::PropertyValue& rValue) { m_aGrabBag.push_back(rValue); } diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx index f22f30664f2c..52576d79f521 100644 --- a/writerfilter/source/dmapper/SdtHelper.hxx +++ b/writerfilter/source/dmapper/SdtHelper.hxx @@ -112,9 +112,9 @@ public: /// Create drop-down control from w:sdt's w:dropDownList. void createDropDownControl(); /// Create date control from w:sdt's w:date. - void createDateControl(OUString& rContentText, css::beans::PropertyValue aCharFormat); + void createDateControl(OUString& rContentText, const css::beans::PropertyValue& rCharFormat); - void appendToInteropGrabBag(com::sun::star::beans::PropertyValue rValue); + void appendToInteropGrabBag(const com::sun::star::beans::PropertyValue& rValue); com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> getInteropGrabBagAndClear(); bool isInteropGrabBagEmpty(); bool containedInInteropGrabBag(const OUString& rValueName); diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index a8dab40188be..087425c8ba0f 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -192,9 +192,9 @@ beans::PropertyValue StyleSheetEntry::GetInteropGrabBag() return aRet; } -void StyleSheetEntry::AppendInteropGrabBag(beans::PropertyValue aValue) +void StyleSheetEntry::AppendInteropGrabBag(const beans::PropertyValue& rValue) { - m_aInteropGrabBag.push_back(aValue); + m_aInteropGrabBag.push_back(rValue); } void lcl_mergeProps( PropertyMapPtr pToFill, PropertyMapPtr pToAdd, TblStyleType nStyleId ) @@ -875,23 +875,24 @@ class PropValVector : public _PropValVector public: PropValVector(){} - void Insert( beans::PropertyValue aVal ); + void Insert(const beans::PropertyValue& rVal); uno::Sequence< uno::Any > getValues(); uno::Sequence< OUString > getNames(); }; -void PropValVector::Insert( beans::PropertyValue aVal ) + +void PropValVector::Insert(const beans::PropertyValue& rVal) { _PropValVector::iterator aIt = begin(); while(aIt != end()) { - if(aIt->Name > aVal.Name) + if(aIt->Name > rVal.Name) { - insert( aIt, aVal ); + insert( aIt, rVal ); return; } ++aIt; } - push_back( aVal ); + push_back(rVal); } uno::Sequence< uno::Any > PropValVector::getValues() { diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx index 27091481f158..e7eaf02ea47c 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.hxx +++ b/writerfilter/source/dmapper/StyleSheetTable.hxx @@ -68,7 +68,7 @@ public: std::vector<css::beans::PropertyValue> aLsdExceptions; ///< List of lsdException attribute lists bool bAutoRedefine; ///< Writer calls this auto-update. - void AppendInteropGrabBag(css::beans::PropertyValue aValue); + void AppendInteropGrabBag(const css::beans::PropertyValue& rValue); css::beans::PropertyValue GetInteropGrabBag(); ///< Used for table styles, has a name. css::beans::PropertyValues GetInteropGrabBagSeq(); ///< Used for existing styles, just a list of properties. |