LibreOffice Module filter (master) 1
|
represent an item of a FilterCache instance. More...
#include <cacheitem.hxx>
Public Member Functions | |
CacheItem () | |
creates an empty item. More... | |
void | update (const CacheItem &rUpdateItem) |
update only properties, which are given by the specified rItem. More... | |
bool | haveProps (o3tl::span< const css::beans::NamedValue > lProps) const |
check, if the given properties exist at this item. More... | |
bool | dontHaveProps (o3tl::span< const css::beans::NamedValue > lProps) const |
check, if the given properties don't exist at this item. More... | |
void | validateUINames (const OUString &sActLocale) |
because we know two UIName properties (a list with all locales and the value for the current locale only), we must be sure that the correspond together. More... | |
css::uno::Sequence< css::beans::PropertyValue > | getAsPackedPropertyValueList (bool bFinalized, bool bMandatory) const |
convert this structure to a seq< PropertyValue > and ignore all empty properties! More... | |
Public Member Functions inherited from comphelper::SequenceAsHashMap | |
SequenceAsHashMap () | |
SequenceAsHashMap (const css::uno::Any &aSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::uno::Any > &lSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::beans::PropertyValue > &lSource) | |
SequenceAsHashMap (const css::uno::Sequence< css::beans::NamedValue > &lSource) | |
void | operator<< (const css::uno::Any &aSource) |
void | operator<< (const css::uno::Sequence< css::uno::Any > &lSource) |
void | operator<< (const css::uno::Sequence< css::beans::PropertyValue > &lSource) |
void | operator<< (const css::uno::Sequence< css::beans::NamedValue > &lSource) |
void | operator>> (css::uno::Sequence< css::beans::PropertyValue > &lDestination) const |
void | operator>> (css::uno::Sequence< css::beans::NamedValue > &lDestination) const |
css::uno::Any | getAsConstAny (bool bAsPropertyValue) const |
css::uno::Sequence< css::beans::NamedValue > | getAsConstNamedValueList () const |
css::uno::Sequence< css::beans::PropertyValue > | getAsConstPropertyValueList () const |
TValueType | getUnpackedValueOrDefault (const OUString &sKey, const TValueType &aDefault) const |
css::uno::Any | getValue (const OUString &sKey) const |
bool | createItemIfMissing (const OUString &sKey, const TValueType &aValue) |
bool | match (const SequenceAsHashMap &rCheck) const |
void | update (const SequenceAsHashMap &rSource) |
css::uno::Any & | operator[] (const OUString &rKey) |
css::uno::Any & | operator[] (const OUStringAndHashCode &rKey) |
void | clear () |
size_t | size () const |
bool | empty () const |
iterator | begin () |
const_iterator | begin () const |
iterator | end () |
const_iterator | end () const |
iterator | find (const OUString &rKey) |
const_iterator | find (const OUString &rKey) const |
iterator | find (const OUStringAndHashCode &rKey) |
const_iterator | find (const OUStringAndHashCode &rKey) const |
iterator | erase (iterator it) |
size_t | erase (const OUString &rKey) |
Additional Inherited Members | |
Public Types inherited from comphelper::SequenceAsHashMap | |
typedef SequenceAsHashMapBase::iterator | iterator |
typedef SequenceAsHashMapBase::const_iterator | const_iterator |
represent an item of a FilterCache instance.
@descr This class is not threadsafe tp perform operations, which use many instances of this class! Synchronizations must be done outside.
Definition at line 39 of file cacheitem.hxx.
filter::config::CacheItem::CacheItem | ( | ) |
creates an empty item.
Definition at line 35 of file cacheitem.cxx.
bool filter::config::CacheItem::dontHaveProps | ( | o3tl::span< const css::beans::NamedValue > | lProps | ) | const |
check, if the given properties don't exist at this item.
@descr All properties are compared in its minimum. E.g: string lists => only the requested items are checked. Additional existing items are ignored.
lProps | contains all properties, which should not exist at this item. |
Definition at line 291 of file cacheitem.cxx.
References comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), and filter::config::isSubSet().
css::uno::Sequence< css::beans::PropertyValue > filter::config::CacheItem::getAsPackedPropertyValueList | ( | bool | bFinalized, |
bool | bMandatory | ||
) | const |
convert this structure to a seq< PropertyValue > and ignore all empty properties!
@descr Normally the converter routines of the base class SequenceAsHashMap do this job already. But it doesn't provide a "pack" mechanism to ignore properties with empty (means "void") values.
Definition at line 80 of file cacheitem.cxx.
References comphelper::SequenceAsHashMap::begin(), comphelper::SequenceAsHashMap::end(), gentoken::i, PROPNAME_FINALIZED, PROPNAME_MANDATORY, and comphelper::SequenceAsHashMap::size().
Referenced by filter::config::FilterCache::getItemWithStateProps().
bool filter::config::CacheItem::haveProps | ( | o3tl::span< const css::beans::NamedValue > | lProps | ) | const |
check, if the given properties exist at this item.
@descr All properties are compared in its minimum. E.g: string lists => only the requested items are checked. Additional existing items are ignored.
lProps | contains all properties, which must exist at this item. |
Definition at line 266 of file cacheitem.cxx.
References comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), and filter::config::isSubSet().
void filter::config::CacheItem::update | ( | const CacheItem & | rUpdateItem | ) |
update only properties, which are given by the specified rItem.
@descr Update means: - add new properties
rUpdateItem | another cache item, which contains some special properties, which should by used for updating this one. |
Definition at line 40 of file cacheitem.cxx.
void filter::config::CacheItem::validateUINames | ( | const OUString & | sActLocale | ) |
because we know two UIName properties (a list with all locales and the value for the current locale only), we must be sure that the correspond together.
sActLocale | must specify the current office locale. It's needed to address the UIName property inside the list of possible ones. |
Definition at line 47 of file cacheitem.cxx.
References comphelper::SequenceAsHashMap::empty(), comphelper::SequenceAsHashMap::end(), comphelper::SequenceAsHashMap::find(), comphelper::SequenceAsHashMap::getAsConstPropertyValueList(), PROPNAME_UINAME, and PROPNAME_UINAMES.
Referenced by filter::config::FilterCache::setItem().