summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-02-06 17:49:10 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-09 10:32:24 +0000
commit1cb7cc1f1df041e9bc4337f4352214a5779040cf (patch)
tree4755e80c61ed697c961fe10cbc449ce3986cfa07 /comphelper
parent29b92329005eb2f31d2b76eafaa1ffff67387b8e (diff)
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>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propmultiplex.cxx8
1 files changed, 3 insertions, 5 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;
}
}