summaryrefslogtreecommitdiff
path: root/lotuswordpro
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 /lotuswordpro
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 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwpmargins.hxx4
-rw-r--r--lotuswordpro/source/filter/lwpstory.cxx2
-rw-r--r--lotuswordpro/source/filter/lwpstory.hxx6
-rw-r--r--lotuswordpro/source/filter/lwptools.hxx8
4 files changed, 10 insertions, 10 deletions
diff --git a/lotuswordpro/source/filter/lwpmargins.hxx b/lotuswordpro/source/filter/lwpmargins.hxx
index d0e74dd51da4..e836617b8ec4 100644
--- a/lotuswordpro/source/filter/lwpmargins.hxx
+++ b/lotuswordpro/source/filter/lwpmargins.hxx
@@ -79,7 +79,7 @@ public:
pStrm->SkipExtra();
}
inline LwpMargins& operator = (const LwpMargins& rOther);
- inline double GetMarginsValue(const sal_uInt8& nWhichSide);
+ inline double GetMarginsValue(sal_uInt8 nWhichSide);
private:
sal_Int32 m_nLeft;
sal_Int32 m_nTop;
@@ -96,7 +96,7 @@ inline LwpMargins& LwpMargins::operator = (const LwpMargins& rOther)
return *this;
}
-inline double LwpMargins::GetMarginsValue(const sal_uInt8& nWhichSide)
+inline double LwpMargins::GetMarginsValue(sal_uInt8 nWhichSide)
{
switch (nWhichSide)
{
diff --git a/lotuswordpro/source/filter/lwpstory.cxx b/lotuswordpro/source/filter/lwpstory.cxx
index 09acda771d10..ee7031af38a2 100644
--- a/lotuswordpro/source/filter/lwpstory.cxx
+++ b/lotuswordpro/source/filter/lwpstory.cxx
@@ -469,7 +469,7 @@ OUString LwpStory::RegisterFirstFribStyle()
return sName;
}
-bool LwpStory::IsBullStyleUsedBefore(const OUString& rStyleName, const sal_uInt8& nPos)
+bool LwpStory::IsBullStyleUsedBefore(const OUString& rStyleName, sal_uInt8 nPos)
{
std::vector <NamePosPair>::reverse_iterator rIter;
for (rIter = m_vBulletStyleNameList.rbegin(); rIter != m_vBulletStyleNameList.rend(); ++rIter)
diff --git a/lotuswordpro/source/filter/lwpstory.hxx b/lotuswordpro/source/filter/lwpstory.hxx
index 1d43ab10b094..ccd262f06941 100644
--- a/lotuswordpro/source/filter/lwpstory.hxx
+++ b/lotuswordpro/source/filter/lwpstory.hxx
@@ -129,8 +129,8 @@ public:
LwpPara* GetLastParaOfPreviousStory();
OUString GetContentText(bool bAllText = false);
- inline void AddBullStyleName2List(const OUString& rStyleName, const sal_uInt8& nPos);
- bool IsBullStyleUsedBefore(const OUString& rStyleName, const sal_uInt8& nPos);
+ inline void AddBullStyleName2List(const OUString& rStyleName, sal_uInt8 nPos);
+ bool IsBullStyleUsedBefore(const OUString& rStyleName, sal_uInt8 nPos);
OUString RegisterFirstFribStyle();
};
@@ -165,7 +165,7 @@ void LwpStory::SetSectionName(const OUString& StyleName)
{
m_CurrSectionName = StyleName;
}
-inline void LwpStory::AddBullStyleName2List(const OUString& rStyleName, const sal_uInt8& nPos)
+inline void LwpStory::AddBullStyleName2List(const OUString& rStyleName, sal_uInt8 nPos)
{
m_vBulletStyleNameList.push_back(std::make_pair(rStyleName, nPos));
}
diff --git a/lotuswordpro/source/filter/lwptools.hxx b/lotuswordpro/source/filter/lwptools.hxx
index c5d11e6244d0..9e2e72d1f046 100644
--- a/lotuswordpro/source/filter/lwptools.hxx
+++ b/lotuswordpro/source/filter/lwptools.hxx
@@ -90,9 +90,9 @@ public:
OUString& str, sal_uInt16 strlen, rtl_TextEncoding aEncoding );
static bool IsUnicodePacked(LwpObjectStream* pObjStrm, sal_uInt16 len);
- inline static double ConvertFromUnits(const sal_Int32& nUnits);
+ inline static double ConvertFromUnits(sal_Int32 nUnits);
inline static double ConvertToMetric(const double& fInch);
- inline static double ConvertFromUnitsToMetric(const sal_Int32& nUnits);
+ inline static double ConvertFromUnitsToMetric(sal_Int32 nUnits);
inline static bool IsOddNumber(sal_uInt16& nNumber);
inline static bool IsEvenNumber(sal_uInt16& nNumber);
@@ -105,7 +105,7 @@ public:
static XFTimeStyle* GetSystemTimeStyle();
};
-inline double LwpTools::ConvertFromUnits(const sal_Int32& nUnits)
+inline double LwpTools::ConvertFromUnits(sal_Int32 nUnits)
{
return (double)nUnits/UNITS_PER_INCH;
}
@@ -113,7 +113,7 @@ inline double LwpTools::ConvertToMetric(const double& fInch)
{
return fInch*CM_PER_INCH;
}
-inline double LwpTools::ConvertFromUnitsToMetric(const sal_Int32& nUnits)
+inline double LwpTools::ConvertFromUnitsToMetric(sal_Int32 nUnits)
{
double fInch = ConvertFromUnits(nUnits);
return ConvertToMetric(fInch);