Bug 56885 - To change text in a XWPFSDTContent object
Summary: To change text in a XWPFSDTContent object
Status: NEW
Alias: None
Product: POI
Classification: Unclassified
Component: XWPF (show other bugs)
Version: unspecified
Hardware: PC All
: P1 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-25 08:15 UTC by rico.stodko
Modified: 2018-11-09 13:11 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rico.stodko 2014-08-25 08:15:19 UTC
In XWPFSDTContent object I can read the text, but I can not change it.
In debug mode, I saw that a XWPFParagraph list in the content object is present and over this object I could change the text then.
Please provide a way to change the text.
Comment 1 Dominik Stadler 2016-04-10 10:32:35 UTC
As the javadoc states these classes are currently read-only, likely until someone steps in and provides patches with accompanying unit-tests that verify the changes.
Comment 2 NadavB 2016-11-15 11:55:23 UTC
We found this feature highly important. Can you give it a priority? At least give raw access to the inner objects so we can change them...

Dominik, can you give a guidance how to do the patch to support that?
Comment 3 Mark Murphy 2016-11-15 13:38:19 UTC
Check out the trunk from the repository

Information about the repository is here: https://poi.apache.org/subversion.html

Build the project. Information Here: https://poi.apache.org/howtobuild.html

Make sure you can successfully run all the tests, the ant jenkins task is good for determining that everything is configured properly. You can tell if tests are currently passing for us by looking here: https://builds.apache.org/job/POI/

If you are getting deifferent results, then you need to fix your environment before you do anything else. Not the ant tasks should download all dependencies.

Then you are ready to develop your patch. Once you have a patch complete and all jenkins tasks run successfully, see the contribution guidelines here: https://poi.apache.org/guidelines.html

Please realize that XWPF is not a stable interface. I am just starting a plan to clean it up, and move it forward into a consistent interface. Initial ideas can be found here: https://github.com/JMarkMurphy/poi/wiki, they are totally incomplete and a work in progress. The point is the entire XWPF interface is a jumble of individually designed pieces and parts thrown together into a big pile. Things will be changing though. Try to keep as much CT code in org.apache.poi.xwpf.model as you can, and only put user interface stuff in org.apache.poi.xwpf.usermodel. This will be a challenge as currently usermodel is not much more than a surrogate for the CT classes, and model contains very little that is useful (or even used?).
Comment 4 NadavB 2018-02-08 18:14:17 UTC
Is there any progress regarding handling and manipulation of SDT tags? (Content Tags)?
Comment 5 gaoyanfu 2018-11-09 13:09:55 UTC
I have generated a new document paragraph title, need to update the directory domain, how to code the implementation
Comment 6 gaoyanfu 2018-11-09 13:11:41 UTC
I have generated a new document paragraph title, need to update the directory domain, how to code the implementation