summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/misc/unitconv.cxx29
1 files changed, 0 insertions, 29 deletions
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);