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(
}
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();
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.
<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>