36 std::vector<std::optional< osl::Guard< comphelper::SolarMutex > >> maGuardArray;
39 explicit AutoOGuardArray( sal_Int32 nNumElements );
41 std::optional< osl::Guard< comphelper::SolarMutex > > & operator[] ( sal_Int32 i ) {
return maGuardArray[
i]; }
46AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : maGuardArray(nNumElements)
88 maSlaveMap [ ++mnLastId ] =
new SlaveData ( pNewSet );
89 mxInfo->add ( pNewSet->mxInfo->maMap, mnLastId );
95 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
99 PropertyDataHash::const_iterator aIter =
mxInfo->maMap.find ( rPropertyName );
101 if( aIter ==
mxInfo->maMap.end())
102 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
104 if ( (*aIter).second->mnMapId == 0 )
115 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard2;
117 xMutexGuard2.emplace( pSlave->
mpMutex );
128 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
130 xMutexGuard.emplace(
mpMutex );
132 PropertyDataHash::const_iterator aIter =
mxInfo->maMap.find ( rPropertyName );
134 if( aIter ==
mxInfo->maMap.end())
135 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
138 if ( (*aIter).second->mnMapId == 0 )
149 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard2;
151 xMutexGuard2.emplace( pSlave->
mpMutex );
184 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
186 xMutexGuard.emplace(
mpMutex );
188 const sal_Int32
nCount = aPropertyNames.getLength();
190 if(
nCount != aValues.getLength() )
191 throw IllegalArgumentException();
198 const Any * pAny = aValues.getConstArray();
199 const OUString * pString = aPropertyNames.getConstArray();
200 PropertyDataHash::const_iterator aEnd =
mxInfo->maMap.end(), aIter;
207 AutoOGuardArray aOGuardArray(
nCount );
209 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pAny )
211 aIter =
mxInfo->maMap.find ( *pString );
215 if ( (*aIter).second->mnMapId == 0 )
224 aOGuardArray[
i].emplace( pSlave->
mxSlave->mpMutex );
226 pSlave->
mxSlave->_preSetValues();
229 pSlave->
mxSlave->_setSingleValue( *((*aIter).second->mpInfo), *pAny );
236 if( rSlave.second->IsInit() )
238 rSlave.second->mxSlave->_postSetValues();
239 rSlave.second->SetInit(
false );
247 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
249 xMutexGuard.emplace(
mpMutex );
251 const sal_Int32
nCount = aPropertyNames.getLength();
253 Sequence < Any > aValues (
nCount );
259 Any * pAny = aValues.getArray();
260 const OUString * pString = aPropertyNames.getConstArray();
261 PropertyDataHash::const_iterator aEnd =
mxInfo->maMap.end(), aIter;
268 AutoOGuardArray aOGuardArray(
nCount );
270 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pAny )
272 aIter =
mxInfo->maMap.find ( *pString );
276 if ( (*aIter).second->mnMapId == 0 )
285 aOGuardArray[
i].emplace( pSlave->
mxSlave->mpMutex );
287 pSlave->
mxSlave->_preGetValues();
290 pSlave->
mxSlave->_getSingleValue( *((*aIter).second->mpInfo), *pAny );
297 if( rSlave.second->IsInit() )
299 rSlave.second->mxSlave->_postSetValues();
300 rSlave.second->SetInit(
false );
325 PropertyDataHash::const_iterator aIter =
mxInfo->maMap.find( PropertyName );
326 if( aIter ==
mxInfo->maMap.end())
327 throw UnknownPropertyException( PropertyName,
static_cast< XPropertySet*
>(
this ) );
330 if ( (*aIter).second->mnMapId != 0 )
335 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
337 xMutexGuard.emplace( pSlave->
mpMutex );
340 return PropertyState_AMBIGUOUS_VALUE;
345 const sal_Int32
nCount = rPropertyNames.getLength();
347 Sequence< PropertyState > aStates(
nCount );
350 PropertyState * pState = aStates.getArray();
351 const OUString * pString = rPropertyNames.getConstArray();
352 PropertyDataHash::const_iterator aEnd =
mxInfo->maMap.end(), aIter;
354 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pState )
356 aIter =
mxInfo->maMap.find ( *pString );
358 throw UnknownPropertyException( *pString,
static_cast< XPropertySet*
>(
this ) );
361 if ( (*aIter).second->mnMapId != 0 )
372 if( rSlave.second->IsInit() )
374 rSlave.second->SetInit(
false );
383 PropertyDataHash::const_iterator aIter =
mxInfo->maMap.find ( rPropertyName );
385 if( aIter ==
mxInfo->maMap.end())
386 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
391 PropertyDataHash::const_iterator aIter =
mxInfo->maMap.find ( rPropertyName );
393 if( aIter ==
mxInfo->maMap.end())
394 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
virtual void _preSetValues()=0
SolarMutex *const mpMutex
virtual void _postGetValues()=0
virtual void _getSingleValue(const comphelper::PropertyInfo &rInfo, css::uno::Any &rValue)=0
virtual void _setSingleValue(const comphelper::PropertyInfo &rInfo, const css::uno::Any &rValue)=0
virtual void _preGetValues()=0
virtual void _postSetValues()=0
virtual void SAL_CALL firePropertiesChangeEvent(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
virtual void SAL_CALL removePropertiesChangeListener(const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void _preGetValues()=0
MasterPropertySet(comphelper::MasterPropertySetInfo *pInfo, SolarMutex *pMutex) noexcept
virtual void _setSingleValue(const comphelper::PropertyInfo &rInfo, const css::uno::Any &rValue)=0
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual void _getSingleValue(const comphelper::PropertyInfo &rInfo, css::uno::Any &rValue)=0
virtual ~MasterPropertySet() noexcept
void registerSlave(ChainablePropertySet *pNewSet) noexcept
virtual css::beans::PropertyState SAL_CALL getPropertyState(const OUString &PropertyName) override
SolarMutex *const mpMutex
virtual void SAL_CALL addPropertiesChangeListener(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Reference< css::beans::XPropertiesChangeListener > &xListener) override
virtual void SAL_CALL setPropertyToDefault(const OUString &PropertyName) override
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void _postGetValues()=0
virtual void _postSetValues()=0
virtual void SAL_CALL setPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames, const css::uno::Sequence< css::uno::Any > &aValues) override
virtual css::uno::Any SAL_CALL getPropertyDefault(const OUString &aPropertyName) override
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates(const css::uno::Sequence< OUString > &aPropertyName) override
rtl::Reference< MasterPropertySetInfo > mxInfo
virtual void _preSetValues()=0
virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyValues(const css::uno::Sequence< OUString > &aPropertyNames) override
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
std::map< sal_uInt8, comphelper::SlaveData * > maSlaveMap
SolarMutex, needed for VCL's Application::GetSolarMutex().
class SAL_NO_VTABLE XPropertySet
rtl::Reference< ChainablePropertySet > mxSlave