Helper class that provides functions to convert values from and to different units.
double calcSerialFromDateTime(const css::util::DateTime &rDateTime) const
Returns the serial value of the passed datetime, based on current nulldate.
void finalizeImport()
Final processing after import of all style settings.
void addErrorCode(sal_uInt8 nErrorCode, const OUString &rErrorCode)
Adds an error code to the internal maps.
sal_uInt8 calcBiffErrorCode(const OUString &rErrorCode) const
Returns a BIFF error code from the passed error string.
std::map< OUString, sal_uInt8 > maOoxErrCodes
Coefficients for unit conversion.
sal_Int32 mnNullDate
Maps error code strings to BIFF error constants.
o3tl::enumarray< Unit, double > maCoeffs
void finalizeNullDate(const css::util::Date &rNullDate)
Updates internal nulldate for date/serial conversion.
UnitConverter(const WorkbookHelper &rHelper)
double scaleValue(double fValue, Unit eFromUnit, Unit eToUnit) const
Converts the passed value between the passed units.
OUString calcErrorString(sal_uInt8 nErrorCode) const
Returns an error string from the passed BIFF error code.
css::util::DateTime calcDateTimeFromSerial(double fSerial) const
Returns the datetime of the passed serial value, based on current nulldate.
double getCoefficient(Unit eUnit) const
Returns the conversion coefficient for the passed unit.
Helper class to provide access to global workbook data.
Unit
Units supported by the UnitConverter class.
@ ScreenX
English Metric Unit (1/360,000 cm).
@ Digit
Vertical screen pixels.
@ ScreenY
Horizontal screen pixels.