41ChainablePropertySet::~ChainablePropertySet()
47Reference< XPropertySetInfo > SAL_CALL ChainablePropertySet::getPropertySetInfo( )
52void SAL_CALL ChainablePropertySet::setPropertyValue(
const OUString& rPropertyName,
const Any& rValue )
55 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
57 xMutexGuard.emplace( mpMutex );
59 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( rPropertyName );
61 if( aIter == mxInfo->maMap.end())
62 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
65 _setSingleValue( *((*aIter).second), rValue );
69Any SAL_CALL ChainablePropertySet::getPropertyValue(
const OUString& rPropertyName )
72 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
74 xMutexGuard.emplace( mpMutex );
76 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( rPropertyName );
78 if( aIter == mxInfo->maMap.end())
79 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
83 _getSingleValue( *((*aIter).second), aAny );
89void SAL_CALL ChainablePropertySet::addPropertyChangeListener(
const OUString&,
const Reference< XPropertyChangeListener >& )
94void SAL_CALL ChainablePropertySet::removePropertyChangeListener(
const OUString&,
const Reference< XPropertyChangeListener >& )
99void SAL_CALL ChainablePropertySet::addVetoableChangeListener(
const OUString&,
const Reference< XVetoableChangeListener >& )
104void SAL_CALL ChainablePropertySet::removeVetoableChangeListener(
const OUString&,
const Reference< XVetoableChangeListener >& )
110void SAL_CALL ChainablePropertySet::setPropertyValues(
const Sequence< OUString >& rPropertyNames,
const Sequence< Any >& rValues)
113 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
115 xMutexGuard.emplace( mpMutex );
117 const sal_Int32
nCount = rPropertyNames.getLength();
119 if(
nCount != rValues.getLength() )
120 throw IllegalArgumentException(
"lengths do not match",
static_cast<cppu::OWeakObject*
>(
this), -1);
127 const Any * pAny = rValues.getConstArray();
128 const OUString * pString = rPropertyNames.getConstArray();
129 PropertyInfoHash::const_iterator aEnd = mxInfo->maMap.end(), aIter;
131 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pAny )
133 aIter = mxInfo->maMap.find ( *pString );
137 _setSingleValue ( *((*aIter).second), *pAny );
143Sequence< Any > SAL_CALL ChainablePropertySet::getPropertyValues(
const Sequence< OUString >& rPropertyNames)
146 std::optional< osl::Guard< comphelper::SolarMutex > > xMutexGuard;
148 xMutexGuard.emplace( mpMutex );
150 const sal_Int32
nCount = rPropertyNames.getLength();
152 Sequence < Any > aValues (
nCount );
158 Any * pAny = aValues.getArray();
159 const OUString * pString = rPropertyNames.getConstArray();
160 PropertyInfoHash::const_iterator aEnd = mxInfo->maMap.end(), aIter;
162 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pAny )
164 aIter = mxInfo->maMap.find ( *pString );
168 _getSingleValue ( *((*aIter).second), *pAny );
176void SAL_CALL ChainablePropertySet::addPropertiesChangeListener(
const Sequence< OUString >&,
const Reference< XPropertiesChangeListener >& )
181void SAL_CALL ChainablePropertySet::removePropertiesChangeListener(
const Reference< XPropertiesChangeListener >& )
186void SAL_CALL ChainablePropertySet::firePropertiesChangeEvent(
const Sequence< OUString >&,
const Reference< XPropertiesChangeListener >& )
192PropertyState SAL_CALL ChainablePropertySet::getPropertyState(
const OUString& PropertyName )
194 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find( PropertyName );
195 if( aIter == mxInfo->maMap.end())
196 throw UnknownPropertyException( PropertyName,
static_cast< XPropertySet*
>(
this ) );
198 return PropertyState_AMBIGUOUS_VALUE;
201Sequence< PropertyState > SAL_CALL ChainablePropertySet::getPropertyStates(
const Sequence< OUString >& rPropertyNames )
203 const sal_Int32
nCount = rPropertyNames.getLength();
205 Sequence< PropertyState > aStates(
nCount );
208 PropertyState * pState = aStates.getArray();
209 const OUString * pString = rPropertyNames.getConstArray();
210 PropertyInfoHash::const_iterator aEnd = mxInfo->maMap.end(), aIter;
212 for ( sal_Int32
i = 0;
i <
nCount; ++
i, ++pString, ++pState )
214 aIter = mxInfo->maMap.find ( *pString );
216 throw UnknownPropertyException( *pString,
static_cast< XPropertySet*
>(
this ) );
222void SAL_CALL ChainablePropertySet::setPropertyToDefault(
const OUString& rPropertyName )
224 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( rPropertyName );
226 if( aIter == mxInfo->maMap.end())
227 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
230Any SAL_CALL ChainablePropertySet::getPropertyDefault(
const OUString& rPropertyName )
232 PropertyInfoHash::const_iterator aIter = mxInfo->maMap.find ( rPropertyName );
234 if( aIter == mxInfo->maMap.end())
235 throw UnknownPropertyException( rPropertyName,
static_cast< XPropertySet*
>(
this ) );
SolarMutex, needed for VCL's Application::GetSolarMutex().
class SAL_NO_VTABLE XPropertySet