Kaydet (Commit) 00dbdc09 authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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
üst 8cee1474
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: dlgutil.cxx,v $ * $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 Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -224,12 +224,20 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet ) ...@@ -224,12 +224,20 @@ FieldUnit GetModuleFieldUnit( const SfxItemSet* pSet )
} }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
void SetMetricValue( MetricField& rField, long nCoreValue, SfxMapUnit eUnit ) void SetMetricValue( MetricField& rField, long nCoreValue, SfxMapUnit eUnit )
{ {
long nVal = OutputDevice::LogicToLogic( nCoreValue, (MapUnit)eUnit, MAP_100TH_MM ); 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 ); nVal = rField.Normalize( nVal );
rField.SetValue( nVal, FUNIT_100TH_MM ); rField.SetValue( nVal, eValUnit );
/* /*
if ( SFX_MAPUNIT_100TH_MM == eUnit ) if ( SFX_MAPUNIT_100TH_MM == eUnit )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment