[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2023-10-19 Thread Stephan Bergmann (via logerrit)
 dbaccess/qa/extras/dialog-save.cxx |2 +-
 dbaccess/qa/extras/empty-stdlib-save.cxx   |2 +-
 dbaccess/qa/extras/nolib-save.cxx  |2 +-
 dbaccess/qa/unit/embeddeddb_performancetest.cxx|4 ++--
 dbaccess/source/core/api/FilteredContainer.cxx |8 
 dbaccess/source/core/api/KeySet.cxx|2 +-
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx |   10 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx   |2 +-
 dbaccess/source/core/dataaccess/datasource.cxx |2 +-
 dbaccess/source/core/misc/DatabaseDataProvider.cxx |2 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx|4 ++--
 dbaccess/source/core/recovery/storagetextstream.cxx|2 +-
 dbaccess/source/core/recovery/subcomponentrecovery.cxx |6 +++---
 dbaccess/source/filter/hsqldb/hsqlimport.cxx   |2 +-
 dbaccess/source/filter/hsqldb/parseschema.cxx  |6 +++---
 dbaccess/source/filter/xml/xmlExport.cxx   |2 +-
 dbaccess/source/ui/app/AppControllerGen.cxx|2 +-
 dbaccess/source/ui/dlg/dbadmin.cxx |2 +-
 dbaccess/source/ui/dlg/dbfindex.cxx|2 +-
 dbaccess/source/ui/dlg/queryfilter.cxx |4 ++--
 dbaccess/source/ui/dlg/tablespage.cxx  |2 +-
 dbaccess/source/ui/misc/indexcollection.cxx|2 +-
 dbaccess/source/ui/querydesign/querycontroller.cxx |4 ++--
 23 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 7eda35a36c8837c620722e5c26c90324ae9b48e9
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:10 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 19 18:49:53 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: dbaccess

Change-Id: I5f92e390ef57ae8f2aba43782c11ca5ee31dba93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158187
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 4b07eebff459..04c12b1c5e8b 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -56,7 +56,7 @@ void DialogSaveTest::test()
 uno::Reference< script::XStorageBasedLibraryContainer > 
xStorDlgLib(xDocScr->getDialogLibraries());
 CPPUNIT_ASSERT(xStorDlgLib.is());
 uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, 
UNO_QUERY_THROW);
-static constexpr OUStringLiteral sStandard(u"Standard");
+static constexpr OUString sStandard(u"Standard"_ustr);
 xBasLib->loadLibrary(sStandard);
 CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
 // the whole point of this test is to test the "save" operation
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx 
b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 41074d909c89..5c3b5d028d8c 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -54,7 +54,7 @@ void DialogSaveTest::test()
 uno::Reference< script::XStorageBasedLibraryContainer > 
xStorDlgLib(xDocScr->getDialogLibraries());
 CPPUNIT_ASSERT(xStorDlgLib.is());
 uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, 
UNO_QUERY_THROW);
-static constexpr OUStringLiteral sStandard(u"Standard");
+static constexpr OUString sStandard(u"Standard"_ustr);
 xBasLib->loadLibrary(sStandard);
 xDlgLib->loadLibrary(sStandard);
 CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
diff --git a/dbaccess/qa/extras/nolib-save.cxx 
b/dbaccess/qa/extras/nolib-save.cxx
index 054ad9a369ca..614c4f03794a 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -54,7 +54,7 @@ void DialogSaveTest::test()
 uno::Reference< script::XStorageBasedLibraryContainer > 
xStorDlgLib(xDocScr->getDialogLibraries());
 CPPUNIT_ASSERT(xStorDlgLib.is());
 uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, 
UNO_QUERY_THROW);
-static constexpr OUStringLiteral sStandard(u"Standard");
+static constexpr OUString sStandard(u"Standard"_ustr);
 xBasLib->loadLibrary(sStandard);
 xDlgLib->loadLibrary(sStandard);
 CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard));
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx 
b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 921fc9977d98..184ef0831ad1 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -82,7 +82,7 @@ class EmbeddedDBPerformanceTest
 : public DBTestBase
 {
 private:
-static constexpr OUStringLiteral our_sEnableTestEnvVar = u"DBA_PERFTEST";
+static constexpr OUString our_sEnableTestEnvVar = u"DBA_PERFTEST"_ustr;
 
 
 // We store the results and print them

[Libreoffice-commits] core.git: dbaccess/qa include/test sc/qa sw/qa test/source vcl/qa xmlsecurity/qa

2022-11-23 Thread Xisco Fauli (via logerrit)
 dbaccess/qa/unit/dbtest_base.cxx|   16 --
 dbaccess/qa/unit/firebird.cxx   |4 +--
 dbaccess/qa/unit/hsql_binary_import.cxx |5 ++--
 dbaccess/qa/unit/hsqldb.cxx |4 +--
 dbaccess/qa/unit/tdf119625.cxx  |5 ++--
 dbaccess/qa/unit/tdf126268.cxx  |5 ++--
 include/test/unoapi_test.hxx|2 +
 sc/qa/extras/scddelinkobj.cxx   |   35 ---
 sc/qa/extras/scddelinksobj.cxx  |9 ++--
 sw/qa/extras/uiwriter/uiwriter.cxx  |   15 -
 sw/qa/uibase/uiview/uiview.cxx  |   12 +++---
 test/source/unoapi_test.cxx |7 ++
 vcl/qa/cppunit/filter/ipdf/ipdf.cxx |   19 
 xmlsecurity/qa/unit/signing/signing.cxx |   36 +++-
 14 files changed, 57 insertions(+), 117 deletions(-)

New commits:
commit 6c3cebd5aaec641807f5efed814fc5d1c64df149
Author: Xisco Fauli 
AuthorDate: Wed Nov 23 11:51:57 2022 +0100
Commit: Xisco Fauli 
CommitDate: Wed Nov 23 14:43:56 2022 +0100

UnoApiTest: factor out createTempFile

Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index 8e7d2ab433c9..88da4b469742 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -30,8 +30,6 @@ class DBTestBase
 public:
 DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
 
-utl::TempFileNamed createTempCopy(std::u16string_view pathname);
-
 uno::Reference getDocumentForUrl(OUString const & 
url);
 
 uno::Reference< XConnection >
@@ -39,20 +37,6 @@ public:
 uno::Reference< XOfficeDatabaseDocument > const & xDocument);
 };
 
-utl::TempFileNamed DBTestBase::createTempCopy(std::u16string_view pathname) {
-OUString url = createFileURL(pathname);
-utl::TempFileNamed tmp;
-tmp.EnableKillingFile();
-auto const e = osl::File::copy(url, tmp.GetURL());
-CPPUNIT_ASSERT_EQUAL_MESSAGE(
-(OString(
-"<" + OUStringToOString(url, RTL_TEXTENCODING_UTF8) + "> -> <"
-+ OUStringToOString(tmp.GetURL(), RTL_TEXTENCODING_UTF8) + ">")
- .getStr()),
-osl::FileBase::E_None, e);
-return tmp;
-}
-
 uno::Reference DBTestBase::getDocumentForUrl(OUString 
const & url) {
 mxComponent = loadFromDesktop(url);
 uno::Reference< XOfficeDatabaseDocument > xDocument(mxComponent, 
UNO_QUERY_THROW);
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index 076144e1b054..8eaf39430e96 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -43,9 +43,9 @@ public:
  */
 void FirebirdTest::testEmptyDBConnection()
 {
-auto const tmp = createTempCopy(u"firebird_empty.odb");
+createTempCopy(u"firebird_empty.odb");
 uno::Reference< XOfficeDatabaseDocument > xDocument =
-getDocumentForUrl(tmp.GetURL());
+getDocumentForUrl(maTempFile.GetURL());
 
 getConnectionForDocument(xDocument);
 
diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx 
b/dbaccess/qa/unit/hsql_binary_import.cxx
index fb9185a82b4c..569463e7e4ef 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -46,8 +46,9 @@ void HsqlBinaryImportTest::testBinaryImport()
 }
 
 // the migration requires the file to be writable
-utl::TempFileNamed const 
temp(createTempCopy(u"hsqldb_migration_test.odb"));
-uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
+createTempCopy(u"hsqldb_migration_test.odb");
+uno::Reference const xDocument
+= getDocumentForUrl(maTempFile.GetURL());
 
 uno::Reference xConnection = 
getConnectionForDocument(xDocument);
 // at this point migration is already done
diff --git a/dbaccess/qa/unit/hsqldb.cxx b/dbaccess/qa/unit/hsqldb.cxx
index 7d792b3c26a8..eb553eac756e 100644
--- a/dbaccess/qa/unit/hsqldb.cxx
+++ b/dbaccess/qa/unit/hsqldb.cxx
@@ -32,8 +32,8 @@ public:
  */
 void HSQLDBTest::testEmptyDBConnection()
 {
-auto const file = createTempCopy(u"hsqldb_empty.odb");
-uno::Reference xDocument = 
getDocumentForUrl(file.GetURL());
+createTempCopy(u"hsqldb_empty.odb");
+uno::Reference xDocument = 
getDocumentForUrl(maTempFile.GetURL());
 
 getConnectionForDocument(xDocument);
 }
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 7486f9f44fe2..ba0c7b2ce345 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -66,8 +66,9 @@ void Tdf119625Test::testTime()
 }
 
 // the migration requires the file to be writable
-utl::TempFileNamed const temp(createTempCopy(u"tdf119625.odb"));
-uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
+createTempCopy(u"tdf119625.odb");
+uno::

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2022-04-14 Thread Noel Grandin (via logerrit)
 dbaccess/qa/extras/hsql_schema_import.cxx  |   16 +++---
 dbaccess/source/filter/hsqldb/createparser.cxx |   60 -
 dbaccess/source/filter/hsqldb/createparser.hxx |4 -
 dbaccess/source/filter/hsqldb/utils.cxx|   12 ++---
 dbaccess/source/filter/hsqldb/utils.hxx|2 
 5 files changed, 48 insertions(+), 46 deletions(-)

New commits:
commit 590323f4235e5ec3de2dc6dee28a4f03288ac6d7
Author: Noel Grandin 
AuthorDate: Thu Apr 14 12:19:57 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 14 16:00:47 2022 +0200

use more string_view in dbaccess

Change-Id: I256ffe22fa060be6a6fc32e73d845879d71a187d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133007
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx 
b/dbaccess/qa/extras/hsql_schema_import.cxx
index 6d714ae9a8ae..f5f34d38b69a 100644
--- a/dbaccess/qa/extras/hsql_schema_import.cxx
+++ b/dbaccess/qa/extras/hsql_schema_import.cxx
@@ -62,7 +62,7 @@ public:
 void HsqlSchemaImportTest::testIntegerPrimaryKeyNotNull()
 {
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse("CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY)");
+aCreateParser.parse(u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY)");
 
 CPPUNIT_ASSERT_EQUAL(OUString{ "\"myTable\"" }, 
aCreateParser.getTableName());
 const auto& columns = aCreateParser.getColumnDef();
@@ -79,7 +79,7 @@ void HsqlSchemaImportTest::testVarcharWithParam()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
 "VARCHAR(50))");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -101,7 +101,7 @@ void HsqlSchemaImportTest::testVarcharWithoutParam()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
 "VARCHAR)");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -116,7 +116,7 @@ void HsqlSchemaImportTest::testNumericWithTwoParam()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"Betrag\" "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"Betrag\" "
 "NUMERIC(8,2))");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -137,7 +137,7 @@ void HsqlSchemaImportTest::testIntegerAutoincremental()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY 
GENERATED "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY 
GENERATED "
 "BY DEFAULT AS IDENTITY(START WITH 0), \"myText\" VARCHAR(50))");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -157,7 +157,7 @@ void HsqlSchemaImportTest::testTimestampWithParam()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
 "TIMESTAMP(0))");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -179,7 +179,7 @@ void HsqlSchemaImportTest::testDefaultValueNow()
 {
 FbCreateStmtParser aCreateParser;
 aCreateParser.parse(
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myDate\" "
+u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myDate\" "
 "TIMESTAMP DEFAULT NOW)");
 
 const auto& columns = aCreateParser.getColumnDef();
@@ -194,7 +194,7 @@ void HsqlSchemaImportTest::testDefaultValueNow()
 void HsqlSchemaImportTest::testEvilNullColumnName()
 {
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse("CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY, "
+aCreateParser.parse(u"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY, "
 "\"myEvilNOT NULLName\" "
 "VARCHAR(20))");
 
diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx 
b/dbaccess/source/filter/hsqldb/createparser.cxx
index c62640e8bc3f..03952655dfd8 100644
--- a/dbaccess/source/filter/hsqldb/createparser.cxx
+++ b/dbaccess/source/filter/hsqldb/createparser.cxx
@@ -23,6 +23,7 @@
 #include "createparser.hxx"
 #include "utils.hxx"
 #include 
+#include 
 
 using namespace ::comphelper;
 using namespace css::sdbc;
@@ -31,16 +32,17 @@ namespace
 {
 /// Returns substring of sSql from the first occurrence of '(' until the
 /// last 

[Libreoffice-commits] core.git: dbaccess/qa

2022-03-05 Thread Luboš Luňák (via logerrit)
 dbaccess/qa/extras/dialog-save.cxx   |6 --
 dbaccess/qa/extras/empty-stdlib-save.cxx |6 --
 dbaccess/qa/extras/nolib-save.cxx|6 --
 3 files changed, 18 deletions(-)

New commits:
commit 7ac19fbce8a35f559eebb879cd0f232bfc95e703
Author: Luboš Luňák 
AuthorDate: Sat Mar 5 10:16:10 2022 +0100
Commit: Luboš Luňák 
CommitDate: Sat Mar 5 23:53:53 2022 +0100

remove a workaround that appears to be no longer necessary

Presumably whatever the locking problem was, it's got fixed
meanwhile.

Change-Id: I7bbd6299a501396f53ed2e8ccaf7d5893744512b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131047
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index ff4f612dc869..212127d48ea9 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -49,12 +49,6 @@ DialogSaveTest::DialogSaveTest()
 
 void DialogSaveTest::test()
 {
-// UnoApiTest::setUp (via InitVCL) puts each test under a locked 
SolarMutex,
-// but at least the below xDocCloseable->close call could lead to a 
deadlock
-// then, and it looks like none of the code here requires the SolarMutex to
-// be locked anyway:
-SolarMutexReleaser rel;
-
 const OUString 
aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testDialogSave.odb"));
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx 
b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 2ffbccaa6131..440fc19d4945 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -47,12 +47,6 @@ DialogSaveTest::DialogSaveTest()
 
 void DialogSaveTest::test()
 {
-// UnoApiTest::setUp (via InitVCL) puts each test under a locked 
SolarMutex,
-// but at least the below xDocCloseable->close call could lead to a 
deadlock
-// then, and it looks like none of the code here requires the SolarMutex to
-// be locked anyway:
-SolarMutexReleaser rel;
-
 const OUString 
aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testEmptyStdlibSave.odb"));
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);
diff --git a/dbaccess/qa/extras/nolib-save.cxx 
b/dbaccess/qa/extras/nolib-save.cxx
index f64e0fbece10..59fee844fd78 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -47,12 +47,6 @@ DialogSaveTest::DialogSaveTest()
 
 void DialogSaveTest::test()
 {
-// UnoApiTest::setUp (via InitVCL) puts each test under a locked 
SolarMutex,
-// but at least the below xDocCloseable->close call could lead to a 
deadlock
-// then, and it looks like none of the code here requires the SolarMutex to
-// be locked anyway:
-SolarMutexReleaser rel;
-
 const OUString 
aFileName(m_directories.getURLFromWorkdir(u"CppunitTest/testNolibSave.odb"));
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);


[Libreoffice-commits] core.git: dbaccess/qa sccomp/qa

2022-02-28 Thread pragat-pandya (via logerrit)
 dbaccess/qa/extras/rowsetclones.cxx |3 +--
 dbaccess/qa/unit/dbtest_base.cxx|4 +---
 sccomp/qa/unit/SwarmSolverTest.cxx  |   10 --
 3 files changed, 2 insertions(+), 15 deletions(-)

New commits:
commit 73ef2f6f615b88ef25366f9073c5fb3db5e76687
Author: pragat-pandya 
AuthorDate: Sun Feb 6 16:50:05 2022 +0530
Commit: Mike Kaganski 
CommitDate: Mon Feb 28 22:21:28 2022 +0100

tdf#139734 removing redundant asserts after MacrosTest::loadFromDesktop

Change-Id: I89ffa387464ce7cc43c1884b031d6fade5b85078
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129581
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/dbaccess/qa/extras/rowsetclones.cxx 
b/dbaccess/qa/extras/rowsetclones.cxx
index 21a30636961b..d83d160ca132 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -51,8 +51,7 @@ void RowSetClones::test()
 const OUString 
sFilePath(m_directories.getURLFromWorkdir(u"CppunitTest/RowSetClones.odb"));
 
 uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath));
-uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY);
-CPPUNIT_ASSERT(xDocument.is());
+uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, 
UNO_QUERY_THROW);
 
 uno::Reference< XDataSource > xDataSource = xDocument->getDataSource();
 CPPUNIT_ASSERT(xDataSource.is());
diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index c7992288cdbd..b5a3bd31cf90 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -67,9 +67,7 @@ uno::Reference< XOfficeDatabaseDocument >
 
 uno::Reference DBTestBase::getDocumentForUrl(OUString 
const & url) {
 uno::Reference< lang::XComponent > xComponent (loadFromDesktop(url));
-uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY);
-CPPUNIT_ASSERT(xDocument.is());
-
+uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, 
UNO_QUERY_THROW);
 return xDocument;
 }
 
diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx 
b/sccomp/qa/unit/SwarmSolverTest.cxx
index 030822b9cdb4..966f9c673fc5 100644
--- a/sccomp/qa/unit/SwarmSolverTest.cxx
+++ b/sccomp/qa/unit/SwarmSolverTest.cxx
@@ -60,8 +60,6 @@ void SwarmSolverTest::testUnconstrained()
 createFileURL(u"Simple.ods", aFileURL);
 mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDocument->getSheets(), 
uno::UNO_QUERY_THROW);
 uno::Reference xSheet(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);
@@ -109,8 +107,6 @@ void SwarmSolverTest::testVariableBounded()
 createFileURL(u"Simple.ods", aFileURL);
 mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDocument->getSheets(), 
uno::UNO_QUERY_THROW);
 uno::Reference xSheet(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);
@@ -160,8 +156,6 @@ void SwarmSolverTest::testVariableConstrained()
 createFileURL(u"Simple.ods", aFileURL);
 mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDocument->getSheets(), 
uno::UNO_QUERY_THROW);
 uno::Reference xSheet(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);
@@ -214,8 +208,6 @@ void SwarmSolverTest::testTwoVariables()
 createFileURL(u"TwoVariables.ods", aFileURL);
 mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDocument->getSheets(), 
uno::UNO_QUERY_THROW);
 uno::Reference xSheet(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);
@@ -272,8 +264,6 @@ void SwarmSolverTest::testMultipleVariables()
 createFileURL(u"MultiVariable.ods", aFileURL);
 mxComponent = loadFromDesktop(aFileURL);
 
-CPPUNIT_ASSERT_MESSAGE("Component not loaded", mxComponent.is());
-
 uno::Reference xDocument(mxComponent, 
uno::UNO_QUERY_THROW);
 uno::Reference xIndex(xDocument->getSheets(), 
uno::UNO_QUERY_THROW);
 uno::Reference xSheet(xIndex->getByIndex(0), 
uno::UNO_QUERY_THROW);


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2021-10-29 Thread Mike Kaganski (via logerrit)
 dbaccess/qa/extras/dialog-save.cxx   |3 
 dbaccess/qa/extras/empty-stdlib-save.cxx |3 
 dbaccess/qa/extras/nolib-save.cxx|3 
 dbaccess/source/core/api/FilteredContainer.cxx   |   15 +---
 dbaccess/source/core/api/KeySet.cxx  |3 
 dbaccess/source/core/dataaccess/ContentHelper.cxx|   25 +++
 dbaccess/source/core/dataaccess/ModelImpl.cxx|9 --
 dbaccess/source/core/dataaccess/connection.cxx   |5 -
 dbaccess/source/core/dataaccess/databasedocument.cxx |   23 ++
 dbaccess/source/core/dataaccess/datasource.cxx   |   34 +
 dbaccess/source/core/dataaccess/documentcontainer.cxx|7 --
 dbaccess/source/core/dataaccess/documentdefinition.cxx   |   16 ++--
 dbaccess/source/core/dataaccess/intercept.cxx|   25 +++
 dbaccess/source/core/misc/DatabaseDataProvider.cxx   |5 -
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx |4 -
 dbaccess/source/filter/xml/xmlDataSourceSetting.cxx  |2 
 dbaccess/source/filter/xml/xmlExport.cxx |   15 ++--
 dbaccess/source/ui/app/AppController.cxx |   13 ++-
 dbaccess/source/ui/app/AppControllerGen.cxx  |7 +-
 dbaccess/source/ui/browser/formadapter.cxx   |3 
 dbaccess/source/ui/browser/sbagrid.cxx   |   16 +---
 dbaccess/source/ui/control/dbtreelistbox.cxx |9 +-
 dbaccess/source/ui/dlg/ConnectionHelper.cxx  |6 -
 dbaccess/source/ui/dlg/paramdialog.cxx   |2 
 dbaccess/source/ui/dlg/queryfilter.cxx   |   52 ---
 dbaccess/source/ui/dlg/tablespage.cxx|5 -
 dbaccess/source/ui/misc/TokenWriter.cxx  |3 
 dbaccess/source/ui/misc/WCopyTable.cxx   |9 +-
 dbaccess/source/ui/misc/databaseobjectview.cxx   |   19 +
 dbaccess/source/ui/misc/linkeddocuments.cxx  |   34 -
 dbaccess/source/ui/misc/singledoccontroller.cxx  |6 +
 dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx  |6 -
 dbaccess/source/ui/querydesign/TableFieldDescription.cxx |5 -
 dbaccess/source/ui/querydesign/TableWindowAccess.cxx |3 
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx|6 -
 dbaccess/source/ui/querydesign/querycontroller.cxx   |8 +-
 dbaccess/source/ui/uno/textconnectionsettings_uno.cxx|   13 ++-
 37 files changed, 185 insertions(+), 237 deletions(-)

New commits:
commit 3412c0f091c54da74ea6964062b9be302e126fe9
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 08:14:44 2021 +0300
Commit: Mike Kaganski 
CommitDate: Fri Oct 29 13:22:00 2021 +0200

Prepare for removal of non-const operator[] from Sequence in dbaccess

Change-Id: Iddb96d39a512ef68827ecf89f3b5650950f88096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124357
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 1eb4720cbcd1..ff4f612dc869 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -92,8 +92,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequence args(1);
-args[0] <<= aFileName;
+uno::Sequence args{ uno::Any(aFileName) };
 Reference 
xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package",
 args), UNO_QUERY_THROW);
 Reference< beans::XPropertySet > 
xPS(xHNA->getByHierarchicalName("Dialogs/Standard/Dialog1.xml"), 
UNO_QUERY_THROW);
 sal_Int64 nSize = 0;
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx 
b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 9339d3c4307e..2ffbccaa6131 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -106,8 +106,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequence args(1);
-args[0] <<= aFileName;
+uno::Sequence args{ uno::Any(aFileName) };
 Reference 
xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package",
 args), UNO_QUERY_THROW);
 CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard"));
 CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard"));
diff --git a/dbaccess/qa/extras/nolib-save.cxx 
b/dbaccess/qa/extras/nolib-save.cxx
index f441b608b31e..f64e0fbece10 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -96,8 +96,7 @@ void DialogSaveTest::test()
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
 {
-uno::Sequenc

[Libreoffice-commits] core.git: dbaccess/qa

2021-06-10 Thread Caolán McNamara (via logerrit)
 dev/null |binary
 1 file changed

New commits:
commit eee3b63561a9f1a8ed3d05e9e7a060344878ffd4
Author: Caolán McNamara 
AuthorDate: Thu Jun 10 12:00:27 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jun 10 15:26:53 2021 +0200

drop unused dbaccess/qa/unit/data/firebird_integer_le.odb

Change-Id: Ic8ab7db1a0b2fd3425caf4714d26207ea2c35db8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116979
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/dbaccess/qa/unit/data/firebird_integer_le.odb 
b/dbaccess/qa/unit/data/firebird_integer_le.odb
deleted file mode 100644
index da2ec1499198..
Binary files a/dbaccess/qa/unit/data/firebird_integer_le.odb and /dev/null 
differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2021-05-25 Thread Noel Grandin (via logerrit)
 dbaccess/qa/extras/macros-test.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 4632f935951584826d18f04939cf6c809fd370cc
Author: Noel Grandin 
AuthorDate: Tue May 25 10:56:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue May 25 11:38:02 2021 +0200

fix leak in CppunitTest_dbaccess_macros_test

Change-Id: I722ea80688f19cc7f5d60cf3fa08f42dc6b35a16
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116090
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index 6e165ac640ff..dee5919c3463 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -9,6 +9,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -37,7 +38,8 @@ void DBAccessTest::test()
 OUString aFileName;
 createFileURL(u"testdb.odb", aFileName);
 uno::Reference xComponent = loadFromDesktop(aFileName);
-xComponent->dispose();
+uno::Reference xDocCloseable(xComponent, 
UNO_QUERY_THROW);
+xDocCloseable->close(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2020-08-03 Thread Stephan Bergmann (via logerrit)
 dbaccess/qa/unit/hsqldb.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c379994973dd730c0ee2fdc8854a06b202f9f150
Author: Stephan Bergmann 
AuthorDate: Mon Aug 3 14:49:32 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Aug 3 16:42:04 2020 +0200

Make test operate on copy of .odb file

For whatever reason, CppunitTest_dbaccess_hsqldb_test had recently started 
to
modify binary dbaccess/qa/unit/data/hsqldb_empty.odb in-place.

Change-Id: I07b5185ddf4b809ef1e1f977c5ab1c34e2e7f18a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/12
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/unit/hsqldb.cxx b/dbaccess/qa/unit/hsqldb.cxx
index 5af5dff89fb5..e9b0b6bbf9f3 100644
--- a/dbaccess/qa/unit/hsqldb.cxx
+++ b/dbaccess/qa/unit/hsqldb.cxx
@@ -33,8 +33,9 @@ public:
  */
 void HSQLDBTest::testEmptyDBConnection()
 {
+auto const file = createTempCopy("hsqldb_empty.odb");
 uno::Reference< XOfficeDatabaseDocument > xDocument =
-getDocumentForFileName("hsqldb_empty.odb");
+getDocumentForUrl(file.GetURL());
 
 getConnectionForDocument(xDocument);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2020-06-30 Thread Stephan Bergmann (via logerrit)
 dbaccess/qa/unit/tdf119625.cxx |5 ++---
 dbaccess/qa/unit/tdf126268.cxx |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx   |2 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx|4 ++--
 dbaccess/source/core/recovery/storagetextstream.cxx|2 +-
 dbaccess/source/core/recovery/subcomponentrecovery.cxx |4 ++--
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx  |2 +-
 dbaccess/source/ui/querydesign/QueryDesignView.cxx |4 ++--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx  |2 +-
 9 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit 4dfa47b25c82899028f439394ce63843ea60f5dc
Author: Stephan Bergmann 
AuthorDate: Tue Jun 30 23:04:07 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jul 1 07:08:29 2020 +0200

Upcoming improved loplugin:staticanonymous -> redundantstatic: dbaccess

Change-Id: I49932a9d89d2933bebd313d3f1f64af84f0e52cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97552
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 5486a476f166..5d0ec008ff7a 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -52,9 +52,8 @@ struct expect_t
the level we are testing, this test will have to allow for or set
the destination timezone.
  */
-static const expect_t expect[]
-= { { 0, 15, 10, 10 }, { 1, 23, 30, 30 }, { 2, 5, 0, 0 },  { 3, 4, 30, 0 },
-{ 4, 3, 15, 10 },  { 5, 5, 0, 0 },{ 6, 3, 22, 22 } };
+const expect_t expect[] = { { 0, 15, 10, 10 }, { 1, 23, 30, 30 }, { 2, 5, 0, 0 
},  { 3, 4, 30, 0 },
+{ 4, 3, 15, 10 },  { 5, 5, 0, 0 },{ 6, 3, 22, 
22 } };
 
 void Tdf119625Test::testTime()
 {
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 426edee37f0c..90039af825de 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -44,7 +44,7 @@ struct expect_t
 };
 }
 
-static const expect_t expect[] = {
+const expect_t expect[] = {
 { 1, "0.00" },   { 2, "25.00" },  { 3, "26.00" }, { 4, "30.4" },  { 5, 
"45.8" },
 { 6, "-25.00" }, { 7, "-26.00" }, { 8, "-30.4" }, { 9, "-45.8" },
 };
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 6811ae332e84..4eac4796982b 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -316,7 +316,7 @@ namespace
 }
 }
 
-static const char sPictures[] = "Pictures";
+const char sPictures[] = "Pictures";
 
 // base documents seem to have a different behaviour to other documents, the
 // root storage contents at least seem to be re-used over different saves, 
thus if there is a
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx 
b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 280789ff8a84..ab5947d91261 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -86,9 +86,9 @@ namespace dbaccess
 return true;
 }
 
-static const char sRecoveryDataSubStorageName[] = "recovery";
+const char sRecoveryDataSubStorageName[] = "recovery";
 
-static const char sObjectMapStreamName[] = "storage-component-map.ini";
+const char sObjectMapStreamName[] = "storage-component-map.ini";
 
 void lcl_writeObjectMap_throw( const Reference & 
i_rContext, const Reference< XStorage >& i_rStorage,
 const MapStringToCompDesc& i_mapStorageToCompDesc )
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx 
b/dbaccess/source/core/recovery/storagetextstream.cxx
index 142615f005c2..6ea4ef005320 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -36,7 +36,7 @@ namespace dbaccess
 Reference< XTextOutputStream2 >  xTextOutput;
 };
 
-static const char sLineFeed[] = "\n";
+const char sLineFeed[] = "\n";
 
 // StorageTextOutputStream
 StorageTextOutputStream::StorageTextOutputStream(   const 
Reference& i_rContext,
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx 
b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 55f3f98a250e..ab16ee9e2c04 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -160,8 +160,8 @@ namespace dbaccess
 return xCommandProcessor;
 }
 
-static const char sSettingsStreamName[] = "settings.xml";
-static const char sCurrentQueryDesignName[] = 
"ooo:current-query-design";
+const char sSettingsStreamName[] = "settings.xml";
+const char sCurrentQueryDesignName[] = "ooo:current-query-design";
 }
 
 namespace {
diff --git a/dbacces

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2020-06-03 Thread Stephan Bergmann (via logerrit)
 dbaccess/qa/extras/hsql_schema_import.cxx   |   66 +---
 dbaccess/qa/extras/macros-test.cxx  |3 
 dbaccess/qa/unit/hsql_binary_import.cxx |6 -
 dbaccess/qa/unit/tdf119625.cxx  |7 -
 dbaccess/qa/unit/tdf126268.cxx  |4 
 dbaccess/source/ui/app/AppController.cxx|5 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx |   12 --
 dbaccess/source/ui/misc/WCopyTable.cxx  |3 
 dbaccess/source/ui/misc/WTypeSelect.cxx |3 
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx |3 
 dbaccess/source/ui/tabledesign/TableController.cxx  |3 
 dbaccess/source/ui/uno/ColumnPeer.cxx   |3 
 12 files changed, 43 insertions(+), 75 deletions(-)

New commits:
commit 868b0763ac47f765cb48c277897274a595b831d0
Author: Stephan Bergmann 
AuthorDate: Wed Jun 3 09:20:59 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 3 11:40:43 2020 +0200

Upcoming loplugin:elidestringvar: dbaccess

Change-Id: I5dc074a250ee169812f3ffd0cc4e598972ab87dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95396
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx 
b/dbaccess/qa/extras/hsql_schema_import.cxx
index 89ee74ce03aa..6d714ae9a8ae 100644
--- a/dbaccess/qa/extras/hsql_schema_import.cxx
+++ b/dbaccess/qa/extras/hsql_schema_import.cxx
@@ -61,10 +61,8 @@ public:
 
 void HsqlSchemaImportTest::testIntegerPrimaryKeyNotNull()
 {
-const OUString sql{ "CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY)" };
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse("CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT 
NULL PRIMARY KEY)");
 
 CPPUNIT_ASSERT_EQUAL(OUString{ "\"myTable\"" }, 
aCreateParser.getTableName());
 const auto& columns = aCreateParser.getColumnDef();
@@ -79,13 +77,10 @@ void HsqlSchemaImportTest::testIntegerPrimaryKeyNotNull()
 
 void HsqlSchemaImportTest::testVarcharWithParam()
 {
-const OUString sql{
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
-"VARCHAR(50))"
-};
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse(
+"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
+"VARCHAR(50))");
 
 const auto& columns = aCreateParser.getColumnDef();
 CPPUNIT_ASSERT_EQUAL(2_z, columns.size());
@@ -104,13 +99,10 @@ void HsqlSchemaImportTest::testVarcharWithParam()
  **/
 void HsqlSchemaImportTest::testVarcharWithoutParam()
 {
-const OUString sql{
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
-"VARCHAR)"
-};
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse(
+"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
+"VARCHAR)");
 
 const auto& columns = aCreateParser.getColumnDef();
 CPPUNIT_ASSERT_EQUAL(2_z, columns.size());
@@ -122,13 +114,10 @@ void HsqlSchemaImportTest::testVarcharWithoutParam()
 
 void HsqlSchemaImportTest::testNumericWithTwoParam()
 {
-const OUString sql{
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"Betrag\" "
-"NUMERIC(8,2))"
-};
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse(
+"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"Betrag\" "
+"NUMERIC(8,2))");
 
 const auto& columns = aCreateParser.getColumnDef();
 CPPUNIT_ASSERT_EQUAL(2_z, columns.size());
@@ -146,13 +135,10 @@ void HsqlSchemaImportTest::testNumericWithTwoParam()
 
 void HsqlSchemaImportTest::testIntegerAutoincremental()
 {
-const OUString sql{
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY 
GENERATED "
-"BY DEFAULT AS IDENTITY(START WITH 0), \"myText\" VARCHAR(50))"
-};
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse(
+"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY 
GENERATED "
+"BY DEFAULT AS IDENTITY(START WITH 0), \"myText\" VARCHAR(50))");
 
 const auto& columns = aCreateParser.getColumnDef();
 const auto column = columns.at(0);
@@ -169,13 +155,10 @@ void HsqlSchemaImportTest::testIntegerAutoincremental()
  */
 void HsqlSchemaImportTest::testTimestampWithParam()
 {
-const OUString sql{
-"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL PRIMARY KEY, 
\"myText\" "
-"TIMESTAMP(0))"
-};
-
 FbCreateStmtParser aCreateParser;
-aCreateParser.parse(sql);
+aCreateParser.parse(
+"CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT N

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2020-04-06 Thread Noel Grandin (via logerrit)
 dbaccess/qa/unit/hsql_binary_import.cxx |1 -
 dbaccess/qa/unit/tdf119625.cxx  |1 -
 dbaccess/qa/unit/tdf126268.cxx  |1 -
 dbaccess/source/core/api/CacheSet.cxx   |3 ---
 dbaccess/source/core/api/KeySet.cxx |6 --
 dbaccess/source/core/misc/DatabaseDataProvider.cxx  |2 --
 dbaccess/source/filter/xml/xmlfilter.cxx|1 -
 dbaccess/source/ui/app/AppDetailPageHelper.cxx  |1 -
 dbaccess/source/ui/app/AppIconControl.cxx   |2 +-
 dbaccess/source/ui/browser/unodatbr.cxx |   10 +-
 dbaccess/source/ui/dlg/queryorder.cxx   |2 --
 dbaccess/source/ui/querydesign/QueryTableView.cxx   |1 -
 dbaccess/source/ui/querydesign/TableConnectionData.cxx  |1 -
 dbaccess/source/ui/querydesign/querycontainerwindow.cxx |3 ++-
 14 files changed, 4 insertions(+), 31 deletions(-)

New commits:
commit 1a26e950ab844f566701cecf32ca812e2e28a8cd
Author: Noel Grandin 
AuthorDate: Sun Apr 5 21:33:59 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Apr 6 10:24:58 2020 +0200

loplugin:unusedvariableplus in dbaccess

Change-Id: Id2c2416443b2c9d6d516513ee543542e9681f69a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91728
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx 
b/dbaccess/qa/unit/hsql_binary_import.cxx
index 604c2e0e0560..fbf12f929019 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -32,7 +32,6 @@ public:
 void HsqlBinaryImportTest::setUp()
 {
 DBTestBase::setUp();
-SvtMiscOptions aMiscOptions;
 osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ 
"1" }.pData);
 }
 
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index 339c2cf163a2..8431c5426e90 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -33,7 +33,6 @@ public:
 void Tdf119625Test::setUp()
 {
 DBTestBase::setUp();
-SvtMiscOptions aMiscOptions;
 osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ 
"1" }.pData);
 }
 
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 2f24cbbda813..b0719936f588 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -32,7 +32,6 @@ public:
 void Tdf126268Test::setUp()
 {
 DBTestBase::setUp();
-SvtMiscOptions aMiscOptions;
 osl_setEnvironment(OUString{ "DBACCESS_HSQL_MIGRATION" }.pData, OUString{ 
"1" }.pData);
 }
 
diff --git a/dbaccess/source/core/api/CacheSet.cxx 
b/dbaccess/source/core/api/CacheSet.cxx
index a1c5430ac343..b8877358e604 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -317,9 +317,6 @@ void OCacheSet::deleteRow(const ORowSetRow& _rDeleteRow 
,const connectivity::OSQ
 OUStringBuffer aSql("DELETE FROM " + m_aComposedTableName + " WHERE ");
 
 // use keys and indexes for exact positioning
-// first the keys
-const Reference xPrimaryKeyColumns = 
getPrimaryKeyColumns_throw(xSet);
-// second the indexes
 Reference xIndexSup(_xTable,UNO_QUERY);
 Reference xIndexes;
 if(xIndexSup.is())
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index f7a3c4ed7847..d50d9e850080 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -451,10 +451,6 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow 
,const ORowSetRow& _rOrigi
 OUString sParam(" = ?");
 
 // use keys and indexes for exact positioning
-// first the keys
-Reference xKeyColumns = getKeyColumns();
-
-// second the indexes
 Reference xIndexSup(_xTable,UNO_QUERY);
 Reference xIndexes;
 if ( xIndexSup.is() )
@@ -843,8 +839,6 @@ void OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const 
connectivity::OSQLTa
 static const char aAnd[] = " AND ";
 
 // use keys and indexes for exact positioning
-Reference xKeyColumns = getKeyColumns();
-// second the indexes
 Reference xIndexSup(_xTable,UNO_QUERY);
 Reference xIndexes;
 if ( xIndexSup.is() )
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx 
b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 9c423950daba..b5179e57b32f 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -79,8 +79,6 @@ DatabaseDataProvider::DatabaseDataProvider(uno::Reference< 
uno::XComponentContex
 
 void SAL_CALL DatabaseDataProvider::disposing()
 {
-lang::EventObject aEvt(static_cast(this));
-
 m_aParameterManager.dispose();   // (to free any references it may have to 
me)
 m_aFilterManager.dispose();  // (dito)
 
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx 
b/dbaccess/so

[Libreoffice-commits] core.git: dbaccess/qa

2020-03-17 Thread Gabor Kelemen (via logerrit)
 dbaccess/qa/extras/dialog-save.cxx  |   16 +---
 dbaccess/qa/extras/empty-stdlib-save.cxx|   17 +
 dbaccess/qa/extras/macros-test.cxx  |   10 --
 dbaccess/qa/extras/nolib-save.cxx   |   17 +
 dbaccess/qa/extras/rowsetclones.cxx |   11 ---
 dbaccess/qa/unit/dbaccess-dialogs-test.cxx  |3 ---
 dbaccess/qa/unit/embeddeddb_performancetest.cxx |4 
 dbaccess/qa/unit/firebird-regression.cxx|2 --
 dbaccess/qa/unit/firebird.cxx   |2 --
 dbaccess/qa/unit/hsql_binary_import.cxx |7 ---
 dbaccess/qa/unit/hsqldb.cxx |5 -
 dbaccess/qa/unit/tdf119625.cxx  |7 ---
 dbaccess/qa/unit/tdf126268.cxx  |7 ---
 13 files changed, 3 insertions(+), 105 deletions(-)

New commits:
commit aa5d3e08c63d128943c92258071c327741df0667
Author: Gabor Kelemen 
AuthorDate: Fri Mar 13 21:22:12 2020 +0100
Commit: Miklos Vajna 
CommitDate: Tue Mar 17 13:39:07 2020 +0100

tdf#42949 Fix IWYU warnings in dbaccess/qa/*

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Id3467819bb659e3adb8f9bc6ff27497634d87946
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90482
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index f3d1524eefce..a336a66e31e4 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -8,12 +8,8 @@
  */
 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -22,18 +18,8 @@
 #include 
 #include 
 #include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx 
b/dbaccess/qa/extras/empty-stdlib-save.cxx
index 3ca43b87a0fe..cce32ed08885 100644
--- a/dbaccess/qa/extras/empty-stdlib-save.cxx
+++ b/dbaccess/qa/extras/empty-stdlib-save.cxx
@@ -8,31 +8,16 @@
  */
 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index 300c42967287..d5b7538f9fc5 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -9,16 +9,6 @@
 
 #include 
 #include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/dbaccess/qa/extras/nolib-save.cxx 
b/dbaccess/qa/extras/nolib-save.cxx
index edc42869d4e9..b42171ce2676 100644
--- a/dbaccess/qa/extras/nolib-save.cxx
+++ b/dbaccess/qa/extras/nolib-save.cxx
@@ -8,31 +8,16 @@
  */
 
 #include 
-#include 
 #include 
-#include 
-#include 
-#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/dbaccess/qa/extras/rowsetclones.cxx 
b/dbaccess/qa/extras/rowsetclones.cxx
index aabb80acc0fa..f62314205be3 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -8,12 +8,8 @@
  */
 
 #include 
-#include 
 #include 
-#include 
-#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -24,13 +20,6 @@
 #include 
 #include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::beans;
diff --git a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx 
b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
index e1156b0edf4d..49eff86ecd9a 100644
--- a/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
+++ b/dbaccess/qa/unit/dbaccess-dialogs-test.cxx
@@ -9,9 +9,6 @@
 
 #include 
 #include 
-#include 
-#include 
-#include 
 #include 
 
 using namespace ::com::sun::star;
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx 
b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 28d8417c1223..0517a9fd170c 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -10,7 +10,6 @@
 #include "dbtest_base.cxx"
 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -19,16 +18,13 @@
 
 #include 
 #include 
-#include 
 #incl

[Libreoffice-commits] core.git: dbaccess/qa

2019-09-02 Thread Stephan Bergmann (via logerrit)
 dbaccess/qa/unit/data/dbaccess-dialogs-test.txt |4 
 1 file changed, 4 deletions(-)

New commits:
commit a73f7af5b3448c728dd52e1eebcf71b8c8861db4
Author: Stephan Bergmann 
AuthorDate: Mon Sep 2 20:15:15 2019 +0200
Commit: Stephan Bergmann 
CommitDate: Mon Sep 2 21:07:34 2019 +0200

Adapt CppunitTest_dbaccess_dialogs_test to .ui file removal

...in 0e944350e92810adfcf080ae1d98ad7bc4bd578d "[API CHANGE] remove
MacroMigrationWizard"

Change-Id: Id57a74b779b74125223f471fe067cb5f3b92987c
Reviewed-on: https://gerrit.libreoffice.org/78416
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/unit/data/dbaccess-dialogs-test.txt 
b/dbaccess/qa/unit/data/dbaccess-dialogs-test.txt
index bcf728a0f006..f6957953e7a7 100644
--- a/dbaccess/qa/unit/data/dbaccess-dialogs-test.txt
+++ b/dbaccess/qa/unit/data/dbaccess-dialogs-test.txt
@@ -61,10 +61,6 @@ dbaccess/ui/applycolpage.ui
 dbaccess/ui/copytablepage.ui
 dbaccess/ui/namematchingpage.ui
 dbaccess/ui/typeselectpage.ui
-dbaccess/ui/preparepage.ui
-dbaccess/ui/backuppage.ui
-dbaccess/ui/migratepage.ui
-dbaccess/ui/summarypage.ui
 dbaccess/ui/specialsettingspage.ui
 dbaccess/ui/generatedvaluespage.ui
 dbaccess/ui/ldapconnectionpage.ui
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2019-08-29 Thread Julien Nabet (via logerrit)
 dbaccess/qa/unit/hsql_binary_import.cxx|6 ++
 dbaccess/qa/unit/tdf119625.cxx |7 +++
 dbaccess/qa/unit/tdf126268.cxx |7 +++
 dbaccess/source/core/dataaccess/datasource.cxx |5 +
 dbaccess/source/core/misc/dsntypes.cxx |7 ++-
 5 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit 2252aba08121566e834dc530f31339e15bd94dec
Author: Julien Nabet 
AuthorDate: Wed Aug 28 22:13:13 2019 +0200
Commit: Julien Nabet 
CommitDate: Thu Aug 29 20:54:47 2019 +0200

tdf#127180: Propose migration + Firebird by default only in experimental

See:

http://document-foundation-mail-archive.969070.n3.nabble.com/About-putting-back-Firebird-experimental-td4265392.html#a4265519

Change-Id: I651baa78d345ce56e8d38d56aba096d04a225c5c
Reviewed-on: https://gerrit.libreoffice.org/78240
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx 
b/dbaccess/qa/unit/hsql_binary_import.cxx
index 2c1c332629cb..5b0249a9497f 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -45,6 +45,10 @@ void HsqlBinaryImportTest::setUp()
 
 void HsqlBinaryImportTest::testBinaryImport()
 {
+SvtMiscOptions aMiscOptions;
+bool oldValue = aMiscOptions.IsExperimentalMode();
+
+aMiscOptions.SetExperimentalMode(true);
 // the migration requires the file to be writable
 utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
 uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
@@ -87,6 +91,8 @@ void HsqlBinaryImportTest::testBinaryImport()
 CPPUNIT_ASSERT_EQUAL(sal_Int16{ 1998 }, date.Year);
 
 closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
+if (!oldValue)
+aMiscOptions.SetExperimentalMode(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(HsqlBinaryImportTest);
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index d38e85bb75a3..e1bb46b087f7 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -63,6 +63,11 @@ static const expect_t expect[]
 
 void Tdf119625Test::testTime()
 {
+SvtMiscOptions aMiscOptions;
+bool oldValue = aMiscOptions.IsExperimentalMode();
+
+aMiscOptions.SetExperimentalMode(true);
+
 // the migration requires the file to be writable
 utl::TempFile const temp(createTempCopy("tdf119625.odb"));
 uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
@@ -106,6 +111,8 @@ void Tdf119625Test::testTime()
 CPPUNIT_ASSERT(!xRes->next());
 
 closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
+if (!oldValue)
+aMiscOptions.SetExperimentalMode(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Tdf119625Test);
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index ffbe6361a231..9d41b95809aa 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -56,6 +56,11 @@ static const expect_t expect[] = {
 
 void Tdf126268Test::testNumbers()
 {
+SvtMiscOptions aMiscOptions;
+bool oldValue = aMiscOptions.IsExperimentalMode();
+
+aMiscOptions.SetExperimentalMode(true);
+
 // the migration requires the file to be writable
 utl::TempFile const temp(createTempCopy("tdf126268.odb"));
 uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
@@ -80,6 +85,8 @@ void Tdf126268Test::testNumbers()
 CPPUNIT_ASSERT(!xRes->next());
 
 closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
+if (!oldValue)
+aMiscOptions.SetExperimentalMode(false);
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Tdf126268Test);
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx 
b/dbaccess/source/core/dataaccess/datasource.cxx
index e01583da6266..edad6f160f7d 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -63,6 +63,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -615,6 +616,10 @@ Reference< XConnection > 
ODatabaseSource::buildLowLevelConnection(const OUString
 //ignore when we don't have a model. E.g. Mailmerge, data sources, 
fields...
 bIgnoreMigration = true;
 }
+SvtMiscOptions aMiscOptions;
+
+if (!aMiscOptions.IsExperimentalMode())
+bIgnoreMigration = true;
 
 if(!bIgnoreMigration && m_pImpl->m_sConnectURL == "sdbc:embedded:hsqldb")
 {
diff --git a/dbaccess/source/core/misc/dsntypes.cxx 
b/dbaccess/source/core/misc/dsntypes.cxx
index 7332ccffa196..86aedb385245 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -286,7 +287,11 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const 
OUString& _sURL )
 
 OUString ODsnTypeCollection::getEmbeddedDatabase()
 {
-return "sdbc:emb

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2019-07-19 Thread Noel Grandin (via logerrit)
 dbaccess/qa/extras/rowsetclones.cxx   |2 +-
 dbaccess/source/core/api/KeySet.cxx   |2 +-
 dbaccess/source/core/api/tablecontainer.cxx   |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx  |3 +--
 dbaccess/source/core/dataaccess/documentcontainer.cxx |2 +-
 dbaccess/source/core/dataaccess/documentdefinition.cxx|   14 +-
 dbaccess/source/core/dataaccess/documenteventexecutor.cxx |2 +-
 dbaccess/source/ext/macromigration/docinteraction.cxx |2 +-
 dbaccess/source/filter/xml/dbloader2.cxx  |2 +-
 dbaccess/source/ui/app/AppController.cxx  |6 +++---
 dbaccess/source/ui/app/AppControllerDnD.cxx   |2 +-
 dbaccess/source/ui/app/AppView.cxx|4 ++--
 dbaccess/source/ui/browser/brwctrlr.cxx   |6 +++---
 dbaccess/source/ui/browser/brwview.cxx|4 ++--
 dbaccess/source/ui/browser/dataview.cxx   |2 +-
 dbaccess/source/ui/browser/genericcontroller.cxx  |2 +-
 dbaccess/source/ui/browser/sbagrid.cxx|   12 ++--
 dbaccess/source/ui/browser/unodatbr.cxx   |7 +++
 dbaccess/source/ui/dlg/ConnectionHelper.cxx   |4 ++--
 dbaccess/source/ui/dlg/DbAdminImpl.cxx|2 +-
 dbaccess/source/ui/misc/UITools.cxx   |2 +-
 dbaccess/source/ui/misc/WCopyTable.cxx|2 +-
 dbaccess/source/ui/misc/datasourceconnector.cxx   |8 +++-
 dbaccess/source/ui/querydesign/querycontroller.cxx|2 +-
 dbaccess/source/ui/tabledesign/TableController.cxx|2 +-
 dbaccess/source/ui/uno/copytablewizard.cxx|2 +-
 26 files changed, 46 insertions(+), 54 deletions(-)

New commits:
commit 1003f9f14d83eac9c08a219fa7d8140550de02c7
Author: Noel Grandin 
AuthorDate: Fri Jul 19 09:52:48 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jul 19 11:53:24 2019 +0200

loplugin:referencecasting in dbaccess

Change-Id: If44176f85f460afca92cfa77b3cc1f7107a41690
Reviewed-on: https://gerrit.libreoffice.org/75938
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/extras/rowsetclones.cxx 
b/dbaccess/qa/extras/rowsetclones.cxx
index 433bf328864b..aabb80acc0fa 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -82,7 +82,7 @@ void RowSetClones::test()
 rowSetProperties->setPropertyValue("ActiveConnection", Any(xConnection));
 
 xRowSet->execute();
-uno::Reference< XResultSet > xResultSet(xRowSet, UNO_QUERY);
+uno::Reference< XResultSet > xResultSet = xRowSet;
 CPPUNIT_ASSERT(xResultSet.is());
 // always starts at BeforeFirst position
 CPPUNIT_ASSERT(xResultSet->isBeforeFirst());
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 80771e48b76f..137f1e3b4104 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -291,7 +291,7 @@ void OKeySet::construct(const Reference< XResultSet>& 
_xDriverSet, const OUStrin
 Reference 
xAnalyzer(xFactory->createInstance(SERVICE_NAME_SINGLESELECTQUERYCOMPOSER),UNO_QUERY);
 xAnalyzer->setElementaryQuery(xSourceComposer->getElementaryQuery());
 Reference xTabSup(xAnalyzer,uno::UNO_QUERY);
-Reference xSelectTables(xTabSup->getTables(),uno::UNO_QUERY);
+Reference xSelectTables = xTabSup->getTables();
 const Sequence< OUString> aSeq = xSelectTables->getElementNames();
 if ( aSeq.getLength() > 1 ) // special handling for join
 {
diff --git a/dbaccess/source/core/api/tablecontainer.cxx 
b/dbaccess/source/core/api/tablecontainer.cxx
index 01336a5e3327..f0adf088281f 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -147,7 +147,7 @@ void lcl_createDefintionObject(const OUString& _rName
 else
 {
 // set as folder
-_xTableDefinition.set( TableDefinition::createWithName( 
::comphelper::getProcessComponentContext(), _rName ), UNO_QUERY);
+_xTableDefinition = TableDefinition::createWithName( 
::comphelper::getProcessComponentContext(), _rName );
 
_xTableDefinitions->insertByName(_rName,makeAny(_xTableDefinition));
 }
 Reference 
xColumnsSupplier(_xTableDefinition,UNO_QUERY);
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 24db02fc6be0..b0904f969b58 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1598,9 +1598,8 @@ void ODatabaseDocument::WriteThroughComponent( const 
Reference< XOutputStream >&
 xSaxWriter->setOutputStream( xOutputStream );
 
 // prepare arguments (prepend doc ha

[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2019-07-12 Thread Xisco Fauli (via logerrit)
 dbaccess/qa/unit/data/tdf126268.odb  |binary
 dbaccess/qa/unit/tdf126268.cxx   |6 --
 dbaccess/source/filter/hsqldb/rowinputbinary.cxx |   20 +++-
 3 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 25277bcb727994072239c9c2549c271fdd62150e
Author: Xisco Fauli 
AuthorDate: Fri Jul 12 12:59:22 2019 +0200
Commit: Xisco Faulí 
CommitDate: Fri Jul 12 19:17:41 2019 +0200

tdf#126268: Add support for negative decimal

basically reintroduce the code deleted in
2e26ef34bf1a2e5d1293e45cf3b1415d9514b056
and check at the right place the sign values

Change-Id: Idf613a3a087b428d1f85abe9b43342fb67538a63
Reviewed-on: https://gerrit.libreoffice.org/75488
Tested-by: Jenkins
Reviewed-by: Xisco Faulí 

diff --git a/dbaccess/qa/unit/data/tdf126268.odb 
b/dbaccess/qa/unit/data/tdf126268.odb
index ffd00c140791..434a4238ba3b 100644
Binary files a/dbaccess/qa/unit/data/tdf126268.odb and 
b/dbaccess/qa/unit/data/tdf126268.odb differ
diff --git a/dbaccess/qa/unit/tdf126268.cxx b/dbaccess/qa/unit/tdf126268.cxx
index 967d5e671ff0..ffbe6361a231 100644
--- a/dbaccess/qa/unit/tdf126268.cxx
+++ b/dbaccess/qa/unit/tdf126268.cxx
@@ -49,8 +49,10 @@ struct expect_t
 OUString number;
 };
 
-static const expect_t expect[]
-= { { 1, "0.00" }, { 2, "25.00" }, { 3, "26.00" }, { 4, "30.4" }, { 5, 
"45.8" } };
+static const expect_t expect[] = {
+{ 1, "0.00" },   { 2, "25.00" },  { 3, "26.00" }, { 4, "30.4" },  { 5, 
"45.8" },
+{ 6, "-25.00" }, { 7, "-26.00" }, { 8, "-30.4" }, { 9, "-45.8" },
+};
 
 void Tdf126268Test::testNumbers()
 {
diff --git a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx 
b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
index a12ab0513abf..b75c8574dccf 100644
--- a/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
+++ b/dbaccess/source/filter/hsqldb/rowinputbinary.cxx
@@ -89,9 +89,27 @@ OUString lcl_double_dabble(const std::vector& 
bytes)
 OUString lcl_makeStringFromBigint(const std::vector& bytes)
 {
 std::vector aBytes{ bytes };
+OUStringBuffer sRet;
 
+// two's complement
+if ((bytes[0] & 0x80) != 0)
+{
+sRet.append("-");
+for (auto& byte : aBytes)
+byte = ~byte;
+// add 1 to byte array
+// FIXME e.g. 1 valid ?
+for (size_t i = aBytes.size() - 1; i != 0; --i)
+{
+aBytes[i] += 1;
+if (aBytes[i] != 0)
+break;
+}
+}
 // convert binary to BCD
-return lcl_double_dabble(aBytes);
+OUString sNum = lcl_double_dabble(aBytes);
+sRet.append(sNum);
+return sRet.makeStringAndClear();
 }
 
 OUString lcl_putDot(const OUString& sNum, sal_Int32 nScale)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/qa

2019-04-22 Thread Andrea Gelmini (via logerrit)
 dbaccess/qa/complex/dbaccess/DatabaseDocument.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7bbd921ad32a72033b28a3b82d032ccea13cf300
Author: Andrea Gelmini 
AuthorDate: Wed Apr 10 16:04:40 2019 +
Commit: Julien Nabet 
CommitDate: Mon Apr 22 09:03:47 2019 +0200

Fix typo

Change-Id: I8874705fcd5f59b4ac177bc0bd586ac4bf5a36bd
Reviewed-on: https://gerrit.libreoffice.org/71053
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java 
b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index e51f1be6e46c..5bd28053b77c 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -543,7 +543,7 @@ public class DatabaseDocument extends TestCase implements 
com.sun.star.document.
  *  Well, I do not really have a good term for this... The point is, 
database documents are in real
  *  only *one* aspect of a more complex thing. The second aspect is a data 
source. Both, in some sense,
  *  just represent different views on the same thing. For a given 
database, there's at each time at most
- *  one data source, and at most one database document. Both have a 
independent life time, and are
+ *  one data source, and at most one database document. Both have an 
independent life time, and are
  *  created when needed.
  *  In particular, a document can be closed (this is what happens when the 
last UI window displaying
  *  this document is closed), and then dies. Now when the other "view", 
the data source, still exists,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/qa

2019-03-03 Thread Libreoffice Gerrit user
 dbaccess/qa/complex/dbaccess/DatabaseDocument.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e7f71c7ab675f238b61d7f28e7f79f51c7e19801
Author: Andrea Gelmini 
AuthorDate: Fri Mar 1 18:25:34 2019 +
Commit: Jens Carl 
CommitDate: Mon Mar 4 05:57:33 2019 +0100

Fix typo

Change-Id: I343b4a34b98351a3573d99fb65a624ff57d88cad
Reviewed-on: https://gerrit.libreoffice.org/68658
Tested-by: Jenkins
Reviewed-by: Jens Carl 

diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java 
b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index a89bc13c5248..e51f1be6e46c 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -595,7 +595,7 @@ public class DatabaseDocument extends TestCase implements 
com.sun.star.document.
 assertTrue( "The test case marker did not survive re-retrieval of the 
doc from the data source.",
 impl_hasMarker( databaseDoc.getArgs() ) );
 
-// on the other hand, closing and regulary re-loading the doc 
*without* the marker should indeed
+// on the other hand, closing and regularly re-loading the doc 
*without* the marker should indeed
 // lose it
 impl_closeDocument( databaseDoc );
 databaseDoc = impl_loadDocument( documentURL, 
impl_getDefaultLoadArgs() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: dbaccess/qa

2019-01-29 Thread Libreoffice Gerrit user
 dbaccess/qa/unit/hsql_binary_import.cxx |5 +++--
 dbaccess/qa/unit/tdf119625.cxx  |4 +++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit f4be87e0583775fa5074aefa4bef4124b0c2d894
Author: Michael Stahl 
AuthorDate: Mon Jan 28 17:12:27 2019 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 29 12:19:26 2019 +0100

dbaccess: fix Tdf119625Test with read-only $SRCDIR

The buildLowLevelConnection() will try to modify the read-only storage
and throw IOException.

Change-Id: I9b8ec840bebcac3c8a69bc6921d32e692d9d9e86
Reviewed-on: https://gerrit.libreoffice.org/67027
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/dbaccess/qa/unit/hsql_binary_import.cxx 
b/dbaccess/qa/unit/hsql_binary_import.cxx
index 8bc81c0587b1..2c1c332629cb 100644
--- a/dbaccess/qa/unit/hsql_binary_import.cxx
+++ b/dbaccess/qa/unit/hsql_binary_import.cxx
@@ -45,8 +45,9 @@ void HsqlBinaryImportTest::setUp()
 
 void HsqlBinaryImportTest::testBinaryImport()
 {
-uno::Reference xDocument
-= getDocumentForFileName("hsqldb_migration_test.odb");
+// the migration requires the file to be writable
+utl::TempFile const temp(createTempCopy("hsqldb_migration_test.odb"));
+uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
 
 uno::Reference xConnection = 
getConnectionForDocument(xDocument);
 // at this point migration is already done
diff --git a/dbaccess/qa/unit/tdf119625.cxx b/dbaccess/qa/unit/tdf119625.cxx
index f9aea7b8d004..d38e85bb75a3 100644
--- a/dbaccess/qa/unit/tdf119625.cxx
+++ b/dbaccess/qa/unit/tdf119625.cxx
@@ -63,7 +63,9 @@ static const expect_t expect[]
 
 void Tdf119625Test::testTime()
 {
-uno::Reference xDocument = 
getDocumentForFileName("tdf119625.odb");
+// the migration requires the file to be writable
+utl::TempFile const temp(createTempCopy("tdf119625.odb"));
+uno::Reference const xDocument = 
getDocumentForUrl(temp.GetURL());
 
 uno::Reference xConnection = 
getConnectionForDocument(xDocument);
 // at this point migration is already done
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2018-07-06 Thread Tamas Bunth
 dbaccess/qa/extras/hsql_schema_import.cxx  |   18 ++
 dbaccess/source/filter/hsqldb/createparser.cxx |7 +--
 2 files changed, 23 insertions(+), 2 deletions(-)

New commits:
commit a91fe8558b4c8aa163069ebdb117d58239da74f2
Author: Tamas Bunth 
Date:   Tue Jun 26 13:15:07 2018 +0200

dbahsql: Look for properties only after name

Additional properties in SQL string like "DEFAULT" or "NOT NULL" should
be searched only after column name, because what if a column name is
"myEvilNOT NULLColumn"

Change-Id: I21f0755ba14c7267243df044db4d16963387
Reviewed-on: https://gerrit.libreoffice.org/56462
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx 
b/dbaccess/qa/extras/hsql_schema_import.cxx
index 892be33d15e7..dd75eb2dc38c 100644
--- a/dbaccess/qa/extras/hsql_schema_import.cxx
+++ b/dbaccess/qa/extras/hsql_schema_import.cxx
@@ -42,6 +42,7 @@ public:
 void testIntegerAutoincremental();
 void testTimestampWithParam();
 void testDefaultValueNow();
+void testEvilNullColumnName();
 // TODO testForeign, testDecomposer
 
 CPPUNIT_TEST_SUITE(HsqlSchemaImportTest);
@@ -53,6 +54,7 @@ public:
 CPPUNIT_TEST(testIntegerAutoincremental);
 CPPUNIT_TEST(testTimestampWithParam);
 CPPUNIT_TEST(testDefaultValueNow);
+CPPUNIT_TEST(testEvilNullColumnName);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -197,6 +199,22 @@ void HsqlSchemaImportTest::testDefaultValueNow()
 CPPUNIT_ASSERT(fbSql.indexOf("\'NOW\'") > 0); // composed 'NOW'
 }
 
+void HsqlSchemaImportTest::testEvilNullColumnName()
+{
+OUString sql{ "CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL 
PRIMARY KEY, "
+  "\"myEvilNOT NULLName\" "
+  "VARCHAR(20))" };
+
+FbCreateStmtParser aCreateParser;
+aCreateParser.parse(sql);
+
+const auto& columns = aCreateParser.getColumnDef();
+CPPUNIT_ASSERT_EQUAL(2_z, columns.size());
+const ColumnDefinition* colVarchar = lcl_findByType(columns, 
css::sdbc::DataType::VARCHAR);
+CPPUNIT_ASSERT(colVarchar != nullptr);
+CPPUNIT_ASSERT(colVarchar->isNullable());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(HsqlSchemaImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx 
b/dbaccess/source/filter/hsqldb/createparser.cxx
index 2344ceb075fe..32abe25a8521 100644
--- a/dbaccess/source/filter/hsqldb/createparser.cxx
+++ b/dbaccess/source/filter/hsqldb/createparser.cxx
@@ -301,10 +301,13 @@ void CreateStmtParser::parseColumnPart(const OUString& 
sColumnPart)
 if (isPrimaryKey)
 m_PrimaryKeys.push_back(rColumnName);
 
+const OUString sColumnWithoutName = 
sColumn.copy(sColumn.indexOf(typeParts.typeName));
+
 ColumnDefinition aColDef(rColumnName, 
lcl_getDataTypeFromHsql(typeParts.typeName),
  typeParts.params, isPrimaryKey,
- lcl_getAutoIncrementDefault(sColumn), 
lcl_isNullable(sColumn),
- bCaseInsensitive, 
lcl_getDefaultValue(sColumn));
+ 
lcl_getAutoIncrementDefault(sColumnWithoutName),
+ lcl_isNullable(sColumnWithoutName), 
bCaseInsensitive,
+ lcl_getDefaultValue(sColumnWithoutName));
 
 m_aColumns.push_back(aColDef);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2018-07-06 Thread Tamas Bunth
 dbaccess/qa/extras/hsql_schema_import.cxx|   23 +++
 dbaccess/source/filter/hsqldb/columndef.cxx  |4 +++-
 dbaccess/source/filter/hsqldb/columndef.hxx  |4 +++-
 dbaccess/source/filter/hsqldb/createparser.cxx   |   18 +-
 dbaccess/source/filter/hsqldb/fbcreateparser.cxx |   10 ++
 5 files changed, 56 insertions(+), 3 deletions(-)

New commits:
commit 8f3d6e67b08ed1bce9bc989e5e3df92c4d9d95d3
Author: Tamas Bunth 
Date:   Tue Jun 26 12:27:57 2018 +0200

tdf#117867 dbahsql: Migrate default values

Default Value "NOW" is a special case, because Firebird likes it with
single quotes. In contrast, HSQLDB uses the keyword without quotes.

Add unit test for parsing default value "NOW"

Change-Id: I34886f8ae53e98addb52bf5e85030a03721d6a45
Reviewed-on: https://gerrit.libreoffice.org/56454
Tested-by: Jenkins
Reviewed-by: Tamás Bunth 

diff --git a/dbaccess/qa/extras/hsql_schema_import.cxx 
b/dbaccess/qa/extras/hsql_schema_import.cxx
index a04e3697ecfb..892be33d15e7 100644
--- a/dbaccess/qa/extras/hsql_schema_import.cxx
+++ b/dbaccess/qa/extras/hsql_schema_import.cxx
@@ -41,6 +41,7 @@ public:
 void testNumericWithTwoParam();
 void testIntegerAutoincremental();
 void testTimestampWithParam();
+void testDefaultValueNow();
 // TODO testForeign, testDecomposer
 
 CPPUNIT_TEST_SUITE(HsqlSchemaImportTest);
@@ -51,6 +52,7 @@ public:
 CPPUNIT_TEST(testNumericWithTwoParam);
 CPPUNIT_TEST(testIntegerAutoincremental);
 CPPUNIT_TEST(testTimestampWithParam);
+CPPUNIT_TEST(testDefaultValueNow);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -174,6 +176,27 @@ void HsqlSchemaImportTest::testTimestampWithParam()
 CPPUNIT_ASSERT(fbSql.indexOf("0") < 0); //does not contain
 }
 
+/**
+ * Special case:
+ * HSQLDB uses keyword NOW without quotes. Firebird uses single quotes 'NOW'
+ */
+void HsqlSchemaImportTest::testDefaultValueNow()
+{
+OUString sql{ "CREATE CACHED TABLE \"myTable\"(\"id\" INTEGER NOT NULL 
PRIMARY KEY, \"myDate\" "
+  "TIMESTAMP DEFAULT NOW)" };
+
+FbCreateStmtParser aCreateParser;
+aCreateParser.parse(sql);
+
+const auto& columns = aCreateParser.getColumnDef();
+const ColumnDefinition* colTimeStamp = lcl_findByType(columns, 
css::sdbc::DataType::TIMESTAMP);
+
+CPPUNIT_ASSERT(colTimeStamp != nullptr);
+CPPUNIT_ASSERT_EQUAL(OUString{ "NOW" }, colTimeStamp->getDefault()); // 
parsed NOW
+OUString fbSql = aCreateParser.compose();
+CPPUNIT_ASSERT(fbSql.indexOf("\'NOW\'") > 0); // composed 'NOW'
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(HsqlSchemaImportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/dbaccess/source/filter/hsqldb/columndef.cxx 
b/dbaccess/source/filter/hsqldb/columndef.cxx
index 6e36ee1b8718..dd71e81f28b3 100644
--- a/dbaccess/source/filter/hsqldb/columndef.cxx
+++ b/dbaccess/source/filter/hsqldb/columndef.cxx
@@ -27,7 +27,8 @@ using namespace css::sdbc;
 
 ColumnDefinition::ColumnDefinition(const OUString& sName, sal_Int32 eType,
const std::vector aParams, bool 
bPrimary,
-   sal_Int32 nAutoIncr, bool bNullable, bool 
bCaseInsensitive)
+   sal_Int32 nAutoIncr, bool bNullable, bool 
bCaseInsensitive,
+   const OUString& sDefault)
 : m_sName(sName)
 , m_eType(eType)
 , m_aParams(aParams)
@@ -35,6 +36,7 @@ ColumnDefinition::ColumnDefinition(const OUString& sName, 
sal_Int32 eType,
 , m_nAutoIncrement(nAutoIncr)
 , m_bNullable(bNullable)
 , m_bCaseInsensitive(bCaseInsensitive)
+, m_sDefaultValue(sDefault)
 {
 }
 }
diff --git a/dbaccess/source/filter/hsqldb/columndef.hxx 
b/dbaccess/source/filter/hsqldb/columndef.hxx
index b356d3906b37..fd23ed313abb 100644
--- a/dbaccess/source/filter/hsqldb/columndef.hxx
+++ b/dbaccess/source/filter/hsqldb/columndef.hxx
@@ -26,11 +26,12 @@ private:
 sal_Int32 m_nAutoIncrement;
 bool m_bNullable;
 bool m_bCaseInsensitive;
+OUString m_sDefaultValue;
 
 public:
 ColumnDefinition(const OUString& sName, sal_Int32 eType, const 
std::vector aParams,
  bool bPrimary = false, sal_Int32 nAutoIncr = -1, bool 
bNullable = true,
- bool bCaseInsensitive = false);
+ bool bCaseInsensitive = false, const OUString& sDefault = 
OUString{});
 
 OUString const& getName() const { return m_sName; }
 sal_Int32 getDataType() const { return m_eType; }
@@ -40,6 +41,7 @@ public:
 bool isCaseInsensitive() const { return m_bCaseInsensitive; }
 sal_Int32 getStartValue() const { return m_nAutoIncrement; }
 const std::vector& getParams() const { return m_aParams; }
+OUString const& getDefault() const { return m_sDefaultValue; }
 };
 }
 
diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx 
b/dbaccess/source/filter/hsqldb/createparser.cxx
index 5b864f42

[Libreoffice-commits] core.git: dbaccess/qa odk/examples sal/osl sc/source soltools/cpp svgio/source sw/source toolkit/test vcl/source writerfilter/source

2018-01-24 Thread Andrea Gelmini
 dbaccess/qa/complex/dbaccess/DatabaseDocument.java |2 +-
 odk/examples/java/Text/TextReplace.java|2 +-
 sal/osl/unx/file_path_helper.hxx   |2 +-
 sc/source/core/inc/interpre.hxx|2 +-
 soltools/cpp/_macro.c  |2 +-
 svgio/source/svgreader/svgsvgnode.cxx  |2 +-
 sw/source/core/inc/rootfrm.hxx |2 +-
 toolkit/test/accessibility/AccessibilityWorkBench.java |2 +-
 vcl/source/window/printdlg.cxx |2 +-
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx  |2 +-
 10 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 4c0735830be6ebf83ce562025fdb34dfd036948e
Author: Andrea Gelmini 
Date:   Wed Jan 24 18:42:23 2018 +0100

Fix typos

Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce
Reviewed-on: https://gerrit.libreoffice.org/48545
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java 
b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
index 673f22d24677..a89bc13c5248 100644
--- a/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
+++ b/dbaccess/qa/complex/dbaccess/DatabaseDocument.java
@@ -945,7 +945,7 @@ public class DatabaseDocument extends TestCase implements 
com.sun.star.document.
 {
 if ("OnTitleChanged".equals(_Event.EventName))
 // OnTitleChanged events are notified too often. This is known, and 
accepted.
-// (the deeper reason is that it's difficult to determine, in the 
DatabaseDocument implementatin,
+// (the deeper reason is that it's difficult to determine, in the 
DatabaseDocument implementation,
 // when the title actually changed. In particular, when we do a 
saveAsURL, and then ask for a
 // title *before* the TitleHelper got the document's OnSaveAsDone 
event, then the wrong (old)
 // title is obtained.
diff --git a/odk/examples/java/Text/TextReplace.java 
b/odk/examples/java/Text/TextReplace.java
index a43799ffadb9..9dc3eec0a2a8 100644
--- a/odk/examples/java/Text/TextReplace.java
+++ b/odk/examples/java/Text/TextReplace.java
@@ -69,7 +69,7 @@ public class TextReplace {
 xReplaceable = UnoRuntime.queryInterface(
 com.sun.star.util.XReplaceable.class, xTextDocument);
 
-// You need a descriptor to set properies for Replace
+// You need a descriptor to set properties for Replace
 xReplaceDescr = xReplaceable.createReplaceDescriptor();
 
 System.out.println("Change all occurrences of ...");
diff --git a/sal/osl/unx/file_path_helper.hxx b/sal/osl/unx/file_path_helper.hxx
index 86c10ccabcf5..2b2fd8891256 100644
--- a/sal/osl/unx/file_path_helper.hxx
+++ b/sal/osl/unx/file_path_helper.hxx
@@ -246,7 +246,7 @@ namespace osl
 
 @param  ppustrAbsolutePath [out] the
 resulting path which is a
-concatination of the base and
+concatenation of the base and
 the relative path
 if base path is empty the
 resulting absolute path is the
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 4b76a166bef0..3a3450654ff2 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -142,7 +142,7 @@ typedef ::std::map< const formula::FormulaConstTokenRef, 
formula::FormulaConstTo
 
 class ScInterpreter
 {
-// distibution function objects need the GetxxxDist methods
+// distribution function objects need the GetxxxDist methods
 friend class ScGammaDistFunction;
 friend class ScBetaDistFunction;
 friend class ScTDistFunction;
diff --git a/soltools/cpp/_macro.c b/soltools/cpp/_macro.c
index e8b87d002f4c..8a89e9379d36 100644
--- a/soltools/cpp/_macro.c
+++ b/soltools/cpp/_macro.c
@@ -577,7 +577,7 @@ void
 {
 if (len + ntp->len + ntp->wslen > sizeof(tt))
 {
-error(ERROR, "## string concatination buffer overrun");
+error(ERROR, "## string concatenation buffer overrun");
 break;
 }
 
diff --git a/svgio/source/svgreader/svgsvgnode.cxx 
b/svgio/source/svgreader/svgsvgnode.cxx
index 43fa092cd2c1..5803c877331b 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -310,7 +310,7 @@ namespace svgio
 if(getParent())
 {
 // #i122594# if width/height is not given, it's 100% (see 
5.1.2 The 'svg' element in SVG1.1 spec).
-// If it is relative, the question is to what. The 
previous implementatin assumed relative to the
+// If it is relative, the question is to what. The 
previous implementation assumed relative to the
 // local ViewBox which is implied 

[Libreoffice-commits] core.git: dbaccess/qa sw/qa unotest/source

2017-09-07 Thread Michael Stahl
 dbaccess/qa/python/fdo84315.py   |2 
 sw/qa/python/check_cross_references.py   |2 
 sw/qa/python/check_fields.py |2 
 sw/qa/python/check_flies.py  |2 
 sw/qa/python/text_portion_enumeration_test.py|6 +-
 unotest/source/python/org/libreoffice/unotest.py |   63 ++-
 6 files changed, 25 insertions(+), 52 deletions(-)

New commits:
commit 01b0d6da7ffdbd0eeea601020329c82fa1b37c11
Author: Michael Stahl 
Date:   Thu Sep 7 21:26:02 2017 +0200

unotest.py: refactor confusing mess of openDoc functions

Change-Id: I148332c639510c55dea2d09bc7aa695708fbf34c

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index 03acc0a92e2f..f58b16f51309 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -20,7 +20,7 @@ class Fdo84315(unittest.TestCase):
 cls._uno = UnoInProcess()
 cls._uno.setUp()
 workdir = os.environ[ "WORKDIR_FOR_BUILD" ]
-cls._xDoc = cls._uno.openDoc(workdir + "/CppunitTest/fdo84315.odb")
+cls._xDoc = cls._uno.openDocFromAbsolutePath(workdir + 
"/CppunitTest/fdo84315.odb")
 
 @classmethod
 def tearDownClass(cls):
diff --git a/sw/qa/python/check_cross_references.py 
b/sw/qa/python/check_cross_references.py
index 2246118bed31..9eaabf0b0105 100644
--- a/sw/qa/python/check_cross_references.py
+++ b/sw/qa/python/check_cross_references.py
@@ -38,7 +38,7 @@ class CheckCrossReferences(unittest.TestCase):
 def setUpClass(cls):
 cls._uno = UnoInProcess()
 cls._uno.setUp()
-cls.document = 
cls._uno.openWriterTemplateDoc("CheckCrossReferences.odt")
+cls.document = cls._uno.openDocFromTDOC("CheckCrossReferences.odt")
 cls.xParaEnum = None
 cls.xPortionEnum = None
 cls.xFieldsRefresh = None
diff --git a/sw/qa/python/check_fields.py b/sw/qa/python/check_fields.py
index ff02ec0eb9d5..2fdbdf93cc2c 100644
--- a/sw/qa/python/check_fields.py
+++ b/sw/qa/python/check_fields.py
@@ -17,7 +17,7 @@ class CheckFields(unittest.TestCase):
 def setUpClass(cls):
 cls._uno = UnoInProcess()
 cls._uno.setUp()
-cls._xDoc = cls._uno.openWriterTemplateDoc("fdo39694.ott")
+cls._xDoc = cls._uno.openTemplateFromTDOC("fdo39694.ott")
 cls._xEmptyDoc = cls._uno.openEmptyWriterDoc()
 
 @classmethod
diff --git a/sw/qa/python/check_flies.py b/sw/qa/python/check_flies.py
index 55c04fec0783..d9407731e609 100644
--- a/sw/qa/python/check_flies.py
+++ b/sw/qa/python/check_flies.py
@@ -26,7 +26,7 @@ class CheckFlies(unittest.TestCase):
 def setUpClass(cls):
 cls._uno = UnoInProcess()
 cls._uno.setUp()
-cls.document = cls._uno.openWriterTemplateDoc("CheckFlies.odt")
+cls.document = cls._uno.openDocFromTDOC("CheckFlies.odt")
 
 @classmethod
 def tearDownClass(cls):
diff --git a/sw/qa/python/text_portion_enumeration_test.py 
b/sw/qa/python/text_portion_enumeration_test.py
index b767368d850b..d6774629f96a 100644
--- a/sw/qa/python/text_portion_enumeration_test.py
+++ b/sw/qa/python/text_portion_enumeration_test.py
@@ -3250,7 +3250,7 @@ class TextPortionEnumerationTest(unittest.TestCase):
 def doload(self, file):
 xComp = None
 print("Loading test document...")
-xComp = self.__class__._uno.openDoc(file)
+xComp = self.__class__._uno.openDocFromAbsolutePath(file)
 self.assertIsNotNone(xComp, "cannot load: {}".format(file))
 print("...done")
 return xComp
@@ -3266,7 +3266,7 @@ class TextPortionEnumerationTest(unittest.TestCase):
 xComp = None
 filename = "TESTMETA.odt"
 try:
-xComp = self.__class__._uno.openBaseDoc(filename)
+xComp = self.__class__._uno.openDocFromTDOC(filename)
 if xComp:
 self.checkloadmeta(xComp)
 with TemporaryDirectory() as tempdir:
@@ -3338,7 +3338,7 @@ class TextPortionEnumerationTest(unittest.TestCase):
 xComp = None
 filename = "TESTXMLID.odt"
 try:
-xComp = self.__class__._uno.openBaseDoc(filename)
+xComp = self.__class__._uno.openDocFromTDOC(filename)
 if xComp:
 self.checkloadxmlid(xComp)
 with TemporaryDirectory() as tempdir:
diff --git a/unotest/source/python/org/libreoffice/unotest.py 
b/unotest/source/python/org/libreoffice/unotest.py
index 0bb5212c9d4a..a6a927ca881c 100644
--- a/unotest/source/python/org/libreoffice/unotest.py
+++ b/unotest/source/python/org/libreoffice/unotest.py
@@ -195,72 +195,45 @@ class UnoInProcess:
 if not(havePonies):
 pyuno.private_initTestEnvironment()
 havePonies = True
+
 def openEmptyWriterDoc(self):
-assert(self.xContext)
-smgr = self.getContext().ServiceManager
-desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", 
s

[Libreoffice-commits] core.git: dbaccess/qa starmath/inc starmath/source writerperfect/inc writerperfect/source

2017-08-03 Thread Noel Grandin
 dbaccess/qa/unit/embeddeddb_performancetest.cxx|   16 
 starmath/inc/cursor.hxx|2 +-
 starmath/inc/document.hxx  |2 +-
 starmath/inc/node.hxx  |4 ++--
 starmath/inc/view.hxx  |4 ++--
 starmath/inc/visitors.hxx  |2 +-
 starmath/source/accessibility.cxx  |6 +++---
 starmath/source/cursor.cxx |2 +-
 starmath/source/document.cxx   |2 +-
 starmath/source/mathmlexport.cxx   |8 
 starmath/source/mathmlexport.hxx   |   10 +-
 starmath/source/mathmlimport.cxx   |8 
 starmath/source/mathmlimport.hxx   |   10 +-
 starmath/source/view.cxx   |4 ++--
 starmath/source/visitors.cxx   |2 +-
 writerperfect/inc/DocumentHandler.hxx  |2 +-
 writerperfect/source/common/DocumentHandler.cxx|2 +-
 writerperfect/source/common/WPFTEncodingDialog.cxx |2 +-
 18 files changed, 44 insertions(+), 44 deletions(-)

New commits:
commit 24817c26b3f8cc1a8156357316be442e5460a1a7
Author: Noel Grandin 
Date:   Thu Aug 3 13:14:02 2017 +0200

loplugin:constparams in starmath

Change-Id: Iac470b572311241216622f22bc543c0bd10a28f6
Reviewed-on: https://gerrit.libreoffice.org/40714
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx 
b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 23ab34723fff..26b77b555fe1 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -98,19 +98,19 @@ private:
 const OUString& rDBName,
 const bool bUsePreparedStatement);
 
-void setupTestTable(uno::Reference< XConnection >& xConnection);
+void setupTestTable(uno::Reference< XConnection > const & xConnection);
 
 SvFileStream *getWordListStream();
 
 // Individual Tests
 void performPreparedStatementInsertTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName);
 void performStatementInsertTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName);
 void performReadTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName);
 
 // Perform all tests on a given DB.
@@ -234,7 +234,7 @@ void EmbeddedDBPerformanceTest::doPerformanceTestOnODB(
 }
 
 void EmbeddedDBPerformanceTest::setupTestTable(
-uno::Reference< XConnection >& xConnection)
+uno::Reference< XConnection > const & xConnection)
 {
 uno::Reference< XStatement > xStatement = xConnection->createStatement();
 
@@ -249,7 +249,7 @@ void EmbeddedDBPerformanceTest::setupTestTable(
 }
 
 void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName)
 {
 uno::Reference< XPreparedStatement > xPreparedStatement =
@@ -291,7 +291,7 @@ void 
EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
 }
 
 void EmbeddedDBPerformanceTest::performStatementInsertTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName)
 {
 uno::Reference< XStatement > xStatement =
@@ -329,7 +329,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
 }
 
 void EmbeddedDBPerformanceTest::performReadTest(
-uno::Reference< XConnection >& xConnection,
+uno::Reference< XConnection > const & xConnection,
 const OUString& rDBName)
 {
 uno::Reference< XStatement > xStatement = xConnection->createStatement();
diff --git a/starmath/inc/cursor.hxx b/starmath/inc/cursor.hxx
index 72de1a1cbadb..476f021670e0 100644
--- a/starmath/inc/cursor.hxx
+++ b/starmath/inc/cursor.hxx
@@ -208,7 +208,7 @@ private:
  *
  * These are SmExpression, SmBinHorNode, SmUnHorNode etc.
  */
-static bool IsLineCompositionNode(SmNode* pNode);
+static bool IsLineCompositionNode(SmNode const * pNode);
 
 /** Count number of selected nodes, excluding line composition nodes
  *
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index e18c674f2a69..04cb436b9d0e 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -172,7 +172,7 @@ public:
 voidUpdateText();
 voidSetText(const OUString& rBuffer);
 const OUString&  GetText() { return maText; }
-voidSetFormat(SmFormat& rFormat);
+void

[Libreoffice-commits] core.git: dbaccess/qa

2016-12-22 Thread Stephan Bergmann
 dbaccess/qa/extras/macros-test.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5610381dded9afa5f768d6899345cada1bf5741f
Author: Stephan Bergmann 
Date:   Thu Dec 22 10:56:45 2016 +0100

Dispose component when done

Change-Id: I3ea2004556b01ba992215b9142b9c8a6aabb63c0

diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index d6c7e6b..300c429 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -51,6 +51,7 @@ void DBAccessTest::test()
 createFileURL(aFileNameBase, aFileName);
 uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName);
 CPPUNIT_ASSERT(xComponent.is());
+xComponent->dispose();
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2016-12-22 Thread Stephan Bergmann
 dbaccess/qa/unit/hsqldb.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit da42fabff48bca04b17d565fd76f96889f092b42
Author: Stephan Bergmann 
Date:   Thu Dec 22 10:50:07 2016 +0100

Dispose document when done

Change-Id: I73a1cb1c206a2f55ec0c8948fca29b3976a51e75

diff --git a/dbaccess/qa/unit/hsqldb.cxx b/dbaccess/qa/unit/hsqldb.cxx
index 69c822c..23fed51 100644
--- a/dbaccess/qa/unit/hsqldb.cxx
+++ b/dbaccess/qa/unit/hsqldb.cxx
@@ -42,6 +42,9 @@ void HSQLDBTest::testEmptyDBConnection()
 getDocumentForFileName("hsqldb_empty.odb");
 
 getConnectionForDocument(xDocument);
+
+css::uno::Reference(
+xDocument, css::uno::UNO_QUERY_THROW)->dispose();
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(HSQLDBTest);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2016-12-12 Thread Michael Stahl
 dbaccess/qa/complex/dbaccess/RowSet.java |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit ae8bd4267ac2da58f9e476d24e1e894202e92dea
Author: Michael Stahl 
Date:   Mon Dec 12 23:17:51 2016 +0100

dbaccess: fix testCloneMovesPlusDeletions test

JunitTest_dbaccess_complex spuriously fails 1% of the time with:

1) testCloneMovesPlusDeletions(complex.dbaccess.RowSet)
java.lang.AssertionError: moving to the next record after |deleteRow| and 
clone moves failed
at complex.dbaccess.RowSet.testCloneMovesPlusDeletions(RowSet.java:756)

The problem is that line RowSet.java:750 deleteRow() manages to delete
the last row in the set, because the positionRandom() is tricked to
position itself on the last row (which it tries not to do), becuase the
RowSet is currently positioned past-the-end on a deleted row and the
ORowSetBase::impl_getRowCount() is a lying bastard that adds 1 to the
result in this special case.

Funnily both the ORowSetBase::impl_getRowCount() and the test using
positionRandom() were added in CWS rowsetdel.  Yay for randomized
tests!

Change-Id: Ic8c7bfa190f6a5269604cf5b3c338f2d0b64205e

diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java 
b/dbaccess/qa/complex/dbaccess/RowSet.java
index 2cbf942..e617d25 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -528,7 +528,12 @@ public class RowSet extends TestCase
  */
 private int positionRandom() throws SQLException, 
UnknownPropertyException, WrappedTargetException
 {
-final int position = (new Random()).nextInt(currentRowCount() - 2) + 2;
+// note: obviously this should subtract 2 but actually subtract 3
+// because if we have just deleted the current row then
+// ORowSetBase::impl_getRowCount() will lie and currentRowCount()
+// returns 1 more than the actual number of rows and then
+// positionRandom() followed by deleteRow() deletes *last* row
+final int position = (new Random()).nextInt(currentRowCount() - 3) + 2;
 assertTrue("sub task failed: could not position to row no. " + 
(Integer.valueOf(position)).toString(),
 m_resultSet.absolute(position));
 return m_resultSet.getRow();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2016-09-02 Thread Miklos Vajna
 dbaccess/qa/extras/rowsetclones.cxx |   30 +++---
 dbaccess/qa/unit/firebird.cxx   |   10 +-
 2 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit 40f0ae88bc6b6964389073aba62b6af8d55982e5
Author: Miklos Vajna 
Date:   Fri Sep 2 09:15:55 2016 +0200

dbaccess: fix loplugin:cppunitassertequals warnings

Change-Id: Ia450aa3170a21424fce641d3c8dee43b49f8ef61
Reviewed-on: https://gerrit.libreoffice.org/28609
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/dbaccess/qa/extras/rowsetclones.cxx 
b/dbaccess/qa/extras/rowsetclones.cxx
index 2ae55cc..28ea38f 100644
--- a/dbaccess/qa/extras/rowsetclones.cxx
+++ b/dbaccess/qa/extras/rowsetclones.cxx
@@ -89,11 +89,11 @@ void RowSetClones::test()
 CPPUNIT_ASSERT(xResultSet->isBeforeFirst());
 CPPUNIT_ASSERT(xResultSet->next());
 CPPUNIT_ASSERT(xResultSet->isFirst());
-CPPUNIT_ASSERT(xResultSet->getRow() == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xResultSet->getRow());
 
 uno::Reference< XRow > xRow(xResultSet, UNO_QUERY);
 CPPUNIT_ASSERT(xRow.is());
-CPPUNIT_ASSERT(xRow->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRow->getInt(1));
 
 uno::Reference< XResultSetAccess > xResultSetAccess(xResultSet, UNO_QUERY);
 CPPUNIT_ASSERT(xResultSetAccess.is());
@@ -107,36 +107,36 @@ void RowSetClones::test()
 // and does not move its source.
 CPPUNIT_ASSERT(xResultSetClone->isFirst());
 CPPUNIT_ASSERT(xResultSet->isFirst());
-CPPUNIT_ASSERT(xResultSet->getRow() == 1);
-CPPUNIT_ASSERT(xResultSetClone->getRow() == 1);
-CPPUNIT_ASSERT(xRow->getInt(1) == 1);
-CPPUNIT_ASSERT(xRowClone->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xResultSet->getRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xResultSetClone->getRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRow->getInt(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRowClone->getInt(1));
 
 // if we move the source, the clone does not move
 CPPUNIT_ASSERT(xResultSet->next());
 CPPUNIT_ASSERT(xResultSetClone->isFirst());
-CPPUNIT_ASSERT(xResultSet->getRow() == 2);
-CPPUNIT_ASSERT(xResultSetClone->getRow() == 1);
-CPPUNIT_ASSERT(xRow->getInt(1) == 2);
-CPPUNIT_ASSERT(xRowClone->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(2), xResultSet->getRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xResultSetClone->getRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(2), xRow->getInt(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRowClone->getInt(1));
 
 CPPUNIT_ASSERT(xResultSet->last());
 CPPUNIT_ASSERT(xResultSet->isLast());
 CPPUNIT_ASSERT(xResultSetClone->isFirst());
-CPPUNIT_ASSERT(xRowClone->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRowClone->getInt(1));
 
 // and the other way round
 CPPUNIT_ASSERT(xResultSet->first());
 CPPUNIT_ASSERT(xResultSetClone->next());
 CPPUNIT_ASSERT(xResultSet->isFirst());
-CPPUNIT_ASSERT(xResultSetClone->getRow() == 2);
-CPPUNIT_ASSERT(xRowClone->getInt(1) == 2);
-CPPUNIT_ASSERT(xRow->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(2), xResultSetClone->getRow());
+CPPUNIT_ASSERT_EQUAL(static_cast(2), xRowClone->getInt(1));
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRow->getInt(1));
 
 CPPUNIT_ASSERT(xResultSetClone->last());
 CPPUNIT_ASSERT(xResultSetClone->isLast());
 CPPUNIT_ASSERT(xResultSet->isFirst());
-CPPUNIT_ASSERT(xRow->getInt(1) == 1);
+CPPUNIT_ASSERT_EQUAL(static_cast(1), xRow->getInt(1));
 
 closeDocument(uno::Reference(xDocument, uno::UNO_QUERY));
 }
diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index da0bed7..e031e16 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -88,15 +88,15 @@ void FirebirdTest::testIntegerDatabase()
 uno::Reference< XColumnLocate > xColumnLocate(xRow, UNO_QUERY);
 CPPUNIT_ASSERT(xColumnLocate.is());
 
-CPPUNIT_ASSERT(sal_Int16(-3) ==
+CPPUNIT_ASSERT_EQUAL(sal_Int16(-3),
 xRow->getShort(xColumnLocate->findColumn("_SMALLINT")));
-CPPUNIT_ASSERT(sal_Int32(-21) ==
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-21),
 xRow->getInt(xColumnLocate->findColumn("_INT")));
-CPPUNIT_ASSERT(SAL_CONST_INT64(-900) ==
+CPPUNIT_ASSERT_EQUAL(SAL_CONST_INT64(-900),
 xRow->getLong(xColumnLocate->findColumn("_BIGINT")));
-CPPUNIT_ASSERT("5" ==
+CPPUNIT_ASSERT_EQUAL(OUString("5"),
 xRow->getString(xColumnLocate->findColumn("_CHAR")));
-CPPUNIT_ASSERT("5" ==
+CPPUNIT_ASSERT_EQUAL(OUString("5"),
 xRow->getString(xColumnLocate->findColumn("_VARCHAR")));
 
 CPPUNIT_ASSERT(!xResultSet->next()); // Should only be one row
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libr

[Libreoffice-commits] core.git: dbaccess/qa

2016-04-03 Thread slideon
 dbaccess/qa/python/fdo84315.py |   58 -
 1 file changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 9338e4f5b1ffcba2d5b0bd8960dd8795d8909ff1
Author: slideon 
Date:   Fri Apr 1 09:51:57 2016 -0400

tdf#97361 Refactor dbaccess test again

Remove duplicate code, add helper functions and constants

Change-Id: Ib8702e2ce9918b47a608f6eb6fd2af7fd4dd1d0d
Reviewed-on: https://gerrit.libreoffice.org/23727
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index a4bbc1b..03acc0a 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -14,8 +14,6 @@ import unohelper
 from org.libreoffice.unotest import UnoInProcess
 
 class Fdo84315(unittest.TestCase):
-_uno = None
-_xDoc = None
 
 @classmethod
 def setUpClass(cls):
@@ -28,47 +26,49 @@ class Fdo84315(unittest.TestCase):
 def tearDownClass(cls):
 cls._uno.tearDown()
 
+def __test_Query(self, column_name, expected_type, xResultset):
+self.assertTrue(xResultset)
+xMeta = xResultset.MetaData
+self.assertEqual(xMeta.ColumnCount, 1)
+self.assertEqual(xResultset.findColumn(column_name), 1)
+self.assertEqual(xMeta.getColumnName(1), column_name)
+self.assertEqual(xMeta.getColumnType(1), expected_type)
+return xMeta
+
+def __test_ResultSetInteger(self, xResultset, expected_values):
+while xResultset.next():
+self.assertEqual(xResultset.getInt(1), expected_values.popleft())
+self.assertEqual(len(expected_values), 0)
+
+def __test_ResultSetString(self, xResultset, expected_values):
+while xResultset.next():
+self.assertEqual(xResultset.getString(1), 
expected_values.popleft())
+self.assertEqual(len(expected_values), 0)
+
 def test_fdo84315(self):
 xDoc = self.__class__._xDoc
 xDataSource = xDoc.DataSource
 xCon = xDataSource.getConnection('','')
 xStatement = xCon.createStatement()
 
+NUMERIC = 2
+VAR_CHAR = 12
+INTEGER = 4
+
 xResultset = xStatement.executeQuery('SELECT "count" FROM 
"test_table"')
 expected_values = deque([42, 4711])
-self.assertTrue(xResultset)
-xMeta = xResultset.MetaData
-self.assertEqual(xMeta.ColumnCount, 1)
-self.assertEqual(xResultset.findColumn("count"), 1)
-self.assertEqual(xMeta.getColumnName(1), "count");
-self.assertEqual(xMeta.getColumnType(1), 2); # numeric
-while xResultset.next():
-self.assertEqual(xResultset.getInt(1), expected_values.popleft())
-self.assertEqual(len(expected_values), 0)
+xMeta = self.__test_Query('count', NUMERIC, xResultset)
+self.__test_ResultSetInteger(xResultset, expected_values)
 
 xResultset = xStatement.executeQuery('SELECT "name" FROM "test_table"')
 expected_values = deque(['foo', 'bar'])
-self.assertTrue(xResultset)
-xMeta = xResultset.MetaData
-self.assertEqual(xMeta.ColumnCount, 1)
-self.assertEqual(xResultset.findColumn("name"), 1)
-self.assertEqual(xMeta.getColumnName(1), "name");
-self.assertEqual(xMeta.getColumnType(1), 12); # varchar
-while xResultset.next():
-self.assertEqual(xResultset.getString(1), 
expected_values.popleft())
-self.assertEqual(len(expected_values), 0)
+xMeta = self.__test_Query('name', VAR_CHAR, xResultset)
+self.__test_ResultSetString(xResultset, expected_values)
 
 xResultset = xStatement.executeQuery('SELECT "id" FROM "test_table"')
 expected_values = deque([0, 1])
-self.assertTrue(xResultset)
-xMeta = xResultset.MetaData
-self.assertEqual(xMeta.ColumnCount, 1)
-self.assertEqual(xResultset.findColumn("id"), 1)
-self.assertEqual(xMeta.getColumnName(1), "id");
-self.assertEqual(xMeta.getColumnType(1), 4); # integer
-while xResultset.next():
-self.assertEqual(xResultset.getInt(1), expected_values.popleft())
-self.assertEqual(len(expected_values), 0)
+xMeta = self.__test_Query('id', INTEGER, xResultset)
+self.__test_ResultSetInteger(xResultset, expected_values)
 
 xCon.dispose()
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2016-04-01 Thread Stephan Bergmann
 dev/null |binary
 1 file changed

New commits:
commit 29da3a4a71b964df0a9337a9d554a8b94c484635
Author: Stephan Bergmann 
Date:   Fri Apr 1 14:34:07 2016 +0200

Remove erroneously added dbaccess/qa/unit/data/hsqldb_empty.odb.lck

...from 9e596250a6e968c5d1e2fb0de582ae242e02acf9 "tdf#97966  Drop static 
keywords"

Change-Id: I04d3559bceb214743695e2a008c1a1383535a635

diff --git a/dbaccess/qa/unit/data/hsqldb_empty.odb.lck 
b/dbaccess/qa/unit/data/hsqldb_empty.odb.lck
deleted file mode 100644
index d64ce94..000
Binary files a/dbaccess/qa/unit/data/hsqldb_empty.odb.lck and /dev/null differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source desktop/source

2016-03-31 Thread Wastack
 dbaccess/qa/unit/data/hsqldb_empty.odb.lck|binary
 dbaccess/source/core/api/resultset.cxx|2 +-
 dbaccess/source/core/dataaccess/ModelImpl.cxx |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx  |8 
 dbaccess/source/core/dataaccess/documenteventexecutor.cxx |2 +-
 dbaccess/source/core/recovery/dbdocrecovery.cxx   |   14 +++---
 dbaccess/source/core/recovery/subcomponentrecovery.cxx|8 
 dbaccess/source/ext/macromigration/migrationengine.cxx|   12 ++--
 dbaccess/source/ext/macromigration/migrationlog.cxx   |2 +-
 dbaccess/source/ui/app/AppDetailPageHelper.cxx|2 +-
 dbaccess/source/ui/dlg/sqlmessage.cxx |2 +-
 dbaccess/source/ui/misc/UITools.cxx   |2 +-
 dbaccess/source/ui/misc/imageprovider.cxx |4 ++--
 desktop/source/app/dispatchwatcher.cxx|2 +-
 desktop/source/deployment/misc/dp_misc.cxx|2 +-
 15 files changed, 32 insertions(+), 32 deletions(-)

New commits:
commit 9e596250a6e968c5d1e2fb0de582ae242e02acf9
Author: Wastack 
Date:   Thu Mar 31 08:40:23 2016 +0200

tdf#97966  Drop 'static' keywords

Including no keywords from extern "C" blocks

Change-Id: Icff7c0308843d6a7608be24d7fcf11fa079c7b72
Reviewed-on: https://gerrit.libreoffice.org/23672
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/dbaccess/qa/unit/data/hsqldb_empty.odb.lck 
b/dbaccess/qa/unit/data/hsqldb_empty.odb.lck
new file mode 100644
index 000..d64ce94
Binary files /dev/null and b/dbaccess/qa/unit/data/hsqldb_empty.odb.lck differ
diff --git a/dbaccess/source/core/api/resultset.cxx 
b/dbaccess/source/core/api/resultset.cxx
index e69cf2b..f268810 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -295,7 +295,7 @@ sal_Int32 OResultSet::findColumn(const OUString& 
columnName) throw( SQLException
 
 namespace
 {
-static Reference< XDatabaseMetaData > 
lcl_getDBMetaDataFromStatement_nothrow( const Reference< XInterface >& 
_rxStatement )
+Reference< XDatabaseMetaData > lcl_getDBMetaDataFromStatement_nothrow( 
const Reference< XInterface >& _rxStatement )
 {
 Reference< XDatabaseMetaData > xDBMetaData;
 try
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx 
b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 318ed94..9df76e5 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1193,7 +1193,7 @@ namespace
 
 namespace
 {
-static void lcl_rebaseScriptStorage_throw( const Reference< 
XStorageBasedLibraryContainer >& _rxContainer,
+void lcl_rebaseScriptStorage_throw( const Reference< 
XStorageBasedLibraryContainer >& _rxContainer,
 const Reference< XStorage >& _rxNewRootStorage )
 {
 if ( _rxContainer.is() )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx 
b/dbaccess/source/core/dataaccess/databasedocument.cxx
index dc1f629..2922e8e 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -285,7 +285,7 @@ namespace
 return _rArguments.getOrDefault( "StatusIndicator", xStatusIndicator );
 }
 
-static void lcl_triggerStatusIndicator_throw( const 
::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const 
bool _bStart )
+void lcl_triggerStatusIndicator_throw( const 
::comphelper::NamedValueCollection& _rArguments, DocumentGuard& _rGuard, const 
bool _bStart )
 {
 Reference< XStatusIndicator > xStatusIndicator( 
lcl_extractStatusIndicator( _rArguments ) );
 if ( !xStatusIndicator.is() )
@@ -307,7 +307,7 @@ namespace
 // note that |reset| can throw a DisposedException
 }
 
-static void lcl_extractStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Sequence< Any >& _rCallArgs )
+void lcl_extractStatusIndicator( const ::comphelper::NamedValueCollection& 
_rArguments, Sequence< Any >& _rCallArgs )
 {
 Reference< XStatusIndicator > xStatusIndicator( 
lcl_extractStatusIndicator( _rArguments ) );
 if ( !xStatusIndicator.is() )
@@ -318,7 +318,7 @@ namespace
 _rCallArgs[ nLength ] <<= xStatusIndicator;
 }
 
-static void lcl_extractAndStartStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& 
_rxStatusIndicator,
+void lcl_extractAndStartStatusIndicator( const 
::comphelper::NamedValueCollection& _rArguments, Reference< XStatusIndicator >& 
_rxStatusIndicator,
 Sequence< Any >& _rCallArgs )
 {
 _rxStatusIndicator = lcl_extractStatusIndicator( _rArguments );
@@ -339,7 +339,7 @@ namespace
 }
 }
 
-static Sequence< PropertyValue > lcl_appendFileNameToDescriptor( const 

[Libreoffice-commits] core.git: dbaccess/qa filter/qa forms/qa framework/qa reportdesign/qa toolkit/qa vcl/qa

2015-06-05 Thread Noel Grandin
 dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java   | 
  31 -
 dbaccess/qa/complex/dbaccess/CopyTableWizard.java| 
  21 
 dbaccess/qa/complex/dbaccess/DataSource.java | 
  59 --
 dbaccess/qa/complex/dbaccess/Parser.java | 
  15 
 dbaccess/qa/complex/dbaccess/PropertyBag.java| 
  19 
 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java  | 
 257 --
 filter/qa/complex/filter/misc/FinalizedMandatoryTest.java| 
 195 ++-
 filter/qa/complex/filter/misc/TypeDetection6FileFormat.java  | 
  22 
 forms/qa/complex/forms/CheckOGroupBoxModel.java  | 
  47 -
 framework/qa/complex/contextMenuInterceptor/CheckContextMenuInterceptor.java | 
 174 ++
 framework/qa/complex/dispatches/checkdispatchapi.java| 
 165 ++
 framework/qa/complex/disposing/GetServiceWhileDisposingOffice.java   | 
  17 
 framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java | 
 142 +
 framework/qa/complex/path_settings/PathSettingsTest.java | 
   6 
 reportdesign/qa/complex/reportdesign/ReportDesignerTest.java | 
 158 ++
 toolkit/qa/complex/toolkit/UnitConversion.java   | 
 126 +---
 vcl/qa/complex/memCheck/CheckMemoryUsage.java| 
  14 
 vcl/qa/complex/persistent_window_states/PersistentWindowTest.java| 
  30 -
 18 files changed, 533 insertions(+), 965 deletions(-)

New commits:
commit 275f0c7b250d448a8e2658ee2f26d4010628237b
Author: Noel Grandin 
Date:   Fri Jun 5 10:24:36 2015 +0200

Let JUnit take care of exceptions

Inspired by commit
4dd0ac62855c5b9382cac004c7eebb9bed983a2b

Change-Id: I6ca29aecde357a3cb5852acfc9b5443761052960
Reviewed-on: https://gerrit.libreoffice.org/16094
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java 
b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
index 81ffdbe..a61ffdf 100644
--- a/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
+++ b/dbaccess/qa/complex/dbaccess/CRMBasedTestCase.java
@@ -19,37 +19,25 @@ package complex.dbaccess;
 
 import com.sun.star.sdb.XSingleSelectQueryComposer;
 import connectivity.tools.CRMDatabase;
-import java.util.logging.Level;
-import java.util.logging.Logger;
 
 // -- junit imports -
 import org.junit.After;
 import org.junit.Before;
-import static org.junit.Assert.*;
 
 
 public abstract class CRMBasedTestCase extends TestCase
 {
 protected   CRMDatabase m_database;
 
-
-protected void createTestCase()
+protected void createTestCase() throws Exception
 {
-try
-{
-m_database = new CRMDatabase( getMSF(), false );
-}
-catch ( Exception e )
-{
-e.printStackTrace( System.err );
-fail( "caught an exception (" + e.getMessage() + ") while creating 
the test case");
-}
+m_database = new CRMDatabase( getMSF(), false );
 }
 
 
 @Before
 @Override
-public void before()
+public void before() throws Exception
 {
 createTestCase();
 }
@@ -57,18 +45,11 @@ public abstract class CRMBasedTestCase extends TestCase
 
 @After
 @Override
-public void after()
+public void after() throws Exception
 {
-try
-{
-if ( m_database != null )
-{
-m_database.saveAndClose();
-}
-}
-catch ( Exception ex )
+if ( m_database != null )
 {
-Logger.getLogger( this.getClass().getName() ).log( Level.SEVERE, 
null, ex );
+m_database.saveAndClose();
 }
 }
 
diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java 
b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
index 97c63d2..20454d24 100644
--- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
@@ -30,7 +30,6 @@ import com.sun.star.sdb.DataAccessDescriptorFactory;
 import com.sun.star.sdbc.XConnection;
 import com.sun.star.sdbcx.XTablesSupplier;
 import com.sun.star.task.XInteractionHandler;
-import com.sun.star.uno.Exception;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.uno.XComponentContext;
 import connectivity.tools.DbaseDatabase;
@@ -41,7 +40,6 @@ import util.UITools;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import static org.junit.Assert.*;
 
 
 /** complex test case for Base's application UI
@@ -55,7 +53,7 @@ public class CopyTableWizard extends CRMBasedTestCase
 
 @After
 @Override
-public void after()
+public void after() throws Exception
 {
 dest.store();
 if ( destinationDB != null

[Libreoffice-commits] core.git: dbaccess/qa

2015-06-02 Thread Noel Grandin
 dbaccess/qa/complex/dbaccess/CopyTableWizard.java |9 ++---
 1 file changed, 2 insertions(+), 7 deletions(-)

New commits:
commit c2d73acad34f43b7c48ef9a4e492ab5b48bb4852
Author: Noel Grandin 
Date:   Tue Jun 2 10:04:20 2015 +0200

inline simple Java method

Change-Id: I496fa3223ed97d4d2cf8d64649ce30da22331dbd
Reviewed-on: https://gerrit.libreoffice.org/16039
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java 
b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
index 03727fe..97c63d2 100644
--- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
@@ -167,7 +167,7 @@ public class CopyTableWizard extends CRMBasedTestCase
 copyWizard.setCreatePrimaryKey(auto);
 Thread thread = new Thread(new CopyThread(copyWizard));
 thread.start();
-sleep();
+util.utils.shortWait();
 
 try
 {
@@ -195,14 +195,9 @@ public class CopyTableWizard extends CRMBasedTestCase
 catch (com.sun.star.lang.IndexOutOfBoundsException 
indexOutOfBoundsException)
 {
 }
-sleep();
+util.utils.shortWait();
 
 thread.join();
 }
 
-private void sleep()
-{
-util.utils.shortWait();
-}
-
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2015-06-01 Thread Stephan Bergmann
 dbaccess/qa/complex/dbaccess/RowSet.java |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 55431a84c264a8bcca593b9207aae0ad81d10f30
Author: Stephan Bergmann 
Date:   Mon Jun 1 18:26:34 2015 +0200

minor simplification

Change-Id: Iad908728d63b0dcf3bef0a76c9d2fa3c892bf986

diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java 
b/dbaccess/qa/complex/dbaccess/RowSet.java
index 2763ac3..156776a 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -104,8 +104,7 @@ public class RowSet extends TestCase
 {
 synchronized (failedResultSetMovementStressGuard) {
 failedResultSetMovementStressMessages
-= failedResultSetMovementStressMessages
-+ "ResultSetMovementStress(" + m_id + ") failed at i="
++= "ResultSetMovementStress(" + m_id + ") failed at i="
 + i + ": " + e + "\n";
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2015-06-01 Thread Stephan Bergmann
 dbaccess/qa/complex/dbaccess/RowSet.java |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit e9d055bf67d2ad600d2efa58a4c8b8bbcedf348c
Author: Stephan Bergmann 
Date:   Mon Jun 1 11:07:31 2015 +0200

Do not lose AssertionError from sub-threads

Change-Id: I8ca7194be6d22b72b73e76e5067273090b087b96

diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java 
b/dbaccess/qa/complex/dbaccess/RowSet.java
index 5ee5ea2..2763ac3 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -69,6 +69,8 @@ public class RowSet extends TestCase
 XPropertySet m_rowSetProperties;
 XParametersSupplier m_paramsSupplier;
 
+private final Object failedResultSetMovementStressGuard = new Object();
+private String failedResultSetMovementStressMessages = "";
 
 private class ResultSetMovementStress implements Runnable
 {
@@ -100,7 +102,12 @@ public class RowSet extends TestCase
 }
 catch (Exception e)
 {
-fail("ResultSetMovementStress(" + m_id + ") failed at i=" + i 
+ ": " + e);
+synchronized (failedResultSetMovementStressGuard) {
+failedResultSetMovementStressMessages
+= failedResultSetMovementStressMessages
++ "ResultSetMovementStress(" + m_id + ") failed at i="
++ i + ": " + e + "\n";
+}
 }
 }
 }
@@ -383,6 +390,9 @@ public class RowSet extends TestCase
 {
 threads[i].join();
 }
+synchronized (failedResultSetMovementStressGuard) {
+assertEquals("", failedResultSetMovementStressMessages);
+}
 }
 catch (Exception e)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa reportdesign/source sc/source sw/source

2015-03-10 Thread Caolán McNamara
 dbaccess/qa/unit/embeddeddb_performancetest.cxx |   11 +--
 reportdesign/source/ui/report/ViewsWindow.cxx   |   17 +++--
 sc/source/filter/xcl97/XclExpChangeTrack.cxx|3 ---
 sw/source/filter/ww8/ww8scan.cxx|5 +++--
 sw/source/ui/dialog/swdlgfact.cxx   |4 +---
 5 files changed, 12 insertions(+), 28 deletions(-)

New commits:
commit 95af5f51fa6c7a0129360bb9df687fb8660fd3c9
Author: Caolán McNamara 
Date:   Tue Mar 10 09:47:02 2015 +

V668 no sense in testing the result of new against null

Change-Id: I85993df91bd14966f9175c356966fbd8eb1a927d

diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx 
b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 1eebc22..a639d72 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -129,16 +129,7 @@ SvFileStream* 
EmbeddedDBPerformanceTest::getWordListStream()
 {
 OUString wlPath;
 createFileURL("wordlist", wlPath);
-
-SvFileStream *pFile(new SvFileStream(wlPath, StreamMode::READ));
-
-if (!pFile)
-{
-fprintf(stderr, "Please ensure the wordlist is present\n");
-CPPUNIT_ASSERT(false);
-}
-
-return pFile;
+return new SvFileStream(wlPath, StreamMode::READ);
 }
 
 void EmbeddedDBPerformanceTest::printTimes(
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index c849571..730b372 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1011,18 +1011,15 @@ void 
OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _
 if ( &rView != &_rSection )
 {
 SdrObject *pNewObj = new 
SdrUnoObj(OUString("com.sun.star.form.component.FixedText"));
-if (pNewObj)
-{
-pNewObj->SetLogicRect(_aRect);
+pNewObj->SetLogicRect(_aRect);
 
-pNewObj->Move(Size(0, aNewPos.Y()));
-bool bChanged = rView.GetModel()->IsChanged();
-rReportSection.getPage()->InsertObject(pNewObj);
-rView.GetModel()->SetChanged(bChanged);
-m_aBegDragTempList.push_back(pNewObj);
+pNewObj->Move(Size(0, aNewPos.Y()));
+bool bChanged = rView.GetModel()->IsChanged();
+rReportSection.getPage()->InsertObject(pNewObj);
+rView.GetModel()->SetChanged(bChanged);
+m_aBegDragTempList.push_back(pNewObj);
 
-rView.MarkObj( pNewObj, rView.GetSdrPageView() );
-}
+rView.MarkObj( pNewObj, rView.GetSdrPageView() );
 }
 const long nSectionHeight = 
rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height();
 aNewPos.Y() -= nSectionHeight;
diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx 
b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
index 2989f20..e90ebfa 100644
--- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx
+++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx
@@ -1546,9 +1546,6 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack()
 
 // create empty document
 pTempDoc = new ScDocument;
-OSL_ENSURE( pTempDoc, "XclExpChangeTrack::CreateTempChangeTrack - no temp 
document" );
-if( !pTempDoc )
-return NULL;
 
 // adjust table count
 SCTAB nOrigCount = GetDoc().GetTableCount();
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 22d93f1..8c4f828 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2884,9 +2884,10 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
 pFkp = *aIter;
 pFkp->Reset(GetStartFc());
 }
-else if (0 != (pFkp = new WW8Fkp(GetFIBVersion(), pFKPStrm, pDataStrm, 
nPo,
-pFkpSizeTab[ ePLCF ], ePLCF, GetStartFc(
+else
 {
+pFkp = new WW8Fkp(GetFIBVersion(), pFKPStrm, pDataStrm, nPo,
+pFkpSizeTab[ ePLCF ], ePLCF, GetStartFc());
 maFkpCache.push_back(pFkp);
 
 if (maFkpCache.size() > eMaxCache)
diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index 8bc1190..a64cb08 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -987,9 +987,7 @@ AbstractInsFootNoteDlg* 
SwAbstractDialogFactory_Impl::CreateInsFootNoteDlg(
 VclAbstractDialog * SwAbstractDialogFactory_Impl::CreateTitlePageDlg ( 
vcl::Window *pParent )
 {
 Dialog* pDlg = new SwTitlePageDlg( pParent );
-if ( pDlg )
-return new VclAbstractDialog_Impl( pDlg );
-return 0;
+return new VclAbstractDialog_Impl( pDlg );
 }
 
 VclAbstractDialog * 
SwAbstractDialogFactory_Impl::CreateVclSwViewDialog(SwView& rView)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freede

[Libreoffice-commits] core.git: dbaccess/qa

2015-02-09 Thread Stephan Bergmann
 dev/null |binary
 1 file changed

New commits:
commit d51502c654ddc3ff6ef8ca7b8f190807bb0a8010
Author: Stephan Bergmann 
Date:   Mon Feb 9 17:39:13 2015 +0100

Fuck that left-behind .lck file

Change-Id: I6ceab61500397cae687fb4356e5dcb48f8090a48

diff --git a/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck 
b/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck
deleted file mode 100644
index 16c4bcc..000
Binary files a/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck and /dev/null 
differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa unotest/source

2015-02-09 Thread Stephan Bergmann
 dbaccess/qa/extras/testdocuments/fdo84315.odb.lck |binary
 dbaccess/qa/python/fdo84315.py|2 +-
 unotest/source/python/org/libreoffice/unotest.py  |5 -
 3 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 49df6e0d8c9d0ef885b0230e53d6296ce0975078
Author: Stephan Bergmann 
Date:   Mon Feb 9 17:33:26 2015 +0100

Adapt file URL hackery to Windows

Change-Id: Icee10aae97e9bcef7a3db7e966c1c4ef6780fc1d

diff --git a/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck 
b/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck
new file mode 100644
index 000..16c4bcc
Binary files /dev/null and b/dbaccess/qa/extras/testdocuments/fdo84315.odb.lck 
differ
diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index e3e2fa3..a4bbc1b 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -22,7 +22,7 @@ class Fdo84315(unittest.TestCase):
 cls._uno = UnoInProcess()
 cls._uno.setUp()
 workdir = os.environ[ "WORKDIR_FOR_BUILD" ]
-cls._xDoc = cls._uno.openDoc(os.path.join(workdir, 
"CppunitTest/fdo84315.odb"))
+cls._xDoc = cls._uno.openDoc(workdir + "/CppunitTest/fdo84315.odb")
 
 @classmethod
 def tearDownClass(cls):
diff --git a/unotest/source/python/org/libreoffice/unotest.py 
b/unotest/source/python/org/libreoffice/unotest.py
index 0acf05a..28f5eca 100644
--- a/unotest/source/python/org/libreoffice/unotest.py
+++ b/unotest/source/python/org/libreoffice/unotest.py
@@ -224,7 +224,10 @@ class UnoInProcess:
 desktop = smgr.createInstanceWithContext("com.sun.star.frame.Desktop", 
self.getContext())
 props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", False)]
 loadProps = tuple([mkPropertyValue(name, value) for (name, value) in 
props])
-url = "file://" + file
+if os.name == "nt":
+url = "file:///" + file
+else:
+url = "file://" + file
 self.xDoc = desktop.loadComponentFromURL(url, "_blank", 0, loadProps)
 assert(self.xDoc)
 return self.xDoc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2015-02-03 Thread Stephan Bergmann
 dbaccess/qa/python/fdo84315.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7dbf8384a9fb41743f4729ad1482a0d343e86fec
Author: Stephan Bergmann 
Date:   Tue Feb 3 15:17:42 2015 +0100

Fix PythonTest_dbaccess_python

Change-Id: Id1ab4496c5a8fa5bf97ac00e57cb89afe82b232b

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index e3a98c1..e3e2fa3 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -27,7 +27,6 @@ class Fdo84315(unittest.TestCase):
 @classmethod
 def tearDownClass(cls):
 cls._uno.tearDown()
-xCon.dispose()
 
 def test_fdo84315(self):
 xDoc = self.__class__._xDoc
@@ -71,5 +70,7 @@ class Fdo84315(unittest.TestCase):
 self.assertEqual(xResultset.getInt(1), expected_values.popleft())
 self.assertEqual(len(expected_values), 0)
 
+xCon.dispose()
+
 if __name__ == '__main__':
 unittest.main()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source include/toolkit toolkit/source vbahelper/source writerfilter/source xmloff/source

2014-12-08 Thread Noel Grandin
 dbaccess/qa/unit/dbtest_base.cxx  |2 
 dbaccess/source/ui/misc/indexcollection.cxx   |   14 +--
 include/toolkit/helper/servicenames.hxx   |1 
 toolkit/source/controls/grid/defaultgriddatamodel.cxx |4 -
 toolkit/source/controls/tree/treedatamodel.cxx|   10 +-
 toolkit/source/helper/servicenames.cxx|1 
 vbahelper/source/vbahelper/vbaglobalbase.cxx  |7 -
 writerfilter/source/rtftok/rtfsdrimport.cxx   |8 +-
 xmloff/source/forms/elementexport.cxx |   72 +-
 xmloff/source/forms/elementimport.cxx |   16 ++--
 xmloff/source/forms/layerexport.cxx   |2 
 11 files changed, 64 insertions(+), 73 deletions(-)

New commits:
commit 2979ff295c9fafdb92cb56cd1f5ddb0a6b56cf20
Author: Noel Grandin 
Date:   Fri Dec 5 16:28:32 2014 +0200

fdo#38835 strip out OUString globals

Change-Id: I1a435214af102461e02217f7d95248dac14e5f1a

diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index 1f226c1..d3b07f8 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -25,8 +25,6 @@ using namespace ::com::sun::star::uno;
 class DBTestBase
 : public UnoApiTest
 {
-protected:
-static const OUString our_sFilePath;
 public:
 DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
 
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx 
b/dbaccess/source/ui/misc/indexcollection.cxx
index 7557d6cc..5049e2a 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -150,9 +150,9 @@ namespace dbaui
 }
 
 // set the properties
-static const OUString s_sUniquePropertyName = "IsUnique";
-static const OUString s_sSortPropertyName = "IsAscending";
-static const OUString s_sNamePropertyName = "Name";
+static const char s_sUniquePropertyName[] = "IsUnique";
+static const char s_sSortPropertyName[] = "IsAscending";
+static const char s_sNamePropertyName[] = "Name";
 // the index' own props
 xIndexDescriptor->setPropertyValue(s_sUniquePropertyName, 
css::uno::makeAny(_rPos->bUnique));
 xIndexDescriptor->setPropertyValue(s_sNamePropertyName, 
makeAny(_rPos->sName));
@@ -252,10 +252,10 @@ namespace dbaui
 
 void OIndexCollection::implFillIndexInfo(OIndex& _rIndex, Reference< 
XPropertySet > _rxDescriptor)
 {
-static const OUString s_sPrimaryIndexPropertyName = 
"IsPrimaryKeyIndex";
-static const OUString s_sUniquePropertyName = "IsUnique";
-static const OUString s_sSortPropertyName = "IsAscending";
-static const OUString s_sCatalogPropertyName = "Catalog";
+static const char s_sPrimaryIndexPropertyName[] = "IsPrimaryKeyIndex";
+static const char s_sUniquePropertyName[] = "IsUnique";
+static const char s_sSortPropertyName[] = "IsAscending";
+static const char s_sCatalogPropertyName[] = "Catalog";
 
 _rIndex.bPrimaryKey = 
::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sPrimaryIndexPropertyName));
 _rIndex.bUnique = 
::cppu::any2bool(_rxDescriptor->getPropertyValue(s_sUniquePropertyName));
diff --git a/include/toolkit/helper/servicenames.hxx 
b/include/toolkit/helper/servicenames.hxx
index b007a87..cc81567 100644
--- a/include/toolkit/helper/servicenames.hxx
+++ b/include/toolkit/helper/servicenames.hxx
@@ -87,7 +87,6 @@ extern const sal_Char szServiceName_UnoSpinButtonControl[], 
szServiceName_UnoSpi
 
 extern const sal_Char szServiceName_TreeControl[];
 extern const sal_Char szServiceName_TreeControlModel[];
-extern const sal_Char szServiceName_MutableTreeDataModel[];
 
 extern const sal_Char szServiceName_GridControl[];
 extern const sal_Char szServiceName_GridControlModel[];
diff --git a/toolkit/source/controls/grid/defaultgriddatamodel.cxx 
b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
index 883d3e4..aa830e4 100644
--- a/toolkit/source/controls/grid/defaultgriddatamodel.cxx
+++ b/toolkit/source/controls/grid/defaultgriddatamodel.cxx
@@ -495,8 +495,8 @@ private:
 
 Sequence< OUString > SAL_CALL 
DefaultGridDataModel::getSupportedServiceNames(  ) throw (RuntimeException, 
std::exception)
 {
-static const OUString 
aServiceName("com.sun.star.awt.grid.DefaultGridDataModel");
-static const Sequence< OUString > aSeq( &aServiceName, 1 );
+Sequence< OUString > aSeq( 1 );
+aSeq[0] = "com.sun.star.awt.grid.DefaultGridDataModel";
 return aSeq;
 }
 
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx 
b/toolkit/source/controls/tree/treedatamodel.cxx
index ee1468f..3f50b3d 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -258,9 +258,8 @@ sal_Bool SAL_CALL MutableTreeDataModel::supportsService( 
const OUStrin

[Libreoffice-commits] core.git: dbaccess/qa framework/qa qadevOOo/runner qadevOOo/tests sfx2/qa

2014-11-24 Thread Noel Grandin
 dbaccess/qa/complex/dbaccess/CopyTableWizard.java  |2 
 framework/qa/complex/framework/recovery/KlickButtonThread.java |2 
 framework/qa/complex/framework/recovery/RecoveryTest.java  |8 
 framework/qa/complex/framework/recovery/RecoveryTools.java |2 
 qadevOOo/runner/convwatch/ConvWatch.java   |5 
 qadevOOo/runner/convwatch/ConvWatchStarter.java|2 
 qadevOOo/runner/convwatch/GraphicalTestArguments.java  |2 
 qadevOOo/runner/convwatch/HTMLOutputter.java   |  294 
--
 qadevOOo/runner/convwatch/INIOutputter.java|4 
 qadevOOo/runner/convwatch/IniFile.java |1 
 qadevOOo/runner/util/DBTools.java  |   35 -
 qadevOOo/runner/util/SysUtils.java |   12 
 qadevOOo/runner/util/UITools.java  |   28 
 qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java |4 
 qadevOOo/tests/java/ifc/awt/_XMessageBoxFactory.java   |1 
 qadevOOo/tests/java/ifc/task/_XInteractionHandler.java |4 
 qadevOOo/tests/java/mod/_remotebridge/various.java |2 
 qadevOOo/tests/java/mod/_sc/ScTableSheetsObj.java  |2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableCellView.java |2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTableView.java |2 
 qadevOOo/tests/java/mod/_sw/SwAccessibleTextFrameView.java |2 
 qadevOOo/tests/java/mod/_sw/SwXCell.java   |2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndex.java  |2 
 qadevOOo/tests/java/mod/_sw/SwXDocumentIndexes.java|2 
 qadevOOo/tests/java/mod/_sw/SwXTableRows.java  |2 
 qadevOOo/tests/java/mod/_sw/SwXTextFrameText.java  |2 
 qadevOOo/tests/java/mod/_sw/SwXTextTableCursor.java|2 
 qadevOOo/tests/java/mod/_sw/SwXTextTableRow.java   |2 
 qadevOOo/tests/java/mod/_sw/SwXTextTables.java |2 
 sfx2/qa/complex/sfx2/GlobalEventBroadcaster.java   |2 
 30 files changed, 155 insertions(+), 279 deletions(-)

New commits:
commit fe095dada4e83129d49c8cc50501aa224d61e0f9
Author: Noel Grandin 
Date:   Tue Nov 18 13:32:37 2014 +0200

java,qadev: remove unused parameters and local vars

Change-Id: Ifb9f9374051fe88dc4cd5a7a28b2c8c992ced873
Reviewed-on: https://gerrit.libreoffice.org/13097
Tested-by: LibreOffice gerrit bot 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java 
b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
index 7b7e2fd..3a0f013 100644
--- a/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
+++ b/dbaccess/qa/complex/dbaccess/CopyTableWizard.java
@@ -172,7 +172,7 @@ public class CopyTableWizard extends CRMBasedTestCase
 try
 {
 final XWindow dialog = getActiveWindow();
-final UITools uiTools = new UITools(getMSF(), dialog);
+final UITools uiTools = new UITools(dialog);
 final XAccessible root = uiTools.getRoot();
 final XAccessibleContext accContext = root.getAccessibleContext();
 final int count = accContext.getAccessibleChildCount();
diff --git a/framework/qa/complex/framework/recovery/KlickButtonThread.java 
b/framework/qa/complex/framework/recovery/KlickButtonThread.java
index 0b7e2ce..d2dceb4 100644
--- a/framework/qa/complex/framework/recovery/KlickButtonThread.java
+++ b/framework/qa/complex/framework/recovery/KlickButtonThread.java
@@ -40,7 +40,7 @@ public class KlickButtonThread extends Thread {
 @Override
 public void run() {
 try{
-UITools oUITools = new UITools(xMSF, xWindow);
+UITools oUITools = new UITools(xWindow);
 
 oUITools.clickButton(buttonName);
 
diff --git a/framework/qa/complex/framework/recovery/RecoveryTest.java 
b/framework/qa/complex/framework/recovery/RecoveryTest.java
index b85f519..746ff82 100644
--- a/framework/qa/complex/framework/recovery/RecoveryTest.java
+++ b/framework/qa/complex/framework/recovery/RecoveryTest.java
@@ -236,7 +236,7 @@ public class RecoveryTest extends ComplexTestCase {
 
 XWindow xWindow = UnoRuntime.queryInterface(XWindow.class, 
oDialog);
 
-UITools oUITools = new UITools(xMSF, xWindow);
+UITools oUITools = new UITools(xWindow);
 
 oUITools.printAccessibleTree((PrintWriter) log, 
param.getBool(PropertyName.DEBUG_IS_ACTIVE));
 
@@ -275,7 +275,7 @@ public class RecoveryTest extends ComplexTestCase {
 
 log.println(oDialog.getTitle());
 
-UITools oUITools = new UITools(xMSF, xWindow);
+UITools oUITools = new UITools(xWindow);
 
 if (cancel) {
 log.println("clicking 'Cancel' button...");
@@ -328,7 +328,7 @@ public cl

[Libreoffice-commits] core.git: dbaccess/qa

2014-10-22 Thread Michael Stahl
 dbaccess/qa/python/fdo84315.py |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 6af967ae4c53b6ce90603338e4378620791fe3fc
Author: Michael Stahl 
Date:   Wed Oct 22 16:35:33 2014 +0200

Revert "PythonTest_dbaccess_python: don't modify source document"

This reverts commit 29474c7a227050b16fc341bdf7df68112793a23d.

Removing the lock file fails on Windows because it is opened; it ought
be possible to close the document instead to clean up the lock file?

Change-Id: I2c93fc893c62d6a267be9723761e5ed7577086a7

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index 06b2a6c..0670f66 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -7,10 +7,8 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-import os
 import unittest
 from collections import deque
-import unohelper
 from org.libreoffice.unotest import UnoInProcess
 
 class Fdo84315(unittest.TestCase):
@@ -25,10 +23,7 @@ class Fdo84315(unittest.TestCase):
 
 @classmethod
 def tearDownClass(cls):
-# Closing the connection properly would modify the source document for 
some reason.
-lock = unohelper.fileUrlToSystemPath(cls._xDoc.URL) + ".lck"
 cls._uno.tearDown()
-os.remove(lock)
 
 def test_fdo84315(self):
 xDoc = self.__class__._xDoc
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2014-10-21 Thread Miklos Vajna
 dbaccess/qa/python/fdo84315.py |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 29474c7a227050b16fc341bdf7df68112793a23d
Author: Miklos Vajna 
Date:   Tue Oct 21 17:54:58 2014 +0200

PythonTest_dbaccess_python: don't modify source document

Change-Id: I4e8f94554141e41863c474c5f99be4b1974f3dd7

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index bf13e1b..06b2a6c 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -7,8 +7,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
+import os
 import unittest
 from collections import deque
+import unohelper
 from org.libreoffice.unotest import UnoInProcess
 
 class Fdo84315(unittest.TestCase):
@@ -23,7 +25,10 @@ class Fdo84315(unittest.TestCase):
 
 @classmethod
 def tearDownClass(cls):
+# Closing the connection properly would modify the source document for 
some reason.
+lock = unohelper.fileUrlToSystemPath(cls._xDoc.URL) + ".lck"
 cls._uno.tearDown()
+os.remove(lock)
 
 def test_fdo84315(self):
 xDoc = self.__class__._xDoc
@@ -66,7 +71,6 @@ class Fdo84315(unittest.TestCase):
 while xResultset.next():
 self.assertEqual(xResultset.getInt(1), expected_values.popleft())
 self.assertEqual(len(expected_values), 0)
-xCon.dispose()
 
 if __name__ == '__main__':
 unittest.main()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2014-10-21 Thread Miklos Vajna
 dbaccess/qa/python/fdo84315.py |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 0796b3041231063c3594e85a8f2ea2b15602d46d
Author: Miklos Vajna 
Date:   Tue Oct 21 16:27:42 2014 +0200

dbaccess: make sure fdo84315.odb.lck is removed after the test passed

Change-Id: I6c9a42625f10a3a30e2636a2a2be2b9bcba8f6af

diff --git a/dbaccess/qa/python/fdo84315.py b/dbaccess/qa/python/fdo84315.py
index 0670f66..bf13e1b 100644
--- a/dbaccess/qa/python/fdo84315.py
+++ b/dbaccess/qa/python/fdo84315.py
@@ -66,6 +66,7 @@ class Fdo84315(unittest.TestCase):
 while xResultset.next():
 self.assertEqual(xResultset.getInt(1), expected_values.popleft())
 self.assertEqual(len(expected_values), 0)
+xCon.dispose()
 
 if __name__ == '__main__':
 unittest.main()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2014-10-09 Thread Lionel Elie Mamane
 dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e0b14b922204acf541bedf658236d30dc5878fca
Author: Lionel Elie Mamane 
Date:   Thu Oct 9 18:26:21 2014 +0200

forgotten part of previous commit

Change-Id: If050e630edacef67ab194c0b6941a6542e4ebceb

diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java 
b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
index 7cb054b..08eea00 100644
--- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
+++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
@@ -51,7 +51,7 @@ public class SingleSelectQueryComposer extends 
CRMBasedTestCase
 + " OR ( \"ID\" = 3 AND \"Postal\" = '6' AND \"Address\" = '7' )"
 + " OR ( \"Address\" = '8' )"
 + " OR ( \"Postal\" = '9' )"
-+ " OR ( NOW( ) = {D '2010-01-01' } )";
++ " OR ( NOW( ) = {d '2010-01-01' } )";
 private final static String INNERPRODUCTSQUERY = "products (inner)";
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source sfx2/source sw/inc sw/source

2014-09-17 Thread Julien Nabet
 dbaccess/qa/complex/dbaccess/RowSet.java   |2 +-
 dbaccess/source/core/api/CacheSet.cxx  |2 +-
 dbaccess/source/core/api/KeySet.cxx|   10 +-
 dbaccess/source/core/api/OptimisticSet.cxx |2 +-
 sfx2/source/view/viewsh.cxx|4 ++--
 sw/inc/anchoreddrawobject.hxx  |2 +-
 sw/source/core/text/txtfly.cxx |2 +-
 7 files changed, 12 insertions(+), 12 deletions(-)

New commits:
commit a762204a5df46ef68c5b0be4427fc99e32c4c36d
Author: Julien Nabet 
Date:   Wed Sep 17 21:14:52 2014 +0200

Typos

Change-Id: Icf850c4b7b146a82a5638a3cd88ad02f3171aff3

diff --git a/dbaccess/qa/complex/dbaccess/RowSet.java 
b/dbaccess/qa/complex/dbaccess/RowSet.java
index c9bb39a..66749fb 100644
--- a/dbaccess/qa/complex/dbaccess/RowSet.java
+++ b/dbaccess/qa/complex/dbaccess/RowSet.java
@@ -200,7 +200,7 @@ public class RowSet extends TestCase
 System.out.println("testing testRowSet");
 createTestCase(true);
 
-// sequential postioning
+// sequential positioning
 m_resultSet.beforeFirst();
 testSequentialPositining(m_resultSet, m_row);
 
diff --git a/dbaccess/source/core/api/CacheSet.cxx 
b/dbaccess/source/core/api/CacheSet.cxx
index 65c5e83..de9d943 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -282,7 +282,7 @@ void SAL_CALL OCacheSet::updateRow(const ORowSetRow& 
_rInsertRow ,const ORowSetR
 fillTableName(xSet);
 
 OUStringBuffer aSql("UPDATE " + m_aComposedTableName + " SET ");
-// list all cloumns that should be set
+// list all columns that should be set
 
 OUStringBuffer aCondition;
 ::std::list< sal_Int32> aOrgValues;
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 2c75718..96e01ab 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -562,14 +562,14 @@ void SAL_CALL OKeySet::updateRow(const ORowSetRow& 
_rInsertRow ,const ORowSetRow
 fillTableName(xSet);
 
 OUStringBuffer aSql = "UPDATE " + m_aComposedTableName + " SET ";
-// list all cloumns that should be set
+// list all columns that should be set
 static OUString aPara(" = ?,");
 OUString aQuote  = getIdentifierQuoteString();
 static OUString aAnd(" AND ");
 OUString sIsNull(" IS NULL");
 OUString sParam(" = ?");
 
-// use keys and indexes for exact postioning
+// use keys and indexes for exact positioning
 // first the keys
 Reference xKeyColumns = getKeyColumns();
 
@@ -972,11 +972,11 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& 
_rDeleteRow,const connectivit
 
 OUStringBuffer aSql("DELETE FROM " + m_aComposedTableName + " WHERE ");
 
-// list all cloumns that should be set
+// list all columns that should be set
 OUString aQuote  = getIdentifierQuoteString();
 static OUString aAnd(" AND ");
 
-// use keys and indexes for excat postioning
+// use keys and indexes for exact positioning
 Reference xKeyColumns = getKeyColumns();
 // second the indexes
 Reference xIndexSup(_xTable,UNO_QUERY);
@@ -1082,7 +1082,7 @@ void SAL_CALL OKeySet::moveToCurrentRow(  ) 
throw(SQLException, RuntimeException
 
 Reference OKeySet::getKeyColumns() const
 {
-// use keys and indexes for exact postioning
+// use keys and indexes for exact positioning
 // first the keys
 
 Reference xKeys = m_xTableKeys;
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx 
b/dbaccess/source/core/api/OptimisticSet.cxx
index 44e7807..aece21b 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -182,7 +182,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& 
_rInsertRow ,const ORow
 {
 if ( m_aJoinedKeyColumns.empty() )
 throw SQLException();
-// list all cloumns that should be set
+// list all columns that should be set
 static OUString s_sPara(" = ?");
 OUString aQuote  = getIdentifierQuoteString();
 
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 9b40bb4..fd07e1a 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1052,7 +1052,7 @@ void SfxViewShell::OuterResizePixel
 here. The mainuse is to change the size of the Vis-Area.
 
 If the Border is changed due to the new calculation then this has to be set
-by . The Postioning of Tools
+by . The Positioning of 
Tools
 is only allowed after the calling of 'SetBorderPixel'.
 
 [Example]
@@ -1101,7 +1101,7 @@ void SfxViewShell::InnerResizePixel
 
 If the Border is changed due to the new calculation then is has to be set
 by .
-The Postioning of Tools is only allowed after the calling of
+The Positioning of Tools is only allowed after the calling of
 'SetBorderPixel'.
 
 
diff --git a/sw/inc/anchoreddrawobject.hxx b/sw/inc/anchoreddrawobject.hxx
index 425952bd..e49185

[Libreoffice-commits] core.git: dbaccess/qa

2014-04-22 Thread Stephan Bergmann
 dbaccess/qa/extras/macros-test.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 139dcea46bf3044697e857a9de0b59a4b943604a
Author: Stephan Bergmann 
Date:   Tue Apr 22 22:07:21 2014 +0200

loplugin:unreffun

Change-Id: Ia7b5ac5ca28d80c353f1ccdce4b69838e584d811

diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index 761f241..7600720 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -23,6 +23,7 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+#if !defined(MACOSX) && !defined(WNT)
 
 class DBAccessTest : public UnoApiTest
 {
@@ -32,9 +33,7 @@ public:
 void test();
 
 CPPUNIT_TEST_SUITE(DBAccessTest);
-#if !defined(MACOSX) && !defined(WNT)
 CPPUNIT_TEST(test);
-#endif
 CPPUNIT_TEST_SUITE_END();
 
 };
@@ -56,6 +55,8 @@ void DBAccessTest::test()
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DBAccessTest);
 
+#endif
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2014-01-24 Thread Miklos Vajna
 dbaccess/qa/extras/dialog-save.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit acdfb2593564ea23d4bbb999856922568d7ab2c3
Author: Miklos Vajna 
Date:   Fri Jan 24 22:39:31 2014 +0100

dbaccess: disable hanging close() for now

I don't know why it hangs, but seems even without closing, the test
still fails after reverting fc9080a0c60f263d00eb7fcda72b3c0a2ebb
(fdo#67685 open xSourceLibrariesStor only when needed, 2013-08-02).

Once the test no longer hangs, of course feel free to add this back.

Change-Id: If124b7f57a8fa2d522ebdb448366aec6f1ff4987

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index aaa7593..4b162ad 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -101,7 +101,7 @@ void DialogSaveTest::test()
 // close
 uno::Reference< util::XCloseable > xDocCloseable(xComponent, 
UNO_QUERY_THROW);
 CPPUNIT_ASSERT(xDocCloseable.is());
-xDocCloseable->close(false);
+//xDocCloseable->close(false);
 
 // All our uno::References are (should?) be invalid now -> let them go 
out of scope
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2013-11-09 Thread Lionel Elie Mamane
 dbaccess/qa/unit/dbtest_base.cxx|   35 +-
 dbaccess/qa/unit/embeddeddb_performancetest.cxx |   38 
 2 files changed, 28 insertions(+), 45 deletions(-)

New commits:
commit 1b85ffca7d56cb1336800d04761884149a7b4247
Author: Lionel Elie Mamane 
Date:   Sat Nov 9 22:33:33 2013 +0100

factorise code; make DBTestBase a UnoApiTest

Change-Id: I29c131f60caa36c464d99b9b86a59e2e16ce94e3

diff --git a/dbaccess/qa/unit/dbtest_base.cxx b/dbaccess/qa/unit/dbtest_base.cxx
index 633a144..1f226c1 100644
--- a/dbaccess/qa/unit/dbtest_base.cxx
+++ b/dbaccess/qa/unit/dbtest_base.cxx
@@ -8,8 +8,7 @@
  */
 
 #include 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -24,30 +23,27 @@ using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::uno;
 
 class DBTestBase
-: public ::test::BootstrapFixture
-, public ::unotest::MacrosTest
+: public UnoApiTest
 {
 protected:
 static const OUString our_sFilePath;
 public:
-virtual void setUp();
-virtual void tearDown();
+DBTestBase() : UnoApiTest("dbaccess/qa/unit/data") {};
 
 uno::Reference< XOfficeDatabaseDocument >
-getDocumentForFileName(OUString sFileName);
+getDocumentForFileName(const OUString &sFileName);
 
 uno::Reference< XConnection >
 getConnectionForDocument(
 uno::Reference< XOfficeDatabaseDocument >& xDocument);
 };
 
-const OUString DBTestBase::our_sFilePath("/dbaccess/qa/unit/data/");
-
 uno::Reference< XOfficeDatabaseDocument >
-DBTestBase::getDocumentForFileName(OUString sFileName)
+DBTestBase::getDocumentForFileName(const OUString &sFileName)
 {
-uno::Reference< lang::XComponent > xComponent =
-loadFromDesktop(getSrcRootURL() + our_sFilePath + sFileName);
+OUString sFilePath;
+createFileURL(sFileName, sFilePath);
+uno::Reference< lang::XComponent > xComponent (loadFromDesktop(sFilePath));
 CPPUNIT_ASSERT(xComponent.is());
 
 uno::Reference< XOfficeDatabaseDocument > xDocument(xComponent, UNO_QUERY);
@@ -68,19 +64,4 @@ uno::Reference< XConnection > 
DBTestBase::getConnectionForDocument(
 return xConnection;
 }
 
-
-void DBTestBase::setUp()
-{
-::test::BootstrapFixture::setUp();
-
-mxDesktop = ::com::sun::star::frame::Desktop::create(
-::comphelper::getProcessComponentContext());
-CPPUNIT_ASSERT(mxDesktop.is());
-}
-
-void DBTestBase::tearDown()
-{
-test::BootstrapFixture::tearDown();
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx 
b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index 0ba4ac4..c326db6 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -100,6 +100,8 @@ private:
 
 void setupTestTable(uno::Reference< XConnection >& xConnection);
 
+SvFileStream *getWordListStream();
+
 // Individual Tests
 void performPreparedStatementInsertTest(
 uno::Reference< XConnection >& xConnection,
@@ -123,6 +125,22 @@ public:
 CPPUNIT_TEST_SUITE_END();
 };
 
+SvFileStream* EmbeddedDBPerformanceTest::getWordListStream()
+{
+OUString wlPath;
+createFileURL("wordlist", wlPath);
+
+SvFileStream *pFile(new SvFileStream(wlPath, STREAM_READ));
+
+if (!pFile)
+{
+fprintf(stderr, "Please ensure the wordlist is present\n");
+CPPUNIT_ASSERT(false);
+}
+
+return pFile;
+}
+
 void EmbeddedDBPerformanceTest::printTimes(
 const TimeValue* pTime1,
 const TimeValue* pTime2,
@@ -252,15 +270,7 @@ void 
EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
 
 uno::Reference< XParameters > xParameters(xPreparedStatement, 
UNO_QUERY_THROW);
 
-::boost::scoped_ptr< SvFileStream > pFile(new SvFileStream(
-getSrcRootURL() + our_sFilePath + "wordlist",
-STREAM_READ));
-
-if (!pFile)
-{
-fprintf(stderr, "Please ensure the wordlist is present\n");
-CPPUNIT_ASSERT(false);
-}
+::boost::scoped_ptr< SvFileStream > pFile(getWordListStream());
 
 OUString aWord;
 sal_Int32 aID = 0;
@@ -296,15 +306,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
 uno::Reference< XStatement > xStatement =
 xConnection->createStatement();
 
-::boost::scoped_ptr< SvFileStream > pFile(new SvFileStream(
-getSrcRootURL() + our_sFilePath + "wordlist",
-STREAM_READ));
-
-if (!pFile)
-{
-fprintf(stderr, "Please ensure the wordlist is present\n");
-CPPUNIT_ASSERT(false);
-}
+::boost::scoped_ptr< SvFileStream > pFile(getWordListStream());
 
 OUString aWord;
 sal_Int32 aID = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa unotest/source

2013-09-27 Thread Stephan Bergmann
 dbaccess/qa/extras/dialog-save.cxx  |2 +-
 unotest/source/cpp/bootstrapfixturebase.cxx |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 5063e39261fb9c9568b56a2a6ff8949fb8230042
Author: Stephan Bergmann 
Date:   Fri Sep 27 14:26:51 2013 +0200

getURLFromWorkdir should actually return a URL

Change-Id: Id6d67f820226da15d90b95aa047767926583cc2e

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 9278d38..a373452 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -65,7 +65,7 @@ DialogSaveTest::DialogSaveTest()
 void DialogSaveTest::test()
 {
 OUString aFileName;
-aFileName = "file://" + 
getURLFromWorkdir("/CppunitTest/testDialogSave.odb");
+aFileName = getURLFromWorkdir("/CppunitTest/testDialogSave.odb");
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);
 CPPUNIT_ASSERT(xComponent.is());
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 98f76f4..56d023d 100644
--- a/unotest/source/cpp/bootstrapfixturebase.cxx
+++ b/unotest/source/cpp/bootstrapfixturebase.cxx
@@ -23,7 +23,8 @@ using namespace ::com::sun::star;
 // heavy lifting is deferred until setUp. setUp and tearDown are interleaved
 // between the tests as you might expect.
 test::BootstrapFixtureBase::BootstrapFixtureBase()
-: m_aSrcRootURL("file://"), m_aSolverRootURL( m_aSrcRootURL )
+: m_aSrcRootURL("file://"), m_aSolverRootURL( m_aSrcRootURL ),
+  m_aWorkdirRootURL(m_aSrcRootURL)
 {
 #ifndef ANDROID
 const char* pSrcRoot = getenv( "SRC_ROOT" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2013-09-27 Thread Lionel Elie Mamane
 dbaccess/qa/extras/dialog-save.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit a9a0933ec67eab0ec31c8fadb60fb8e8e3e90485
Author: Lionel Elie Mamane 
Date:   Fri Sep 27 13:07:29 2013 +0200

raah... getURLFromWorkdir does not put the URL scheme

Change-Id: I62162230b313c66872ef1b3e8b18070126169aa1

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 43fffa4..9278d38 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -62,12 +62,10 @@ DialogSaveTest::DialogSaveTest()
 {
 }
 
-// TODO: use temporary copy; see example in chart2/qa/extras/charttest.hxx:65 
(function reload)
-
 void DialogSaveTest::test()
 {
 OUString aFileName;
-aFileName = getURLFromWorkdir("/CppunitTest/testDialogSave.odb");
+aFileName = "file://" + 
getURLFromWorkdir("/CppunitTest/testDialogSave.odb");
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);
 CPPUNIT_ASSERT(xComponent.is());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2013-09-27 Thread Lionel Elie Mamane
 dbaccess/qa/extras/dialog-save.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c24161acd6a605cfd364c303185730234868e918
Author: Lionel Elie Mamane 
Date:   Fri Sep 27 12:52:10 2013 +0200

get workdir URL directly

as opposed to buggily trying to build it ourselves from the path

Change-Id: Ibf44fac809a9cf12bc654a5a2f8ac8f00866b1a3

diff --git a/dbaccess/qa/extras/dialog-save.cxx 
b/dbaccess/qa/extras/dialog-save.cxx
index 38d5c61..43fffa4 100644
--- a/dbaccess/qa/extras/dialog-save.cxx
+++ b/dbaccess/qa/extras/dialog-save.cxx
@@ -67,7 +67,7 @@ DialogSaveTest::DialogSaveTest()
 void DialogSaveTest::test()
 {
 OUString aFileName;
-aFileName = "file://" + 
getPathFromWorkdir("/CppunitTest/testDialogSave.odb");
+aFileName = getURLFromWorkdir("/CppunitTest/testDialogSave.odb");
 {
 uno::Reference< lang::XComponent > xComponent = 
loadFromDesktop(aFileName);
 CPPUNIT_ASSERT(xComponent.is());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa

2013-09-12 Thread Norbert Thiebaud
 dbaccess/qa/unit/firebird.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24f277a4ad53a8655902d5fb3aab05643d90f57e
Author: Norbert Thiebaud 
Date:   Thu Sep 12 17:26:38 2013 -0500

Do not use int64 litteral without the proper wrapping

Change-Id: I879a47720f337b57038ac3207cb466aa42d0beeb

diff --git a/dbaccess/qa/unit/firebird.cxx b/dbaccess/qa/unit/firebird.cxx
index 183d83d..78b7e66 100644
--- a/dbaccess/qa/unit/firebird.cxx
+++ b/dbaccess/qa/unit/firebird.cxx
@@ -75,7 +75,7 @@ void FirebirdTest::testIntegerDatabase()
 xRow->getShort(xColumnLocate->findColumn("_SMALLINT")));
 CPPUNIT_ASSERT(sal_Int32(-21) ==
 xRow->getInt(xColumnLocate->findColumn("_INT")));
-CPPUNIT_ASSERT(sal_Int64(-900) ==
+CPPUNIT_ASSERT(SAL_CONST_INT64(-900) ==
 xRow->getLong(xColumnLocate->findColumn("_BIGINT")));
 CPPUNIT_ASSERT(OUString("5") ==
 xRow->getString(xColumnLocate->findColumn("_CHAR")));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/qa dbaccess/source

2013-08-19 Thread Jelle van der Waa
 dbaccess/qa/extras/macros-test.cxx |6 -
 dbaccess/source/core/recovery/subcomponentrecovery.cxx |5 
 dbaccess/source/ext/macromigration/migrationengine.cxx |   19 ++---
 dbaccess/source/ext/macromigration/migrationlog.cxx|   14 +++-
 dbaccess/source/sdbtools/connection/objectnames.cxx|6 -
 dbaccess/source/ui/misc/WCopyTable.cxx |3 --
 6 files changed, 11 insertions(+), 42 deletions(-)

New commits:
commit 9a1aca007fd06f3f8223ee02a79e44099d778b51
Author: Jelle van der Waa 
Date:   Sat Aug 17 22:14:22 2013 +0200

fdo#57950: Remove some chained appends in dbaccess

Change-Id: If93b4a11ac15ede2b08ef42bb2fa4670f0d4cd24
Reviewed-on: https://gerrit.libreoffice.org/5481
Reviewed-by: Andrzej J.R. Hunt 
Tested-by: Andrzej J.R. Hunt 

diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index cc0a437..bcff534 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -51,11 +51,7 @@ private:
 
 void DBAccessTest::createFileURL(const OUString& aFileBase, const OUString& 
aFileExtension, OUString& rFilePath)
 {
-OUString aSep("/");
-OUStringBuffer aBuffer( getSrcRootURL() );
-aBuffer.append(m_aBaseString);
-aBuffer.append(aSep).append(aFileBase).append(aFileExtension);
-rFilePath = aBuffer.makeStringAndClear();
+rFilePath = getSrcRootURL() + m_aBaseString + "/" + aFileBase + 
aFileExtension;
 }
 
 DBAccessTest::DBAccessTest()
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx 
b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index af11780..0981787 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -218,10 +218,7 @@ namespace dbaccess
 private:
 OUString impl_prefix( const ::xmloff::token::XMLTokenEnum i_eToken )
 {
-OUStringBuffer aQualifiedName( m_aNamespace );
-aQualifiedName.append( sal_Unicode( ':' ) );
-aQualifiedName.append( ::xmloff::token::GetXMLToken( i_eToken ) );
-return aQualifiedName.makeStringAndClear();
+return m_aNamespace + ":" + ::xmloff::token::GetXMLToken( i_eToken 
);
 }
 
 private:
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx 
b/dbaccess/source/ext/macromigration/migrationengine.cxx
index c0ec435..8d0b5f1 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -1253,12 +1253,7 @@ namespace dbmm
 }
 sBaseName = aReplacement.makeStringAndClear();
 
-OUStringBuffer aNewLibNameAttempt;
-aNewLibNameAttempt.append( sPrefix );
-aNewLibNameAttempt.append( sBaseName );
-aNewLibNameAttempt.appendAscii( "_" );
-aNewLibNameAttempt.append( _rSourceLibName );
-OUString sTargetName( aNewLibNameAttempt.makeStringAndClear() 
);
+OUString sTargetName( sPrefix + sBaseName + "_" + 
_rSourceLibName );
 if ( !_rxTargetContainer->hasByName( sTargetName ) )
 return sTargetName;
 }
@@ -1267,12 +1262,7 @@ namespace dbmm
 // (The latter is valid, since there can be multiple sub documents 
with the same base name,
 // in different levels in the hierarchy.)
 // In this case, just use the umambiguous sub document number.
-OUStringBuffer aNewLibName;
-aNewLibName.append( sPrefix );
-aNewLibName.append( OUString::valueOf( sal_Int64( 
_rDocument.nNumber ) ) );
-aNewLibName.appendAscii( "_" );
-aNewLibName.append( _rSourceLibName );
-return aNewLibName.makeStringAndClear();
+return sPrefix + OUString::valueOf( sal_Int64( _rDocument.nNumber 
) ) + "_" + _rSourceLibName;
 }
 }
 
@@ -1680,10 +1670,7 @@ namespace dbmm
 OSL_ENSURE( sLibrary != sNewLibName,
 "MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: a 
library which has not been migrated?" );
 
-OUStringBuffer aNewLocation;
-aNewLocation.append( sNewLibName );
-aNewLocation.append( sScriptName.copy( nLibModuleSeparator ) );
-xUri->setName( aNewLocation.makeStringAndClear() );
+xUri->setName( sNewLibName + sScriptName.copy( nLibModuleSeparator 
) );
 
 // update the new script URL
 _inout_rScriptCode = xUri->getUriReference();
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx 
b/dbaccess/source/ext/macromigration/migrationlog.cxx
index cee6065..f4c1ac9 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -430,11 +430,8 @@ namespace dbmm
 OUString sBacke

[Libreoffice-commits] core.git: dbaccess/qa sc/qa

2013-08-03 Thread Lionel Elie Mamane
 dbaccess/qa/extras/macros-test.cxx |1 +
 sc/qa/extras/macros-test.cxx   |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 63572992755a9e2f5ba3e73bbe10ab145f102896
Author: Lionel Elie Mamane 
Date:   Sat Aug 3 10:50:14 2013 +0200

minor tweaks to existing unittests

Change-Id: I64769fee917c5d8c6450a19ad53fdf795e280c98

diff --git a/dbaccess/qa/extras/macros-test.cxx 
b/dbaccess/qa/extras/macros-test.cxx
index 24f78e5..cc0a437 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -80,6 +80,7 @@ void DBAccessTest::setUp()
 // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
 // which is a private symbol to us, gets called
 mxDesktop = com::sun::star::frame::Desktop::create( 
comphelper::getComponentContext(getMultiServiceFactory()) );
+CPPUNIT_ASSERT(mxDesktop.is());
 }
 
 void DBAccessTest::tearDown()
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 023f627..074edb5 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -9,7 +9,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -81,7 +80,8 @@ void ScMacrosTest::testMSP()
 SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
 
 CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-ScDocShell* xDocSh = static_cast(pFoundShell);
+ScDocShell* xDocSh = dynamic_cast(pFoundShell);
+CPPUNIT_ASSERT(xDocSh != NULL);
 
 pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, 
aOutParamIndex,aOutParam);
 OUString sResult;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits