LibreOffice Module filter (master) 1
|
Functions | |
OString | OutHex (sal_uLong nHex, sal_uInt8 nLen) |
Outputs a single character in hex form. More... | |
OString | OutChar (sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool *pSuccess, bool bUnicode=true) |
Handles correct unicode and legacy export of a single character. More... | |
OString | OutString (std::u16string_view rStr, rtl_TextEncoding eDestEnc, bool bUnicode=true) |
Handles correct unicode and legacy export of a string. More... | |
static bool | TryOutString (std::u16string_view rStr, rtl_TextEncoding eDestEnc) |
Checks if lossless conversion of the string to eDestEnc is possible or not. More... | |
OString | OutStringUpr (std::string_view pToken, std::u16string_view rStr, rtl_TextEncoding eDestEnc) |
Handles correct unicode and legacy export of a string, when a '{' \upr '{' keyword ansi_text '}{*' \ud '{' keyword Unicode_text '}}}' construct should be used. More... | |
int | AsHex (char ch) |
Get the numeric value of a single character, representing a hex value. More... | |
OString | WriteHex (const sal_uInt8 *pData, sal_uInt32 nSize, SvStream *pStream=nullptr, sal_uInt32 nLimit=64) |
Writes binary data as a hex dump. More... | |
bool | ExtractOLE2FromObjdata (const OString &rObjdata, SvStream &rOle2) |
Extract OLE2 data from an \objdata hex dump. More... | |
bool | StripMetafileHeader (const sal_uInt8 *&rpGraphicAry, sal_uInt64 &rSize) |
Strips the header of a WMF file. More... | |
MSFILTER_DLLPUBLIC int msfilter::rtfutil::AsHex | ( | char | ch | ) |
Get the numeric value of a single character, representing a hex value.
Definition at line 253 of file rtfutil.cxx.
References ch.
Referenced by ExtractOLE2FromObjdata().
MSFILTER_DLLPUBLIC bool msfilter::rtfutil::ExtractOLE2FromObjdata | ( | const OString & | rObjdata, |
SvStream & | rOle2 | ||
) |
Extract OLE2 data from an \objdata hex dump.
Definition at line 303 of file rtfutil.cxx.
References AsHex(), ch, count, gentoken::i, nPos, read_uInt8s_ToOString(), SvStream::ReadBytes(), SvStream::ReadUInt32(), SAL_N_ELEMENTS, SvStream::Seek(), SvStream::SeekRel(), SvStream::Tell(), SvStream::WriteChar(), and SvStream::WriteStream().
MSFILTER_DLLPUBLIC OString msfilter::rtfutil::OutChar | ( | sal_Unicode | c, |
int * | pUCMode, | ||
rtl_TextEncoding | eDestEnc, | ||
bool * | pSuccess, | ||
bool | bUnicode | ||
) |
Handles correct unicode and legacy export of a single character.
Definition at line 129 of file rtfutil.cxx.
References aBuf, OOO_STRING_SVTOOLS_RTF_LINE, OOO_STRING_SVTOOLS_RTF_TAB, and OutHex().
Referenced by OutString(), and TryOutString().
MSFILTER_DLLPUBLIC OString msfilter::rtfutil::OutHex | ( | sal_uLong | nHex, |
sal_uInt8 | nLen | ||
) |
Outputs a single character in hex form.
Definition at line 98 of file rtfutil.cxx.
References n.
Referenced by OutChar().
MSFILTER_DLLPUBLIC OString msfilter::rtfutil::OutString | ( | std::u16string_view | rStr, |
rtl_TextEncoding | eDestEnc, | ||
bool | bUnicode = true |
||
) |
Handles correct unicode and legacy export of a string.
rStr | the string to export |
eDestEnc | the legacy encoding to use |
bUnicode | if unicode output is wanted as well, or just legacy |
Definition at line 213 of file rtfutil.cxx.
References aBuf, n, OOO_STRING_SVTOOLS_RTF_UC, and OutChar().
Referenced by OutStringUpr().
MSFILTER_DLLPUBLIC OString msfilter::rtfutil::OutStringUpr | ( | std::string_view | pToken, |
std::u16string_view | rStr, | ||
rtl_TextEncoding | eDestEnc | ||
) |
Handles correct unicode and legacy export of a string, when a '{' \upr '{' keyword ansi_text '}{*' \ud '{' keyword Unicode_text '}}}' construct should be used.
pToken | the keyword |
rStr | the text to export |
eDestEnc | the legacy encoding to use |
Definition at line 242 of file rtfutil.cxx.
References OOO_STRING_SVTOOLS_RTF_IGNORE, OOO_STRING_SVTOOLS_RTF_UD, OOO_STRING_SVTOOLS_RTF_UPR, OutString(), and TryOutString().
MSFILTER_DLLPUBLIC bool msfilter::rtfutil::StripMetafileHeader | ( | const sal_uInt8 *& | rpGraphicAry, |
sal_uInt64 & | rSize | ||
) |
Strips the header of a WMF file.
Definition at line 379 of file rtfutil.cxx.
|
static |
Checks if lossless conversion of the string to eDestEnc is possible or not.
Definition at line 229 of file rtfutil.cxx.
Referenced by OutStringUpr().
MSFILTER_DLLPUBLIC OString msfilter::rtfutil::WriteHex | ( | const sal_uInt8 * | pData, |
sal_uInt32 | nSize, | ||
SvStream * | pStream, | ||
sal_uInt32 | nLimit | ||
) |
Writes binary data as a hex dump.
Definition at line 271 of file rtfutil.cxx.
References gentoken::i, pData, SAL_NEWLINE_STRING, SvStream::WriteChar(), and SvStream::WriteOString().