summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-02 15:10:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-01-03 08:07:41 +0100
commitacdba3c2eee18ef0c079b7c41cd4165e06c956c7 (patch)
tree18c6da7b7d46bf901b6dd4f7a5b280caa7f62280 /sw/source/uibase
parentf4bd9029ba7b500ebf99b7fa3d774de7fa029176 (diff)
loplugin:passstuffbyref more return improvements
slightly less restrictive check when calling functions Change-Id: I35e268ac611797b1daa83777cda02288a635aa32 Reviewed-on: https://gerrit.libreoffice.org/47259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/swmodul1.cxx2
-rw-r--r--sw/source/uibase/inc/glosdoc.hxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx2
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx2
-rw-r--r--sw/source/uibase/utlui/initui.cxx4
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx2
6 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/app/swmodul1.cxx b/sw/source/uibase/app/swmodul1.cxx
index 1e82eaf98bd2..00992b9e196c 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -418,7 +418,7 @@ void SwModule::SetRedlineAuthor(const OUString &rAuthor)
InsertRedlineAuthor( m_sActAuthor );
}
-OUString SwModule::GetRedlineAuthor(std::size_t nPos)
+OUString const & SwModule::GetRedlineAuthor(std::size_t nPos)
{
OSL_ENSURE(nPos < m_pAuthorNames.size(), "author not found!"); //#i45342# RTF doc with no author table caused reader to crash
while(nPos >= m_pAuthorNames.size())
diff --git a/sw/source/uibase/inc/glosdoc.hxx b/sw/source/uibase/inc/glosdoc.hxx
index f9ba04987743..2ed0ef9fade9 100644
--- a/sw/source/uibase/inc/glosdoc.hxx
+++ b/sw/source/uibase/inc/glosdoc.hxx
@@ -97,7 +97,7 @@ public:
);
size_t GetGroupCnt();
- OUString GetGroupName(size_t);
+ OUString const & GetGroupName(size_t);
OUString GetGroupTitle( const OUString& rGroupName );
bool FindGroupName(OUString& rGroup);
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index 9f592df77473..cb3b317bf9d2 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -352,7 +352,7 @@ typedef bool (SwWrtShell:: *FNSimpleMove)();
void SetPageStyle(const OUString &rCollName);
- OUString GetCurPageStyle() const;
+ OUString const & GetCurPageStyle() const;
// change current style using the attributes in effect
void QuickUpdateStyle();
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index 8790a4763986..424d54290981 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -132,7 +132,7 @@ bool SwGlossaries::FindGroupName(OUString& rGroup)
return false;
}
-OUString SwGlossaries::GetGroupName(size_t nGroupId)
+OUString const & SwGlossaries::GetGroupName(size_t nGroupId)
{
OSL_ENSURE(nGroupId < m_GlosArr.size(),
"SwGlossaries::GetGroupName: index out of bounds");
diff --git a/sw/source/uibase/utlui/initui.cxx b/sw/source/uibase/utlui/initui.cxx
index bd5a30fb1a52..af3fd53daa89 100644
--- a/sw/source/uibase/utlui/initui.cxx
+++ b/sw/source/uibase/utlui/initui.cxx
@@ -329,7 +329,7 @@ namespace
};
}
-OUString SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
+OUString const & SwAuthorityFieldType::GetAuthFieldName(ToxAuthorityField eType)
{
if(!pAuthFieldNameList)
{
@@ -367,7 +367,7 @@ static const char* STR_AUTH_TYPE_ARY[] =
STR_AUTH_TYPE_CUSTOM5
};
-OUString SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
+OUString const & SwAuthorityFieldType::GetAuthTypeName(ToxAuthorityType eType)
{
if(!pAuthFieldTypeList)
{
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index d401687ec5a3..c8e9b93712b4 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1504,7 +1504,7 @@ void SwWrtShell::SetPageStyle(const OUString &rCollName)
// Access templates
-OUString SwWrtShell::GetCurPageStyle() const
+OUString const & SwWrtShell::GetCurPageStyle() const
{
return GetPageDesc(GetCurPageDesc( false/*bCalcFrame*/ )).GetName();
}