LibreOffice Module oox (master) 1
Static Public Member Functions | List of all members
oox::dump::StringHelper Class Reference

Static helper functions for formatted output to strings. More...

#include <dumperbase.hxx>

Static Public Member Functions

static void appendChar (OUStringBuffer &rStr, sal_Unicode cChar, sal_Int32 nCount)
 
static void appendString (OUStringBuffer &rStr, std::u16string_view rData, sal_Int32 nWidth, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_uInt8 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_Int8 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_uInt16 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_Int16 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_uInt32 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_Int32 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_uInt64 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, sal_Int64 nData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendDec (OUStringBuffer &rStr, double fData, sal_Int32 nWidth=0, sal_Unicode cFill=' ')
 
static void appendHex (OUStringBuffer &rStr, sal_uInt8 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_Int8 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_uInt16 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_Int16 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_uInt32 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_Int32 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_uInt64 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, sal_Int64 nData, bool bPrefix=true)
 
static void appendHex (OUStringBuffer &rStr, double fData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_uInt8 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_Int8 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_uInt16 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_Int16 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_uInt32 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_Int32 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_uInt64 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, sal_Int64 nData, bool bPrefix=true)
 
static void appendShortHex (OUStringBuffer &rStr, double fData, bool bPrefix=true)
 
static void appendBin (OUStringBuffer &rStr, sal_uInt8 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_Int8 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_uInt16 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_Int16 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_uInt32 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_Int32 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_uInt64 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, sal_Int64 nData, bool bDots=true)
 
static void appendBin (OUStringBuffer &rStr, double fData, bool bDots=true)
 
template<typename Type >
static void appendFix (OUStringBuffer &rStr, Type nData, sal_Int32 nWidth=0)
 
static void appendBool (OUStringBuffer &rStr, bool bData)
 
template<typename Type >
static void appendValue (OUStringBuffer &rStr, Type nData, FormatType eFmtType)
 
static void appendCChar (OUStringBuffer &rStr, sal_Unicode cChar, bool bPrefix=true)
 
static void appendEncChar (OUStringBuffer &rStr, sal_Unicode cChar, sal_Int32 nCount, bool bPrefix=true)
 
static void appendEncString (OUStringBuffer &rStr, std::u16string_view rData, bool bPrefix=true)
 
static void appendToken (OUStringBuffer &rStr, std::u16string_view rToken, sal_Unicode cSep=OOX_DUMP_LISTSEP)
 
static void appendIndex (OUStringBuffer &rStr, sal_Int64 nIdx)
 
static std::u16string_view getToken (std::u16string_view rData, sal_Int32 &rnPos, sal_Unicode cSep=OOX_DUMP_LISTSEP)
 
static void enclose (OUStringBuffer &rStr, sal_Unicode cOpen, sal_Unicode cClose='\0')
 Encloses the passed string with the passed characters. More...
 
static std::u16string_view trimSpaces (std::u16string_view rStr)
 
static OUString trimTrailingNul (const OUString &rStr)
 
static OString convertToUtf8 (std::u16string_view rStr)
 
static DataType convertToDataType (std::u16string_view rStr)
 
static FormatType convertToFormatType (std::u16string_view rStr)
 
static bool convertFromDec (sal_Int64 &ornData, std::u16string_view rData)
 
static bool convertFromHex (sal_Int64 &ornData, std::u16string_view rData)
 
static bool convertStringToInt (sal_Int64 &ornData, std::u16string_view rData)
 
static bool convertStringToDouble (double &orfData, std::u16string_view rData)
 
static bool convertStringToBool (std::u16string_view rData)
 
static OUStringPair convertStringToPair (const OUString &rString, sal_Unicode cSep='=')
 
static void convertStringToStringList (OUStringVector &orVec, std::u16string_view rData, bool bIgnoreEmpty)
 
static void convertStringToIntList (Int64Vector &orVec, std::u16string_view rData, bool bIgnoreEmpty)
 

Detailed Description

Static helper functions for formatted output to strings.

Definition at line 244 of file dumperbase.hxx.

Member Function Documentation

◆ appendBin() [1/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
double  fData,
bool  bDots = true 
)
static

Definition at line 439 of file dumperbase.cxx.

References appendBin(), and oox::dump::lcl_ConvertDouble().

◆ appendBin() [2/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_Int16  nData,
bool  bDots = true 
)
static

Definition at line 408 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [3/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_Int32  nData,
bool  bDots = true 
)
static

Definition at line 421 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [4/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_Int64  nData,
bool  bDots = true 
)
static

Definition at line 434 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [5/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_Int8  nData,
bool  bDots = true 
)
static

Definition at line 395 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [6/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_uInt16  nData,
bool  bDots = true 
)
static

Definition at line 400 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [7/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_uInt32  nData,
bool  bDots = true 
)
static

Definition at line 413 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [8/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_uInt64  nData,
bool  bDots = true 
)
static

Definition at line 426 of file dumperbase.cxx.

References appendBin().

◆ appendBin() [9/9]

void oox::dump::StringHelper::appendBin ( OUStringBuffer &  rStr,
sal_uInt8  nData,
bool  bDots = true 
)
static

Definition at line 385 of file dumperbase.cxx.

Referenced by appendBin(), appendValue(), and oox::dump::Output::writeBin().

◆ appendBool()

void oox::dump::StringHelper::appendBool ( OUStringBuffer &  rStr,
bool  bData 
)
static

Definition at line 446 of file dumperbase.cxx.

Referenced by appendValue(), and oox::dump::Output::writeBool().

◆ appendCChar()

void oox::dump::StringHelper::appendCChar ( OUStringBuffer &  rStr,
sal_Unicode  cChar,
bool  bPrefix = true 
)
static

Definition at line 453 of file dumperbase.cxx.

References appendHex().

Referenced by appendEncChar(), and appendEncString().

◆ appendChar()

void oox::dump::StringHelper::appendChar ( OUStringBuffer &  rStr,
sal_Unicode  cChar,
sal_Int32  nCount 
)
static

Definition at line 197 of file dumperbase.cxx.

References nCount, and nIndex.

Referenced by appendEncChar(), appendString(), oox::dump::Output::incIndent(), and oox::dump::Output::tab().

◆ appendDec() [1/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
double  fData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 258 of file dumperbase.cxx.

References appendString().

◆ appendDec() [2/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_Int16  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 226 of file dumperbase.cxx.

References appendString().

◆ appendDec() [3/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_Int32  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 236 of file dumperbase.cxx.

References appendString().

◆ appendDec() [4/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_Int64  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 253 of file dumperbase.cxx.

References appendString().

◆ appendDec() [5/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_Int8  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 216 of file dumperbase.cxx.

References appendString().

◆ appendDec() [6/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_uInt16  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 221 of file dumperbase.cxx.

References appendString().

◆ appendDec() [7/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_uInt32  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 231 of file dumperbase.cxx.

References appendString().

◆ appendDec() [8/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_uInt64  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 241 of file dumperbase.cxx.

References aBuffer, and appendString().

◆ appendDec() [9/9]

void oox::dump::StringHelper::appendDec ( OUStringBuffer &  rStr,
sal_uInt8  nData,
sal_Int32  nWidth = 0,
sal_Unicode  cFill = ' ' 
)
static

◆ appendEncChar()

void oox::dump::StringHelper::appendEncChar ( OUStringBuffer &  rStr,
sal_Unicode  cChar,
sal_Int32  nCount,
bool  bPrefix = true 
)
static

Definition at line 469 of file dumperbase.cxx.

References appendCChar(), appendChar(), and nCount.

Referenced by oox::dump::Output::writeChar().

◆ appendEncString()

void oox::dump::StringHelper::appendEncString ( OUStringBuffer &  rStr,
std::u16string_view  rData,
bool  bPrefix = true 
)
static

Definition at line 486 of file dumperbase.cxx.

References appendCChar().

Referenced by oox::dump::StorageObjectBase::getSysFileName().

◆ appendFix()

template<typename Type >
void oox::dump::StringHelper::appendFix ( OUStringBuffer &  rStr,
Type  nData,
sal_Int32  nWidth = 0 
)
static

Definition at line 354 of file dumperbase.hxx.

References appendDec().

Referenced by appendValue(), and oox::dump::Output::writeFix().

◆ appendHex() [1/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
double  fData,
bool  bPrefix = true 
)
static

Definition at line 322 of file dumperbase.cxx.

References appendHex(), and oox::dump::lcl_ConvertDouble().

◆ appendHex() [2/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_Int16  nData,
bool  bPrefix = true 
)
static

Definition at line 284 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [3/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_Int32  nData,
bool  bPrefix = true 
)
static

Definition at line 295 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [4/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_Int64  nData,
bool  bPrefix = true 
)
static

Definition at line 306 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [5/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_Int8  nData,
bool  bPrefix = true 
)
static

Definition at line 273 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [6/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_uInt16  nData,
bool  bPrefix = true 
)
static

Definition at line 278 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [7/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_uInt32  nData,
bool  bPrefix = true 
)
static

Definition at line 289 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [8/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_uInt64  nData,
bool  bPrefix = true 
)
static

Definition at line 300 of file dumperbase.cxx.

References appendHex().

◆ appendHex() [9/9]

void oox::dump::StringHelper::appendHex ( OUStringBuffer &  rStr,
sal_uInt8  nData,
bool  bPrefix = true 
)
static

◆ appendIndex()

void oox::dump::StringHelper::appendIndex ( OUStringBuffer &  rStr,
sal_Int64  nIdx 
)
static

Definition at line 523 of file dumperbase.cxx.

References appendDec().

◆ appendShortHex() [1/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
double  fData,
bool  bPrefix = true 
)
static

Definition at line 378 of file dumperbase.cxx.

References appendHex().

◆ appendShortHex() [2/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_Int16  nData,
bool  bPrefix = true 
)
static

Definition at line 347 of file dumperbase.cxx.

References appendShortHex().

◆ appendShortHex() [3/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_Int32  nData,
bool  bPrefix = true 
)
static

Definition at line 360 of file dumperbase.cxx.

References appendShortHex().

◆ appendShortHex() [4/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_Int64  nData,
bool  bPrefix = true 
)
static

Definition at line 373 of file dumperbase.cxx.

References appendShortHex().

◆ appendShortHex() [5/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_Int8  nData,
bool  bPrefix = true 
)
static

Definition at line 334 of file dumperbase.cxx.

References appendHex().

◆ appendShortHex() [6/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_uInt16  nData,
bool  bPrefix = true 
)
static

Definition at line 339 of file dumperbase.cxx.

References appendHex(), and SAL_MAX_UINT8.

◆ appendShortHex() [7/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_uInt32  nData,
bool  bPrefix = true 
)
static

Definition at line 352 of file dumperbase.cxx.

References appendHex(), appendShortHex(), and SAL_MAX_UINT16.

◆ appendShortHex() [8/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_uInt64  nData,
bool  bPrefix = true 
)
static

Definition at line 365 of file dumperbase.cxx.

References appendHex(), appendShortHex(), and SAL_MAX_UINT32.

◆ appendShortHex() [9/9]

void oox::dump::StringHelper::appendShortHex ( OUStringBuffer &  rStr,
sal_uInt8  nData,
bool  bPrefix = true 
)
static

◆ appendString()

void oox::dump::StringHelper::appendString ( OUStringBuffer &  rStr,
std::u16string_view  rData,
sal_Int32  nWidth,
sal_Unicode  cFill = ' ' 
)
static

Definition at line 203 of file dumperbase.cxx.

References appendChar().

Referenced by appendDec().

◆ appendToken()

void oox::dump::StringHelper::appendToken ( OUStringBuffer &  rStr,
std::u16string_view  rToken,
sal_Unicode  cSep = OOX_DUMP_LISTSEP 
)
static

◆ appendValue()

template<typename Type >
void oox::dump::StringHelper::appendValue ( OUStringBuffer &  rStr,
Type  nData,
FormatType  eFmtType 
)
static

◆ convertFromDec()

bool oox::dump::StringHelper::convertFromDec ( sal_Int64 &  ornData,
std::u16string_view  rData 
)
static

Definition at line 671 of file dumperbase.cxx.

References nPos.

Referenced by convertStringToInt().

◆ convertFromHex()

bool oox::dump::StringHelper::convertFromHex ( sal_Int64 &  ornData,
std::u16string_view  rData 
)
static

Definition at line 694 of file dumperbase.cxx.

References nPos.

Referenced by convertStringToInt().

◆ convertStringToBool()

bool oox::dump::StringHelper::convertStringToBool ( std::u16string_view  rData)
static

◆ convertStringToDouble()

bool oox::dump::StringHelper::convertStringToDouble ( double &  orfData,
std::u16string_view  rData 
)
static

Definition at line 720 of file dumperbase.cxx.

◆ convertStringToInt()

bool oox::dump::StringHelper::convertStringToInt ( sal_Int64 &  ornData,
std::u16string_view  rData 
)
static

◆ convertStringToIntList()

void oox::dump::StringHelper::convertStringToIntList ( Int64Vector orVec,
std::u16string_view  rData,
bool  bIgnoreEmpty 
)
static

Definition at line 777 of file dumperbase.cxx.

References convertStringToInt(), getToken(), and nPos.

Referenced by oox::dump::NameListBase::exclude().

◆ convertStringToPair()

OUStringPair oox::dump::StringHelper::convertStringToPair ( const OUString &  rString,
sal_Unicode  cSep = '=' 
)
static

◆ convertStringToStringList()

void oox::dump::StringHelper::convertStringToStringList ( OUStringVector orVec,
std::u16string_view  rData,
bool  bIgnoreEmpty 
)
static

◆ convertToDataType()

DataType oox::dump::StringHelper::convertToDataType ( std::u16string_view  rStr)
static

◆ convertToFormatType()

FormatType oox::dump::StringHelper::convertToFormatType ( std::u16string_view  rStr)
static

◆ convertToUtf8()

OString oox::dump::StringHelper::convertToUtf8 ( std::u16string_view  rStr)
static

Definition at line 622 of file dumperbase.cxx.

References OUStringToOString().

Referenced by oox::dump::OutputObjectBase::writeValueItem().

◆ enclose()

void oox::dump::StringHelper::enclose ( OUStringBuffer &  rStr,
sal_Unicode  cOpen,
sal_Unicode  cClose = '\0' 
)
static

Encloses the passed string with the passed characters.

Uses cOpen, if cClose is NUL.

Definition at line 535 of file dumperbase.cxx.

Referenced by oox::dump::InputObjectBase::dumpGuid(), oox::dump::ConstList::implGetName(), oox::dump::FlagsList::implGetName(), and oox::dump::OutputObjectBase::writeStringItem().

◆ getToken()

std::u16string_view oox::dump::StringHelper::getToken ( std::u16string_view  rData,
sal_Int32 &  rnPos,
sal_Unicode  cSep = OOX_DUMP_LISTSEP 
)
static

Definition at line 530 of file dumperbase.cxx.

References o3tl::getToken(), and trimSpaces().

Referenced by convertStringToIntList(), and convertStringToStringList().

◆ trimSpaces()

std::u16string_view oox::dump::StringHelper::trimSpaces ( std::u16string_view  rStr)
static

◆ trimTrailingNul()

OUString oox::dump::StringHelper::trimTrailingNul ( const OUString &  rStr)
static

The documentation for this class was generated from the following files: