summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--comphelper/source/property/propmultiplex.cxx8
-rw-r--r--include/comphelper/propmultiplex.hxx2
2 files changed, 4 insertions, 6 deletions
diff --git a/comphelper/source/property/propmultiplex.cxx b/comphelper/source/property/propmultiplex.cxx
index 4c044abcb2c8..4a50e8c283f6 100644
--- a/comphelper/source/property/propmultiplex.cxx
+++ b/comphelper/source/property/propmultiplex.cxx
@@ -104,9 +104,8 @@ void OPropertyChangeMultiplexer::dispose()
{
Reference< XPropertyChangeListener> xPreventDelete(this);
- const OUString* pProperties = m_aProperties.getConstArray();
- for (sal_Int32 i = 0; i < m_aProperties.getLength(); ++i, ++pProperties)
- m_xSet->removePropertyChangeListener(*pProperties, static_cast< XPropertyChangeListener*>(this));
+ for (const OUString& rProp : m_aProperties)
+ m_xSet->removePropertyChangeListener(rProp, static_cast< XPropertyChangeListener*>(this));
m_pListener->setAdapter(nullptr);
@@ -153,8 +152,7 @@ void OPropertyChangeMultiplexer::addProperty(const OUString& _sPropertyName)
if (m_xSet.is())
{
m_xSet->addPropertyChangeListener(_sPropertyName, static_cast< XPropertyChangeListener*>(this));
- m_aProperties.realloc(m_aProperties.getLength() + 1);
- m_aProperties.getArray()[m_aProperties.getLength()-1] = _sPropertyName;
+ m_aProperties.push_back(_sPropertyName);
m_bListening = true;
}
}
diff --git a/include/comphelper/propmultiplex.hxx b/include/comphelper/propmultiplex.hxx
index 15d9da6899bb..2bafa2411114 100644
--- a/include/comphelper/propmultiplex.hxx
+++ b/include/comphelper/propmultiplex.hxx
@@ -72,7 +72,7 @@ namespace comphelper
class COMPHELPER_DLLPUBLIC OPropertyChangeMultiplexer :public cppu::WeakImplHelper< css::beans::XPropertyChangeListener>
{
friend class OPropertyChangeListener;
- css::uno::Sequence< OUString > m_aProperties;
+ std::vector< OUString > m_aProperties;
css::uno::Reference< css::beans::XPropertySet> m_xSet;
OPropertyChangeListener* m_pListener;
sal_Int32 m_nLockCount;