usingnamespace ::com::sun::star::uno; using ::com::sun::star::beans::XPropertySet; using ::com::sun::star::beans::XPropertySetInfo;
bool SinglePropertySetInfoCache::hasProperty( const Reference< XPropertySet >& rPropSet,
Reference< XPropertySetInfo >& rPropSetInfo )
{ if( !rPropSetInfo.is() )
rPropSetInfo = rPropSet->getPropertySetInfo();
Map::iterator aIter = m_Map.find( rPropSetInfo ); if( aIter != m_Map.end() )
{ return (*aIter).second;
} bool bRet = rPropSetInfo->hasPropertyByName( m_sName ); // Check whether the property set info is destroyed if it is assigned to a // weak reference only; if it is destroyed, then every instance of // getPropertySetInfo returns a new object; Such property set infos must not // be cached:
WeakReference < XPropertySetInfo > xWeakInfo( rPropSetInfo );
rPropSetInfo = nullptr;
rPropSetInfo = xWeakInfo; if( rPropSetInfo.is() )
{
m_Map.emplace(rPropSetInfo, bRet);
} return bRet;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.