LibreOffice Module sfx2 (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
SfxOleStringHelper Class Reference

Helper for classes that need to load or save string values. More...

#include <oleprops.hxx>

Inheritance diagram for SfxOleStringHelper:
[legend]
Collaboration diagram for SfxOleStringHelper:
[legend]

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SfxOleStringHelper() [1/2]

SfxOleStringHelper::SfxOleStringHelper ( const SfxOleTextEncoding rTextEnc)
inlineexplicit

Creates a string helper object depending on an external text encoding.

Definition at line 138 of file oleprops.hxx.

◆ SfxOleStringHelper() [2/2]

SfxOleStringHelper::SfxOleStringHelper ( rtl_TextEncoding  eTextEnc)
inlineexplicit

Creates a string helper object with own text encoding.

Definition at line 141 of file oleprops.hxx.

Member Function Documentation

◆ ImplLoadString16()

OUString SfxOleStringHelper::ImplLoadString16 ( SvStream rStrm)
staticprivate

◆ ImplLoadString8()

OUString SfxOleStringHelper::ImplLoadString8 ( SvStream rStrm) const
private

◆ ImplSaveString16()

void SfxOleStringHelper::ImplSaveString16 ( SvStream rStrm,
std::u16string_view  rValue 
)
staticprivate

Definition at line 319 of file oleprops.cxx.

References rStrm, SvStream::WriteInt32(), and SvStream::WriteUInt16().

Referenced by SaveString16(), and SaveString8().

◆ ImplSaveString8()

void SfxOleStringHelper::ImplSaveString8 ( SvStream rStrm,
std::u16string_view  rValue 
) const
private

◆ LoadString16()

OUString SfxOleStringHelper::LoadString16 ( SvStream rStrm)
static

Loads a Unicode string from the passed stream, ignores own encoding.

Definition at line 260 of file oleprops.cxx.

References ImplLoadString16(), and rStrm.

◆ LoadString8()

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().

◆ SaveString16()

void SfxOleStringHelper::SaveString16 ( SvStream rStrm,
std::u16string_view  rValue 
)
static

Saves a Unicode string to the passed stream, ignores own encoding.

Definition at line 265 of file oleprops.cxx.

References ImplSaveString16(), and rStrm.

◆ SaveString8()

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().


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