diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 09:32:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-06-18 20:10:57 +0200 |
commit | 31f04378dbc07d4367dc3b66163aaed171cf0323 (patch) | |
tree | 803e8caa6fa9cecdab5e1a0047fbd334fd2ab1ee /sfx2 | |
parent | 2836b78b54650d117282a9a345677d1b4d9fc043 (diff) |
loplugin:passstuffbyref
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb
Reviewed-on: https://gerrit.libreoffice.org/74246
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/SfxRedactionHelper.hxx | 8 | ||||
-rw-r--r-- | sfx2/inc/autoredactdialog.hxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/SfxRedactionHelper.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/doc/autoredactdialog.cxx | 6 |
4 files changed, 14 insertions, 16 deletions
diff --git a/sfx2/inc/SfxRedactionHelper.hxx b/sfx2/inc/SfxRedactionHelper.hxx index ae72c39f4886..737357505e5d 100644 --- a/sfx2/inc/SfxRedactionHelper.hxx +++ b/sfx2/inc/SfxRedactionHelper.hxx @@ -60,24 +60,24 @@ public: * Returns the value of the given string param as an OUString * Returns empty OUString if no param * */ - static OUString getStringParam(const SfxRequest& rReq, const sal_uInt16& nParamId); + static OUString getStringParam(const SfxRequest& rReq, sal_uInt16 nParamId); /* * Creates metafiles from the pages of the given document, * and pushes into the given vector. * */ static void getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMetaFiles, - std::vector<::Size>& aPageSizes, const sal_Int32& nPages, + std::vector<::Size>& aPageSizes, sal_Int32 nPages, DocumentToGraphicRenderer& aRenderer); /* * Creates one shape and one draw page for each gdimetafile, * and inserts the shapes into the newly created draw pages. * */ static void - addPagesToDraw(uno::Reference<XComponent>& xComponent, const sal_Int32& nPages, + addPagesToDraw(uno::Reference<XComponent>& xComponent, sal_Int32 nPages, const std::vector<GDIMetaFile>& aMetaFiles, const std::vector<::Size>& aPageSizes, const PageMargins& aPageMargins, const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, - const bool& bIsAutoRedact); + bool bIsAutoRedact); /* * Makes the Redaction toolbar visible to the user. * Meant to be called after converting a document to a Draw doc diff --git a/sfx2/inc/autoredactdialog.hxx b/sfx2/inc/autoredactdialog.hxx index bb633b9a9bb1..9734f236de10 100644 --- a/sfx2/inc/autoredactdialog.hxx +++ b/sfx2/inc/autoredactdialog.hxx @@ -83,7 +83,7 @@ public: OUString get_id(int nRow) const { return m_xControl->get_id(nRow); } // Sync data on the targets box with the data on the target - void setRowData(const int& nRowIndex, const RedactionTarget* pTarget); + void setRowData(int nRowIndex, const RedactionTarget* pTarget); //void connect_changed(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_changed(rLink); } //void connect_row_activated(const Link<weld::TreeView&, void>& rLink) { m_xControl->connect_row_activated(rLink); } @@ -168,7 +168,7 @@ public: SfxAddTargetDialog(weld::Window* pWindow, const OUString& rName); SfxAddTargetDialog(weld::Window* pWindow, const OUString& sName, const RedactionTargetType& eTargetType, const OUString& sContent, - const bool& bCaseSensitive, const bool& bWholeWords); + bool bCaseSensitive, bool bWholeWords); OUString getName() const { return m_xName->get_text(); } RedactionTargetType getType() const; diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx b/sfx2/source/doc/SfxRedactionHelper.cxx index efd06b14fccd..310c0374ca35 100644 --- a/sfx2/source/doc/SfxRedactionHelper.cxx +++ b/sfx2/source/doc/SfxRedactionHelper.cxx @@ -75,7 +75,7 @@ bool SfxRedactionHelper::isRedactMode(const SfxRequest& rReq) return false; } -OUString SfxRedactionHelper::getStringParam(const SfxRequest& rReq, const sal_uInt16& nParamId) +OUString SfxRedactionHelper::getStringParam(const SfxRequest& rReq, sal_uInt16 nParamId) { OUString sStringParam; @@ -128,7 +128,7 @@ void setPageMargins(uno::Reference<beans::XPropertySet>& xPageProperySet, // #i10613# Extracted from ImplCheckRect::ImplCreate tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice& rOut, - const sal_Int32& nStrStartPos, const sal_Int32& nStrEndPos) + sal_Int32 nStrStartPos, sal_Int32 nStrEndPos) { tools::Rectangle aActionBounds; @@ -185,8 +185,7 @@ tools::Rectangle ImplCalcActionBounds(const MetaAction& rAct, const OutputDevice } // End of anon namespace void SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMetaFiles, - std::vector<::Size>& aPageSizes, - const sal_Int32& nPages, + std::vector<::Size>& aPageSizes, sal_Int32 nPages, DocumentToGraphicRenderer& aRenderer) { for (sal_Int32 nPage = 1; nPage <= nPages; ++nPage) @@ -219,11 +218,10 @@ void SfxRedactionHelper::getPageMetaFilesFromDoc(std::vector<GDIMetaFile>& aMeta } void SfxRedactionHelper::addPagesToDraw( - uno::Reference<XComponent>& xComponent, const sal_Int32& nPages, + uno::Reference<XComponent>& xComponent, sal_Int32 nPages, const std::vector<GDIMetaFile>& aMetaFiles, const std::vector<::Size>& aPageSizes, const PageMargins& aPageMargins, - const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, - const bool& bIsAutoRedact) + const std::vector<std::pair<RedactionTarget*, OUString>>& r_aTableTargets, bool bIsAutoRedact) { // Access the draw pages uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xComponent, uno::UNO_QUERY); diff --git a/sfx2/source/doc/autoredactdialog.cxx b/sfx2/source/doc/autoredactdialog.cxx index 2a11a2a6e63a..cc0aa1456db8 100644 --- a/sfx2/source/doc/autoredactdialog.cxx +++ b/sfx2/source/doc/autoredactdialog.cxx @@ -182,7 +182,7 @@ OUString TargetsTable::GetNameProposal() return sDefaultTargetName + " " + OUString::number(nHighestTargetId + 1); } -void TargetsTable::setRowData(const int& nRowIndex, const RedactionTarget* pTarget) +void TargetsTable::setRowData(int nRowIndex, const RedactionTarget* pTarget) { OUString sContent = pTarget->sContent; @@ -675,8 +675,8 @@ SfxAddTargetDialog::SfxAddTargetDialog(weld::Window* pParent, const OUString& rN SfxAddTargetDialog::SfxAddTargetDialog(weld::Window* pParent, const OUString& sName, const RedactionTargetType& eTargetType, - const OUString& sContent, const bool& bCaseSensitive, - const bool& bWholeWords) + const OUString& sContent, bool bCaseSensitive, + bool bWholeWords) : GenericDialogController(pParent, "sfx/ui/addtargetdialog.ui", "AddTargetDialog") , m_xName(m_xBuilder->weld_entry("name")) , m_xType(m_xBuilder->weld_combo_box("type")) |