[
https://issues.apache.org/jira/browse/ODFTOOLKIT-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13460230#comment-13460230
]
DaLi Liu commented on ODFTOOLKIT-169:
-------------------------------------
Verified status of this issue
1.invalid or fixed or no response - maybe can be closed;
I test this issue the last Simple ODF API, it seems that the issue has been
fixed.
Here is my test codes:
try {
odfdoc =
Document.loadDocument(ResourceUtilities.getAbsolutePath("table_ok.odp"));
PresentationDocument odpdoc = (PresentationDocument)
odfdoc;
PresentationDocument
newpd=PresentationDocument.newPresentationDocument();
newpd.appendPresentation(odpdoc);
newpd.save(ResourceUtilities.newTestOutputFile("table_ok_169.odp"));
} catch (Exception e) {
Logger.getLogger(PresentationTest_169.class.getName()).log(Level.SEVERE,
e.getMessage(), e);
Assert.fail(e.getMessage());
}
> Same styles are not copied when we append a presentation document to an other
> -----------------------------------------------------------------------------
>
> Key: ODFTOOLKIT-169
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-169
> Project: ODF Toolkit
> Issue Type: Bug
> Components: java
> Affects Versions: 0.8.6
> Environment: Operating System: Windows
> Platform: PC
> Reporter: matthieu
> Assignee: Ying Chun Guo
> Fix For: 0.9
>
> Attachments: ASF.LICENSE.NOT.GRANTED--style_break.zip
>
>
> Created an attachment (id=424)
> Examples documents to illustrate the bug
> When I add a new document to an other, there is some "content styles tags"
> with same content but differents id (corresponding to a tag element in the
> document) which are not copied.
> OdfPrensentationDocument.appendPrensentation
> > copyForeignStyleRef(...);
> > getCopyStyleList(...);
> > HashMap<OdfElement, List<OdfElement>> copyStyleEleList
> This Map keep styles which have same content but after, elements having those
> styles are not rewrited.
> So in the final document, there is elements which have lost their styles.
> To fix this bug, I think you can rewrite elements style-name in the map with
> the referent style-name kept.
> For better understanding, please see document attached.
> table_ok.odp > document before appendPresentation
> table_ko.odp > document after appendPresentation
> Thank you.
> Matthieu
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira