Comments (5)
thanks @svanteschubert I really appreciate your time on this!
I've solved this specific case in a different way today:
In the original document, I simply placed a single bullet point list like:
- <FOO>
then I iterated over all lists in that document looking for an item that matched <FOO>
, once it matched I simply appended the list items and removed the first entry!
from odftoolkit.
from odftoolkit.
Oliver Rau suggested you use org.odftoolkit.odfdom.incubator.search.TextStyleNavigation
you create it with a pattern and receive a TextSelection, where you can call getElement() to receive the DOM node.
This is not our code, but I will enhance it to use JDK Iterator & Iterable interfaces.
Oliver did it this way:
final TextNavigation search = new TextNavigation(FIELD_PATTERN, inputDocument);
while (search.hasNext()) {
// search for the next selection
final TextSelection item = (TextSelection) search.nextSelection();
Looking at the code of TextStyleNavigation hasNext seems to search for the next item and is not idempotent:
@OverRide
public boolean hasNext() {
mCurrentSelectedItem = findnext(mCurrentSelectedItem);
return (mCurrentSelectedItem != null);
}
Let me fix this all on the 1.0.0_SNAPSHOT branch soon, but you may already start working.. ;-)
from odftoolkit.
from odftoolkit.
hi @svanteschubert thanks for the feedback! I highly appreciate it!
I'll have a look at ODFDOM module, do you think its possible to essentially insert things like bullet points, tables etc at certain predefined place holders throughout the document?
Any further pointers would be super appreciated!
from odftoolkit.
Related Issues (20)
- Enabling Source Generation for XML attributes with different types dependent on element parent
- ODF Validator dependency <type>pom</type>
- Integrate ODF Validator using Maven HOT 7
- Iterate cells HOT 2
- Cloning fails on Windows HOT 3
- OdfTableCell.getDisplayText() includes comment timestamp and text. HOT 3
- Incorrect behavior of OdfElement.getTextContent() HOT 3
- Unable to replace paragraph in ODF Text Document HOT 11
- Removing "incubator" package name (incompatible API change)
- Setting stringValue or displayText in table cell resets horizontal alignment to left HOT 1
- Determine font, font size, bold/italic/underline styles HOT 2
- Diskussion Forum HOT 1
- OdfEditableTextExtractor extracts only a last part of the text HOT 1
- Character encoding error when creating new spreadsheet HOT 2
- Fix OSGI Implementation Details
- Help Request: Formating cells in an ODF-Table HOT 1
- Bad link in README HOT 1
- Bad links in JavaDoc HOT 2
- Release file can't be built due to lack of .git HOT 3
- Help request: How to display the date and time in a cell at the same time? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odftoolkit.