summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-12 08:33:08 +0200
committerNoel Grandin <noel@peralex.com>2016-04-12 08:33:32 +0200
commit7c99b5586d7cb145079129470fdbf720399eee3c (patch)
tree71015148cefc130aa7d5b4ecd4e1284b4b2d7563 /sw
parentdc0d98590f07c7dae4504b7ed0c0127794f032d8 (diff)
clang-tidy performance-unnecessary-value-param in sw
Change-Id: I3e030743b640d5a5f6b3bf4a4e9ba50ccd001287
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/SwNumberTree.hxx2
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/ndgrf.hxx2
-rw-r--r--sw/inc/textboxhelper.hxx2
-rw-r--r--sw/inc/unoparagraph.hxx2
-rw-r--r--sw/inc/unotbl.hxx4
-rw-r--r--sw/source/core/SwNumberTree/SwNumberTree.cxx2
-rw-r--r--sw/source/core/crsr/crbm.cxx2
-rw-r--r--sw/source/core/doc/docbm.cxx4
-rw-r--r--sw/source/core/doc/docglos.cxx2
-rw-r--r--sw/source/core/doc/swstylemanager.cxx2
-rw-r--r--sw/source/core/doc/tblcpy.cxx6
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/graphic/ndgrf.cxx2
-rw-r--r--sw/source/core/unocore/unoobj2.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/core/unocore/unotbl.cxx6
-rw-r--r--sw/source/core/unocore/unotext.cxx2
18 files changed, 24 insertions, 24 deletions
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx
index f4144ee97881..4b9bdae378f4 100644
--- a/sw/inc/SwNumberTree.hxx
+++ b/sw/inc/SwNumberTree.hxx
@@ -476,7 +476,7 @@ protected:
- false only set if aItLastValid is preceding
the current last valid node
*/
- void SetLastValid(tSwNumberTreeChildren::const_iterator aItLastValid,
+ void SetLastValid(const tSwNumberTreeChildren::const_iterator& aItLastValid,
bool bValidating = false) const;
/**
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 7c3cfc9aa2c4..1dbf4adb07f2 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -877,7 +877,7 @@ public:
Convenince function used by ReplaceDocumentProperties to skip some UNO calls.
*/
- void ReplaceUserDefinedDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties > xSourceDocProps );
+ void ReplaceUserDefinedDocumentProperties( const css::uno::Reference< css::document::XDocumentProperties >& xSourceDocProps );
/** Replace document properties with those from rSource.
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 7b960c9c8a32..3c29befdf9d2 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -195,7 +195,7 @@ public:
bool IsLinkedInputStreamReady() const { return mbLinkedInputStreamReady;}
void TriggerAsyncRetrieveInputStream();
void ApplyInputStream(
- css::uno::Reference<css::io::XInputStream> xInputStream,
+ const css::uno::Reference<css::io::XInputStream>& xInputStream,
const bool bIsStreamReadOnly );
void UpdateLinkWithInputStream();
bool IsAsyncRetrieveInputStreamPossible() const;
diff --git a/sw/inc/textboxhelper.hxx b/sw/inc/textboxhelper.hxx
index 2b3e08738230..012869f533fe 100644
--- a/sw/inc/textboxhelper.hxx
+++ b/sw/inc/textboxhelper.hxx
@@ -64,7 +64,7 @@ public:
/// If we have an associated TextFrame, then return that.
static SwFrameFormat* findTextBox(const SwFrameFormat* pShape);
- static SwFrameFormat* findTextBox(css::uno::Reference<css::drawing::XShape> xShape);
+ static SwFrameFormat* findTextBox(const css::uno::Reference<css::drawing::XShape>& xShape);
/// Return the textbox rectangle of a draw shape (in twips).
static Rectangle getTextRectangle(SwFrameFormat* pShape, bool bAbsolute = true);
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
index 4da09be3f151..4515bbfa9584 100644
--- a/sw/inc/unoparagraph.hxx
+++ b/sw/inc/unoparagraph.hxx
@@ -277,7 +277,7 @@ struct SwXParagraphEnumeration
{
static SwXParagraphEnumeration* Create(
css::uno::Reference< css::text::XText > const & xParent,
- std::shared_ptr<SwUnoCursor> pCursor,
+ const std::shared_ptr<SwUnoCursor>& pCursor,
const CursorType eType,
SwStartNode const*const pStartNode = nullptr,
SwTable const*const pTable = nullptr);
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index a80a57dddfeb..f7ea6062db18 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -425,12 +425,12 @@ private:
class Impl;
::sw::UnoImplPtr<Impl> m_pImpl;
- SwXCellRange(sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc);
+ SwXCellRange(const sw::UnoCursorPointer& pCursor, SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc);
virtual ~SwXCellRange();
public:
static ::rtl::Reference<SwXCellRange> CreateXCellRange(
- sw::UnoCursorPointer pCursor, SwFrameFormat& rFrameFormat,
+ const sw::UnoCursorPointer& pCursor, SwFrameFormat& rFrameFormat,
SwRangeDescriptor& rDesc);
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
diff --git a/sw/source/core/SwNumberTree/SwNumberTree.cxx b/sw/source/core/SwNumberTree/SwNumberTree.cxx
index eb8899ba74ae..6824c4420daf 100644
--- a/sw/source/core/SwNumberTree/SwNumberTree.cxx
+++ b/sw/source/core/SwNumberTree/SwNumberTree.cxx
@@ -1027,7 +1027,7 @@ SwNumberTreeNode * SwNumberTreeNode::GetPred(bool bSibling) const
}
void SwNumberTreeNode::SetLastValid
- ( SwNumberTreeNode::tSwNumberTreeChildren::const_iterator aItValid,
+ ( const SwNumberTreeNode::tSwNumberTreeChildren::const_iterator& aItValid,
bool bValidating ) const
{
OSL_ENSURE( (aItValid == mChildren.end() || GetIterator(*aItValid) != mChildren.end()),
diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
index bd82a2457438..946af35c5cae 100644
--- a/sw/source/core/crsr/crbm.cxx
+++ b/sw/source/core/crsr/crbm.cxx
@@ -70,7 +70,7 @@ namespace
return rpFirst->GetMarkEnd() > rpSecond->GetMarkEnd();
}
- bool lcl_IsInvisibleBookmark(IDocumentMarkAccess::pMark_t pMark)
+ bool lcl_IsInvisibleBookmark(const IDocumentMarkAccess::pMark_t& pMark)
{
return IDocumentMarkAccess::GetType(*pMark) != IDocumentMarkAccess::MarkType::BOOKMARK;
}
diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
index d5dafda28ec2..e8fff02eeac1 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -260,8 +260,8 @@ namespace
IDocumentMarkAccess::const_iterator_t lcl_FindMarkByName(
const OUString& rName,
- IDocumentMarkAccess::const_iterator_t ppMarksBegin,
- IDocumentMarkAccess::const_iterator_t ppMarksEnd)
+ const IDocumentMarkAccess::const_iterator_t& ppMarksBegin,
+ const IDocumentMarkAccess::const_iterator_t& ppMarksEnd)
{
return find_if(
ppMarksBegin,
diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx
index 647a8000b0ec..6a870069d1fa 100644
--- a/sw/source/core/doc/docglos.cxx
+++ b/sw/source/core/doc/docglos.cxx
@@ -36,7 +36,7 @@
using namespace ::com::sun::star;
void SwDoc::ReplaceUserDefinedDocumentProperties(
- uno::Reference<document::XDocumentProperties> xSourceDocProps)
+ const uno::Reference<document::XDocumentProperties>& xSourceDocProps)
{
OSL_ENSURE(xSourceDocProps.is(), "null reference");
diff --git a/sw/source/core/doc/swstylemanager.cxx b/sw/source/core/doc/swstylemanager.cxx
index e1b47cd3f4fe..e5be8bc1d4ef 100644
--- a/sw/source/core/doc/swstylemanager.cxx
+++ b/sw/source/core/doc/swstylemanager.cxx
@@ -35,7 +35,7 @@ class SwStyleCache
SwStyleNameCache mMap;
public:
SwStyleCache() {}
- void addStyleName( StylePool::SfxItemSet_Pointer_t pStyle )
+ void addStyleName( const StylePool::SfxItemSet_Pointer_t& pStyle )
{ mMap[ StylePool::nameOf(pStyle) ] = pStyle; }
void addCompletePool( StylePool& rPool );
StylePool::SfxItemSet_Pointer_t getByName( const OUString& rName ) { return mMap[rName]; }
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index f25cd8a6865e..ed6de582954b 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -105,10 +105,10 @@ namespace
};
SubTable::iterator insertSubLine( SubTable& rSubTable, SwTableLine& rLine,
- SubTable::iterator pStartLn );
+ const SubTable::iterator& pStartLn );
SubTable::iterator insertSubBox( SubTable& rSubTable, SwTableBox& rBox,
- SubTable::iterator pStartLn, SubTable::iterator pEndLn )
+ SubTable::iterator pStartLn, const SubTable::iterator& pEndLn )
{
if( !rBox.GetTabLines().empty() )
{
@@ -151,7 +151,7 @@ namespace
}
SubTable::iterator insertSubLine( SubTable& rSubTable, SwTableLine& rLine,
- SubTable::iterator pStartLn )
+ const SubTable::iterator& pStartLn )
{
SubTable::iterator pMax = pStartLn;
++pMax;
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 3c55e28a69d7..0a66017f86f2 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -274,7 +274,7 @@ void SwTextBoxHelper::getShapeWrapThrough(const SwFrameFormat* pTextBox, bool& r
rWrapThrough = it->second->GetSurround().GetSurround() == SURROUND_THROUGHT;
}
-SwFrameFormat* SwTextBoxHelper::findTextBox(uno::Reference<drawing::XShape> xShape)
+SwFrameFormat* SwTextBoxHelper::findTextBox(const uno::Reference<drawing::XShape>& xShape)
{
SwXShape* pShape = dynamic_cast<SwXShape*>(xShape.get());
if (!pShape)
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index cdf1fc1829e8..cf6df9a4453f 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -1107,7 +1107,7 @@ void SwGrfNode::TriggerAsyncRetrieveInputStream()
void SwGrfNode::ApplyInputStream(
- css::uno::Reference<css::io::XInputStream> xInputStream,
+ const css::uno::Reference<css::io::XInputStream>& xInputStream,
const bool bIsStreamReadOnly )
{
if ( IsLinkedFile() )
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 7c95bb340d9a..b60e23e34203 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -515,7 +515,7 @@ struct SwXParagraphEnumerationImpl final : public SwXParagraphEnumeration
SwXParagraphEnumeration* SwXParagraphEnumeration::Create(
uno::Reference< text::XText > const& xParent,
- ::std::shared_ptr<SwUnoCursor> pCursor,
+ const ::std::shared_ptr<SwUnoCursor>& pCursor,
const CursorType eType,
SwStartNode const*const pStartNode,
SwTable const*const pTable)
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 342f9cfef49b..5e07f5ef668b 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2442,7 +2442,7 @@ void SwXStyle::setPropertyToDefault(const OUString& rPropertyName)
setPropertiesToDefault(aSequence);
}
-SwFormat* lcl_GetFormatForStyle(SwDoc* pDoc, rtl::Reference<SwDocStyleSheet> xStyle, const SfxStyleFamily eFamily)
+SwFormat* lcl_GetFormatForStyle(SwDoc* pDoc, const rtl::Reference<SwDocStyleSheet>& xStyle, const SfxStyleFamily eFamily)
{
if(!xStyle.is())
return nullptr;
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index e64c5d6874c8..24b1222b95c6 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -3206,7 +3206,7 @@ public:
bool m_bFirstRowAsLabel;
bool m_bFirstColumnAsLabel;
- Impl(sw::UnoCursorPointer const pCursor, SwFrameFormat& rFrameFormat,
+ Impl(sw::UnoCursorPointer const& pCursor, SwFrameFormat& rFrameFormat,
SwRangeDescriptor& rDesc)
: SwClient(&rFrameFormat)
, m_ChartListeners(m_Mutex)
@@ -3280,7 +3280,7 @@ uno::Sequence<OUString> SwXCellRange::getSupportedServiceNames() throw( uno::Run
"com.sun.star.style.ParagraphPropertiesComplex" };
}
-SwXCellRange::SwXCellRange(sw::UnoCursorPointer const pCursor,
+SwXCellRange::SwXCellRange(sw::UnoCursorPointer const& pCursor,
SwFrameFormat& rFrameFormat, SwRangeDescriptor& rDesc)
: m_pImpl(new Impl(pCursor, rFrameFormat, rDesc))
{
@@ -3291,7 +3291,7 @@ SwXCellRange::~SwXCellRange()
}
rtl::Reference<SwXCellRange> SwXCellRange::CreateXCellRange(
- sw::UnoCursorPointer const pCursor, SwFrameFormat& rFrameFormat,
+ sw::UnoCursorPointer const& pCursor, SwFrameFormat& rFrameFormat,
SwRangeDescriptor& rDesc)
{
SwXCellRange *const pCellRange(new SwXCellRange(pCursor, rFrameFormat, rDesc));
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index caf84cc8332d..61692e972831 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2041,7 +2041,7 @@ lcl_ApplyCellProperties(
const sal_Int32 nCell,
TableColumnSeparators const& rRowSeparators,
const uno::Sequence< beans::PropertyValue >& rCellProperties,
- uno::Reference< uno::XInterface > xCell,
+ const uno::Reference< uno::XInterface >& xCell,
::std::vector<VerticallyMergedCell> & rMergedCells)
{
const sal_Int32 nCellProperties = rCellProperties.getLength();