summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-05 09:46:12 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-06 06:48:38 +0000
commitf3d9aab8410c00298f29ca0194c5d33d53c63ff2 (patch)
tree370d24d49547d8eb2cdbcb293992d9b9a4a670ed /sw
parent654c98064d3fd2bd1e13ae2bda5f84e8d51d0071 (diff)
teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref. Suggested by Tor Lillqvist Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6 Reviewed-on: https://gerrit.libreoffice.org/24672 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/IDocumentDrawModelAccess.hxx4
-rw-r--r--sw/source/core/doc/DocumentDrawModelManager.cxx4
-rw-r--r--sw/source/core/inc/DocumentDrawModelManager.hxx4
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.cxx2
-rw-r--r--sw/source/uibase/docvw/AnchorOverlayObject.hxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/sw/inc/IDocumentDrawModelAccess.hxx b/sw/inc/IDocumentDrawModelAccess.hxx
index e4a220ecd631..93868401af87 100644
--- a/sw/inc/IDocumentDrawModelAccess.hxx
+++ b/sw/inc/IDocumentDrawModelAccess.hxx
@@ -59,7 +59,7 @@ public:
@return bool, indicating, if given layer ID belongs to the visible ones.
*/
- virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const = 0;
+ virtual bool IsVisibleLayerId( SdrLayerID _nLayerId ) const = 0;
/** method to determine, if the corresponding invisible layer ID for a visible one.
@@ -74,7 +74,7 @@ public:
@return sal_Int8, invisible layer ID corresponding to given layer ID
*/
- virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) = 0;
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( SdrLayerID _nVisibleLayerId ) = 0;
/// Searches text in shapes anchored inside rPaM.
virtual bool Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) = 0;
diff --git a/sw/source/core/doc/DocumentDrawModelManager.cxx b/sw/source/core/doc/DocumentDrawModelManager.cxx
index e45ddf8f4fa4..ae8facee14b3 100644
--- a/sw/source/core/doc/DocumentDrawModelManager.cxx
+++ b/sw/source/core/doc/DocumentDrawModelManager.cxx
@@ -281,7 +281,7 @@ void DocumentDrawModelManager::NotifyInvisibleLayers( SdrPageView& _rSdrPageView
_rSdrPageView.SetLayerVisible( sLayerNm, false );
}
-bool DocumentDrawModelManager::IsVisibleLayerId( const SdrLayerID& _nLayerId ) const
+bool DocumentDrawModelManager::IsVisibleLayerId( SdrLayerID _nLayerId ) const
{
bool bRetVal;
@@ -306,7 +306,7 @@ bool DocumentDrawModelManager::IsVisibleLayerId( const SdrLayerID& _nLayerId ) c
return bRetVal;
}
-SdrLayerID DocumentDrawModelManager::GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId )
+SdrLayerID DocumentDrawModelManager::GetInvisibleLayerIdByVisibleOne( SdrLayerID _nVisibleLayerId )
{
SdrLayerID nInvisibleLayerId;
diff --git a/sw/source/core/inc/DocumentDrawModelManager.hxx b/sw/source/core/inc/DocumentDrawModelManager.hxx
index 096d855eac25..26a25574c7e3 100644
--- a/sw/source/core/inc/DocumentDrawModelManager.hxx
+++ b/sw/source/core/inc/DocumentDrawModelManager.hxx
@@ -55,9 +55,9 @@ public:
virtual void NotifyInvisibleLayers( SdrPageView& _rSdrPageView ) override;
- virtual bool IsVisibleLayerId( const SdrLayerID& _nLayerId ) const override;
+ virtual bool IsVisibleLayerId( SdrLayerID _nLayerId ) const override;
- virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( const SdrLayerID& _nVisibleLayerId ) override;
+ virtual SdrLayerID GetInvisibleLayerIdByVisibleOne( SdrLayerID _nVisibleLayerId ) override;
virtual bool Search(const SwPaM& rPaM, const SvxSearchItem& rSearchItem) override;
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.cxx b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
index 9afd4249cf16..69e53842a0b4 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.cxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.cxx
@@ -229,7 +229,7 @@ ImplPrimitive2DIDBlock(AnchorPrimitive, PRIMITIVE2D_ID_SWSIDEBARANCHORPRIMITIVE)
/*static*/ AnchorOverlayObject* AnchorOverlayObject::CreateAnchorOverlayObject(
SwView& rDocView,
const SwRect& aAnchorRect,
- const long& aPageBorder,
+ long aPageBorder,
const Point& aLineStart,
const Point& aLineEnd,
const Color& aColorAnchor )
diff --git a/sw/source/uibase/docvw/AnchorOverlayObject.hxx b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
index ebe49230737f..579e4eec74c7 100644
--- a/sw/source/uibase/docvw/AnchorOverlayObject.hxx
+++ b/sw/source/uibase/docvw/AnchorOverlayObject.hxx
@@ -43,7 +43,7 @@ class AnchorOverlayObject: public sdr::overlay::OverlayObjectWithBasePosition
public:
static AnchorOverlayObject* CreateAnchorOverlayObject( SwView& rDocView,
const SwRect& aAnchorRect,
- const long& aPageBorder,
+ long aPageBorder,
const Point& aLineStart,
const Point& aLineEnd,
const Color& aColorAnchor );