summaryrefslogtreecommitdiffstats
path: root/svx/source/dialog/dlgutil.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-12-04 15:34:53 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-12-04 15:34:53 +0000
commit00dbdc09458126d193e2b311dcb200cbe8e047d9 (patch)
treeba3855e3715c9fe8ff9d138a72f81a390785ab9f /svx/source/dialog/dlgutil.cxx
parentINTEGRATION: CWS vcl69 (1.17.30); FILE MERGED (diff)
downloadcore-00dbdc09458126d193e2b311dcb200cbe8e047d9.tar.gz
core-00dbdc09458126d193e2b311dcb200cbe8e047d9.zip
INTEGRATION: CWS vcl69 (1.11.38); FILE MERGED
2006/11/21 12:07:08 pl 1.11.38.2: RESYNC: (1.11-1.12); FILE MERGED 2006/10/31 19:17:31 pl 1.11.38.1: #i69437# workaround precision of metricfield
Diffstat (limited to 'svx/source/dialog/dlgutil.cxx')
-rw-r--r--svx/source/dialog/dlgutil.cxx16
1 files changed, 12 insertions, 4 deletions
diff --git a/svx/source/dialog/dlgutil.cxx b/svx/source/dialog/dlgutil.cxx
index 896e3f9ebda4..5b58f2a3780c 100644
--- a/svx/source/dialog/dlgutil.cxx
+++ b/svx/source/dialog/dlgutil.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dlgutil.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: vg $ $Date: 2006-11-01 15:00:15 $
+ * last change: $Author: rt $ $Date: 2006-12-04 16:34:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -224,12 +224,20 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet )
}
// -----------------------------------------------------------------------
-
void SetMetricValue( MetricField& rField, long nCoreValue, SfxMapUnit eUnit )
{
long nVal = OutputDevice::LogicToLogic( nCoreValue, (MapUnit)eUnit, MAP_100TH_MM );
+ /* #i69437#
+ * work around limited precision of MetricField
+ */
+ FieldUnit eValUnit = FUNIT_100TH_MM;
+ if( nVal > rField.Denormalize( 0x3fffffff ) )
+ {
+ nVal /= 1000;
+ eValUnit = FUNIT_CM;
+ }
nVal = rField.Normalize( nVal );
- rField.SetValue( nVal, FUNIT_100TH_MM );
+ rField.SetValue( nVal, eValUnit );
/*
if ( SFX_MAPUNIT_100TH_MM == eUnit )