You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by cb...@apache.org on 2011/04/19 15:06:27 UTC
svn commit: r1095076 - in /xmlgraphics/fop/trunk:
src/java/org/apache/fop/render/rtf/RTFHandler.java status.xml
Author: cbowditch
Date: Tue Apr 19 13:06:27 2011
New Revision: 1095076
URL: http://svn.apache.org/viewvc?rev=1095076&view=rev
Log:
Bugzilla #51008: page-number-citation-last does not work in RTF
Patch submitted by Max Aster
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
xmlgraphics/fop/trunk/status.xml
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=1095076&r1=1095075&r2=1095076&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java Tue Apr 19 13:06:27 2011
@@ -78,6 +78,7 @@ import org.apache.fop.fo.flow.ListItemBo
import org.apache.fop.fo.flow.ListItemLabel;
import org.apache.fop.fo.flow.PageNumber;
import org.apache.fop.fo.flow.PageNumberCitation;
+import org.apache.fop.fo.flow.PageNumberCitationLast;
import org.apache.fop.fo.flow.table.Table;
import org.apache.fop.fo.flow.table.TableBody;
import org.apache.fop.fo.flow.table.TableCell;
@@ -1447,6 +1448,26 @@ public class RTFHandler extends FOEventH
throw new RuntimeException(e.getMessage());
}
}
+
+ /** {@inheritDoc} */
+ public void startPageNumberCitationLast(PageNumberCitationLast l) {
+ if (bDefer) {
+ return;
+ }
+ try {
+
+ IRtfTextrunContainer container
+ = (IRtfTextrunContainer)builderContext.getContainer(
+ IRtfTextrunContainer.class, true, this);
+ RtfTextrun textrun = container.getTextrun();
+
+ textrun.addPageNumberCitation(l.getRefId());
+
+ } catch (Exception e) {
+ log.error("startPageNumberCitationLast: " + e.getMessage());
+ throw new RuntimeException(e.getMessage());
+ }
+ }
private void prepareTable(Table tab) {
// Allows to receive the available width of the table
@@ -1641,6 +1662,12 @@ public class RTFHandler extends FOEventH
} else {
endPageNumberCitation((PageNumberCitation) foNode);
}
+ } else if (foNode instanceof PageNumberCitationLast) {
+ if (bStart) {
+ startPageNumberCitationLast((PageNumberCitationLast) foNode);
+ } else {
+ endPageNumberCitationLast((PageNumberCitationLast) foNode);
+ }
} else {
RTFEventProducer eventProducer = RTFEventProducer.Provider.get(
getUserAgent().getEventBroadcaster());
Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=1095076&r1=1095075&r2=1095076&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Apr 19 13:06:27 2011
@@ -59,6 +59,9 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Renderers" dev="CB" type="fix" fixes-bug="51008" due-to="Max Aster">
+ Bugzilla 51008: page-number-citation-last does not work in RTF
+ </action>
<action context="Renderers" dev="VH" type="add">
Added id element to intermediate format to track the origin of content.
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org