connectivity/qa/connectivity/mysql/mysql.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit ed5b0540613117cac0f85da9b270e734a763132d
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Nov 29 15:49:38 2021 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Nov 30 09:28:00 2021 +0100

    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 <[email protected]>
    (cherry picked from commit 7e79b8c933516daed62382d0d60c34653ebedc4d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126094
    Reviewed-by: Xisco Fauli <[email protected]>

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())
     {

Reply via email to