summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-23 02:38:18 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-02-23 18:02:00 +0100
commitf9632ab04288909c9ff4de56171c31acb7f2c573 (patch)
tree628c4bc6a351bccbed6e6cd7d03566d7c9e7e770 /connectivity
parentcaebcd5d12f8d2798f32f72fd0bcfdc12f9f2c4f (diff)
use init lists for property sequences
Change-Id: I8b3b2b839c37b584e1a4036e49af7ff2737ea7f6
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/dbtools.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index b385eb7ac7f4..f5d564c21906 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -68,6 +68,7 @@
#include <comphelper/interaction.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
+#include <comphelper/propertysequence.hxx>
#include <connectivity/conncleanup.hxx>
#include <connectivity/dbconversion.hxx>
#include <connectivity/dbexception.hxx>
@@ -410,11 +411,10 @@ SharedConnection lcl_connectRowSet(const Reference< XRowSet>& _rxRowSet, const R
xRowSetProps->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PASSWORD)) >>= sPwd;
if (!sUser.isEmpty())
{ // use user and pwd together with the url
- Sequence< PropertyValue> aInfo(2);
- aInfo.getArray()[0].Name = "user";
- aInfo.getArray()[0].Value <<= sUser;
- aInfo.getArray()[1].Name = "password";
- aInfo.getArray()[1].Value <<= sPwd;
+ auto aInfo(::comphelper::InitPropertySequence({
+ { "user", makeAny(sUser) },
+ { "password", makeAny(sPwd) }
+ }));
xPureConnection = xDriverManager->getConnectionWithInfo( sURL, aInfo );
}
else