30using ::com::sun::star::uno::Reference;
31using ::com::sun::star::uno::Sequence;
32using ::com::sun::star::uno::Any;
49 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
63 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
68 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
74 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
86 if( pWrappedProperty )
88 else if( xInnerPropertySet.is() )
89 xInnerPropertySet->setPropertyValue( rPropertyName, rValue );
92 SAL_WARN(
"chart2.tools",
"found no inner property set to map to");
95 catch(
const beans::UnknownPropertyException& )
99 catch(
const beans::PropertyVetoException& )
103 catch(
const lang::IllegalArgumentException& )
107 catch(
const lang::WrappedTargetException& )
111 catch(
const uno::RuntimeException& )
115 catch(
const uno::Exception&
ex )
118 TOOLS_WARN_EXCEPTION(
"chart2",
"invalid exception caught in WrappedPropertySet::setPropertyValue");
119 throw lang::WrappedTargetException(
ex.Message,
nullptr, anyEx );
131 if( pWrappedProperty )
133 else if( xInnerPropertySet.is() )
134 aRet = xInnerPropertySet->getPropertyValue( rPropertyName );
137 SAL_WARN(
"chart2.tools",
"found no inner property set to map to");
140 catch(
const beans::UnknownPropertyException& )
144 catch(
const lang::WrappedTargetException& )
148 catch(
const uno::RuntimeException& )
152 catch(
const uno::Exception&
ex )
155 TOOLS_WARN_EXCEPTION(
"chart2",
"invalid exception caught in WrappedPropertySet::setPropertyValue");
156 throw lang::WrappedTargetException(
ex.Message,
nullptr, anyEx );
165 if( xInnerPropertySet.is() )
168 if( pWrappedProperty )
169 xInnerPropertySet->addPropertyChangeListener( pWrappedProperty->
getInnerName(), xListener );
171 xInnerPropertySet->addPropertyChangeListener( rPropertyName, xListener );
177 if( xInnerPropertySet.is() )
180 if( pWrappedProperty )
181 xInnerPropertySet->removePropertyChangeListener( pWrappedProperty->
getInnerName(), aListener );
183 xInnerPropertySet->removePropertyChangeListener( rPropertyName, aListener );
189 if( xInnerPropertySet.is() )
192 if( pWrappedProperty )
193 xInnerPropertySet->addVetoableChangeListener( pWrappedProperty->
getInnerName(), aListener );
195 xInnerPropertySet->addVetoableChangeListener( rPropertyName, aListener );
201 if( xInnerPropertySet.is() )
204 if( pWrappedProperty )
205 xInnerPropertySet->removeVetoableChangeListener( pWrappedProperty->
getInnerName(), aListener );
207 xInnerPropertySet->removeVetoableChangeListener( rPropertyName, aListener );
214 bool bUnknownProperty =
false;
215 sal_Int32 nMinCount = std::min( rValueSeq.getLength(), rNameSeq.getLength() );
216 for(sal_Int32 nN=0; nN<nMinCount; nN++)
218 OUString aPropertyName( rNameSeq[nN] );
223 catch(
const beans::UnknownPropertyException& )
226 bUnknownProperty =
true;
230 OSL_ENSURE(!bUnknownProperty,
"unknown property");
237 if( rNameSeq.hasElements() )
239 aRetSeq.realloc( rNameSeq.getLength() );
240 auto pRetSeq = aRetSeq.getArray();
241 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
245 OUString aPropertyName( rNameSeq[nN] );
248 catch(
const beans::UnknownPropertyException& )
252 catch(
const lang::WrappedTargetException& )
262 OSL_FAIL(
"not implemented yet");
267 OSL_FAIL(
"not implemented yet");
272 OSL_FAIL(
"not implemented yet");
279 beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE );
282 if( xInnerPropertyState.is() )
285 if( pWrappedProperty )
288 aState = xInnerPropertyState->getPropertyState( rPropertyName );
303 return (*aFound).second.get();
310 if( rNameSeq.hasElements() )
312 aRetSeq.realloc( rNameSeq.getLength() );
313 auto pRetSeq = aRetSeq.getArray();
314 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
316 OUString aPropertyName( rNameSeq[nN] );
326 if( xInnerPropertyState.is() )
329 if( pWrappedProperty )
332 xInnerPropertyState->setPropertyToDefault( rPropertyName );
339 if( xInnerPropertyState.is() )
342 if( pWrappedProperty )
345 aRet = xInnerPropertyState->getPropertyDefault( rPropertyName );
354 for(beans::Property
const & prop : rPropSeq)
361 for(OUString
const & s : rNameSeq)
369 if( rNameSeq.hasElements() )
371 aRetSeq.realloc( rNameSeq.getLength() );
372 auto pRetSeq = aRetSeq.getArray();
373 for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
375 OUString aPropertyName( rNameSeq[nN] );
387 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
392 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
398 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
408 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
415 for (
auto & elem : aPropList)
421 OSL_FAIL(
"missing property in property list" );
423 else if(
p->find(
nHandle ) !=
p->end() )
426 OSL_FAIL(
"duplicate Wrapped property" );
432 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
438 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
virtual const css::uno::Sequence< css::beans::Property > & getPropertySequence()=0
give all the properties that should be visible to the outer side
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void SAL_CALL setPropertiesToDefault(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
virtual std::vector< std::unique_ptr< WrappedProperty > > createWrappedProperties()=0
give a list of all properties that need a special treatment; properties that are not in this list wil...
virtual void SAL_CALL setAllPropertiesToDefault() override
void clearWrappedPropertySet()
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
::cppu::IPropertyArrayHelper & getInfoHelper()
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
std::unique_ptr< tWrappedPropertyMap > m_pWrappedPropertyMap
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
std::unique_ptr<::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper
virtual ~WrappedPropertySet() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
SAL_DLLPRIVATE tWrappedPropertyMap & getWrappedPropertyMap()
const WrappedProperty * getWrappedProperty(const OUString &rOuterName)
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
SAL_DLLPRIVATE css::uno::Reference< css::beans::XPropertyState > getInnerPropertyState()
css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet()=0
virtual css::beans::PropertyState getPropertyState(const css::uno::Reference< css::beans::XPropertyState > &xInnerPropertyState) const
virtual css::uno::Any getPropertyDefault(const css::uno::Reference< css::beans::XPropertyState > &xInnerPropertyState) const
virtual css::uno::Any getPropertyValue(const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const
virtual void setPropertyToDefault(const css::uno::Reference< css::beans::XPropertyState > &xInnerPropertyState) const
virtual void setPropertyValue(const css::uno::Any &rOuterValue, const css::uno::Reference< css::beans::XPropertySet > &xInnerPropertySet) const
virtual OUString getInnerName() const
virtual sal_Int32 SAL_CALL getHandleByName(const ::rtl::OUString &rPropertyName)=0
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
#define SAL_WARN(area, stream)
std::map< sal_Int32, std::unique_ptr< const WrappedProperty > > tWrappedPropertyMap
OSQLColumns::const_iterator find(const OSQLColumns::const_iterator &first, const OSQLColumns::const_iterator &last, std::u16string_view _rVal, const ::comphelper::UStringMixEqual &_rCase)
Any SAL_CALL getCaughtException()