LibreOffice Module tools (master) 1
Functions
UnitConversion.hxx File Reference
#include <o3tl/unit_conversion.hxx>
#include <sal/types.h>
#include <tools/fldunit.hxx>
#include <tools/fract.hxx>
#include <tools/mapunit.hxx>
Include dependency graph for UnitConversion.hxx:

Go to the source code of this file.

Functions

constexpr o3tl::Length FieldToO3tlLength (FieldUnit eU, o3tl::Length ePixelValue=o3tl::Length::px)
 
constexpr o3tl::Length MapToO3tlLength (MapUnit eU, o3tl::Length ePixelValue=o3tl::Length::px)
 
Fraction conversionFract (o3tl::Length from, o3tl::Length to)
 
template<typename N >
constexpr auto convertTwipToMm100 (N n)
 
constexpr sal_Int64 sanitiseMm100ToTwip (sal_Int64 n)
 
template<typename N >
constexpr auto convertPointToMm100 (N n)
 
template<typename N >
constexpr auto convertMm100ToPoint (N n)
 
template<typename N >
constexpr auto convertMasterUnitToMm100 (N n)
 
template<typename N >
constexpr auto convertMm100ToMasterUnit (N n)
 

Function Documentation

◆ conversionFract()

Fraction conversionFract ( o3tl::Length  from,
o3tl::Length  to 
)
inline

Definition at line 87 of file UnitConversion.hxx.

References div(), from, and to().

◆ convertMasterUnitToMm100()

template<typename N >
constexpr auto convertMasterUnitToMm100 ( N  n)
constexpr

Definition at line 113 of file UnitConversion.hxx.

References o3tl::convert(), o3tl::master, o3tl::mm100, and n.

◆ convertMm100ToMasterUnit()

template<typename N >
constexpr auto convertMm100ToMasterUnit ( N  n)
constexpr

Definition at line 117 of file UnitConversion.hxx.

References o3tl::convert(), o3tl::master, o3tl::mm100, and n.

◆ convertMm100ToPoint()

template<typename N >
constexpr auto convertMm100ToPoint ( N  n)
constexpr

Definition at line 107 of file UnitConversion.hxx.

References o3tl::convert(), o3tl::mm100, n, and o3tl::pt.

◆ convertPointToMm100()

template<typename N >
constexpr auto convertPointToMm100 ( N  n)
constexpr

Definition at line 103 of file UnitConversion.hxx.

References o3tl::convert(), o3tl::mm100, n, and o3tl::pt.

◆ convertTwipToMm100()

template<typename N >
constexpr auto convertTwipToMm100 ( N  n)
constexpr

Definition at line 93 of file UnitConversion.hxx.

References o3tl::convert(), o3tl::mm100, n, and o3tl::twip.

◆ FieldToO3tlLength()

constexpr o3tl::Length FieldToO3tlLength ( FieldUnit  eU,
o3tl::Length  ePixelValue = o3tl::Length::px 
)
constexpr

◆ MapToO3tlLength()

constexpr o3tl::Length MapToO3tlLength ( MapUnit  eU,
o3tl::Length  ePixelValue = o3tl::Length::px 
)
constexpr

◆ sanitiseMm100ToTwip()

constexpr sal_Int64 sanitiseMm100ToTwip ( sal_Int64  n)
constexpr

Definition at line 98 of file UnitConversion.hxx.

References o3tl::convertSaturate(), o3tl::mm100, n, and o3tl::twip.