[Libreoffice-commits] core.git: lotuswordpro/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Sun Jun 26 06:14:59 UTC 2016
lotuswordpro/source/filter/lwptools.cxx | 2 +-
lotuswordpro/source/filter/lwptools.hxx | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
New commits:
commit feb6a07259c57ab00118f197ef2b3e1d5575c48e
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Wed Jun 15 18:40:38 2016 +0200
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index cf04d1d..045768b 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 9e2e72d..457b2ac 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;
}
More information about the Libreoffice-commits
mailing list