Author: adelmelle
Date: Sat Mar 26 23:08:43 2011
New Revision: 1085824
URL: http://svn.apache.org/viewvc?rev=1085824&view=rev
Log:
Fixed regression introduced by Bugzilla 50593: bookmarks pointing to a
non-existing internal destination should just trigger a warning.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
xmlgraphics/fop/trunk/status.xml
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/bookmarks_1.xml
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java?rev=1085824&r1=1085823&r2=1085824&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/AreaTreeHandler.java Sat
Mar 26 23:08:43 2011
@@ -336,7 +336,7 @@ public class AreaTreeHandler extends FOE
String[] ids = res.getIDRefs();
for (String id : ids) {
List<PageViewport> pageVPList =
idTracker.getPageViewportsContainingID(id);
- if (pageVPList != null) {
+ if (pageVPList != null && !pageVPList.isEmpty()) {
res.resolveIDRef(id, pageVPList);
} else {
AreaEventProducer eventProducer =
AreaEventProducer.Provider.get(
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java?rev=1085824&r1=1085823&r2=1085824&view=diff
==============================================================================
---
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
(original)
+++
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFSerializer.java
Sat Mar 26 23:08:43 2011
@@ -718,14 +718,18 @@ public class IFSerializer extends Abstra
}
private void serializeBookmark(Bookmark bookmark) throws SAXException,
IFException {
- noteAction(bookmark.getAction());
+ if (bookmark.getAction() != null) {
+ noteAction(bookmark.getAction());
+ }
AttributesImpl atts = new AttributesImpl();
atts.addAttribute(null, "title", "title", XMLUtil.CDATA,
bookmark.getTitle());
atts.addAttribute(null, "starting-state", "starting-state",
XMLUtil.CDATA, bookmark.isShown() ? "show" : "hide");
handler.startElement(DocumentNavigationExtensionConstants.BOOKMARK,
atts);
- serializeXMLizable(bookmark.getAction());
+ if (bookmark.getAction() != null) {
+ serializeXMLizable(bookmark.getAction());
+ }
Iterator iter = bookmark.getChildBookmarks().iterator();
while (iter.hasNext()) {
Bookmark b = (Bookmark)iter.next();
Modified: xmlgraphics/fop/trunk/status.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1085824&r1=1085823&r2=1085824&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sat Mar 26 23:08:43 2011
@@ -59,6 +59,10 @@
documents. Example: the fix of marks layering will be such a case when
it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="AD" type="fix" fixes-bug="50593">
+ Fixed regression introduced by Bugzilla 50593: bookmarks pointing to a
non-existing
+ internal destination should just trigger a warning.
+ </action>
<action context="Layout" dev="AD" type="fix" fixes-bug="50965"
due-to="Martin Koegler">
Bugzilla 50965: Fixed a regression in BlockContainerLayoutManager
where margins were
no longer reset after forced breaks.
Modified:
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/bookmarks_1.xml
URL:
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/bookmarks_1.xml?rev=1085824&r1=1085823&r2=1085824&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/bookmarks_1.xml
(original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/bookmarks_1.xml
Sat Mar 26 23:08:43 2011
@@ -42,6 +42,12 @@
<fo:bookmark internal-destination="chapter2-sec2">
<fo:bookmark-title>Section 2</fo:bookmark-title>
</fo:bookmark>
+ <!-- add a reference to a non-existing id; should only trigger a
warning
+ see Bugzilla 50593
+ -->
+ <fo:bookmark internal-destination="chapterX-secX">
+ <fo:bookmark-title>Section X</fo:bookmark-title>
+ </fo:bookmark>
</fo:bookmark>
<fo:bookmark internal-destination="bc">
<fo:bookmark-title>Fixed Block Container</fo:bookmark-title>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]