summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-09 17:01:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-10 08:13:52 +0200
commit1ce0a72094fd09b4506a2380ff7787ac03c6e534 (patch)
tree97f2d32438f486c2b26096e56b057220e10695be /svx
parentcfa4801cd0d8bfd5d6e692c0a3afa9639df45522 (diff)
rename TakeStr to GetStr
and return a value instead of the awkward out-parameter Change-Id: I4c2c430329bab45787b3cd67339edce4c1c7a326 Reviewed-on: https://gerrit.libreoffice.org/80551 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdattr.cxx4
-rw-r--r--svx/source/svdraw/svdtrans.cxx9
2 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 80ee71ba8da7..5ea950355a04 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -861,7 +861,7 @@ bool SdrMetricItem::GetPresentation(SfxItemPresentation ePres,
{
long nValue=GetValue();
SdrFormatter aFmt(eCoreMetric,ePresMetric);
- aFmt.TakeStr(nValue,rText);
+ rText = aFmt.GetStr(nValue);
OUString aStr;
SdrFormatter::TakeUnitStr(ePresMetric,aStr);
rText += " " + aStr;
@@ -1265,7 +1265,7 @@ bool SdrTextAniAmountItem::GetPresentation(
SdrFormatter aFmt(eCoreMetric, ePresMetric);
OUString aStr;
- aFmt.TakeStr(nValue, rText);
+ rText = aFmt.GetStr(nValue);
SdrFormatter::TakeUnitStr(ePresMetric, aStr);
rText += aStr;
}
diff --git a/svx/source/svdraw/svdtrans.cxx b/svx/source/svdraw/svdtrans.cxx
index 14ec58c04cd3..1605e592da5f 100644
--- a/svx/source/svdraw/svdtrans.cxx
+++ b/svx/source/svdraw/svdtrans.cxx
@@ -727,14 +727,13 @@ void SdrFormatter::Undirty()
}
-void SdrFormatter::TakeStr(long nVal, OUString& rStr) const
+OUString SdrFormatter::GetStr(long nVal) const
{
- OUString aNullCode("0");
+ const OUString aNullCode("0");
if(!nVal)
{
- rStr = aNullCode;
- return;
+ return aNullCode;
}
// we may lose some decimal places here, because of MulDiv instead of Real
@@ -836,7 +835,7 @@ void SdrFormatter::TakeStr(long nVal, OUString& rStr) const
aStr.insert(0, "-");
}
- rStr = aStr.makeStringAndClear();
+ return aStr.makeStringAndClear();
}
void SdrFormatter::TakeUnitStr(MapUnit eUnit, OUString& rStr)