From 1aa37aa6bee19099b57555a6d839992b054aa405 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sat, 22 Sep 2018 10:03:58 +0200 Subject: loplugin:unusedmethods Change-Id: I9dac9260af9955dc4a66b34c33265c6e36094322 Reviewed-on: https://gerrit.libreoffice.org/60911 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svtools/source/misc/unitconv.cxx | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'svtools/source') diff --git a/svtools/source/misc/unitconv.cxx b/svtools/source/misc/unitconv.cxx index 6372671718d2..d08820e041d6 100644 --- a/svtools/source/misc/unitconv.cxx +++ b/svtools/source/misc/unitconv.cxx @@ -132,35 +132,6 @@ void SetFieldUnit( MetricField& rField, FieldUnit eUnit, bool bAll ) } } -void SetFieldUnit( MetricBox& rBox, FieldUnit eUnit ) -{ - sal_Int64 nMin = rBox.Denormalize( rBox.GetMin( FUNIT_TWIP ) ); - sal_Int64 nMax = rBox.Denormalize( rBox.GetMax( FUNIT_TWIP ) ); - - switch ( eUnit ) - { - case FUNIT_M: - case FUNIT_KM: - eUnit = FUNIT_CM; - break; - - case FUNIT_FOOT: - case FUNIT_MILE: - eUnit = FUNIT_INCH; - break; - default: ;//prevent warning - } - rBox.SetUnit( eUnit ); - - if ( FUNIT_POINT == eUnit && rBox.GetDecimalDigits() > 1 ) - rBox.SetDecimalDigits( 1 ); - else - rBox.SetDecimalDigits( 2 ); - - rBox.SetMin( rBox.Normalize( nMin ), FUNIT_TWIP ); - rBox.SetMax( rBox.Normalize( nMax ), FUNIT_TWIP ); -} - void SetMetricValue(weld::MetricSpinButton& rField, int nCoreValue, MapUnit eUnit) { auto nVal = OutputDevice::LogicToLogic(nCoreValue, eUnit, MapUnit::Map100thMM); -- cgit