summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-14 09:38:50 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-14 14:31:50 +0100
commit8389dc88a48b366ad7f3dd84129467175e18ab40 (patch)
tree2de192eab43601ee8b145215504ed6aa2b9db243 /svx
parentf67e5ef9a5c71f3b35b1c67eb72794e44cc15410 (diff)
split out MetricField value conversion functions
Change-Id: I67a33bd2a5cb06dc66e471918b5c378044a2eff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/pch/precompiled_svx.hxx4
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx5
-rw-r--r--svx/source/dialog/dlgunit.hxx5
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx3
-rw-r--r--svx/source/stbctrls/pszctrl.cxx4
5 files changed, 12 insertions, 9 deletions
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 3581e2087a00..f08526683f9f 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-02-13 20:23:51 using:
+ Generated on 2020-02-14 10:26:10 using:
./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -86,7 +86,7 @@
#include <vcl/errcode.hxx>
#include <vcl/errinf.hxx>
#include <vcl/event.hxx>
-#include <vcl/field.hxx>
+#include <vcl/fieldvalues.hxx>
#include <vcl/font.hxx>
#include <vcl/gdimtf.hxx>
#include <vcl/graph.hxx>
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 184934342a0c..14b4c809f04a 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -18,6 +18,7 @@
*/
#include "dlgunit.hxx"
+#include <vcl/fieldvalues.hxx>
#include <vcl/graph.hxx>
#include <vcl/graphicfilter.hxx>
#include <vcl/virdev.hxx>
@@ -219,12 +220,12 @@ void CompressGraphicsDialog::UpdateResolutionLB()
double CompressGraphicsDialog::GetViewWidthInch() const
{
- return static_cast<double>(MetricField::ConvertValue(m_aViewSize100mm.Width(), 2, MapUnit::Map100thMM, FieldUnit::INCH)) / 100.0;
+ return static_cast<double>(vcl::ConvertValue(m_aViewSize100mm.Width(), 2, MapUnit::Map100thMM, FieldUnit::INCH)) / 100.0;
}
double CompressGraphicsDialog::GetViewHeightInch() const
{
- return static_cast<double>(MetricField::ConvertValue(m_aViewSize100mm.Height(), 2, MapUnit::Map100thMM, FieldUnit::INCH)) / 100.0;
+ return static_cast<double>(vcl::ConvertValue(m_aViewSize100mm.Height(), 2, MapUnit::Map100thMM, FieldUnit::INCH)) / 100.0;
}
BmpScaleFlag CompressGraphicsDialog::GetSelectedInterpolationType() const
diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx
index 914e52d54388..108e2b5e3062 100644
--- a/svx/source/dialog/dlgunit.hxx
+++ b/svx/source/dialog/dlgunit.hxx
@@ -20,13 +20,14 @@
#ifndef INCLUDED_SVX_SOURCE_DIALOG_DLGUNIT_HXX
#define INCLUDED_SVX_SOURCE_DIALOG_DLGUNIT_HXX
+#include <rtl/ustrbuf.hxx>
#include <svx/svdtrans.hxx>
-#include <vcl/field.hxx>
+#include <vcl/fieldvalues.hxx>
inline OUString GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode cSep )
{
OUStringBuffer aVal = OUString::number(
- MetricField::ConvertValue(nVal_100, 2, MapUnit::Map100thMM, eFieldUnit));
+ vcl::ConvertValue(nVal_100, 2, MapUnit::Map100thMM, eFieldUnit));
while( aVal.getLength() < 3 )
aVal.insert( 0, "0" );
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index eb22debd13e6..7d87dca1c488 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -38,6 +38,7 @@
#include <unotools/localedatawrapper.hxx>
#include <unotools/viewoptions.hxx>
#include <vcl/canvastools.hxx>
+#include <vcl/fieldvalues.hxx>
#include <vcl/virdev.hxx>
#include <vcl/svapp.hxx>
#include <svl/aeitem.hxx>
@@ -995,7 +996,7 @@ void PosSizePropertyPanel::SetPosSizeMinMax()
fRight -= maRect.getWidth();
fBottom -= maRect.getHeight();
- const double fMaxLong(static_cast<double>(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1));
+ const double fMaxLong(static_cast<double>(vcl::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1));
fLeft = std::clamp(fLeft, -fMaxLong, fMaxLong);
fRight = std::clamp(fRight, -fMaxLong, fMaxLong);
fTop = std::clamp(fTop, - fMaxLong, fMaxLong);
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index 8d2c4110863d..72e5d3f530be 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -21,7 +21,7 @@
#include <vcl/builder.hxx>
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
-#include <vcl/field.hxx>
+#include <vcl/fieldvalues.hxx>
#include <vcl/status.hxx>
#include <vcl/menu.hxx>
#include <vcl/image.hxx>
@@ -70,7 +70,7 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
OUString sMetric;
const sal_Unicode cSep = Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
- sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0, 0, FieldUnit::MM_100TH, eOutUnit );
+ sal_Int64 nConvVal = vcl::ConvertValue( nVal * 100, 0, 0, FieldUnit::MM_100TH, eOutUnit );
if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
sMetric += "-";