diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-23 09:47:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-24 08:36:27 +0200 |
commit | 645db9a2643832e29dbdf904e1cf7b323d273f86 (patch) | |
tree | bb799a9a87fb09b5d93972c6a627b1bc0b67ff85 /sw/source/ui/misc | |
parent | 2629aac31142449312f77c5843ea209cc810acb4 (diff) |
clang-tidy performance-unnecessary-copy-init in sw
Change-Id: I515e3e8ddaee3e3ddc4bf3827fb85f3489e84539
Reviewed-on: https://gerrit.libreoffice.org/62253
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/bookmark.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/num.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index 61182dae5e04..03584d8cf387 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -150,7 +150,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, SelectionChangedHdl, SvTreeListBox*, void) for (sal_Int32 i = m_pBookmarksBox->GetSelectionCount(); i; i--) { sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pSelected->GetUserData()); - OUString sEntryName = pBookmark->GetName(); + const OUString& sEntryName = pBookmark->GetName(); sEditBoxText.append(sEntryName); if (i > 1) sEditBoxText.append(";"); @@ -412,7 +412,7 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark) OUString sHidden = "No"; if (pBookmark->IsHidden()) sHidden = "Yes"; - OUString sHideCondition = pBookmark->GetHideCondition(); + const OUString& sHideCondition = pBookmark->GetHideCondition(); OUString sPageNum = OUString::number(SwPaM(pMark->GetMarkStart()).GetPageNum()); OUString sColumnData = sPageNum + "\t" + pBookmark->GetName() + "\t" + sBookmarkNodeText + "\t" + sHidden + "\t" + sHideCondition; InsertEntryToColumn(sColumnData, TREELIST_APPEND, 0xffff, pMark); @@ -459,7 +459,7 @@ OUString BookmarkTable::GetNameProposal() while (pEntry) { sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pEntry->GetUserData()); - OUString sName = pBookmark->GetName(); + const OUString& sName = pBookmark->GetName(); sal_Int32 nIndex = 0; if (sName.getToken(0, ' ', nIndex) == sDefaultBookmarkName) { diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 58ec33857f9c..9572219f7d6c 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -605,7 +605,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, Button*, void) { //check if at least one glossary path is write enabled SvtPathOptions aPathOpt; - const OUString sGlosPath( aPathOpt.GetAutoTextPath() ); + const OUString& sGlosPath( aPathOpt.GetAutoTextPath() ); const sal_Int32 nPaths = comphelper::string::getTokenCount(sGlosPath, ';'); bool bIsWritable = false; for(sal_Int32 nPath = 0; nPath < nPaths; nPath++) diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 35e763f326d6..764eec430efa 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -842,7 +842,7 @@ IMPL_LINK_NOARG(SwNumPositionTabPage, StandardHdl, weld::Button&, void) SwNumRule aTmpNumRule( pWrtSh->GetUniqueNumRuleName(), aNumFormat.GetPositionAndSpaceMode(), pOutlineDlg ? OUTLINE_RULE : NUM_RULE ); - SwNumFormat aTempFormat(aTmpNumRule.Get( i )); + const SwNumFormat& aTempFormat(aTmpNumRule.Get( i )); aNumFormat.SetPositionAndSpaceMode( aTempFormat.GetPositionAndSpaceMode() ); if ( aTempFormat.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { |