LibreOffice Module svtools (master) 1
|
#include <o3tl/temporary.hxx>
#include <svtools/unitconv.hxx>
#include <tools/debug.hxx>
#include <tools/UnitConversion.hxx>
#include <vcl/outdev.hxx>
#include <vcl/weld.hxx>
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) |
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.
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.
tools::Long ControlToItem | ( | tools::Long | nIn, |
FieldUnit | eCtrl, | ||
MapUnit | eItem | ||
) |
Definition at line 146 of file unitconv.cxx.
References ItemToControl().
sal_Int64 GetCoreValue | ( | const weld::MetricSpinButton & | rField, |
MapUnit | eUnit | ||
) |
Definition at line 96 of file unitconv.cxx.
References weld::MetricSpinButton::denormalize(), weld::MetricSpinButton::get_value(), and OutputDevice::LogicToLogic().
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().
Definition at line 152 of file unitconv.cxx.
void SetFieldUnit | ( | weld::MetricSpinButton & | rField, |
FieldUnit | eUnit, | ||
bool | bAll | ||
) |
Definition at line 27 of file unitconv.cxx.
References weld::MetricSpinButton::denormalize(), weld::MetricSpinButton::get_digits(), weld::MetricSpinButton::get_range(), weld::MetricSpinButton::get_value(), weld::MetricSpinButton::normalize(), nValue, weld::MetricSpinButton::set_digits(), weld::MetricSpinButton::set_increments(), weld::MetricSpinButton::set_range(), weld::MetricSpinButton::set_unit(), and weld::MetricSpinButton::set_value().
void SetMetricValue | ( | weld::MetricSpinButton & | rField, |
sal_Int64 | nCoreValue, | ||
MapUnit | eUnit | ||
) |
Definition at line 89 of file unitconv.cxx.
References OutputDevice::LogicToLogic(), weld::MetricSpinButton::normalize(), and weld::MetricSpinButton::set_value().
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().