LibreOffice Module sax (master) 1
Namespaces | Functions | Variables
converter.cxx File Reference
#include <sax/tools/converter.hxx>
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/util/Date.hpp>
#include <com/sun/star/util/Duration.hpp>
#include <com/sun/star/util/Time.hpp>
#include <optional>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
#include <rtl/character.hxx>
#include <sal/log.hxx>
#include <o3tl/string_view.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <o3tl/unit_conversion.hxx>
#include <osl/diagnose.h>
#include <tools/long.hxx>
#include <algorithm>
#include <string_view>
Include dependency graph for converter.cxx:

Go to the source code of this file.

Namespaces

namespace  sax
 

Functions

static sal_Int64 sax::toInt64_WithLength (const sal_Unicode *str, sal_Int16 radix, sal_Int32 nStrLength)
 
static sal_Int64 sax::toInt64_WithLength (const char *str, sal_Int16 radix, sal_Int32 nStrLength)
 
template<typename V >
static bool sax::lcl_convertMeasure (sal_Int32 &rValue, V rString, sal_Int16 nTargetUnit, sal_Int32 nMin, sal_Int32 nMax)
 convert string to measure using optional min and max values More...
 
static int sax::lcl_gethex (int nChar)
 
template<typename V >
static bool sax::lcl_convertColor (sal_Int32 &rColor, V rValue)
 convert string to rgb color More...
 
template<typename V >
static bool sax::lcl_convertNumber64 (sal_Int64 &rValue, V aString, sal_Int64 nMin, sal_Int64 nMax)
 convert string to 64-bit number with optional min and max values More...
 
template<typename V >
static bool sax::convertDurationHelper (double &rfTime, V pStr)
 helper function of Converter::convertDuration More...
 
template<typename V >
static Result sax::readUnsignedNumber (V rString, size_t &io_rnPos, sal_Int32 &o_rNumber)
 
template<typename V >
static Result sax::readUnsignedNumberMaxDigits (int maxDigits, V rString, size_t &io_rnPos, sal_Int32 &o_rNumber)
 
template<typename V >
static bool sax::readDurationT (V rString, size_t &io_rnPos)
 
template<typename V >
static bool sax::readDurationComponent (V rString, size_t &io_rnPos, sal_Int32 &io_rnTemp, bool &io_rbTimePart, sal_Int32 &o_rnTarget, const sal_Unicode cLower, const sal_Unicode cUpper)
 
template<typename V >
static bool sax::convertDurationHelper (util::Duration &rDuration, V string)
 
static void sax::lcl_AppendTimezone (OUStringBuffer &i_rBuffer, int const nOffset)
 
static void sax::convertTime (OUStringBuffer &i_rBuffer, const css::util::DateTime &i_rDateTime)
 
static void sax::convertTimeZone (OUStringBuffer &i_rBuffer, const css::util::DateTime &i_rDateTime, sal_Int16 const *pTimeZoneOffset)
 
static bool sax::lcl_isLeapYear (const sal_uInt32 nYear)
 
static sal_uInt16 sax::lcl_MaxDaysPerMonth (const sal_Int32 nMonth, const sal_Int32 nYear)
 
static void sax::lcl_ConvertToUTC (sal_Int16 &o_rYear, sal_uInt16 &o_rMonth, sal_uInt16 &o_rDay, sal_uInt16 &o_rHours, sal_uInt16 &o_rMinutes, int const nSourceOffset)
 
template<typename V >
static bool sax::readDateTimeComponent (V rString, size_t &io_rnPos, sal_Int32 &o_rnTarget, const sal_Int32 nMinLength, const bool bExactLength)
 
template<typename V >
static bool sax::lcl_parseDate (bool &isNegative, sal_Int32 &nYear, sal_Int32 &nMonth, sal_Int32 &nDay, bool &bHaveTime, size_t &nPos, V string, bool const bIgnoreInvalidOrMissingDate)
 convert ISO "date" or "dateTime" string to util::DateTime or util::Date More...
 
template<typename V >
static bool sax::lcl_parseDateTime (util::Date *const pDate, util::DateTime &rDateTime, bool &rbDateTime, std::optional< sal_Int16 > *const pTimeZoneOffset, V string, bool const bIgnoreInvalidOrMissingDate)
 convert ISO "date" or "dateTime" string to util::DateTime or util::Date More...
 
template<typename V >
static sal_Int16 sax::lcl_GetUnitFromString (V rString, sal_Int16 nDefaultUnit)
 

Variables

const std::string_view sax::gpsMM = "mm"
 
const std::string_view sax::gpsCM = "cm"
 
const std::string_view sax::gpsPT = "pt"
 
const std::string_view sax::gpsINCH = "in"
 
const std::string_view sax::gpsPC = "pc"
 
const sal_Int8 sax::XML_MAXDIGITSCOUNT_TIME = 14
 
const char sax::aHexTab [] = "0123456789abcdef"