LibreOffice Module sfx2 (master) 1
|
A section in a property set. More...
#include <oleprops.hxx>
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, SfxOlePropertyRef > | SfxOlePropMap |
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... | |
A section in a property set.
Contains properties with unique identifiers.
Definition at line 261 of file oleprops.hxx.
|
private |
Definition at line 264 of file oleprops.hxx.
|
explicit |
Definition at line 709 of file oleprops.cxx.
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().
bool SfxOleSection::GetBoolValue | ( | bool & | rbValue, |
sal_Int32 | nPropId | ||
) | const |
Returns the value of a boolean property with the passed ID in rbValue.
Definition at line 745 of file oleprops.cxx.
References GetProperty().
Referenced by GetAnyValue().
bool SfxOleSection::GetDateValue | ( | css::util::Date & | rValue, |
sal_Int32 | nPropId | ||
) | const |
Returns the value of a date property with the passed ID in rValue.
Definition at line 780 of file oleprops.cxx.
References GetProperty(), and TIMESTAMP_INVALID_UTILDATE.
Referenced by GetAnyValue().
bool SfxOleSection::GetDoubleValue | ( | double & | rfValue, |
sal_Int32 | nPropId | ||
) | const |
Returns the value of a floating-point property with the passed ID in rfValue.
Definition at line 735 of file oleprops.cxx.
References GetProperty().
Referenced by GetAnyValue().
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.
Definition at line 765 of file oleprops.cxx.
References GetProperty(), and TIMESTAMP_INVALID_UTILDATETIME.
Referenced by GetAnyValue().
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().
bool SfxOleSection::GetInt32Value | ( | sal_Int32 & | rnValue, |
sal_Int32 | nPropId | ||
) | const |
Returns the value of a signed int32 property with the passed ID in rnValue.
Definition at line 725 of file oleprops.cxx.
References GetProperty().
Referenced by GetAnyValue().
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().
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.
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.
bool SfxOleSection::GetStringValue | ( | OUString & | rValue, |
sal_Int32 | nPropId | ||
) | const |
Returns the value of a string property with the passed ID in rValue.
Definition at line 755 of file oleprops.cxx.
References GetProperty().
Referenced by GetAnyValue().
|
overrideprivatevirtual |
Derived classes implement loading the object from the passed steam.
Implements SfxOleObjectBase.
Definition at line 939 of file oleprops.cxx.
References SvStream::good(), SfxOleObjectBase::LoadObject(), LoadProperty(), maCodePageProp, maDictProp, maPropMap, mbSupportsDict, mnStartPos, PROPID_CODEPAGE, PROPID_DICTIONARY, PROPTYPE_INT16, SvStream::ReadInt32(), SvStream::ReadUInt32(), rStrm, SeekToPropertyPos(), SfxOleDictionaryProperty::SetNameCount(), and SvStream::Tell().
|
overrideprivatevirtual |
Derived classes implement saving the object to the passed steam.
Implements SfxOleObjectBase.
Definition at line 995 of file oleprops.cxx.
References SfxOleDictionaryProperty::HasPropertyNames(), maCodePageProp, maDictProp, maPropMap, mnStartPos, rStrm, SaveProperty(), SvStream::Seek(), SvStream::SeekRel(), SfxOleTextEncoding::SetTextEncoding(), SvStream::Tell(), SvStream::TellEnd(), SvStream::WriteInt32(), and SvStream::WriteUInt32().
|
private |
Definition at line 1033 of file oleprops.cxx.
References maCodePageProp, maPropMap, PROPTYPE_BOOL, PROPTYPE_DATE, PROPTYPE_DOUBLE, PROPTYPE_FILETIME, PROPTYPE_INT32, PROPTYPE_STRING16, PROPTYPE_STRING8, SvStream::ReadInt32(), rStrm, and SfxOleObjectBase::SetError().
Referenced by ImplLoad().
|
private |
Definition at line 1072 of file oleprops.cxx.
References SfxOlePropertyBase::GetPropId(), SfxOlePropertyBase::GetPropType(), mnStartPos, rStrm, SfxOleObjectBase::SaveObject(), SvStream::Seek(), STREAM_SEEK_TO_END, SvStream::Tell(), SvStream::WriteInt32(), SvStream::WriteUChar(), and SvStream::WriteUInt32().
Referenced by ImplSave().
|
private |
Definition at line 1027 of file oleprops.cxx.
References checkSeek(), ERRCODE_NONE, SvStream::GetErrorCode(), mnStartPos, and rStrm.
Referenced by ImplLoad().
bool SfxOleSection::SetAnyValue | ( | sal_Int32 | nPropId, |
const css::uno::Any & | rValue | ||
) |
Inserts a property created from the passed any.
Definition at line 891 of file oleprops.cxx.
References SetBoolValue(), SetDateValue(), SetDoubleValue(), SetFileTimeValue(), SetInt32Value(), and SetStringValue().
Referenced by sfx2::SaveOlePropertySet().
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().
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().
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().
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().
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().
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().
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().
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().
bool SfxOleSection::SetStringValue | ( | sal_Int32 | nPropId, |
const OUString & | rValue | ||
) |
Inserts a string property with the passed value.
Definition at line 816 of file oleprops.cxx.
References maCodePageProp, and SetProperty().
Referenced by sfx2::SaveOlePropertySet(), and SetAnyValue().
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().
|
private |
All properties in this section, by identifier.
Definition at line 338 of file oleprops.hxx.
Referenced by ImplLoad(), ImplSave(), LoadProperty(), and SetStringValue().
|
private |
The codepage property.
Definition at line 339 of file oleprops.hxx.
Referenced by GetPropertyName(), ImplLoad(), ImplSave(), and SetPropertyName().
|
private |
Definition at line 337 of file oleprops.hxx.
Referenced by GetFreePropertyId(), GetProperty(), GetPropertyIds(), ImplLoad(), ImplSave(), LoadProperty(), and SetProperty().
|
private |
Start stream position of the section.
Definition at line 341 of file oleprops.hxx.
Referenced by ImplLoad().
|
private |
The dictionary property.
Definition at line 340 of file oleprops.hxx.
Referenced by ImplLoad(), ImplSave(), SaveProperty(), and SeekToPropertyPos().