sequence->vector in OPropertyChangeMultiplexer
Change-Id: I4daa06fe14971ae34e089620ba07818d998764f0 Reviewed-on: https://gerrit.libreoffice.org/22179 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
parent
29b9232900
commit
1cb7cc1f1d
@ -104,9 +104,8 @@ void OPropertyChangeMultiplexer::dispose()
|
|||||||
{
|
{
|
||||||
Reference< XPropertyChangeListener> xPreventDelete(this);
|
Reference< XPropertyChangeListener> xPreventDelete(this);
|
||||||
|
|
||||||
const OUString* pProperties = m_aProperties.getConstArray();
|
for (const OUString& rProp : m_aProperties)
|
||||||
for (sal_Int32 i = 0; i < m_aProperties.getLength(); ++i, ++pProperties)
|
m_xSet->removePropertyChangeListener(rProp, static_cast< XPropertyChangeListener*>(this));
|
||||||
m_xSet->removePropertyChangeListener(*pProperties, static_cast< XPropertyChangeListener*>(this));
|
|
||||||
|
|
||||||
m_pListener->setAdapter(nullptr);
|
m_pListener->setAdapter(nullptr);
|
||||||
|
|
||||||
@ -153,8 +152,7 @@ void OPropertyChangeMultiplexer::addProperty(const OUString& _sPropertyName)
|
|||||||
if (m_xSet.is())
|
if (m_xSet.is())
|
||||||
{
|
{
|
||||||
m_xSet->addPropertyChangeListener(_sPropertyName, static_cast< XPropertyChangeListener*>(this));
|
m_xSet->addPropertyChangeListener(_sPropertyName, static_cast< XPropertyChangeListener*>(this));
|
||||||
m_aProperties.realloc(m_aProperties.getLength() + 1);
|
m_aProperties.push_back(_sPropertyName);
|
||||||
m_aProperties.getArray()[m_aProperties.getLength()-1] = _sPropertyName;
|
|
||||||
m_bListening = true;
|
m_bListening = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ namespace comphelper
|
|||||||
class COMPHELPER_DLLPUBLIC OPropertyChangeMultiplexer :public cppu::WeakImplHelper< css::beans::XPropertyChangeListener>
|
class COMPHELPER_DLLPUBLIC OPropertyChangeMultiplexer :public cppu::WeakImplHelper< css::beans::XPropertyChangeListener>
|
||||||
{
|
{
|
||||||
friend class OPropertyChangeListener;
|
friend class OPropertyChangeListener;
|
||||||
css::uno::Sequence< OUString > m_aProperties;
|
std::vector< OUString > m_aProperties;
|
||||||
css::uno::Reference< css::beans::XPropertySet> m_xSet;
|
css::uno::Reference< css::beans::XPropertySet> m_xSet;
|
||||||
OPropertyChangeListener* m_pListener;
|
OPropertyChangeListener* m_pListener;
|
||||||
sal_Int32 m_nLockCount;
|
sal_Int32 m_nLockCount;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user