[Libreoffice-commits] core.git: 3 commits - editeng/source odk/examples qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests setup_native/scripts sysui/desktop

Michael Stahl mstahl at redhat.com
Tue Nov 17 01:22:00 PST 2015


 editeng/source/items/flditem.cxx                                  |    2 
 odk/examples/DevelopersGuide/Database/sdbcx.java                  |   11 -
 qadevOOo/Jar_OOoRunner.mk                                         |    1 
 qadevOOo/objdsc/adabas/com.sun.star.comp.sdbcx.adabas.ODriver.csv |    5 
 qadevOOo/tests/java/mod/_adabas/ODriver.java                      |  105 ----------
 qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java         |   18 +
 setup_native/scripts/install_solaris.sh                           |    1 
 sysui/desktop/appstream-appdata/libreoffice-base.appdata.xml      |    2 
 8 files changed, 18 insertions(+), 127 deletions(-)

New commits:
commit c830aa640104317f951b9e470bde9bc66ed627a5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Nov 16 23:27:27 2015 +0100

    editeng: fix SvxTableField::operator==()
    
    This was erroneously returning false due to inverted dynamic_cast check,
    causing "svl/source/items/itempool.cxx:750: unequal items in Put(): no
    operator==?, with ID/pos 4048"
    
    (regression from fa91dd31f39a24329d288d4e1cda28db3a16af0d)
    
    Change-Id: I9c5b49150470fc78d58ecd2a2e990637627bd591

diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index 4e252ac..6432cbb 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -767,7 +767,7 @@ SvxFieldData* SvxTableField::Clone() const
 
 bool SvxTableField::operator==( const SvxFieldData& rCmp ) const
 {
-    if (dynamic_cast< const SvxTableField *>(&rCmp) != nullptr)
+    if (dynamic_cast<const SvxTableField *>(&rCmp) == nullptr)
         return false;
 
     return mnTab == static_cast<const SvxTableField&>(rCmp).mnTab;
commit 1d87c2456dab9a0f78ab25d029e82139488e2c57
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Nov 16 21:22:46 2015 +0100

    qadevOOo: fix race in the ScAccessiblePreviewTable event test
    
    XAccessibleEventBroadcaster::addAccessibleEventListener test calls the
    fireEvent() and the problem is that the event is triggered not on the
    print preview itself, but some toolbar button.  This then causes an
    accessible event to be broadcast from the print preview too, but only
    after doAccessibleAction() returns, some time later from VCL main-loop.
    
    If the test checks the flag in the listener before the main thread sends
    the event, the test fails; try to fix that with
    XToolkit::processEventsToIdle().
    
    Change-Id: Ia52bdf99cdc349ffb0a03536fba271b792caae0f

diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
index 1e6b8f0..7844b3c 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewTable.java
@@ -104,9 +104,8 @@ public class ScAccessiblePreviewTable extends TestCase {
      * Obtains the accessible object for a table in preview mode.
      */
     @Override
-    protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
-
-        XCell xCell = null;
+    protected TestEnvironment createTestEnvironment(final TestParameters Param,
+                final PrintWriter log) throws Exception {
 
         log.println("Getting spreadsheet") ;
         XSpreadsheets oSheets = xSheetDoc.getSheets() ;
@@ -115,8 +114,7 @@ public class ScAccessiblePreviewTable extends TestCase {
                 new Type(XSpreadsheet.class),oIndexSheets.getByIndex(0));
 
         log.println("Getting a cell from sheet") ;
-        xCell = oSheet.getCellByPosition(0, 0);
-
+        XCell xCell = oSheet.getCellByPosition(0, 0);
         xCell.setFormula("Value");
 
         XModel xModel = UnoRuntime.queryInterface(XModel.class, xSheetDoc);
@@ -168,7 +166,7 @@ public class ScAccessiblePreviewTable extends TestCase {
         XAccessibleContext zoomIn =
             AccessibilityTools.getAccessibleObjectForRole(xRoot,AccessibleRole.PUSH_BUTTON, "Zoom In");
 
-        log.println("Getting "+ zoomIn.getAccessibleName());
+        log.println("Getting \"" + zoomIn.getAccessibleName() + "\" which is a \"" + UnoRuntime.queryInterface(com.sun.star.lang.XServiceInfo.class, zoomIn).getImplementationName() + "\"");
 
         final XAccessibleAction pressZoom = UnoRuntime.queryInterface(XAccessibleAction.class, zoomIn);
         tEnv.addObjRelation("EventProducer",
@@ -176,7 +174,13 @@ public class ScAccessiblePreviewTable extends TestCase {
                 public void fireEvent() {
                         try {
                             pressZoom.doAccessibleAction(0);
-                        } catch (com.sun.star.lang.IndexOutOfBoundsException ibe) {}
+                            // the action is not triggered on the preview table
+                            // but some toolbar button - this will indirectly
+                            // trigger a table event but only from VCL main loop
+                            utils.waitForEventIdle(Param.getMSF());
+                        } catch (com.sun.star.lang.IndexOutOfBoundsException ibe) {
+                            log.println("ScAccessiblePreviewTable: IndexOutOfBoundsException from pressZoom.doAccessibleAction(0)");
+                        }
                 }
             });
 
commit 95af641c81a67103849385b0f8e7b4953efcef0e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Nov 16 14:43:14 2015 +0100

    remove vestigial Adabas D references in tests etc.
    
    Adabas D connector was removed in 8256eb0205fcddb79a67be13d6507b2653ff5e08
    
    Change-Id: Ie142763ac32728c1596c196d919cbe84e6735c96

diff --git a/odk/examples/DevelopersGuide/Database/sdbcx.java b/odk/examples/DevelopersGuide/Database/sdbcx.java
index 26813ff..78a9eb7 100644
--- a/odk/examples/DevelopersGuide/Database/sdbcx.java
+++ b/odk/examples/DevelopersGuide/Database/sdbcx.java
@@ -110,24 +110,23 @@ public class sdbcx
     public void createConnection() throws com.sun.star.uno.Exception
     {
         // create the Driver with the implementation name
-        Object aDriver = xORB.createInstance("com.sun.star.comp.sdbcx.adabas.ODriver");
+        Object aDriver = xORB.createInstance("org.openoffice.comp.connectivity.pq.Driver.noext");
         // query for the interface
         com.sun.star.sdbc.XDriver xDriver;
         xDriver = UnoRuntime.queryInterface(XDriver.class,aDriver);
         if(xDriver != null)
         {
             // first create the needed url
-            String adabasURL = "sdbc:adabas::MYDB0";
+            String URL = "sdbc:postgresql:dbname=MYDB0";
             // second create the necessary properties
-            com.sun.star.beans.PropertyValue [] adabasProps = new com.sun.star.beans.PropertyValue[]
+            com.sun.star.beans.PropertyValue [] Props = new com.sun.star.beans.PropertyValue[]
             {
                 new com.sun.star.beans.PropertyValue("user",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE),
                 new com.sun.star.beans.PropertyValue("password",0,"test1",com.sun.star.beans.PropertyState.DIRECT_VALUE)
             };
 
-
-            // now create a connection to adabas
-            con = xDriver.connect(adabasURL,adabasProps);
+            // now create a connection to the database
+            con = xDriver.connect(URL, Props);
             if(con != null)
             {
                 System.out.println("Connection could be created!");
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index 9987c1c..0e513f6 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -853,7 +853,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
     qadevOOo/tests/java/ifc/xml/_UserDefinedAttributesSupplier \
     qadevOOo/tests/java/mod/_acceptor/Acceptor \
     qadevOOo/tests/java/mod/_acceptor/uno/Acceptor \
-    qadevOOo/tests/java/mod/_adabas/ODriver \
     qadevOOo/tests/java/mod/_ado/ODriver \
     qadevOOo/tests/java/mod/_basctl/AccessibleShape \
     qadevOOo/tests/java/mod/_brdgfctr/BridgeFactory \
diff --git a/qadevOOo/objdsc/adabas/com.sun.star.comp.sdbcx.adabas.ODriver.csv b/qadevOOo/objdsc/adabas/com.sun.star.comp.sdbcx.adabas.ODriver.csv
deleted file mode 100644
index 8c11a68..0000000
--- a/qadevOOo/objdsc/adabas/com.sun.star.comp.sdbcx.adabas.ODriver.csv
+++ /dev/null
@@ -1,5 +0,0 @@
-"ODriver";"com::sun::star::sdbc::XDriver";"connect()"
-"ODriver";"com::sun::star::sdbc::XDriver";"acceptsURL()"
-"ODriver";"com::sun::star::sdbc::XDriver";"getPropertyInfo()"
-"ODriver";"com::sun::star::sdbc::XDriver";"getMajorVersion()"
-"ODriver";"com::sun::star::sdbc::XDriver";"getMinorVersion()"
diff --git a/qadevOOo/tests/java/mod/_adabas/ODriver.java b/qadevOOo/tests/java/mod/_adabas/ODriver.java
deleted file mode 100644
index 0a24925..0000000
--- a/qadevOOo/tests/java/mod/_adabas/ODriver.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-package mod._adabas;
-
-import java.io.PrintWriter;
-
-import lib.Status;
-import lib.StatusException;
-import lib.TestCase;
-import lib.TestEnvironment;
-import lib.TestParameters;
-
-import com.sun.star.beans.PropertyValue;
-import com.sun.star.uno.XInterface;
-
-/**
-* Here <code>com.sun.star.sdbc.Driver</code> service is tested.<p>
-* Test allows to run object tests in several threads concurrently.
-* @see com.sun.star.sdbc.Driver
-* @see com.sun.star.sdbc.XDriver
-* @see com.sun.star.sdbcx.XCreateCatalog
-* @see com.sun.star.sdbcx.XDropCatalog
-* @see ifc.sdbc._XDriver
-* @see ifc.sdbcx._XCreateCatalog
-* @see ifc.sdbcx._XDropCatalog
-*/
-public class ODriver extends TestCase {
-    /**
-     * Creates an instance of the service
-     * <code>com.sun.star.sdbc.Driver</code>. <p>
-     * Object relations created :
-     * <ul>
-     *  <li> <code>'XDriver.URL'</code> for {@link ifc.sdbc._XDriver}:
-     *      is the URL of the database to which to connect.
-     *      The URL is obtained from the parameter <code>adabas.url</code></li>
-     *  <li> <code>'XDriver.UNSUITABLE_URL'</code> for {@link ifc.sdbc._XDriver}:
-     *      the wrong kind of URL to connect using given driver.
-     *      The URL is obtained from the parameter <code>jdbc.url</code></li>
-     *  <li> <code>'XDriver.INFO'</code> for {@link ifc.sdbc._XDriver}:
-     *      a list of arbitrary string tag/value pairs as connection arguments.
-     *      The values for list are obtained from the parameter
-     *      <code>adabas.user</code> and <code>adabas.password</code>.</li>
-     * </ul>
-     */
-    @Override
-    protected TestEnvironment createTestEnvironment(TestParameters Param, PrintWriter log) throws Exception {
-
-        XInterface oObj = (XInterface)Param.getMSF().
-            createInstance("com.sun.star.comp.sdbcx.adabas.ODriver");
-
-        log.println("creating a new environment for object");
-        TestEnvironment tEnv = new TestEnvironment(oObj);
-
-        //adding relation for sdbc.XDriver
-        String adabasURL = (String) Param.get("adabas.url");
-        if (adabasURL == null) {
-            throw new StatusException(Status.failed(
-                "Couldn't get 'adabas.url' from ini-file"));
-        }
-        tEnv.addObjRelation("XDriver.URL", "sdbc:adabas:" + adabasURL);
-
-
-        String user = (String) Param.get("adabas.user");
-        if (user == null) {
-            throw new StatusException(Status.failed(
-                "Couldn't get 'adabas.user' from ini-file"));
-        }
-        String password = (String) Param.get("adabas.password");
-        if (password == null) {
-            throw new StatusException(Status.failed(
-                "Couldn't get 'adabas.password' from ini-file"));
-        }
-        PropertyValue[] info = new PropertyValue[2];
-        info[0] = new PropertyValue();
-        info[0].Name = "user"; info[0].Value = user;
-        info[1] = new PropertyValue();
-        info[1].Name = "password"; info[1].Value = password;
-        tEnv.addObjRelation("XDriver.INFO", info);
-
-        String jdbcUrl = (String) Param.get("jdbc.url");
-        if (jdbcUrl == null) {
-            throw new StatusException(Status.failed(
-                "Couldn't get 'jdbc.url' from ini-file"));
-        }
-        tEnv.addObjRelation("XDriver.UNSUITABLE_URL", "jdbc:" + jdbcUrl);
-
-        return tEnv;
-    }
-}
diff --git a/setup_native/scripts/install_solaris.sh b/setup_native/scripts/install_solaris.sh
index 96c197c..de60ea9 100644
--- a/setup_native/scripts/install_solaris.sh
+++ b/setup_native/scripts/install_solaris.sh
@@ -166,7 +166,6 @@ else
   #
 
   cat > /tmp/userinstall_filer.$$ << EOF
-/SUNWadabas/d
 /^SUNWj[0-9]/d
 /-desktop-int/d
 /-shared-mime-info/d
diff --git a/sysui/desktop/appstream-appdata/libreoffice-base.appdata.xml b/sysui/desktop/appstream-appdata/libreoffice-base.appdata.xml
index e40b769..8c6390c 100644
--- a/sysui/desktop/appstream-appdata/libreoffice-base.appdata.xml
+++ b/sysui/desktop/appstream-appdata/libreoffice-base.appdata.xml
@@ -17,7 +17,7 @@ It's a solution for people requiring an easy-to-understand, simple-to-use system
 <p>
 For power users and enterprise requirements, it provides native-support drivers
 for some of the most-widely employed multi-user database engines:
-MySQL, Adabas D, MS Access and PostgreSQL.
+PostgreSQL, MySQL and MS Access.
 In addition, the built-in support for JDBC- and ODBC-standard drivers allows you
 to connect to virtually any other existing database engine as well.
 </p>


More information about the Libreoffice-commits mailing list