LibreOffice Module svtools (master) 1
Functions
unitconv.cxx File Reference
#include <o3tl/temporary.hxx>
#include <svtools/unitconv.hxx>
#include <tools/debug.hxx>
#include <tools/UnitConversion.hxx>
#include <vcl/outdev.hxx>
#include <vcl/weld.hxx>
Include dependency graph for unitconv.cxx:

Go to the source code of this file.

Functions

void SetFieldUnit (weld::MetricSpinButton &rField, FieldUnit eUnit, bool bAll)
 
void SetMetricValue (weld::MetricSpinButton &rField, sal_Int64 nCoreValue, MapUnit eUnit)
 
sal_Int64 GetCoreValue (const weld::MetricSpinButton &rField, MapUnit eUnit)
 
tools::Long CalcToUnit (float nIn, MapUnit eUnit)
 
tools::Long ItemToControl (tools::Long nIn, MapUnit eItem, FieldUnit eCtrl)
 
tools::Long ControlToItem (tools::Long nIn, FieldUnit eCtrl, MapUnit eItem)
 
FieldUnit MapToFieldUnit (const MapUnit eUnit)
 
tools::Long CalcToPoint (tools::Long nIn, MapUnit eUnit, sal_uInt16 nFactor)
 
tools::Long TransformMetric (tools::Long nVal, FieldUnit aOld, FieldUnit aNew)
 

Function Documentation

◆ CalcToPoint()

tools::Long CalcToPoint ( tools::Long  nIn,
MapUnit  eUnit,
sal_uInt16  nFactor 
)

Definition at line 181 of file unitconv.cxx.

References o3tl::convert(), DBG_ASSERT, o3tl::invalid, MapToO3tlLength(), and o3tl::pt.

◆ CalcToUnit()

tools::Long CalcToUnit ( float  nIn,
MapUnit  eUnit 
)

Definition at line 120 of file unitconv.cxx.

References o3tl::convert(), DBG_ASSERT, o3tl::invalid, MapToO3tlLength(), and o3tl::pt.

◆ ControlToItem()

tools::Long ControlToItem ( tools::Long  nIn,
FieldUnit  eCtrl,
MapUnit  eItem 
)

Definition at line 146 of file unitconv.cxx.

References ItemToControl().

◆ GetCoreValue()

sal_Int64 GetCoreValue ( const weld::MetricSpinButton rField,
MapUnit  eUnit 
)

◆ ItemToControl()

tools::Long ItemToControl ( tools::Long  nIn,
MapUnit  eItem,
FieldUnit  eCtrl 
)

Definition at line 137 of file unitconv.cxx.

References o3tl::convert(), FieldToO3tlLength(), o3tl::invalid, and MapToO3tlLength().

Referenced by ControlToItem().

◆ MapToFieldUnit()

FieldUnit MapToFieldUnit ( const MapUnit  eUnit)

Definition at line 152 of file unitconv.cxx.

◆ SetFieldUnit()

void SetFieldUnit ( weld::MetricSpinButton rField,
FieldUnit  eUnit,
bool  bAll 
)

◆ SetMetricValue()

void SetMetricValue ( weld::MetricSpinButton rField,
sal_Int64  nCoreValue,
MapUnit  eUnit 
)

◆ TransformMetric()

tools::Long TransformMetric ( tools::Long  nVal,
FieldUnit  aOld,
FieldUnit  aNew 
)

Definition at line 195 of file unitconv.cxx.

References o3tl::convert(), FieldToO3tlLength(), o3tl::invalid, and o3tl::temporary().