summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2016-06-15 18:40:38 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-26 06:14:33 +0000
commitfeb6a07259c57ab00118f197ef2b3e1d5575c48e (patch)
treefbb988f4f5a33d3f33efe6ed6caf01c2f634c924 /lotuswordpro
parent6402c19c9b4d51dd7feaa3129b6f15b20704d356 (diff)
lwp: pass numbers by value
and add const to LtTm refenrence Change-Id: I3515db0fa1b79ce73592de6cba0ec79c39a9e9f4 Reviewed-on: https://gerrit.libreoffice.org/26315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwptools.cxx2
-rw-r--r--lotuswordpro/source/filter/lwptools.hxx14
2 files changed, 8 insertions, 8 deletions
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index cf04d1d64d0c..045768b5dc7f 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -224,7 +224,7 @@ OUString LwpTools::convertToFileUrl(const OString &fileName)
return uUrlFileName;
}
-OUString LwpTools::DateTimeToOUString(LtTm & dt)
+OUString LwpTools::DateTimeToOUString(const LtTm &dt)
{
OUString aResult = OUString::number(dt.tm_year) + "-" + OUString::number(dt.tm_mon) + "-" + OUString::number(dt.tm_mday) +
"T" + OUString::number(dt.tm_hour) + ":" + OUString::number(dt.tm_min) + ":" + OUString::number(dt.tm_sec);
diff --git a/lotuswordpro/source/filter/lwptools.hxx b/lotuswordpro/source/filter/lwptools.hxx
index 9e2e72d1f046..457b2ac12eb2 100644
--- a/lotuswordpro/source/filter/lwptools.hxx
+++ b/lotuswordpro/source/filter/lwptools.hxx
@@ -91,15 +91,15 @@ public:
static bool IsUnicodePacked(LwpObjectStream* pObjStrm, sal_uInt16 len);
inline static double ConvertFromUnits(sal_Int32 nUnits);
- inline static double ConvertToMetric(const double& fInch);
+ inline static double ConvertToMetric(double fInch);
inline static double ConvertFromUnitsToMetric(sal_Int32 nUnits);
- inline static bool IsOddNumber(sal_uInt16& nNumber);
- inline static bool IsEvenNumber(sal_uInt16& nNumber);
+ inline static bool IsOddNumber(sal_uInt16 nNumber);
+ inline static bool IsEvenNumber(sal_uInt16 nNumber);
static bool isFileUrl(const OString& fileName);
static OUString convertToFileUrl(const OString& fileName);
- static OUString DateTimeToOUString(LtTm& dt);
+ static OUString DateTimeToOUString(const LtTm& dt);
static XFDateStyle* GetSystemDateStyle(bool bLongFormat);
static XFTimeStyle* GetSystemTimeStyle();
@@ -109,7 +109,7 @@ inline double LwpTools::ConvertFromUnits(sal_Int32 nUnits)
{
return (double)nUnits/UNITS_PER_INCH;
}
-inline double LwpTools::ConvertToMetric(const double& fInch)
+inline double LwpTools::ConvertToMetric(double fInch)
{
return fInch*CM_PER_INCH;
}
@@ -118,11 +118,11 @@ inline double LwpTools::ConvertFromUnitsToMetric(sal_Int32 nUnits)
double fInch = ConvertFromUnits(nUnits);
return ConvertToMetric(fInch);
}
-inline bool LwpTools::IsOddNumber(sal_uInt16& nNumber)
+inline bool LwpTools::IsOddNumber(sal_uInt16 nNumber)
{
return (nNumber%2) != 0;
}
-inline bool LwpTools::IsEvenNumber(sal_uInt16& nNumber)
+inline bool LwpTools::IsEvenNumber(sal_uInt16 nNumber)
{
return (nNumber%2) == 0;
}