Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getTablelist on a .odm File #188

Open
TomWeissflog opened this issue Nov 28, 2022 · 2 comments
Open

getTablelist on a .odm File #188

TomWeissflog opened this issue Nov 28, 2022 · 2 comments
Assignees

Comments

@TomWeissflog
Copy link

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?

@svanteschubert
Copy link
Contributor

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
Copy link
Contributor

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! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants