incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120346] New: Cannot read property TableName from a table using UNO
Date Mon, 23 Jul 2012 11:37:55 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120346

          Priority: P3
            Bug ID: 120346
          Assignee: ooo-issues@incubator.apache.org
           Summary: Cannot read property TableName from a table using UNO
          Severity: normal
        Issue Type: DEFECT
    Classification: Code
                OS: All
          Reporter: MaxZinal@yandex.ru
          Hardware: All
            Status: UNCONFIRMED
           Version: AOO340-dev
         Component: code
           Product: udk

When trying to read property TableName from an XTextTable, a user program
receives a RuntimeException.

SAMPLE CODE:

    XComponent xTemplateComponent = client.getComponentLoader().
       loadComponentFromURL("file:///home/zinal/Desktop/test1.odt",
            "_blank", 0, new PropertyValue[0]);
    XTextTablesSupplier tablesSupplier =
        (XTextTablesSupplier)
UnoRuntime.queryInterface(XTextTablesSupplier.class,
        xTemplateComponent);
    XIndexAccess indexedTables = (XIndexAccess) UnoRuntime.queryInterface(
        XIndexAccess.class, tablesSupplier.getTextTables());
    for ( int i=0; i<indexedTables.getCount(); ++i ) {
      Object table = indexedTables.getByIndex(i);
      XPropertySet xTableProps = (XPropertySet) UnoRuntime.queryInterface(
         XPropertySet.class, table);
      System.out.println("    Table name: " + 
         xTableProps.getPropertyValue("TableName"));
    }

EXCEPTION BACKTRACE:

com.sun.star.uno.RuntimeException: 
    at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:173)
    at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:139)
    at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:334)
    at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:303)
    at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:87)
    at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:636)
    at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:146)
    at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:128)
    at $Proxy3.getPropertyValue(Unknown Source)
    at ru.pg.asmrp.tests.ooo.BasicTest.testWordTables(BasicTest.java:62)
    at ru.pg.asmrp.tests.ooo.BasicTest.main(BasicTest.java:32)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message