odftoolkit icon indicating copy to clipboard operation
odftoolkit copied to clipboard

getTablelist on a .odm File

Open TomWeissflog opened this issue 3 years ago • 3 comments

After updating from Simple Api to ODFDOM the table search doesn't find the underlying tables from the .odf Files anymore. var count = TextDocument.loadDocument("AFile.odm").getTableList().size() was about 28 Tables var count = OdfTextDocument.loadDocument("AFile.odm").getTableList(true).size() is now 2 In which way do i need to adjust my code to get a complete Table List?

TomWeissflog avatar Nov 28 '22 11:11 TomWeissflog

I did a quick grep on existing regression tests:

find . -name *.java | xargs grep getTableList

revealed e.g.

odfdom/src/test/java/org/odftoolkit/odfdom/doc/table/TableTest.java

Could you please give this test a try and adopt this test with your test file adding it to odfdom/src/test/resourcestest-input

As the parameter is true in your example it is a recursive search all <table:table> should be found. Otherwise, you might even give the debugger a try! :-)

Thanks in advance for your help! Svante

svanteschubert avatar Dec 12 '22 13:12 svanteschubert

Aye, it is a master document and other documents are external and referenced from the master document, which are likely not being searched. If you like to add this functionality, you might want to copy/paste it from the Simple API (once added by IBM).

Any pull requests are most welcome! :-)

svanteschubert avatar Dec 12 '22 13:12 svanteschubert

@TomWeissflog Any update on this, Tom?

svanteschubert avatar May 13 '25 20:05 svanteschubert