Hi Jeremias,

Just to satiate your curiousity, in the modca spec, page 96, it says
"A medium map remains in effect until another medium map is selected
or the end of the document is reached.", which means the previous
implementation, storing the lastMediumMap, would be perfectly valid.

Mehdi

On 8 July 2011 16:00,  <jerem...@apache.org> wrote:
> Author: jeremias
> Date: Fri Jul  8 15:00:47 2011
> New Revision: 1144351
>
> URL: http://svn.apache.org/viewvc?rev=1144351&view=rev
> Log:
> Removed the lastMediumMap variable and the check to omit the IMM if it 
> doesn't change. I wonder why I came up with that. This can lead, among other 
> things, to problems when an AFP file is split.
>
> Modified:
>    
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
>
> Modified: 
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
> URL: 
> http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java?rev=1144351&r1=1144350&r2=1144351&view=diff
> ==============================================================================
> --- 
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
>  (original)
> +++ 
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPDocumentHandler.java
>  Fri Jul  8 15:00:47 2011
> @@ -83,9 +83,6 @@ public class AFPDocumentHandler extends
>     private Map<String, PageSegmentDescriptor> pageSegmentMap
>         = new java.util.HashMap<String, PageSegmentDescriptor>();
>
> -    /** Medium Map referenced on previous page **/
> -    private String lastMediumMap;
> -
>     private static enum Location {
>         ELSEWHERE, IN_DOCUMENT_HEADER, FOLLOWING_PAGE_SEQUENCE, IN_PAGE_HEADER
>     }
> @@ -379,9 +376,8 @@ public class AFPDocumentHandler extends
>             }
>             AFPInvokeMediumMap imm = (AFPInvokeMediumMap)extension;
>             String mediumMap = imm.getName();
> -            if (mediumMap != null && !mediumMap.equals(lastMediumMap)) {
> +            if (mediumMap != null) {
>                 dataStream.createInvokeMediumMap(mediumMap);
> -                lastMediumMap = mediumMap;
>             }
>         } else if (extension instanceof AFPIncludeFormMap) {
>             AFPIncludeFormMap formMap = (AFPIncludeFormMap)extension;
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-commits-unsubscr...@xmlgraphics.apache.org
> For additional commands, e-mail: fop-commits-h...@xmlgraphics.apache.org
>
>

Reply via email to