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

[ASP-28550] Docx with un-accepted changes #72

Open
wants to merge 6 commits into
base: trunk-airslate
Choose a base branch
from

Conversation

airvavilov
Copy link

No description provided.

@@ -74,6 +56,27 @@ void testHeaderParagraph() throws IOException {
}
}

@Test
void testUnAcceptedChanges() throws IOException {
try (XWPFDocument xml = XWPFTestDataSamples.openSampleDocument("UnAcceptedChangesTest.docx")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Еще нужны тесты на remove аля
testRemoveRuns
Вот сюда нужно добавить новый вид ранов
testRemoveAndInsertRunsWithOtherIRunElement

Мб еще есть тесты в этом классе где мы вариантивно создаем разные раны - туда нужно тоже добавить новый ран

this.trackChange = trackChange;
}

public CTRunTrackChange getTrackChange() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут и в методах ниже this не обяз. писать для доступа к проперти

@alekseytatarynov
Copy link

alekseytatarynov commented Nov 8, 2022

Еще нужно такую же логику реализовать в XWPFSDTContentRun. Обрати внимание на метод buildRunsInOrderFromXml
+ тесты

@@ -146,7 +146,7 @@ private void buildRunsInOrderFromXml(XmlObject object) {
}
if (o instanceof CTRunTrackChange) {
for (CTR r : ((CTRunTrackChange) o).getRArray()) {
XWPFRun cr = new XWPFRun(r, this);
XWPFRun cr = new XWPFTrackChangeRun((CTRunTrackChange) o, r, this);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

раз уж мы тут вносим измнения, то может добавим сюда вот эти вот методы?
https://github.com/pdffiller/dadadocs-scripting-template-engine/pull/475/files#diff-52316947a9ce35960fd4534be4ce3cd1b30dc8d78081839e75a67628a04ce86dR26

@airvavilov airvavilov changed the title Docx with un-accepted changes [ASP-28550] Docx with un-accepted changes Nov 11, 2022
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

Successfully merging this pull request may close these issues.

3 participants