From 73c1cddb3208d994cb209e83ae101e0d4b1e9413 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 12 Oct 2009 17:39:53 +0000 Subject: [PATCH] Switched parameters of separateTextElements and beginTextObjectAccess, for consistency with saveGraphicsState and beginMarkedContentSequence git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Accessibility@824439 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/fop/render/pdf/PDFContentGenerator.java | 12 ++++++------ src/java/org/apache/fop/render/pdf/PDFPainter.java | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java index 73e1945f2..9cff94f6a 100644 --- a/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java +++ b/src/java/org/apache/fop/render/pdf/PDFContentGenerator.java @@ -219,10 +219,10 @@ public class PDFContentGenerator { /** * used for accessibility, separates 2 text elements - * @param mcid of new text element * @param structElemType of parent of new text element + * @param mcid of new text element */ - protected void separateTextElements(int mcid, String structElemType) { + protected void separateTextElements(String structElemType, int mcid) { textutil.endTextObject(); endMarkedContentSequence(); beginMarkedContentSequence(structElemType, mcid); @@ -235,7 +235,7 @@ public class PDFContentGenerator { */ public void separateTextElementFromLeader() { if (!inArtifactMode) { - separateTextElements(0, null); + separateTextElements(null, 0); } } @@ -248,10 +248,10 @@ public class PDFContentGenerator { /** * Accessibility beginTextObject - * @param mcid of text element * @param structElemType of parent + * @param mcid of text element */ - protected void beginTextObjectAccess(int mcid, String structElemType) { + protected void beginTextObjectAccess(String structElemType, int mcid) { if (!textutil.isInTextObject()) { beginMarkedContentSequence(structElemType, mcid); textutil.beginTextObject(); @@ -262,7 +262,7 @@ public class PDFContentGenerator { * Accessibility begin of LeaderTextObject */ public void beginLeaderTextObject() { - beginTextObjectAccess(0, null); + beginTextObjectAccess(null, 0); } /** Indicates the end of a text object. */ diff --git a/src/java/org/apache/fop/render/pdf/PDFPainter.java b/src/java/org/apache/fop/render/pdf/PDFPainter.java index 4b9f47a4e..25e169ab0 100644 --- a/src/java/org/apache/fop/render/pdf/PDFPainter.java +++ b/src/java/org/apache/fop/render/pdf/PDFPainter.java @@ -301,10 +301,10 @@ public class PDFPainter extends AbstractIFPainter { if (ptr != null && ptr.length() > 0) { MarkedContentInfo mci = logicalStructureHandler.addTextContentItem(ptr); if (generator.getTextUtil().isInTextObject()) { - generator.separateTextElements(mci.mcid, mci.tag); + generator.separateTextElements(mci.tag, mci.mcid); } generator.updateColor(state.getTextColor(), true, null); - generator.beginTextObjectAccess(mci.mcid, mci.tag); + generator.beginTextObjectAccess(mci.tag, mci.mcid); } else { // // Leader content is marked as "/Artifact" -- 2.39.5