LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
SfxOleSection Class Reference

A section in a property set. More...

#include <oleprops.hxx>

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

Public Member Functions

 SfxOleSection (bool bSupportsDict)
 
SfxOlePropertyRef GetProperty (sal_Int32 nPropId) const
 Returns the property with the passed ID, or an empty reference, if nothing found. More...
 
bool GetInt32Value (sal_Int32 &rnValue, sal_Int32 nPropId) const
 Returns the value of a signed int32 property with the passed ID in rnValue. More...
 
bool GetDoubleValue (double &rfValue, sal_Int32 nPropId) const
 Returns the value of a floating-point property with the passed ID in rfValue. More...
 
bool GetBoolValue (bool &rbValue, sal_Int32 nPropId) const
 Returns the value of a boolean property with the passed ID in rbValue. More...
 
bool GetStringValue (OUString &rValue, sal_Int32 nPropId) const
 Returns the value of a string property with the passed ID in rValue. More...
 
bool GetFileTimeValue (css::util::DateTime &rValue, sal_Int32 nPropId) const
 Returns the value of a time stamp property with the passed ID in rValue. More...
 
bool GetDateValue (css::util::Date &rValue, sal_Int32 nPropId) const
 Returns the value of a date property with the passed ID in rValue. More...
 
void SetProperty (const SfxOlePropertyRef &xProp)
 Adds the passed property to the property set. More...
 
void SetInt32Value (sal_Int32 nPropId, sal_Int32 nValue)
 Inserts a signed int32 property with the passed value. More...
 
void SetDoubleValue (sal_Int32 nPropId, double fValue)
 Inserts a floating-point property with the passed value. More...
 
void SetBoolValue (sal_Int32 nPropId, bool bValue)
 Inserts a boolean property with the passed value. More...
 
bool SetStringValue (sal_Int32 nPropId, const OUString &rValue)
 Inserts a string property with the passed value. More...
 
void SetFileTimeValue (sal_Int32 nPropId, const css::util::DateTime &rValue)
 Inserts a time stamp property with the passed value. More...
 
void SetDateValue (sal_Int32 nPropId, const css::util::Date &rValue)
 Inserts a date property with the passed value. More...
 
void SetThumbnailValue (sal_Int32 nPropId, const css::uno::Sequence< sal_Int8 > &i_rData)
 Inserts a thumbnail property from the passed meta file. More...
 
void SetBlobValue (sal_Int32 nPropId, const css::uno::Sequence< sal_Int8 > &i_rData)
 Inserts a BLOB property with the passed data. More...
 
css::uno::Any GetAnyValue (sal_Int32 nPropId) const
 Returns the value of the property with the passed ID in a UNO any. More...
 
bool SetAnyValue (sal_Int32 nPropId, const css::uno::Any &rValue)
 Inserts a property created from the passed any. More...
 
OUString GetPropertyName (sal_Int32 nPropId) const
 Returns the custom name for the passed property ID, or an empty string, if name not found. More...
 
void SetPropertyName (sal_Int32 nPropId, const OUString &rPropName)
 Sets a custom name for the passed property ID. More...
 
void GetPropertyIds (::std::vector< sal_Int32 > &rPropIds) const
 Returns the identifiers of all existing properties in the passed vector. More...
 
sal_Int32 GetFreePropertyId () const
 Returns a property identifier not used in this section. More...
 
- Public Member Functions inherited from SfxOleObjectBase
 SfxOleObjectBase ()
 
virtual ~SfxOleObjectBase ()
 
ErrCode const & GetError () const
 Returns the current error code. More...
 
ErrCode const & Load (SvStream &rStrm)
 Loads this object from the passed stream. More...
 
ErrCode const & Save (SvStream &rStrm)
 Saves this object to the passed stream. More...
 

Private Types

typedef ::std::map< sal_Int32, SfxOlePropertyRefSfxOlePropMap
 

Private Member Functions

virtual void ImplLoad (SvStream &rStrm) override
 Derived classes implement loading the object from the passed steam. More...
 
virtual void ImplSave (SvStream &rStrm) override
 Derived classes implement saving the object to the passed steam. More...
 
bool SeekToPropertyPos (SvStream &rStrm, sal_uInt32 nPropPos) const
 
void LoadProperty (SvStream &rStrm, sal_Int32 nPropId)
 
void SaveProperty (SvStream &rStrm, SfxOlePropertyBase &rProp, sal_uInt64 &rnPropPosPos)
 

Private Attributes

SfxOlePropMap maPropMap
 
SfxOleCodePageProperty maCodePageProp
 All properties in this section, by identifier. More...
 
SfxOleDictionaryProperty maDictProp
 The codepage property. More...
 
sal_uInt64 mnStartPos
 The dictionary property. More...
 
bool mbSupportsDict
 Start stream position of the section. More...
 

Additional Inherited Members

- Protected Member Functions inherited from SfxOleObjectBase
void SetError (ErrCode nErrCode)
 Sets the passed error code. More...
 
void LoadObject (SvStream &rStrm, SfxOleObjectBase &rObj)
 Loads the passed object from the stream. More...
 
void SaveObject (SvStream &rStrm, SfxOleObjectBase &rObj)
 Saves the passed object to the stream. More...
 

Detailed Description

A section in a property set.

Contains properties with unique identifiers.

Definition at line 261 of file oleprops.hxx.

Member Typedef Documentation

◆ SfxOlePropMap

Definition at line 264 of file oleprops.hxx.

Constructor & Destructor Documentation

◆ SfxOleSection()

SfxOleSection::SfxOleSection ( bool  bSupportsDict)
explicit

Definition at line 709 of file oleprops.cxx.

Member Function Documentation

◆ GetAnyValue()

Any SfxOleSection::GetAnyValue ( sal_Int32  nPropId) const

Returns the value of the property with the passed ID in a UNO any.

Definition at line 862 of file oleprops.cxx.

References Any, GetBoolValue(), GetDateValue(), GetDoubleValue(), GetFileTimeValue(), GetInt32Value(), and GetStringValue().

◆ GetBoolValue()

bool SfxOleSection::GetBoolValue ( bool &  rbValue,
sal_Int32  nPropId 
) const

Returns the value of a boolean property with the passed ID in rbValue.

Returns
true = Property found, rbValue is valid; false = Property not found.

Definition at line 745 of file oleprops.cxx.

References GetProperty().

Referenced by GetAnyValue().

◆ GetDateValue()

bool SfxOleSection::GetDateValue ( css::util::Date &  rValue,
sal_Int32  nPropId 
) const

Returns the value of a date property with the passed ID in rValue.

Returns
true = Property found, rValue is valid; false = Property not found.

Definition at line 780 of file oleprops.cxx.

References GetProperty(), and TIMESTAMP_INVALID_UTILDATE.

Referenced by GetAnyValue().

◆ GetDoubleValue()

bool SfxOleSection::GetDoubleValue ( double &  rfValue,
sal_Int32  nPropId 
) const

Returns the value of a floating-point property with the passed ID in rfValue.

Returns
true = Property found, rfValue is valid; false = Property not found.

Definition at line 735 of file oleprops.cxx.

References GetProperty().

Referenced by GetAnyValue().

◆ GetFileTimeValue()

bool SfxOleSection::GetFileTimeValue ( css::util::DateTime &  rValue,
sal_Int32  nPropId 
) const

Returns the value of a time stamp property with the passed ID in rValue.

Returns
true = Property found, rValue is valid; false = Property not found.

Definition at line 765 of file oleprops.cxx.

References GetProperty(), and TIMESTAMP_INVALID_UTILDATETIME.

Referenced by GetAnyValue().

◆ GetFreePropertyId()

sal_Int32 SfxOleSection::GetFreePropertyId ( ) const

Returns a property identifier not used in this section.

Definition at line 934 of file oleprops.cxx.

References maPropMap, and PROPID_FIRSTCUSTOM.

Referenced by sfx2::SaveOlePropertySet().

◆ GetInt32Value()

bool SfxOleSection::GetInt32Value ( sal_Int32 &  rnValue,
sal_Int32  nPropId 
) const

Returns the value of a signed int32 property with the passed ID in rnValue.

Returns
true = Property found, rnValue is valid; false = Property not found.

Definition at line 725 of file oleprops.cxx.

References GetProperty().

Referenced by GetAnyValue().

◆ GetProperty()

SfxOlePropertyRef SfxOleSection::GetProperty ( sal_Int32  nPropId) const

Returns the property with the passed ID, or an empty reference, if nothing found.

Definition at line 716 of file oleprops.cxx.

References maPropMap.

Referenced by GetBoolValue(), GetDateValue(), GetDoubleValue(), GetFileTimeValue(), GetInt32Value(), and GetStringValue().

◆ GetPropertyIds()

void SfxOleSection::GetPropertyIds ( ::std::vector< sal_Int32 > &  rPropIds) const

Returns the identifiers of all existing properties in the passed vector.

Definition at line 927 of file oleprops.cxx.

References maPropMap.

◆ GetPropertyName()

OUString SfxOleSection::GetPropertyName ( sal_Int32  nPropId) const

Returns the custom name for the passed property ID, or an empty string, if name not found.

Definition at line 917 of file oleprops.cxx.

References SfxOleDictionaryProperty::GetPropertyName(), and maDictProp.

◆ GetStringValue()

bool SfxOleSection::GetStringValue ( OUString &  rValue,
sal_Int32  nPropId 
) const

Returns the value of a string property with the passed ID in rValue.

Returns
true = Property found, rValue is valid; false = Property not found.

Definition at line 755 of file oleprops.cxx.

References GetProperty().

Referenced by GetAnyValue().

◆ ImplLoad()

void SfxOleSection::ImplLoad ( SvStream rStrm)
overrideprivatevirtual

◆ ImplSave()

void SfxOleSection::ImplSave ( SvStream rStrm)
overrideprivatevirtual

◆ LoadProperty()

void SfxOleSection::LoadProperty ( SvStream rStrm,
sal_Int32  nPropId 
)
private

◆ SaveProperty()

void SfxOleSection::SaveProperty ( SvStream rStrm,
SfxOlePropertyBase rProp,
sal_uInt64 &  rnPropPosPos 
)
private

◆ SeekToPropertyPos()

bool SfxOleSection::SeekToPropertyPos ( SvStream rStrm,
sal_uInt32  nPropPos 
) const
private

Definition at line 1027 of file oleprops.cxx.

References checkSeek(), ERRCODE_NONE, SvStream::GetErrorCode(), mnStartPos, and rStrm.

Referenced by ImplLoad().

◆ SetAnyValue()

bool SfxOleSection::SetAnyValue ( sal_Int32  nPropId,
const css::uno::Any &  rValue 
)

Inserts a property created from the passed any.

Returns
true = Property converted and inserted; false = Property type not supported.

Definition at line 891 of file oleprops.cxx.

References SetBoolValue(), SetDateValue(), SetDoubleValue(), SetFileTimeValue(), SetInt32Value(), and SetStringValue().

Referenced by sfx2::SaveOlePropertySet().

◆ SetBlobValue()

void SfxOleSection::SetBlobValue ( sal_Int32  nPropId,
const css::uno::Sequence< sal_Int8 > &  i_rData 
)

Inserts a BLOB property with the passed data.

Definition at line 854 of file oleprops.cxx.

References SetProperty().

Referenced by sfx2::SaveOlePropertySet().

◆ SetBoolValue()

void SfxOleSection::SetBoolValue ( sal_Int32  nPropId,
bool  bValue 
)

Inserts a boolean property with the passed value.

Definition at line 811 of file oleprops.cxx.

References SetProperty().

Referenced by SetAnyValue().

◆ SetDateValue()

void SfxOleSection::SetDateValue ( sal_Int32  nPropId,
const css::util::Date &  rValue 
)

Inserts a date property with the passed value.

Definition at line 832 of file oleprops.cxx.

References SetProperty(), and TIMESTAMP_INVALID_UTILDATETIME.

Referenced by SetAnyValue().

◆ SetDoubleValue()

void SfxOleSection::SetDoubleValue ( sal_Int32  nPropId,
double  fValue 
)

Inserts a floating-point property with the passed value.

Definition at line 806 of file oleprops.cxx.

References SetProperty().

Referenced by SetAnyValue().

◆ SetFileTimeValue()

void SfxOleSection::SetFileTimeValue ( sal_Int32  nPropId,
const css::util::DateTime &  rValue 
)

Inserts a time stamp property with the passed value.

Definition at line 824 of file oleprops.cxx.

References SetProperty(), and TIMESTAMP_INVALID_UTILDATETIME.

Referenced by sfx2::SaveOlePropertySet(), and SetAnyValue().

◆ SetInt32Value()

void SfxOleSection::SetInt32Value ( sal_Int32  nPropId,
sal_Int32  nValue 
)

Inserts a signed int32 property with the passed value.

Definition at line 801 of file oleprops.cxx.

References nValue, and SetProperty().

Referenced by SetAnyValue().

◆ SetProperty()

void SfxOleSection::SetProperty ( const SfxOlePropertyRef xProp)

Adds the passed property to the property set.

Drops an existing old property.

Definition at line 795 of file oleprops.cxx.

References maPropMap.

Referenced by SetBlobValue(), SetBoolValue(), SetDateValue(), SetDoubleValue(), SetFileTimeValue(), SetInt32Value(), SetStringValue(), and SetThumbnailValue().

◆ SetPropertyName()

void SfxOleSection::SetPropertyName ( sal_Int32  nPropId,
const OUString &  rPropName 
)

Sets a custom name for the passed property ID.

Definition at line 922 of file oleprops.cxx.

References maDictProp, and SfxOleDictionaryProperty::SetPropertyName().

Referenced by sfx2::SaveOlePropertySet().

◆ SetStringValue()

bool SfxOleSection::SetStringValue ( sal_Int32  nPropId,
const OUString &  rValue 
)

Inserts a string property with the passed value.

Returns
true = Property inserted; false = String was empty, property not inserted.

Definition at line 816 of file oleprops.cxx.

References maCodePageProp, and SetProperty().

Referenced by sfx2::SaveOlePropertySet(), and SetAnyValue().

◆ SetThumbnailValue()

void SfxOleSection::SetThumbnailValue ( sal_Int32  nPropId,
const css::uno::Sequence< sal_Int8 > &  i_rData 
)

Inserts a thumbnail property from the passed meta file.

Definition at line 846 of file oleprops.cxx.

References SetProperty().

Referenced by sfx2::SaveOlePropertySet().

Member Data Documentation

◆ maCodePageProp

SfxOleCodePageProperty SfxOleSection::maCodePageProp
private

All properties in this section, by identifier.

Definition at line 338 of file oleprops.hxx.

Referenced by ImplLoad(), ImplSave(), LoadProperty(), and SetStringValue().

◆ maDictProp

SfxOleDictionaryProperty SfxOleSection::maDictProp
private

The codepage property.

Definition at line 339 of file oleprops.hxx.

Referenced by GetPropertyName(), ImplLoad(), ImplSave(), and SetPropertyName().

◆ maPropMap

SfxOlePropMap SfxOleSection::maPropMap
private

◆ mbSupportsDict

bool SfxOleSection::mbSupportsDict
private

Start stream position of the section.

Definition at line 341 of file oleprops.hxx.

Referenced by ImplLoad().

◆ mnStartPos

sal_uInt64 SfxOleSection::mnStartPos
private

The dictionary property.

Definition at line 340 of file oleprops.hxx.

Referenced by ImplLoad(), ImplSave(), SaveProperty(), and SeekToPropertyPos().


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