LibreOffice Module svtools (master) 1
Namespaces | Typedefs | Functions
unitconv.hxx File Reference
#include <svtools/svtdllapi.h>
#include <tools/mapunit.hxx>
#include <tools/fldunit.hxx>
#include <tools/long.hxx>
Include dependency graph for unitconv.hxx:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  weld
 

Typedefs

typedef tools::Long(* FUNC_CONVERT) (tools::Long)
 

Functions

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

Typedef Documentation

◆ FUNC_CONVERT

typedef tools::Long(* FUNC_CONVERT) (tools::Long)

Definition at line 32 of file unitconv.hxx.

Function Documentation

◆ CalcToPoint()

SVT_DLLPUBLIC 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()

SVT_DLLPUBLIC 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()

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

Definition at line 146 of file unitconv.cxx.

References ItemToControl().

◆ GetCoreValue()

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

◆ ItemToControl()

SVT_DLLPUBLIC 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()

SVT_DLLPUBLIC FieldUnit MapToFieldUnit ( const MapUnit  eUnit)

Definition at line 152 of file unitconv.cxx.

◆ SetFieldUnit()

SVT_DLLPUBLIC void SetFieldUnit ( weld::MetricSpinButton rCtrl,
FieldUnit  eUnit,
bool  bAll = false 
)

◆ SetMetricValue()

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

◆ TransformMetric()

SVT_DLLPUBLIC 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().