You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/11/24 12:58:39 UTC
[Bug 57250] New: XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
Bug ID: 57250
Summary: XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Product: POI
Version: 3.11-dev
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HSLF
Assignee: dev@poi.apache.org
Reporter: vladk.dev@gmail.com
I guess the bug was introduced by commit 1620997 (Bug 56854 - XMLBeans
performance when using getXXXList() and other proxy methods).
Tested with version 3.11-beta3.
The setSlideOrder() method removes old slide at wrong position:
after insert:
<xml-fragment xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:sldId id="257" r:id="rId7"/>
<p:sldId id="256" r:id="rId2"/>
<p:sldId id="257" r:id="rId7"/>
</xml-fragment>
after remove:
<xml-fragment xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main">
<p:sldId id="257" r:id="rId7"/>
<p:sldId id="257" r:id="rId7"/>
</xml-fragment>
Finally the presentation refers to the same slide twice and the old slide is
not more reachable.
The following unit test fails (create a slide show insert-infront.pptx with a
single slide containing text "Test me"):
@Test
public void testInsertInfront() throws Exception {
XMLSlideShow ss =
XSLFTestDataSamples.openSampleDocument("insert-infront.pptx");
XSLFSlide slide;
assertEquals(1, ss.getSlides().length);
slide = ss.getSlides()[0];
assertContains(getSlideText(slide), "Test me");
slide = ss.createSlide();
ss.setSlideOrder(slide, 0);
slide.createTextBox().setText("New slide");
// Save and re-load
ss = XSLFTestDataSamples.writeOutAndReadBack(ss);
assertEquals(2, ss.getSlides().length);
slide = ss.getSlides()[0];
assertContains(getSlideText(slide), "New slide");
slide = ss.getSlides()[1];
assertContains(getSlideText(slide), "Test me");
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57250] XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
Andreas Beeker <an...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|HSLF |XSLF
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57250] XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
Andreas Beeker <an...@gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Andreas Beeker <an...@gmx.de> ---
Thank you for the patch. Applied with r1643684
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57250] XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57250] XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
--- Comment #2 from Yaniv Kunda <ya...@kundas.net> ---
Created attachment 32266
--> https://issues.apache.org/bugzilla/attachment.cgi?id=32266&action=edit
Fix for bug 57250
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 57250] XMLSlideShow.setSlideOrder() produces corrupted
CTSlideIdList
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57250
--- Comment #1 from Yaniv Kunda <ya...@kundas.net> ---
I will fix as soon as Apache SVN server comes back.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org