summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-11-29 15:49:38 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-30 09:28:00 +0100
commited5b0540613117cac0f85da9b270e734a763132d (patch)
treecf85df53e627a77434a464ef3982bfa517f233e6 /connectivity
parent20f56c937c44a9cbe3c05fa7c510feaf9d2341df (diff)
fix mysqlc test after Sequence::operator[] change
Change-Id: I247aeceaa4100295beec8107385d2ae28765dde8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126054 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 7e79b8c933516daed62382d0d60c34653ebedc4d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126094 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/qa/connectivity/mysql/mysql.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/connectivity/qa/connectivity/mysql/mysql.cxx b/connectivity/qa/connectivity/mysql/mysql.cxx
index 7a4267b5e95b..4b1a9a4e4f08 100644
--- a/connectivity/qa/connectivity/mysql/mysql.cxx
+++ b/connectivity/qa/connectivity/mysql/mysql.cxx
@@ -22,6 +22,7 @@
#include <com/sun/star/sdbc/XDriver.hpp>
#include <com/sun/star/util/DateTime.hpp>
+#include <comphelper/propertysequence.hxx>
#include <svtools/miscopt.hxx>
#include <osl/process.h>
@@ -101,16 +102,16 @@ void MysqlTestDriver::setUp()
CPPUNIT_ASSERT_MESSAGE("no mysqlc component!", m_xMysqlcComponent.is());
// set user name and password
- m_infos = Sequence<PropertyValue>{ 2 };
- m_infos[0].Name = OUString{ "user" };
sal_Int32 nPer = m_sUrl.indexOf("/");
- m_infos[0].Value = makeAny(m_sUrl.copy(0, nPer));
+ OUString sUsername = m_sUrl.copy(0, nPer);
m_sUrl = m_sUrl.copy(nPer + 1);
- m_infos[1].Name = OUString{ "password" };
sal_Int32 nAt = m_sUrl.indexOf("@");
- m_infos[1].Value = makeAny(m_sUrl.copy(0, nAt));
+ OUString sPassword = m_sUrl.copy(0, nAt);
m_sUrl = m_sUrl.copy(nAt + 1);
+ m_infos = comphelper::InitPropertySequence(
+ { { "user", makeAny(sUsername) }, { "password", makeAny(sPassword) } });
+
m_xDriver.set(m_xMysqlcComponent, UNO_QUERY);
if (!m_xDriver.is())
{