LibreOffice Module sfx2 (master) 1
|
Helper for classes that need to load or save string values. More...
#include <oleprops.hxx>
Public Member Functions | |
SfxOleStringHelper (const SfxOleTextEncoding &rTextEnc) | |
Creates a string helper object depending on an external text encoding. More... | |
SfxOleStringHelper (rtl_TextEncoding eTextEnc) | |
Creates a string helper object with own text encoding. More... | |
OUString | LoadString8 (SvStream &rStrm) const |
Loads a string from the passed stream with current encoding (maybe Unicode). More... | |
void | SaveString8 (SvStream &rStrm, std::u16string_view rValue) const |
Saves a string to the passed stream with current encoding (maybe Unicode). More... | |
Public Member Functions inherited from SfxOleTextEncoding | |
SfxOleTextEncoding () | |
SfxOleTextEncoding (rtl_TextEncoding eTextEnc) | |
rtl_TextEncoding | GetTextEncoding () const |
Returns the current text encoding identifier. More... | |
void | SetTextEncoding (rtl_TextEncoding eTextEnc) |
Sets the passed text encoding. More... | |
bool | IsUnicode () const |
Returns true, if this object contains Unicode text encoding. More... | |
void | SetUnicode () |
Sets Unicode text encoding to this object. More... | |
sal_uInt16 | GetCodePage () const |
Converts the current settings to a Windows codepage identifier. More... | |
void | SetCodePage (sal_uInt16 nCodePage) |
Sets the current text encoding from a Windows codepage identifier. More... | |
Static Public Member Functions | |
static OUString | LoadString16 (SvStream &rStrm) |
Loads a Unicode string from the passed stream, ignores own encoding. More... | |
static void | SaveString16 (SvStream &rStrm, std::u16string_view rValue) |
Saves a Unicode string to the passed stream, ignores own encoding. More... | |
Private Member Functions | |
OUString | ImplLoadString8 (SvStream &rStrm) const |
void | ImplSaveString8 (SvStream &rStrm, std::u16string_view rValue) const |
Static Private Member Functions | |
static OUString | ImplLoadString16 (SvStream &rStrm) |
static void | ImplSaveString16 (SvStream &rStrm, std::u16string_view rValue) |
Helper for classes that need to load or save string values.
Classes derived from this class contain functions to load and save string values with the text encoding passed in the constructor.
Definition at line 134 of file oleprops.hxx.
|
inlineexplicit |
Creates a string helper object depending on an external text encoding.
Definition at line 138 of file oleprops.hxx.
|
inlineexplicit |
Creates a string helper object with own text encoding.
Definition at line 141 of file oleprops.hxx.
|
staticprivate |
Definition at line 286 of file oleprops.cxx.
References SvStream::good(), read_uInt16s_ToOUString(), SvStream::ReadInt32(), SvStream::remainingSize(), rStrm, SAL_WARN_IF, and SvStream::SeekRel().
Referenced by LoadString16(), and LoadString8().
|
private |
Definition at line 270 of file oleprops.cxx.
References SfxOleTextEncoding::GetTextEncoding(), SvStream::good(), read_uInt8s_ToOString(), SvStream::ReadInt32(), SvStream::remainingSize(), rStrm, SAL_WARN_IF, and SvStream::SeekRel().
Referenced by LoadString8().
|
staticprivate |
Definition at line 319 of file oleprops.cxx.
References rStrm, SvStream::WriteInt32(), and SvStream::WriteUInt16().
Referenced by SaveString16(), and SaveString8().
|
private |
Definition at line 307 of file oleprops.cxx.
References SfxOleTextEncoding::GetTextEncoding(), OUStringToOString(), rStrm, SvStream::WriteBytes(), SvStream::WriteInt32(), and SvStream::WriteUChar().
Referenced by SaveString8().
|
static |
Loads a Unicode string from the passed stream, ignores own encoding.
Definition at line 260 of file oleprops.cxx.
References ImplLoadString16(), and rStrm.
OUString SfxOleStringHelper::LoadString8 | ( | SvStream & | rStrm | ) | const |
Loads a string from the passed stream with current encoding (maybe Unicode).
Definition at line 247 of file oleprops.cxx.
References ImplLoadString16(), ImplLoadString8(), SfxOleTextEncoding::IsUnicode(), and rStrm.
Referenced by SfxOleDictionaryProperty::ImplLoad().
|
static |
Saves a Unicode string to the passed stream, ignores own encoding.
Definition at line 265 of file oleprops.cxx.
References ImplSaveString16(), and rStrm.
void SfxOleStringHelper::SaveString8 | ( | SvStream & | rStrm, |
std::u16string_view | rValue | ||
) | const |
Saves a string to the passed stream with current encoding (maybe Unicode).
Definition at line 252 of file oleprops.cxx.
References ImplSaveString16(), ImplSaveString8(), SfxOleTextEncoding::IsUnicode(), and rStrm.
Referenced by SfxOleDictionaryProperty::ImplSave().