aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/AbstractState.java (renamed from src/java/org/apache/fop/render/AbstractState.java)34
-rw-r--r--src/java/org/apache/fop/afp/AFPAbstractGraphicsObjectPainter.java (renamed from src/java/org/apache/fop/render/afp/AFPAbstractGraphicsObjectPainter.java)4
-rw-r--r--src/java/org/apache/fop/afp/AFPBorderPainter.java (renamed from src/java/org/apache/fop/render/afp/AFPBorderPainter.java)4
-rw-r--r--src/java/org/apache/fop/afp/AFPConstants.java (renamed from src/java/org/apache/fop/render/afp/AFPConstants.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPDataObjectFactory.java (renamed from src/java/org/apache/fop/render/afp/AFPDataObjectFactory.java)31
-rw-r--r--src/java/org/apache/fop/afp/AFPDataObjectInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPDataObjectInfo.java)6
-rw-r--r--src/java/org/apache/fop/afp/AFPForeignAttributeReader.java (renamed from src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java)6
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphics2D.java (renamed from src/java/org/apache/fop/render/afp/AFPGraphics2D.java)74
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphicsConfiguration.java (renamed from src/java/org/apache/fop/render/afp/AFPGraphicsConfiguration.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphicsDevice.java (renamed from src/java/org/apache/fop/render/afp/AFPGraphicsDevice.java)3
-rw-r--r--src/java/org/apache/fop/afp/AFPGraphicsObjectInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPGraphicsObjectInfo.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPImageObjectInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPImageObjectInfo.java)3
-rw-r--r--src/java/org/apache/fop/afp/AFPLineDataInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPLineDataInfo.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPObjectAreaInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPObjectAreaInfo.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPPageFonts.java (renamed from src/java/org/apache/fop/render/afp/AFPPageFonts.java)6
-rw-r--r--src/java/org/apache/fop/afp/AFPRectanglePainter.java (renamed from src/java/org/apache/fop/render/afp/AFPRectanglePainter.java)4
-rw-r--r--src/java/org/apache/fop/afp/AFPResourceInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPResourceInfo.java)3
-rw-r--r--src/java/org/apache/fop/afp/AFPResourceLevel.java (renamed from src/java/org/apache/fop/render/afp/AFPResourceLevel.java)2
-rw-r--r--src/java/org/apache/fop/afp/AFPResourceManager.java (renamed from src/java/org/apache/fop/render/afp/AFPResourceManager.java)15
-rw-r--r--src/java/org/apache/fop/afp/AFPState.java (renamed from src/java/org/apache/fop/render/afp/AFPState.java)24
-rw-r--r--src/java/org/apache/fop/afp/AFPStreamer.java (renamed from src/java/org/apache/fop/render/afp/AFPStreamer.java)9
-rw-r--r--src/java/org/apache/fop/afp/AFPTextDataInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPTextDataInfo.java)12
-rw-r--r--src/java/org/apache/fop/afp/AFPTextHandler.java (renamed from src/java/org/apache/fop/render/afp/AFPTextHandler.java)15
-rw-r--r--src/java/org/apache/fop/afp/AFPUnitConverter.java (renamed from src/java/org/apache/fop/render/afp/AFPUnitConverter.java)5
-rw-r--r--src/java/org/apache/fop/afp/AbstractAFPPainter.java (renamed from src/java/org/apache/fop/render/afp/AbstractAFPPainter.java)6
-rw-r--r--src/java/org/apache/fop/afp/BorderPaintInfo.java (renamed from src/java/org/apache/fop/render/afp/BorderPaintInfo.java)3
-rw-r--r--src/java/org/apache/fop/afp/Factory.java (renamed from src/java/org/apache/fop/render/afp/modca/Factory.java)46
-rw-r--r--src/java/org/apache/fop/afp/PaintInfo.java (renamed from src/java/org/apache/fop/render/afp/PaintInfo.java)2
-rw-r--r--src/java/org/apache/fop/afp/RectanglePaintInfo.java (renamed from src/java/org/apache/fop/render/afp/RectanglePaintInfo.java)3
-rw-r--r--src/java/org/apache/fop/afp/Streamable.java (renamed from src/java/org/apache/fop/render/afp/Streamable.java)2
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPBase12FontCollection.java (renamed from src/java/org/apache/fop/render/afp/fonts/AFPBase12FontCollection.java)2
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFont.java (renamed from src/java/org/apache/fop/render/afp/fonts/AFPFont.java)3
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFontAttributes.java (renamed from src/java/org/apache/fop/render/afp/AFPFontAttributes.java)14
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFontCollection.java (renamed from src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java)2
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFontInfo.java (renamed from src/java/org/apache/fop/render/afp/fonts/AFPFontInfo.java)3
-rw-r--r--src/java/org/apache/fop/afp/fonts/AFPFontReader.java (renamed from src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java)7
-rw-r--r--src/java/org/apache/fop/afp/fonts/CharacterSet.java (renamed from src/java/org/apache/fop/render/afp/fonts/CharacterSet.java)10
-rw-r--r--src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java (renamed from src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java)2
-rw-r--r--src/java/org/apache/fop/afp/fonts/FontRuntimeException.java (renamed from src/java/org/apache/fop/render/afp/exceptions/FontRuntimeException.java)6
-rw-r--r--src/java/org/apache/fop/afp/fonts/FopCharacterSet.java (renamed from src/java/org/apache/fop/render/afp/fonts/FopCharacterSet.java)2
-rw-r--r--src/java/org/apache/fop/afp/fonts/OutlineFont.java (renamed from src/java/org/apache/fop/render/afp/fonts/OutlineFont.java)3
-rw-r--r--src/java/org/apache/fop/afp/fonts/RasterFont.java (renamed from src/java/org/apache/fop/render/afp/fonts/RasterFont.java)19
-rw-r--r--src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java (renamed from src/java/org/apache/fop/render/afp/goca/AbstractGraphicsCoord.java)6
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsArea.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsArea.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsBox.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsBox.java)2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsChainedSegment.java)8
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsData.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsData.java)10
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsFillet.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsFillet.java)2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsFullArc.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsFullArc.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsImage.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsImage.java)8
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsLine.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsLine.java)2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetArcParameters.java)2
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetCharacterSet.java)6
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetCurrentPosition.java)3
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetLineType.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetLineWidth.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetMix.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetMix.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetPatternSymbol.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsSetProcessColor.java)4
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsString.java (renamed from src/java/org/apache/fop/render/afp/goca/GraphicsString.java)8
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageCellPosition.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageCellPosition.java)6
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageContent.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageContent.java)4
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageInputDescriptor.java)6
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageOutputControl.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageOutputControl.java)6
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageRasterData.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageRasterData.java)10
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageRasterPattern.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageRasterPattern.java)2
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageSegment.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageSegment.java)6
-rw-r--r--src/java/org/apache/fop/afp/ioca/ImageSizeParameter.java (renamed from src/java/org/apache/fop/render/afp/ioca/ImageSizeParameter.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractAFPObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractAFPObject.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractDataObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractDataObject.java)11
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractDescriptor.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractEnvironmentGroup.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractNamedAFPObject.java)18
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractPageObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractPageObject.java)9
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractPreparedAFPObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractPreparedAFPObject.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractPreparedObjectContainer.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractPreparedObjectContainer.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractResourceEnvironmentGroupContainer.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractResourceEnvironmentGroupContainer.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/AbstractStructuredAFPObject.java (renamed from src/java/org/apache/fop/render/afp/modca/AbstractStructuredAFPObject.java)12
-rw-r--r--src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/ActiveEnvironmentGroup.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/ContainerDataDescriptor.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/DataStream.java (renamed from src/java/org/apache/fop/render/afp/modca/DataStream.java)63
-rw-r--r--src/java/org/apache/fop/afp/modca/Document.java (renamed from src/java/org/apache/fop/render/afp/modca/Document.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/GraphicsDataDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/GraphicsDataDescriptor.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/GraphicsObject.java (renamed from src/java/org/apache/fop/render/afp/modca/GraphicsObject.java)33
-rw-r--r--src/java/org/apache/fop/afp/modca/IMImageObject.java (renamed from src/java/org/apache/fop/render/afp/modca/IMImageObject.java)10
-rw-r--r--src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/ImageDataDescriptor.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/ImageObject.java (renamed from src/java/org/apache/fop/render/afp/modca/ImageObject.java)11
-rw-r--r--src/java/org/apache/fop/afp/modca/IncludeObject.java (renamed from src/java/org/apache/fop/render/afp/modca/IncludeObject.java)10
-rw-r--r--src/java/org/apache/fop/afp/modca/IncludePageOverlay.java (renamed from src/java/org/apache/fop/render/afp/modca/IncludePageOverlay.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/IncludePageSegment.java (renamed from src/java/org/apache/fop/render/afp/modca/IncludePageSegment.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/InterchangeSet.java (renamed from src/java/org/apache/fop/render/afp/modca/InterchangeSet.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/InvokeMediumMap.java (renamed from src/java/org/apache/fop/render/afp/modca/InvokeMediumMap.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/MapCodedFont.java (renamed from src/java/org/apache/fop/render/afp/modca/MapCodedFont.java)22
-rw-r--r--src/java/org/apache/fop/afp/modca/MapContainerData.java (renamed from src/java/org/apache/fop/render/afp/modca/MapContainerData.java)8
-rw-r--r--src/java/org/apache/fop/afp/modca/MapDataResource.java (renamed from src/java/org/apache/fop/render/afp/modca/MapDataResource.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/MapPageOverlay.java (renamed from src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/MaximumSizeExceededException.java (renamed from src/java/org/apache/fop/render/afp/modca/MaximumSizeExceededException.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/NoOperation.java (renamed from src/java/org/apache/fop/render/afp/modca/NoOperation.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java)12
-rw-r--r--src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java (renamed from src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/ObjectContainer.java (renamed from src/java/org/apache/fop/render/afp/modca/ObjectContainer.java)15
-rw-r--r--src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/Overlay.java (renamed from src/java/org/apache/fop/render/afp/modca/Overlay.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/PageDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/PageDescriptor.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/PageGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/PageGroup.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/PageObject.java (renamed from src/java/org/apache/fop/render/afp/modca/PageObject.java)13
-rw-r--r--src/java/org/apache/fop/afp/modca/PageSegment.java (renamed from src/java/org/apache/fop/render/afp/modca/PageSegment.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/PreparedAFPObject.java (renamed from src/java/org/apache/fop/render/afp/modca/PreparedAFPObject.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/PreprocessPresentationObject.java (renamed from src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/PresentationEnvironmentControl.java (renamed from src/java/org/apache/fop/render/afp/modca/PresentationEnvironmentControl.java)8
-rw-r--r--src/java/org/apache/fop/afp/modca/PresentationTextData.java (renamed from src/java/org/apache/fop/render/afp/modca/PresentationTextData.java)8
-rw-r--r--src/java/org/apache/fop/afp/modca/PresentationTextDescriptor.java (renamed from src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java)5
-rw-r--r--src/java/org/apache/fop/afp/modca/PresentationTextObject.java (renamed from src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/Registry.java (renamed from src/java/org/apache/fop/render/afp/modca/Registry.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/ResourceGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/ResourceGroup.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/ResourceObject.java (renamed from src/java/org/apache/fop/render/afp/modca/ResourceObject.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java (renamed from src/java/org/apache/fop/render/afp/modca/StreamedResourceGroup.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/TagLogicalElement.java (renamed from src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/TagLogicalElementBean.java (renamed from src/java/org/apache/fop/render/afp/modca/TagLogicalElementBean.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/FullyQualifiedNameTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/MappingOptionTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/MappingOptionTriplet.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/MeasurementUnitsTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/MeasurementUnitsTriplet.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/ObjectAreaSizeTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/ObjectAreaSizeTriplet.java)4
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/ObjectByteExtentTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/ObjectByteExtentTriplet.java)6
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/ObjectClassificationTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/ObjectClassificationTriplet.java)8
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/ResourceObjectTypeTriplet.java)2
-rw-r--r--src/java/org/apache/fop/afp/modca/triplets/Triplet.java (renamed from src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java)6
-rw-r--r--src/java/org/apache/fop/afp/util/BinaryUtils.java (renamed from src/java/org/apache/fop/render/afp/tools/BinaryUtils.java)2
-rw-r--r--src/java/org/apache/fop/afp/util/DTDEntityResolver.java (renamed from src/java/org/apache/fop/render/afp/tools/DTDEntityResolver.java)4
-rw-r--r--src/java/org/apache/fop/afp/util/StringUtils.java (renamed from src/java/org/apache/fop/render/afp/tools/StringUtils.java)2
-rw-r--r--src/java/org/apache/fop/afp/util/StructuredFieldReader.java (renamed from src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java)2
-rw-r--r--src/java/org/apache/fop/fonts/Base14Font.java1
-rw-r--r--src/java/org/apache/fop/fonts/CustomFont.java1
-rw-r--r--src/java/org/apache/fop/fonts/Font.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontCollection.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontDescriptor.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontEventListener.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontMetrics.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontTriplet.java1
-rw-r--r--src/java/org/apache/fop/fonts/FontType.java28
-rw-r--r--src/java/org/apache/fop/fonts/FontUtil.java1
-rw-r--r--src/java/org/apache/fop/fonts/MultiByteFont.java1
-rw-r--r--src/java/org/apache/fop/fonts/MutableFont.java1
-rw-r--r--src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java6
-rw-r--r--src/java/org/apache/fop/pdf/PDFState.java6
-rw-r--r--src/java/org/apache/fop/render/StateStack.java50
-rw-r--r--src/java/org/apache/fop/render/afp/AFPAbstractImageFactory.java10
-rw-r--r--src/java/org/apache/fop/render/afp/AFPBatikGraphicsObjectPainter.java2
-rw-r--r--src/java/org/apache/fop/render/afp/AFPDataObjectInfoFactory.java28
-rw-r--r--src/java/org/apache/fop/render/afp/AFPDataObjectInfoProvider.java1
-rw-r--r--src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java12
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java29
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageRawStreamFactory.java13
-rw-r--r--src/java/org/apache/fop/render/afp/AFPImageRenderedFactory.java12
-rw-r--r--src/java/org/apache/fop/render/afp/AFPInfo.java3
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRawCCITTFaxFactory.java10
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRenderer.java26
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java10
-rw-r--r--src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java (renamed from src/java/org/apache/fop/render/afp/AFPImageInfo.java)75
-rw-r--r--src/java/org/apache/fop/render/afp/AFPSVGHandler.java24
-rw-r--r--src/java/org/apache/fop/render/afp/AFPTextPainter.java8
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java2
-rw-r--r--src/java/org/apache/fop/render/ps/PSTextPainter.java6
-rw-r--r--src/java/org/apache/fop/store/FileStore.java166
-rw-r--r--src/java/org/apache/fop/store/InputStreamStorer.java50
-rw-r--r--src/java/org/apache/fop/store/StoreRecord.java90
-rw-r--r--src/java/org/apache/fop/store/Storer.java87
-rw-r--r--src/java/org/apache/fop/store/Writable.java38
-rw-r--r--src/java/org/apache/fop/store/WritableStorer.java47
-rw-r--r--src/java/org/apache/fop/store/WriteSession.java109
-rw-r--r--src/java/org/apache/fop/svg/GraphicsConfiguration.java1
-rw-r--r--src/java/org/apache/fop/svg/PDFBridgeContext.java2
-rw-r--r--src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java1
178 files changed, 794 insertions, 1172 deletions
diff --git a/src/java/org/apache/fop/render/AbstractState.java b/src/java/org/apache/fop/AbstractState.java
index 04409390f..851c50e76 100644
--- a/src/java/org/apache/fop/render/AbstractState.java
+++ b/src/java/org/apache/fop/AbstractState.java
@@ -17,15 +17,17 @@
/* $Id$ */
-package org.apache.fop.render;
+package org.apache.fop;
import java.awt.Color;
import java.awt.geom.AffineTransform;
import java.io.Serializable;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Iterator;
import java.util.Stack;
+
/**
* A base class which holds information about the current rendering state.
*/
@@ -329,6 +331,8 @@ public abstract class AbstractState implements Cloneable, Serializable {
*/
public abstract class AbstractData implements Cloneable, Serializable {
+ private static final long serialVersionUID = 5208418041189828624L;
+
/** The current color */
private Color color = null;
@@ -430,4 +434,32 @@ public abstract class AbstractState implements Cloneable, Serializable {
+ ", transform=" + transform;
}
}
+
+ /**
+ * No copy constructor for java.util.Stack so extended and implemented one.
+ */
+ private class StateStack extends java.util.Stack {
+
+ private static final long serialVersionUID = 4897178211223823041L;
+
+ /**
+ * Default constructor
+ */
+ public StateStack() {
+ super();
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param c initial contents of stack
+ */
+ public StateStack(Collection c) {
+ elementCount = c.size();
+ // 10% for growth
+ elementData = new Object[
+ (int)Math.min((elementCount * 110L) / 100, Integer.MAX_VALUE)];
+ c.toArray(elementData);
+ }
+ }
}
diff --git a/src/java/org/apache/fop/render/afp/AFPAbstractGraphicsObjectPainter.java b/src/java/org/apache/fop/afp/AFPAbstractGraphicsObjectPainter.java
index 101d28b61..8c5e84012 100644
--- a/src/java/org/apache/fop/render/afp/AFPAbstractGraphicsObjectPainter.java
+++ b/src/java/org/apache/fop/afp/AFPAbstractGraphicsObjectPainter.java
@@ -17,11 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.modca.GraphicsObject;
+import org.apache.fop.afp.modca.GraphicsObject;
import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
/**
diff --git a/src/java/org/apache/fop/render/afp/AFPBorderPainter.java b/src/java/org/apache/fop/afp/AFPBorderPainter.java
index 5fbb91abc..96f9ae78f 100644
--- a/src/java/org/apache/fop/render/afp/AFPBorderPainter.java
+++ b/src/java/org/apache/fop/afp/AFPBorderPainter.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.geom.AffineTransform;
+import org.apache.fop.afp.modca.DataStream;
import org.apache.fop.fo.Constants;
-import org.apache.fop.render.afp.modca.DataStream;
import org.apache.fop.util.ColorUtil;
/**
diff --git a/src/java/org/apache/fop/render/afp/AFPConstants.java b/src/java/org/apache/fop/afp/AFPConstants.java
index b9ab2de78..3462ddfe6 100644
--- a/src/java/org/apache/fop/render/afp/AFPConstants.java
+++ b/src/java/org/apache/fop/afp/AFPConstants.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
/**
* Constants used by the AFP renderer.
diff --git a/src/java/org/apache/fop/render/afp/AFPDataObjectFactory.java b/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
index f8e3c1518..d2e5a7a62 100644
--- a/src/java/org/apache/fop/render/afp/AFPDataObjectFactory.java
+++ b/src/java/org/apache/fop/afp/AFPDataObjectFactory.java
@@ -17,25 +17,24 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.geom.Rectangle2D;
-import org.apache.fop.render.afp.ioca.ImageContent;
-import org.apache.fop.render.afp.modca.AbstractDataObject;
-import org.apache.fop.render.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.render.afp.modca.Document;
-import org.apache.fop.render.afp.modca.Factory;
-import org.apache.fop.render.afp.modca.GraphicsObject;
-import org.apache.fop.render.afp.modca.ImageObject;
-import org.apache.fop.render.afp.modca.IncludeObject;
-import org.apache.fop.render.afp.modca.ObjectContainer;
-import org.apache.fop.render.afp.modca.Overlay;
-import org.apache.fop.render.afp.modca.PageSegment;
-import org.apache.fop.render.afp.modca.Registry;
-import org.apache.fop.render.afp.modca.ResourceObject;
-import org.apache.fop.render.afp.modca.triplets.MappingOptionTriplet;
-import org.apache.fop.render.afp.modca.triplets.ObjectClassificationTriplet;
+import org.apache.fop.afp.ioca.ImageContent;
+import org.apache.fop.afp.modca.AbstractDataObject;
+import org.apache.fop.afp.modca.AbstractNamedAFPObject;
+import org.apache.fop.afp.modca.Document;
+import org.apache.fop.afp.modca.GraphicsObject;
+import org.apache.fop.afp.modca.ImageObject;
+import org.apache.fop.afp.modca.IncludeObject;
+import org.apache.fop.afp.modca.ObjectContainer;
+import org.apache.fop.afp.modca.Overlay;
+import org.apache.fop.afp.modca.PageSegment;
+import org.apache.fop.afp.modca.Registry;
+import org.apache.fop.afp.modca.ResourceObject;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
+import org.apache.fop.afp.modca.triplets.ObjectClassificationTriplet;
import org.apache.xmlgraphics.image.codec.tiff.TIFFImage;
import org.apache.xmlgraphics.java2d.Graphics2DImagePainter;
diff --git a/src/java/org/apache/fop/render/afp/AFPDataObjectInfo.java b/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
index cdd4b4d37..c618a53fc 100644
--- a/src/java/org/apache/fop/render/afp/AFPDataObjectInfo.java
+++ b/src/java/org/apache/fop/afp/AFPDataObjectInfo.java
@@ -17,19 +17,19 @@
/* $Id: $ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.io.InputStream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.modca.Registry;
+import org.apache.fop.afp.modca.Registry;
/**
* A list of parameters associated with an AFP data objects
*/
public class AFPDataObjectInfo {
- private static final Log log = LogFactory.getLog("org.apache.fop.afp");
+ private static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
/** the object area info */
private AFPObjectAreaInfo objectAreaInfo;
diff --git a/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java b/src/java/org/apache/fop/afp/AFPForeignAttributeReader.java
index 4d5d4c1db..710c24533 100644
--- a/src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java
+++ b/src/java/org/apache/fop/afp/AFPForeignAttributeReader.java
@@ -15,9 +15,9 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.io.File;
import java.util.Map;
@@ -31,7 +31,7 @@ import org.apache.xmlgraphics.util.QName;
* Parses any AFP foreign attributes
*/
public class AFPForeignAttributeReader {
- private static final Log log = LogFactory.getLog("org.apache.fop.afp");
+ private static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
/** the resource-name attribute */
public static final String RESOURCE_NAME = "afp:resource-name";
diff --git a/src/java/org/apache/fop/render/afp/AFPGraphics2D.java b/src/java/org/apache/fop/afp/AFPGraphics2D.java
index 9acf76873..21114bb88 100644
--- a/src/java/org/apache/fop/render/afp/AFPGraphics2D.java
+++ b/src/java/org/apache/fop/afp/AFPGraphics2D.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.AlphaComposite;
import java.awt.BasicStroke;
@@ -45,7 +45,9 @@ import java.io.IOException;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-
+import org.apache.fop.afp.goca.GraphicsSetLineType;
+import org.apache.fop.afp.modca.GraphicsObject;
+import org.apache.fop.fonts.FontInfo;
import org.apache.xmlgraphics.image.loader.ImageInfo;
import org.apache.xmlgraphics.image.loader.ImageSize;
import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
@@ -54,10 +56,7 @@ import org.apache.xmlgraphics.java2d.GraphicContext;
import org.apache.xmlgraphics.java2d.StrokingTextHandler;
import org.apache.xmlgraphics.java2d.TextHandler;
import org.apache.xmlgraphics.ps.ImageEncodingHelper;
-
-import org.apache.fop.apps.MimeConstants;
-import org.apache.fop.render.afp.goca.GraphicsSetLineType;
-import org.apache.fop.render.afp.modca.GraphicsObject;
+import org.apache.xmlgraphics.util.MimeConstants;
/**
* This is a concrete implementation of <tt>AbstractGraphics2D</tt> (and
@@ -92,12 +91,18 @@ public class AFPGraphics2D extends AbstractGraphics2D {
/** Custom text handler */
protected TextHandler customTextHandler = null;
- /** AFP info */
- private AFPInfo info = null;
+ /** AFP resource manager */
+ private AFPResourceManager resourceManager = null;
+
+ /** AFP resource info */
+ private AFPResourceInfo resourceInfo = null;
/** Current AFP state */
private AFPState state = null;
+ /** The AFP FontInfo */
+ private FontInfo fontInfo;
+
/**
* Main constructor
*
@@ -121,27 +126,27 @@ public class AFPGraphics2D extends AbstractGraphics2D {
this.graphicsObj = g2d.graphicsObj;
this.fallbackTextHandler = g2d.fallbackTextHandler;
this.customTextHandler = g2d.customTextHandler;
- this.info = g2d.info;
+ this.resourceManager = g2d.resourceManager;
+ this.resourceInfo = g2d.resourceInfo;
this.state = g2d.state;
}
/**
- * Sets the AFPInfo
+ * Sets the AFP resource manager
*
- * @param afpInfo the AFP Info to use
+ * @param resourceManager the AFP resource manager
*/
- public void setAFPInfo(AFPInfo afpInfo) {
- this.info = afpInfo;
- this.state = info.getState();
+ public void setResourceManager(AFPResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
}
/**
- * Gets the AFPInfo
+ * Sets the AFP resource info
*
- * @return the AFPInfo
+ * @param resourceInfo the AFP resource info
*/
- public AFPInfo getAFPInfo() {
- return this.info;
+ public void setResourceInfo(AFPResourceInfo resourceInfo) {
+ this.resourceInfo = resourceInfo;
}
/**
@@ -419,7 +424,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
imageObjectInfo.setBitsPerPixel(state.getBitsPerPixel());
- imageObjectInfo.setResourceInfo(info.getResourceInfo());
+ imageObjectInfo.setResourceInfo(resourceInfo);
int dataHeight = renderedImage.getHeight();
imageObjectInfo.setDataHeight(dataHeight);
@@ -509,7 +514,6 @@ public class AFPGraphics2D extends AbstractGraphics2D {
AFPImageObjectInfo imageObjectInfo = getImageObjectInfo(bufferedImage, x, y, width, height);
// create image resource
- AFPResourceManager resourceManager = info.getResourceManager();
resourceManager.createObject(imageObjectInfo);
return true;
} catch (IOException ioe) {
@@ -557,7 +561,7 @@ public class AFPGraphics2D extends AbstractGraphics2D {
*
* @return the GOCA graphics object
*/
- protected GraphicsObject getGraphicsObject() {
+ public GraphicsObject getGraphicsObject() {
return this.graphicsObj;
}
@@ -575,8 +579,34 @@ public class AFPGraphics2D extends AbstractGraphics2D {
*
* @param state the AFP state
*/
- protected void setState(AFPState state) {
+ public void setState(AFPState state) {
this.state = state;
}
+ /**
+ * Returns the AFP state
+ *
+ * @return the AFP state
+ */
+ public AFPState getState() {
+ return this.state;
+ }
+
+ /**
+ * Sets the FontInfo
+ *
+ * @param the FontInfo
+ */
+ public void setFontInfo(FontInfo fontInfo) {
+ this.fontInfo = fontInfo;
+ }
+
+ /**
+ * Returns the FontInfo
+ *
+ * @return the FontInfo
+ */
+ public FontInfo getFontInfo() {
+ return this.fontInfo;
+ }
}
diff --git a/src/java/org/apache/fop/render/afp/AFPGraphicsConfiguration.java b/src/java/org/apache/fop/afp/AFPGraphicsConfiguration.java
index 1f40b7cfd..6c6d92098 100644
--- a/src/java/org/apache/fop/render/afp/AFPGraphicsConfiguration.java
+++ b/src/java/org/apache/fop/afp/AFPGraphicsConfiguration.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.GraphicsDevice;
import java.awt.Rectangle;
diff --git a/src/java/org/apache/fop/render/afp/AFPGraphicsDevice.java b/src/java/org/apache/fop/afp/AFPGraphicsDevice.java
index d4c756a5a..20270e426 100644
--- a/src/java/org/apache/fop/render/afp/AFPGraphicsDevice.java
+++ b/src/java/org/apache/fop/afp/AFPGraphicsDevice.java
@@ -17,11 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
+
/**
* This implements the GraphicsDevice interface as appropriate for
* an AFPGraphics2D.
diff --git a/src/java/org/apache/fop/render/afp/AFPGraphicsObjectInfo.java b/src/java/org/apache/fop/afp/AFPGraphicsObjectInfo.java
index b4c651574..df0ef55c5 100644
--- a/src/java/org/apache/fop/render/afp/AFPGraphicsObjectInfo.java
+++ b/src/java/org/apache/fop/afp/AFPGraphicsObjectInfo.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.geom.Rectangle2D;
diff --git a/src/java/org/apache/fop/render/afp/AFPImageObjectInfo.java b/src/java/org/apache/fop/afp/AFPImageObjectInfo.java
index 711e135d0..561ad438b 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageObjectInfo.java
+++ b/src/java/org/apache/fop/afp/AFPImageObjectInfo.java
@@ -17,8 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp;
-
+package org.apache.fop.afp;
/**
diff --git a/src/java/org/apache/fop/render/afp/AFPLineDataInfo.java b/src/java/org/apache/fop/afp/AFPLineDataInfo.java
index 618cf21ae..f3acf4f71 100644
--- a/src/java/org/apache/fop/render/afp/AFPLineDataInfo.java
+++ b/src/java/org/apache/fop/afp/AFPLineDataInfo.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.Color;
diff --git a/src/java/org/apache/fop/render/afp/AFPObjectAreaInfo.java b/src/java/org/apache/fop/afp/AFPObjectAreaInfo.java
index 0a3cdef87..963424470 100644
--- a/src/java/org/apache/fop/render/afp/AFPObjectAreaInfo.java
+++ b/src/java/org/apache/fop/afp/AFPObjectAreaInfo.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
/**
* A common class used to convey locations,
diff --git a/src/java/org/apache/fop/render/afp/AFPPageFonts.java b/src/java/org/apache/fop/afp/AFPPageFonts.java
index 1bcbbb51d..41fce731d 100644
--- a/src/java/org/apache/fop/render/afp/AFPPageFonts.java
+++ b/src/java/org/apache/fop/afp/AFPPageFonts.java
@@ -17,9 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
+
+import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.AFPFontAttributes;
-import org.apache.fop.render.afp.fonts.AFPFont;
/**
* Holds the current page fonts
diff --git a/src/java/org/apache/fop/render/afp/AFPRectanglePainter.java b/src/java/org/apache/fop/afp/AFPRectanglePainter.java
index 18f275459..56c60b440 100644
--- a/src/java/org/apache/fop/render/afp/AFPRectanglePainter.java
+++ b/src/java/org/apache/fop/afp/AFPRectanglePainter.java
@@ -17,11 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.geom.AffineTransform;
-import org.apache.fop.render.afp.modca.DataStream;
+import org.apache.fop.afp.modca.DataStream;
public class AFPRectanglePainter extends AbstractAFPPainter {
diff --git a/src/java/org/apache/fop/render/afp/AFPResourceInfo.java b/src/java/org/apache/fop/afp/AFPResourceInfo.java
index f52a3cd0b..729339fa4 100644
--- a/src/java/org/apache/fop/render/afp/AFPResourceInfo.java
+++ b/src/java/org/apache/fop/afp/AFPResourceInfo.java
@@ -17,7 +17,8 @@
/* $Id: $ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
+
/**
* The level at which a resource is to reside in the AFP output
diff --git a/src/java/org/apache/fop/render/afp/AFPResourceLevel.java b/src/java/org/apache/fop/afp/AFPResourceLevel.java
index 8dc1c2077..85cdefb4b 100644
--- a/src/java/org/apache/fop/render/afp/AFPResourceLevel.java
+++ b/src/java/org/apache/fop/afp/AFPResourceLevel.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
/**
* A resource level
diff --git a/src/java/org/apache/fop/render/afp/AFPResourceManager.java b/src/java/org/apache/fop/afp/AFPResourceManager.java
index 6acc2419c..111238be8 100644
--- a/src/java/org/apache/fop/render/afp/AFPResourceManager.java
+++ b/src/java/org/apache/fop/afp/AFPResourceManager.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.io.IOException;
import java.io.OutputStream;
@@ -25,13 +25,12 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.modca.AbstractDataObject;
-import org.apache.fop.render.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.render.afp.modca.DataStream;
-import org.apache.fop.render.afp.modca.Factory;
-import org.apache.fop.render.afp.modca.IncludeObject;
-import org.apache.fop.render.afp.modca.Registry;
-import org.apache.fop.render.afp.modca.ResourceGroup;
+import org.apache.fop.afp.modca.AbstractDataObject;
+import org.apache.fop.afp.modca.AbstractNamedAFPObject;
+import org.apache.fop.afp.modca.DataStream;
+import org.apache.fop.afp.modca.IncludeObject;
+import org.apache.fop.afp.modca.Registry;
+import org.apache.fop.afp.modca.ResourceGroup;
/**
* Manages the creation and storage of document resources
diff --git a/src/java/org/apache/fop/render/afp/AFPState.java b/src/java/org/apache/fop/afp/AFPState.java
index 8209f3153..9de3a0c05 100644
--- a/src/java/org/apache/fop/render/afp/AFPState.java
+++ b/src/java/org/apache/fop/afp/AFPState.java
@@ -17,20 +17,20 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.AbstractState;
+import org.apache.fop.AbstractState;
/**
* This keeps information about the current state when writing to an AFP datastream.
*/
-public class AFPState extends org.apache.fop.render.AbstractState implements Cloneable {
+public class AFPState extends org.apache.fop.AbstractState implements Cloneable {
private static final long serialVersionUID = 8206711712452344473L;
- private static Log log = LogFactory.getLog("org.apache.fop.render.afp.AFPState");
+ private static Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
/** the portrait rotation */
private int portraitRotation = 0;
@@ -66,7 +66,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
* @param rotation
* The rotation in degrees.
*/
- protected void setPortraitRotation(int rotation) {
+ public void setPortraitRotation(int rotation) {
if (rotation == 0 || rotation == 90 || rotation == 180
|| rotation == 270) {
portraitRotation = rotation;
@@ -94,7 +94,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
* @param rotation
* The rotation in degrees.
*/
- protected void setLandscapeRotation(int rotation) {
+ public void setLandscapeRotation(int rotation) {
if (rotation == 0 || rotation == 90 || rotation == 180
|| rotation == 270) {
landscapeRotation = rotation;
@@ -158,7 +158,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
*
* @return true if color images are to be used
*/
- protected boolean isColorImages() {
+ public boolean isColorImages() {
return this.colorImages;
}
@@ -176,7 +176,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
*
* @return true if images are supported natively in this AFP environment
*/
- protected boolean isNativeImages() {
+ public boolean isNativeImages() {
return this.nativeImages;
}
@@ -198,7 +198,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
*
* @return the resolution in dpi
*/
- protected int getResolution() {
+ public int getResolution() {
return this.resolution;
}
@@ -240,7 +240,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
*
* @return the current page fonts
*/
- protected AFPPageFonts getPageFonts() {
+ public AFPPageFonts getPageFonts() {
return pageState.getFonts();
}
@@ -303,7 +303,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
*
* @param uri the uri of the current image
*/
- protected void setImageUri(String uri) {
+ public void setImageUri(String uri) {
((AFPData)getData()).imageUri = uri;
}
@@ -483,7 +483,7 @@ public class AFPState extends org.apache.fop.render.AbstractState implements Clo
/**
* Block level state data
*/
- private class AFPData extends org.apache.fop.render.AbstractState.AbstractData {
+ private class AFPData extends org.apache.fop.AbstractState.AbstractData {
private static final long serialVersionUID = -1789481244175275686L;
/** The current fill status */
diff --git a/src/java/org/apache/fop/render/afp/AFPStreamer.java b/src/java/org/apache/fop/afp/AFPStreamer.java
index be68caab2..42dcf4412 100644
--- a/src/java/org/apache/fop/render/afp/AFPStreamer.java
+++ b/src/java/org/apache/fop/afp/AFPStreamer.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.io.BufferedOutputStream;
import java.io.File;
@@ -31,10 +31,9 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.modca.DataStream;
-import org.apache.fop.render.afp.modca.Factory;
-import org.apache.fop.render.afp.modca.ResourceGroup;
-import org.apache.fop.render.afp.modca.StreamedResourceGroup;
+import org.apache.fop.afp.modca.DataStream;
+import org.apache.fop.afp.modca.ResourceGroup;
+import org.apache.fop.afp.modca.StreamedResourceGroup;
/**
* Manages the streaming of the AFP output
diff --git a/src/java/org/apache/fop/render/afp/AFPTextDataInfo.java b/src/java/org/apache/fop/afp/AFPTextDataInfo.java
index 7cc90c589..3e87fc473 100644
--- a/src/java/org/apache/fop/render/afp/AFPTextDataInfo.java
+++ b/src/java/org/apache/fop/afp/AFPTextDataInfo.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.Color;
@@ -56,7 +56,7 @@ public class AFPTextDataInfo {
*
* @param fontReference the font reference
*/
- protected void setFontReference(int fontReference) {
+ public void setFontReference(int fontReference) {
this.fontReference = fontReference;
}
@@ -110,7 +110,7 @@ public class AFPTextDataInfo {
*
* @param color the color
*/
- protected void setColor(Color color) {
+ public void setColor(Color color) {
this.color = color;
}
@@ -128,7 +128,7 @@ public class AFPTextDataInfo {
*
* @param variableSpaceCharacterIncrement the variable space character increment
*/
- protected void setVariableSpaceCharacterIncrement(
+ public void setVariableSpaceCharacterIncrement(
int variableSpaceCharacterIncrement) {
this.variableSpaceCharacterIncrement = variableSpaceCharacterIncrement;
}
@@ -147,7 +147,7 @@ public class AFPTextDataInfo {
*
* @param interCharacterAdjustment the inter character adjustment
*/
- protected void setInterCharacterAdjustment(int interCharacterAdjustment) {
+ public void setInterCharacterAdjustment(int interCharacterAdjustment) {
this.interCharacterAdjustment = interCharacterAdjustment;
}
@@ -165,7 +165,7 @@ public class AFPTextDataInfo {
*
* @param data the text orientation
*/
- protected void setData(byte[] data) {
+ public void setData(byte[] data) {
this.data = data;
}
diff --git a/src/java/org/apache/fop/render/afp/AFPTextHandler.java b/src/java/org/apache/fop/afp/AFPTextHandler.java
index 0bd36b3e6..3dee6ca2e 100644
--- a/src/java/org/apache/fop/render/afp/AFPTextHandler.java
+++ b/src/java/org/apache/fop/afp/AFPTextHandler.java
@@ -17,17 +17,18 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.Color;
import java.io.IOException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.AFPFontAttributes;
+import org.apache.fop.afp.modca.GraphicsObject;
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.render.afp.fonts.AFPFont;
-import org.apache.fop.render.afp.modca.GraphicsObject;
import org.apache.xmlgraphics.java2d.TextHandler;
/**
@@ -44,16 +45,12 @@ public class AFPTextHandler implements TextHandler {
/** Overriding FontState */
protected Font overrideFont = null;
- /** current state */
- private AFPState state = null;
-
/**
* Main constructor.
* @param g2d the PSGraphics2D instance this instances is used by
*/
public AFPTextHandler(AFPGraphics2D g2d) {
this.g2d = g2d;
- this.state = g2d.getAFPInfo().getState();
}
/**
@@ -61,7 +58,7 @@ public class AFPTextHandler implements TextHandler {
* @return the FontInfo object
*/
public FontInfo getFontInfo() {
- return g2d.getAFPInfo().getFontInfo();
+ return g2d.getFontInfo();
}
/**
@@ -73,6 +70,8 @@ public class AFPTextHandler implements TextHandler {
log.debug("drawString() str=" + str + ", x=" + x + ", y=" + y);
GraphicsObject graphicsObj = g2d.getGraphicsObject();
Color col = g2d.getColor();
+
+ AFPState state = g2d.getState();
if (state.setColor(col)) {
graphicsObj.setColor(col);
}
diff --git a/src/java/org/apache/fop/render/afp/AFPUnitConverter.java b/src/java/org/apache/fop/afp/AFPUnitConverter.java
index 8a25bb604..69282fc18 100644
--- a/src/java/org/apache/fop/render/afp/AFPUnitConverter.java
+++ b/src/java/org/apache/fop/afp/AFPUnitConverter.java
@@ -15,13 +15,14 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.geom.AffineTransform;
+
/**
* AFP Unit converter
*/
diff --git a/src/java/org/apache/fop/render/afp/AbstractAFPPainter.java b/src/java/org/apache/fop/afp/AbstractAFPPainter.java
index ec148e5a4..ba6d49fc6 100644
--- a/src/java/org/apache/fop/render/afp/AbstractAFPPainter.java
+++ b/src/java/org/apache/fop/afp/AbstractAFPPainter.java
@@ -17,16 +17,16 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.modca.DataStream;
+import org.apache.fop.afp.modca.DataStream;
public abstract class AbstractAFPPainter {
/** Static logging instance */
- protected static Log log = LogFactory.getLog("org.apache.fop.render.afp");
+ protected static Log log = LogFactory.getLog("org.apache.xmlgraphics.afp");
protected final DataStream dataStream;
protected final AFPState state;
diff --git a/src/java/org/apache/fop/render/afp/BorderPaintInfo.java b/src/java/org/apache/fop/afp/BorderPaintInfo.java
index 9ba7f29cf..74252b7b9 100644
--- a/src/java/org/apache/fop/render/afp/BorderPaintInfo.java
+++ b/src/java/org/apache/fop/afp/BorderPaintInfo.java
@@ -17,10 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.awt.Color;
+
/**
* Border painting information
*/
diff --git a/src/java/org/apache/fop/render/afp/modca/Factory.java b/src/java/org/apache/fop/afp/Factory.java
index 468912b50..840d7b4e8 100644
--- a/src/java/org/apache/fop/render/afp/modca/Factory.java
+++ b/src/java/org/apache/fop/afp/Factory.java
@@ -17,19 +17,49 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp;
import java.io.OutputStream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.AFPState;
-import org.apache.fop.render.afp.goca.GraphicsData;
-import org.apache.fop.render.afp.ioca.ImageContent;
-import org.apache.fop.render.afp.ioca.ImageRasterData;
-import org.apache.fop.render.afp.ioca.ImageSegment;
-import org.apache.fop.render.afp.ioca.ImageSizeParameter;
-import org.apache.fop.render.afp.tools.StringUtils;
+import org.apache.fop.afp.goca.GraphicsData;
+import org.apache.fop.afp.ioca.ImageContent;
+import org.apache.fop.afp.ioca.ImageRasterData;
+import org.apache.fop.afp.ioca.ImageSegment;
+import org.apache.fop.afp.ioca.ImageSizeParameter;
+import org.apache.fop.afp.modca.ActiveEnvironmentGroup;
+import org.apache.fop.afp.modca.ContainerDataDescriptor;
+import org.apache.fop.afp.modca.DataStream;
+import org.apache.fop.afp.modca.Document;
+import org.apache.fop.afp.modca.GraphicsDataDescriptor;
+import org.apache.fop.afp.modca.GraphicsObject;
+import org.apache.fop.afp.modca.IMImageObject;
+import org.apache.fop.afp.modca.ImageDataDescriptor;
+import org.apache.fop.afp.modca.ImageObject;
+import org.apache.fop.afp.modca.IncludeObject;
+import org.apache.fop.afp.modca.IncludePageSegment;
+import org.apache.fop.afp.modca.InvokeMediumMap;
+import org.apache.fop.afp.modca.MapCodedFont;
+import org.apache.fop.afp.modca.MapContainerData;
+import org.apache.fop.afp.modca.MapDataResource;
+import org.apache.fop.afp.modca.ObjectAreaDescriptor;
+import org.apache.fop.afp.modca.ObjectAreaPosition;
+import org.apache.fop.afp.modca.ObjectContainer;
+import org.apache.fop.afp.modca.ObjectEnvironmentGroup;
+import org.apache.fop.afp.modca.Overlay;
+import org.apache.fop.afp.modca.PageDescriptor;
+import org.apache.fop.afp.modca.PageGroup;
+import org.apache.fop.afp.modca.PageObject;
+import org.apache.fop.afp.modca.PresentationEnvironmentControl;
+import org.apache.fop.afp.modca.PresentationTextDescriptor;
+import org.apache.fop.afp.modca.PresentationTextObject;
+import org.apache.fop.afp.modca.ResourceEnvironmentGroup;
+import org.apache.fop.afp.modca.ResourceGroup;
+import org.apache.fop.afp.modca.ResourceObject;
+import org.apache.fop.afp.modca.StreamedResourceGroup;
+import org.apache.fop.afp.modca.TagLogicalElement;
+import org.apache.fop.afp.util.StringUtils;
/**
* Creator of MO:DCA data objects (mostly)
diff --git a/src/java/org/apache/fop/render/afp/PaintInfo.java b/src/java/org/apache/fop/afp/PaintInfo.java
index 3225ef61d..2b11d0e3e 100644
--- a/src/java/org/apache/fop/render/afp/PaintInfo.java
+++ b/src/java/org/apache/fop/afp/PaintInfo.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
/**
* Generic painting information interface
diff --git a/src/java/org/apache/fop/render/afp/RectanglePaintInfo.java b/src/java/org/apache/fop/afp/RectanglePaintInfo.java
index 9e4b3f2e7..f0fae0317 100644
--- a/src/java/org/apache/fop/render/afp/RectanglePaintInfo.java
+++ b/src/java/org/apache/fop/afp/RectanglePaintInfo.java
@@ -17,7 +17,8 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
+
/**
* Filled rectangle painting information
diff --git a/src/java/org/apache/fop/render/afp/Streamable.java b/src/java/org/apache/fop/afp/Streamable.java
index cb2cd1bda..cd731ab47 100644
--- a/src/java/org/apache/fop/render/afp/Streamable.java
+++ b/src/java/org/apache/fop/afp/Streamable.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
+package org.apache.fop.afp;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPBase12FontCollection.java b/src/java/org/apache/fop/afp/fonts/AFPBase12FontCollection.java
index 9157b9083..c39bf5e1e 100644
--- a/src/java/org/apache/fop/render/afp/fonts/AFPBase12FontCollection.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPBase12FontCollection.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import org.apache.fop.fonts.Base14Font;
import org.apache.fop.fonts.Font;
diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPFont.java b/src/java/org/apache/fop/afp/fonts/AFPFont.java
index e87675e63..dc8f9c315 100644
--- a/src/java/org/apache/fop/render/afp/fonts/AFPFont.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFont.java
@@ -17,7 +17,8 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
+
import java.util.Map;
import java.util.Set;
diff --git a/src/java/org/apache/fop/render/afp/AFPFontAttributes.java b/src/java/org/apache/fop/afp/fonts/AFPFontAttributes.java
index ffbc85046..1dd22c66a 100644
--- a/src/java/org/apache/fop/render/afp/AFPFontAttributes.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFontAttributes.java
@@ -17,9 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp;
-
-import org.apache.fop.render.afp.fonts.AFPFont;
+package org.apache.fop.afp.fonts;
/**
* This class encapsulates the font attributes that need to be included
@@ -37,17 +35,17 @@ public class AFPFontAttributes {
/**
* The font key
*/
- private String fontKey;
+ private final String fontKey;
/**
* The font
*/
- private AFPFont font;
+ private final AFPFont font;
/**
* The point size
*/
- private int pointSize;
+ private final int pointSize;
/**
* Constructor for the AFPFontAttributes
@@ -96,12 +94,12 @@ public class AFPFontAttributes {
public void setFontReference(int fontReference) {
this.fontReference = fontReference;
}
-
+
/** {@inheritDoc} */
public String toString() {
return "fontReference=" + fontReference
+ ", fontKey=" + fontKey
+ ", font=" + font
- + ", pointSize=" + pointSize;
+ + ", pointSize=" + pointSize;
}
}
diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java b/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
index 540ee3b49..f7216eb11 100644
--- a/src/java/org/apache/fop/render/afp/fonts/AFPFontCollection.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFontCollection.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import java.util.Iterator;
import java.util.List;
diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPFontInfo.java b/src/java/org/apache/fop/afp/fonts/AFPFontInfo.java
index a70dce4b9..0259435c6 100644
--- a/src/java/org/apache/fop/render/afp/fonts/AFPFontInfo.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFontInfo.java
@@ -17,10 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import java.util.List;
+
/**
* FontInfo contains meta information on fonts
*/
diff --git a/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java b/src/java/org/apache/fop/afp/fonts/AFPFontReader.java
index f72d23d47..16c341ac4 100644
--- a/src/java/org/apache/fop/render/afp/fonts/AFPFontReader.java
+++ b/src/java/org/apache/fop/afp/fonts/AFPFontReader.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import java.io.File;
import java.io.FileNotFoundException;
@@ -31,7 +31,8 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.tools.StructuredFieldReader;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.util.StructuredFieldReader;
/**
* The AFPFontReader is responsible for reading the font attributes from binary
@@ -55,7 +56,7 @@ public final class AFPFontReader {
/**
* Static logging instance
*/
- protected static final Log log = LogFactory.getLog("org.apache.fop.render.afp.fonts");
+ protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp.fonts");
/**
* Template used to convert lists to arrays.
diff --git a/src/java/org/apache/fop/render/afp/fonts/CharacterSet.java b/src/java/org/apache/fop/afp/fonts/CharacterSet.java
index fc0ab8b16..31b53bf08 100644
--- a/src/java/org/apache/fop/render/afp/fonts/CharacterSet.java
+++ b/src/java/org/apache/fop/afp/fonts/CharacterSet.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
@@ -25,8 +25,8 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.tools.StringUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.util.StringUtils;
/**
* The IBM Font Object Content Architecture (FOCA) supports presentation
@@ -51,10 +51,10 @@ public class CharacterSet {
protected static final Log log = LogFactory.getLog(CharacterSet.class.getName());
/** default codepage */
- protected static final String DEFAULT_CODEPAGE = "T1V10500";
+ public static final String DEFAULT_CODEPAGE = "T1V10500";
/** default encoding */
- protected static final String DEFAULT_ENCODING = "Cp500";
+ public static final String DEFAULT_ENCODING = "Cp500";
private static final int MAX_NAME_LEN = 8;
diff --git a/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java b/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java
index e13029717..88e99eccf 100644
--- a/src/java/org/apache/fop/render/afp/fonts/CharacterSetOrientation.java
+++ b/src/java/org/apache/fop/afp/fonts/CharacterSetOrientation.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
/**
* The IBM Font Object Content Architecture (FOCA) supports presentation
diff --git a/src/java/org/apache/fop/render/afp/exceptions/FontRuntimeException.java b/src/java/org/apache/fop/afp/fonts/FontRuntimeException.java
index a54e4ad67..86e41707f 100644
--- a/src/java/org/apache/fop/render/afp/exceptions/FontRuntimeException.java
+++ b/src/java/org/apache/fop/afp/fonts/FontRuntimeException.java
@@ -17,13 +17,15 @@
/* $Id$ */
-package org.apache.fop.render.afp.exceptions;
+package org.apache.fop.afp.fonts;
/**
* A runtime exception for handling fatal errors in processing fonts.
* <p/>
*/
-public class FontRuntimeException extends NestedRuntimeException {
+public class FontRuntimeException extends RuntimeException {
+
+ private static final long serialVersionUID = -2217420523816384707L;
/**
* Constructs a FontRuntimeException with the specified message.
diff --git a/src/java/org/apache/fop/render/afp/fonts/FopCharacterSet.java b/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java
index d5beb5a33..49e536eab 100644
--- a/src/java/org/apache/fop/render/afp/fonts/FopCharacterSet.java
+++ b/src/java/org/apache/fop/afp/fonts/FopCharacterSet.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
import org.apache.fop.fonts.Typeface;
diff --git a/src/java/org/apache/fop/render/afp/fonts/OutlineFont.java b/src/java/org/apache/fop/afp/fonts/OutlineFont.java
index 71c5dfb6f..28f2df6c4 100644
--- a/src/java/org/apache/fop/render/afp/fonts/OutlineFont.java
+++ b/src/java/org/apache/fop/afp/fonts/OutlineFont.java
@@ -17,7 +17,8 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
+
/**
* A font defined as a set of lines and curves as opposed to a bitmap font. An
diff --git a/src/java/org/apache/fop/render/afp/fonts/RasterFont.java b/src/java/org/apache/fop/afp/fonts/RasterFont.java
index ee4bfba6c..7582159c5 100644
--- a/src/java/org/apache/fop/render/afp/fonts/RasterFont.java
+++ b/src/java/org/apache/fop/afp/fonts/RasterFont.java
@@ -17,16 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.fonts;
+package org.apache.fop.afp.fonts;
-import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.fo.properties.FixedLength;
-import org.apache.fop.render.afp.exceptions.FontRuntimeException;
/**
* A font where each character is stored as an array of pixels (a bitmap). Such
@@ -38,9 +35,10 @@ import org.apache.fop.render.afp.exceptions.FontRuntimeException;
public class RasterFont extends AFPFont {
/** Static logging instance */
- protected static final Log log = LogFactory.getLog("org.apache.fop.render.afp.fonts");
+ protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp.fonts");
- private Map charSets = new HashMap();
+ private final Map/*<String,CharacterSet>*/ charSets
+ = new java.util.HashMap/*<String,CharacterSet>*/();
private CharacterSet charSet = null;
@@ -65,6 +63,9 @@ public class RasterFont extends AFPFont {
this.charSet = characterSet;
}
+ /** Describes the unit millipoint. */
+ public static final String MPT = "mpt";
+
/**
* Get the character set metrics for the specified point size.
*
@@ -76,7 +77,7 @@ public class RasterFont extends AFPFont {
String pointsize = String.valueOf(size / 1000);
CharacterSet csm = (CharacterSet) charSets.get(pointsize);
if (csm == null) {
- csm = (CharacterSet) charSets.get(size + FixedLength.MPT);
+ csm = (CharacterSet) charSets.get(size + MPT);
}
if (csm == null) {
// Get char set with nearest font size
@@ -84,7 +85,7 @@ public class RasterFont extends AFPFont {
for (Iterator it = charSets.entrySet().iterator(); it.hasNext();) {
Map.Entry me = (Map.Entry)it.next();
String key = (String)me.getKey();
- if (!key.endsWith(FixedLength.MPT)) {
+ if (!key.endsWith(MPT)) {
int mpt = Integer.parseInt(key) * 1000;
if (Math.abs(size - mpt) < distance) {
distance = Math.abs(size - mpt);
@@ -94,7 +95,7 @@ public class RasterFont extends AFPFont {
}
}
if (csm != null) {
- charSets.put(size + FixedLength.MPT, csm);
+ charSets.put(size + MPT, csm);
String msg = "No " + (size / 1000) + "pt font " + getFontName()
+ " found, substituted with " + pointsize + "pt font";
log.warn(msg);
diff --git a/src/java/org/apache/fop/render/afp/goca/AbstractGraphicsCoord.java b/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java
index dbb7469fe..6f993b840 100644
--- a/src/java/org/apache/fop/render/afp/goca/AbstractGraphicsCoord.java
+++ b/src/java/org/apache/fop/afp/goca/AbstractGraphicsCoord.java
@@ -17,10 +17,10 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A base class encapsulating the structure of coordinate based GOCA objects
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsArea.java b/src/java/org/apache/fop/afp/goca/GraphicsArea.java
index 7ad6ede27..2b6d8a804 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsArea.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsArea.java
@@ -17,12 +17,12 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractPreparedObjectContainer;
+import org.apache.fop.afp.modca.AbstractPreparedObjectContainer;
/**
* A GOCA graphics area (container for filled shapes/objects)
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsBox.java b/src/java/org/apache/fop/afp/goca/GraphicsBox.java
index 3daa437f2..4f4947000 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsBox.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsBox.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
/**
* A GOCA graphics rectangular box
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsChainedSegment.java b/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
index ba4ccea86..8dab3d922 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsChainedSegment.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
@@ -17,14 +17,14 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractPreparedObjectContainer;
-import org.apache.fop.render.afp.modca.PreparedAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractPreparedObjectContainer;
+import org.apache.fop.afp.modca.PreparedAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A GOCA graphics segment
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsData.java b/src/java/org/apache/fop/afp/goca/GraphicsData.java
index 538933a03..ca5fef3f4 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsData.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsData.java
@@ -17,15 +17,15 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractPreparedObjectContainer;
-import org.apache.fop.render.afp.modca.PreparedAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
-import org.apache.fop.render.afp.tools.StringUtils;
+import org.apache.fop.afp.modca.AbstractPreparedObjectContainer;
+import org.apache.fop.afp.modca.PreparedAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
+import org.apache.fop.afp.util.StringUtils;
/**
* A GOCA graphics data
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsFillet.java b/src/java/org/apache/fop/afp/goca/GraphicsFillet.java
index cc1cedf2a..40b98b0d3 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsFillet.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsFillet.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
/**
* A GOCA graphics curved tangential line to a specified set of
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsFullArc.java b/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java
index 41347280e..9d511e142 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsFullArc.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsFullArc.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A GOCA graphics arc (circle/ellipse)
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsImage.java b/src/java/org/apache/fop/afp/goca/GraphicsImage.java
index ed8c1b386..24d4c78f8 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsImage.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsImage.java
@@ -15,15 +15,15 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractStructuredAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractStructuredAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A GOCA Image
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsLine.java b/src/java/org/apache/fop/afp/goca/GraphicsLine.java
index f09d24d98..319a9a122 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsLine.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsLine.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
/**
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetArcParameters.java b/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java
index 26735ed30..693cf21a9 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetArcParameters.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetArcParameters.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
/**
* Sets the arc parameters for a GOCA graphics arc (circle/ellipse)
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetCharacterSet.java b/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java
index f3d8b186b..f4d04910a 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetCharacterSet.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetCharacterSet.java
@@ -17,10 +17,10 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Sets the current character set (font) to be used for following graphics strings
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetCurrentPosition.java b/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java
index 7b68d0f17..675c2f034 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetCurrentPosition.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetCurrentPosition.java
@@ -17,8 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
-
+package org.apache.fop.afp.goca;
/**
* Sets the current painting position of the graphics object
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetLineType.java b/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
index febf2dfb2..0093885a6 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetLineType.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
/**
* Sets the value of the current line type attribute when stroking GOCA shapes (structured fields)
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetLineWidth.java b/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
index 82163d29e..863cbf50d 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetLineWidth.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
/**
* Sets the line width to use when stroking GOCA shapes (structured fields)
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetMix.java b/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java
index 99a04d3ee..339620271 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetMix.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java
@@ -17,9 +17,9 @@
/* $Id$ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
public class GraphicsSetMix extends AbstractPreparedAFPObject {
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetPatternSymbol.java b/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
index bdc7b1233..f0e6845be 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetPatternSymbol.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
/**
* Sets the pattern symbol to use when filling following GOCA structured fields
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsSetProcessColor.java b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
index aa98b95c2..6ec1e50ee 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsSetProcessColor.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
@@ -17,12 +17,12 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.awt.Color;
import java.awt.color.ColorSpace;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
/**
* Sets the current processing color for the following GOCA structured fields
diff --git a/src/java/org/apache/fop/render/afp/goca/GraphicsString.java b/src/java/org/apache/fop/afp/goca/GraphicsString.java
index a67774b6d..0fa14bb6d 100644
--- a/src/java/org/apache/fop/render/afp/goca/GraphicsString.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsString.java
@@ -17,13 +17,13 @@
/* $Id: $ */
-package org.apache.fop.render.afp.goca;
+package org.apache.fop.afp.goca;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.modca.AbstractPreparedAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.modca.AbstractPreparedAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A GOCA graphics string
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageCellPosition.java b/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java
index 4faac0c6e..0728ad98f 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageCellPosition.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The IM Image Cell Position structured field specifies the placement,
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageContent.java b/src/java/org/apache/fop/afp/ioca/ImageContent.java
index 7143b986c..27147d511 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageContent.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageContent.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractStructuredAFPObject;
+import org.apache.fop.afp.modca.AbstractStructuredAFPObject;
/**
*/
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageInputDescriptor.java b/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java
index cb6595eaf..f3351933c 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageInputDescriptor.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The IM Image Input Descriptor structured field contains the
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageOutputControl.java b/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java
index 1758f4a16..8574f445b 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageOutputControl.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The IM Image Output Control structured field specifies the position and
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageRasterData.java b/src/java/org/apache/fop/afp/ioca/ImageRasterData.java
index 0c863e1e7..115472bd8 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageRasterData.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageRasterData.java
@@ -17,15 +17,15 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractAFPObject;
-import org.apache.fop.render.afp.modca.AbstractAFPObject.Category;
-import org.apache.fop.render.afp.modca.AbstractAFPObject.Type;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractAFPObject;
+import org.apache.fop.afp.modca.AbstractAFPObject.Category;
+import org.apache.fop.afp.modca.AbstractAFPObject.Type;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Contains the image points that define the IM image raster pattern.
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageRasterPattern.java b/src/java/org/apache/fop/afp/ioca/ImageRasterPattern.java
index 9619c40ff..789eeb950 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageRasterPattern.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageRasterPattern.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
/**
* Raster data is a grid of cells covering an area of interest.
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageSegment.java b/src/java/org/apache/fop/afp/ioca/ImageSegment.java
index 8f6e6a59c..eab8b931a 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageSegment.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageSegment.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.render.afp.modca.Factory;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.modca.AbstractNamedAFPObject;
/**
* An Image Segment is represented by a set of self-defining fields, fields
diff --git a/src/java/org/apache/fop/render/afp/ioca/ImageSizeParameter.java b/src/java/org/apache/fop/afp/ioca/ImageSizeParameter.java
index e2c408200..38e7d9e56 100644
--- a/src/java/org/apache/fop/render/afp/ioca/ImageSizeParameter.java
+++ b/src/java/org/apache/fop/afp/ioca/ImageSizeParameter.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.ioca;
+package org.apache.fop.afp.ioca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.AbstractAFPObject;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.AbstractAFPObject;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Describes the measurement characteristics of the image when it is created.
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractAFPObject.java b/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
index 87ae21cda..9e1e107f3 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractAFPObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
@@ -26,7 +26,7 @@ import java.util.Iterator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.Streamable;
+import org.apache.fop.afp.Streamable;
/**
* This is the base class for all data stream objects. Page objects are
@@ -36,7 +36,7 @@ import org.apache.fop.render.afp.Streamable;
public abstract class AbstractAFPObject implements Streamable {
/** Static logging instance */
- protected static final Log log = LogFactory.getLog("org.apache.fop.render.afp.modca");
+ protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp.modca");
/** the structured field class id */
protected static final byte SF_CLASS = (byte)0xD3;
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractDataObject.java b/src/java/org/apache/fop/afp/modca/AbstractDataObject.java
index b59af4157..c7b987a9e 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractDataObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractDataObject.java
@@ -17,15 +17,16 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.AFPDataObjectInfo;
-import org.apache.fop.render.afp.AFPObjectAreaInfo;
-import org.apache.fop.render.afp.AFPResourceInfo;
-import org.apache.fop.render.afp.AFPResourceLevel;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPResourceLevel;
+import org.apache.fop.afp.Factory;
/**
* Abstract base class used by the ImageObject and GraphicsObject which both
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractDescriptor.java b/src/java/org/apache/fop/afp/modca/AbstractDescriptor.java
index 2ec5feac2..f3734cfb7 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractDescriptor.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
/**
* Base class for AFP descriptor objects
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractEnvironmentGroup.java b/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java
index 7e81e4934..a58bba1f0 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractEnvironmentGroup.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractNamedAFPObject.java b/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java
index 31a4b8430..de02f13d3 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractNamedAFPObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java
@@ -17,11 +17,11 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
+import org.apache.fop.afp.AFPConstants;
/**
* This is the base class for all named data stream objects.
@@ -67,14 +67,16 @@ public abstract class AbstractNamedAFPObject extends AbstractStructuredAFPObject
* @return the name as a byte array in EBCIDIC encoding
*/
protected byte[] getNameBytes() {
- int nameLen = getNameLength();
- if (name.length() < nameLen) {
- name = (name + " ").substring(0, nameLen);
- } else if (name.length() > nameLen) {
- String truncatedName = name.substring(0, nameLen);
+ int afpNameLen = getNameLength();
+ int nameLen = name.length();
+ if (nameLen < afpNameLen) {
+ name = (name + " ").substring(0, afpNameLen);
+ } else if (name.length() > afpNameLen) {
+ String truncatedName = name.substring(nameLen - afpNameLen, nameLen);
log.warn("Constructor:: name '" + name + "'"
- + " truncated to " + nameLen + " chars"
+ + " truncated to " + afpNameLen + " chars"
+ " ('" + truncatedName + "')");
+ name = truncatedName;
}
byte[] nameBytes = null;
try {
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractPageObject.java b/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
index 6b03adee0..d7252c390 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractPageObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
@@ -17,15 +17,16 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
-import org.apache.fop.render.afp.AFPLineDataInfo;
-import org.apache.fop.render.afp.AFPTextDataInfo;
-import org.apache.fop.render.afp.fonts.AFPFont;
+import org.apache.fop.afp.AFPLineDataInfo;
+import org.apache.fop.afp.AFPTextDataInfo;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.fonts.AFPFont;
/**
* Pages contain the data objects that comprise a presentation document. Each
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractPreparedAFPObject.java b/src/java/org/apache/fop/afp/modca/AbstractPreparedAFPObject.java
index 42b729cf0..10a516318 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractPreparedAFPObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractPreparedAFPObject.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractPreparedObjectContainer.java b/src/java/org/apache/fop/afp/modca/AbstractPreparedObjectContainer.java
index 5d32a6b9b..9019a6acc 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractPreparedObjectContainer.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractPreparedObjectContainer.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractResourceEnvironmentGroupContainer.java b/src/java/org/apache/fop/afp/modca/AbstractResourceEnvironmentGroupContainer.java
index 1a5cc86d6..baba170f7 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractResourceEnvironmentGroupContainer.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractResourceEnvironmentGroupContainer.java
@@ -17,11 +17,13 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.fop.afp.Factory;
+
/**
* An abstract class which encapsulates the common features of
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java b/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java
index 9a29f7486..860c6b56a 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractResourceGroupContainer.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java
@@ -17,14 +17,15 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Iterator;
-import org.apache.fop.render.afp.Streamable;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.Streamable;
/**
diff --git a/src/java/org/apache/fop/render/afp/modca/AbstractStructuredAFPObject.java b/src/java/org/apache/fop/afp/modca/AbstractStructuredAFPObject.java
index 89b7f8cdb..9bfc11095 100644
--- a/src/java/org/apache/fop/render/afp/modca/AbstractStructuredAFPObject.java
+++ b/src/java/org/apache/fop/afp/modca/AbstractStructuredAFPObject.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.InputStream;
@@ -28,11 +28,11 @@ import java.util.Iterator;
import java.util.List;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.render.afp.modca.Registry.ObjectType;
-import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
-import org.apache.fop.render.afp.modca.triplets.ObjectClassificationTriplet;
-import org.apache.fop.render.afp.modca.triplets.Triplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.Registry.ObjectType;
+import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
+import org.apache.fop.afp.modca.triplets.ObjectClassificationTriplet;
+import org.apache.fop.afp.modca.triplets.Triplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* An abstract class encapsulating an MODCA structured object
diff --git a/src/java/org/apache/fop/render/afp/modca/ActiveEnvironmentGroup.java b/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java
index da418aca6..ddc986be3 100644
--- a/src/java/org/apache/fop/render/afp/modca/ActiveEnvironmentGroup.java
+++ b/src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java
@@ -17,13 +17,14 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
-import org.apache.fop.render.afp.fonts.AFPFont;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.fonts.AFPFont;
/**
* An Active Environment Group (AEG) is associated with each page,
diff --git a/src/java/org/apache/fop/render/afp/modca/ContainerDataDescriptor.java b/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java
index 224b25112..0f99d6624 100644
--- a/src/java/org/apache/fop/render/afp/modca/ContainerDataDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/ContainerDataDescriptor.java
@@ -15,14 +15,14 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Container data descriptor (to maintain compatibility with pre-year 2000 applications)
diff --git a/src/java/org/apache/fop/render/afp/modca/DataStream.java b/src/java/org/apache/fop/afp/modca/DataStream.java
index 2f5336f20..c1c5e12a7 100644
--- a/src/java/org/apache/fop/render/afp/modca/DataStream.java
+++ b/src/java/org/apache/fop/afp/modca/DataStream.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.awt.Color;
import java.awt.Point;
@@ -28,13 +28,14 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.fop.render.afp.AFPFontAttributes;
-import org.apache.fop.render.afp.AFPLineDataInfo;
-import org.apache.fop.render.afp.AFPResourceLevel;
-import org.apache.fop.render.afp.AFPState;
-import org.apache.fop.render.afp.AFPTextDataInfo;
-import org.apache.fop.render.afp.fonts.AFPFont;
-import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
+import org.apache.fop.afp.AFPLineDataInfo;
+import org.apache.fop.afp.AFPResourceLevel;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPTextDataInfo;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.AFPFontAttributes;
+import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
/**
* A data stream is a continuous ordered stream of data elements and objects
@@ -54,15 +55,11 @@ import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
public class DataStream {
/** Static logging instance */
- protected static Log log = LogFactory.getLog("org.apache.fop.render.afp.modca");
+ protected static final Log log = LogFactory.getLog("org.apache.xmlgraphics.afp.modca");
/** Boolean completion indicator */
private boolean complete = false;
- /** The application producing the AFP document */
- // not used
- // private String producer = null;
-
/** The AFP document object */
private Document document = null;
@@ -78,12 +75,6 @@ public class DataStream {
/** The current page */
private AbstractPageObject currentPage = null;
-// /** The portrait rotation */
-// private int portraitRotation = 0;
-//
-// /** The landscape rotation */
-// private int landscapeRotation = 270;
-
/** The MO:DCA interchange set in use (default to MO:DCA-P IS/2 set) */
private InterchangeSet interchangeSet
= InterchangeSet.valueOf(InterchangeSet.MODCA_PRESENTATION_INTERCHANGE_SET_2);
@@ -599,38 +590,4 @@ public class DataStream {
return resourceGroup;
}
- /**
- * Sets the rotation to be used for portrait pages, valid values are 0
- * (default), 90, 180, 270.
- *
- * @param pageRotation the rotation in degrees.
- * @deprecated not used
- */
- public void setPortraitRotation(int pageRotation) {
- }
-
- /**
- * Sets the rotation to be used for landscape pages, valid values are 0, 90,
- * 180, 270 (default).
- *
- * @param pageRotation the rotation in degrees.
- * @deprecated not used
- */
- public void setLandscapeRotation(int pageRotation) {
- }
-
- /**
- * Sets the offsets to be used for element positioning
- *
- * @param xOff
- * the offset in the x direction
- * @param yOff
- * the offset in the y direction
- * @param orientation
- * the orientation
- * @deprecated not used
- */
- public void setOffsets(int xOff, int yOff, int orientation) {
- }
-
}
diff --git a/src/java/org/apache/fop/render/afp/modca/Document.java b/src/java/org/apache/fop/afp/modca/Document.java
index 30fa8e557..bb0dbebe3 100644
--- a/src/java/org/apache/fop/render/afp/modca/Document.java
+++ b/src/java/org/apache/fop/afp/modca/Document.java
@@ -17,11 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.fop.afp.Factory;
+
/**
* The document is the highest level of the MO:DCA data-stream document
* component hierarchy. Documents can be made up of pages, and the pages, which
diff --git a/src/java/org/apache/fop/render/afp/modca/GraphicsDataDescriptor.java b/src/java/org/apache/fop/afp/modca/GraphicsDataDescriptor.java
index 7ee0e07f5..5495e2e9c 100644
--- a/src/java/org/apache/fop/render/afp/modca/GraphicsDataDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/GraphicsDataDescriptor.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* GOCA Graphics Data Descriptor
@@ -53,7 +53,7 @@ public class GraphicsDataDescriptor extends AbstractDescriptor {
* @param heightRes
* the height resolution of the graphics window
*/
- protected GraphicsDataDescriptor(int xlwind, int xrwind, int ybwind,
+ public GraphicsDataDescriptor(int xlwind, int xrwind, int ybwind,
int ytwind, int widthRes, int heightRes) {
this.xlwind = xlwind;
this.xrwind = xrwind;
diff --git a/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java b/src/java/org/apache/fop/afp/modca/GraphicsObject.java
index 4d33b28de..8b76dde15 100644
--- a/src/java/org/apache/fop/render/afp/modca/GraphicsObject.java
+++ b/src/java/org/apache/fop/afp/modca/GraphicsObject.java
@@ -17,28 +17,29 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
-import org.apache.fop.render.afp.AFPDataObjectInfo;
-import org.apache.fop.render.afp.AFPObjectAreaInfo;
-import org.apache.fop.render.afp.goca.GraphicsBox;
-import org.apache.fop.render.afp.goca.GraphicsData;
-import org.apache.fop.render.afp.goca.GraphicsFillet;
-import org.apache.fop.render.afp.goca.GraphicsFullArc;
-import org.apache.fop.render.afp.goca.GraphicsLine;
-import org.apache.fop.render.afp.goca.GraphicsSetArcParameters;
-import org.apache.fop.render.afp.goca.GraphicsSetCharacterSet;
-import org.apache.fop.render.afp.goca.GraphicsSetCurrentPosition;
-import org.apache.fop.render.afp.goca.GraphicsSetLineType;
-import org.apache.fop.render.afp.goca.GraphicsSetLineWidth;
-import org.apache.fop.render.afp.goca.GraphicsSetPatternSymbol;
-import org.apache.fop.render.afp.goca.GraphicsSetProcessColor;
-import org.apache.fop.render.afp.goca.GraphicsString;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.goca.GraphicsBox;
+import org.apache.fop.afp.goca.GraphicsData;
+import org.apache.fop.afp.goca.GraphicsFillet;
+import org.apache.fop.afp.goca.GraphicsFullArc;
+import org.apache.fop.afp.goca.GraphicsLine;
+import org.apache.fop.afp.goca.GraphicsSetArcParameters;
+import org.apache.fop.afp.goca.GraphicsSetCharacterSet;
+import org.apache.fop.afp.goca.GraphicsSetCurrentPosition;
+import org.apache.fop.afp.goca.GraphicsSetLineType;
+import org.apache.fop.afp.goca.GraphicsSetLineWidth;
+import org.apache.fop.afp.goca.GraphicsSetPatternSymbol;
+import org.apache.fop.afp.goca.GraphicsSetProcessColor;
+import org.apache.fop.afp.goca.GraphicsString;
/**
* Top-level GOCA graphics object.
diff --git a/src/java/org/apache/fop/render/afp/modca/IMImageObject.java b/src/java/org/apache/fop/afp/modca/IMImageObject.java
index 63fff8cdc..a09042441 100644
--- a/src/java/org/apache/fop/render/afp/modca/IMImageObject.java
+++ b/src/java/org/apache/fop/afp/modca/IMImageObject.java
@@ -17,15 +17,15 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.ioca.ImageCellPosition;
-import org.apache.fop.render.afp.ioca.ImageInputDescriptor;
-import org.apache.fop.render.afp.ioca.ImageOutputControl;
-import org.apache.fop.render.afp.ioca.ImageRasterData;
+import org.apache.fop.afp.ioca.ImageCellPosition;
+import org.apache.fop.afp.ioca.ImageInputDescriptor;
+import org.apache.fop.afp.ioca.ImageOutputControl;
+import org.apache.fop.afp.ioca.ImageRasterData;
/**
* An IM image data object specifies the contents of a raster image and
diff --git a/src/java/org/apache/fop/render/afp/modca/ImageDataDescriptor.java b/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
index 430f6590c..07976e18a 100644
--- a/src/java/org/apache/fop/render/afp/modca/ImageDataDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/ImageDataDescriptor.java
@@ -17,11 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+
+import org.apache.fop.afp.util.BinaryUtils;
/**
* ImageDataDescriptor
diff --git a/src/java/org/apache/fop/render/afp/modca/ImageObject.java b/src/java/org/apache/fop/afp/modca/ImageObject.java
index 005bae176..8ab56691f 100644
--- a/src/java/org/apache/fop/render/afp/modca/ImageObject.java
+++ b/src/java/org/apache/fop/afp/modca/ImageObject.java
@@ -17,16 +17,17 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.render.afp.AFPDataObjectInfo;
-import org.apache.fop.render.afp.AFPImageObjectInfo;
-import org.apache.fop.render.afp.AFPObjectAreaInfo;
-import org.apache.fop.render.afp.ioca.ImageSegment;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPImageObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.ioca.ImageSegment;
/**
* An IOCA Image Data Object
diff --git a/src/java/org/apache/fop/render/afp/modca/IncludeObject.java b/src/java/org/apache/fop/afp/modca/IncludeObject.java
index 9e5216f6f..c0ab5c640 100644
--- a/src/java/org/apache/fop/render/afp/modca/IncludeObject.java
+++ b/src/java/org/apache/fop/afp/modca/IncludeObject.java
@@ -17,15 +17,15 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.triplets.MappingOptionTriplet;
-import org.apache.fop.render.afp.modca.triplets.MeasurementUnitsTriplet;
-import org.apache.fop.render.afp.modca.triplets.ObjectAreaSizeTriplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
+import org.apache.fop.afp.modca.triplets.MeasurementUnitsTriplet;
+import org.apache.fop.afp.modca.triplets.ObjectAreaSizeTriplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* An Include Object structured field references an object on a page or overlay.
diff --git a/src/java/org/apache/fop/render/afp/modca/IncludePageOverlay.java b/src/java/org/apache/fop/afp/modca/IncludePageOverlay.java
index be1ef870f..44f0edc5b 100644
--- a/src/java/org/apache/fop/render/afp/modca/IncludePageOverlay.java
+++ b/src/java/org/apache/fop/afp/modca/IncludePageOverlay.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
*
diff --git a/src/java/org/apache/fop/render/afp/modca/IncludePageSegment.java b/src/java/org/apache/fop/afp/modca/IncludePageSegment.java
index a9d247553..7355e3b1a 100644
--- a/src/java/org/apache/fop/render/afp/modca/IncludePageSegment.java
+++ b/src/java/org/apache/fop/afp/modca/IncludePageSegment.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Include Page Segment structured field references a page segment resource
diff --git a/src/java/org/apache/fop/render/afp/modca/InterchangeSet.java b/src/java/org/apache/fop/afp/modca/InterchangeSet.java
index 4d52df3d3..28a4da42b 100644
--- a/src/java/org/apache/fop/render/afp/modca/InterchangeSet.java
+++ b/src/java/org/apache/fop/afp/modca/InterchangeSet.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
/**
* MO:DCA Interchange Set
diff --git a/src/java/org/apache/fop/render/afp/modca/InvokeMediumMap.java b/src/java/org/apache/fop/afp/modca/InvokeMediumMap.java
index cee7711e6..f910a0b9c 100644
--- a/src/java/org/apache/fop/render/afp/modca/InvokeMediumMap.java
+++ b/src/java/org/apache/fop/afp/modca/InvokeMediumMap.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Invoke Medium Map structured field identifies the Medium Map that is to
diff --git a/src/java/org/apache/fop/render/afp/modca/MapCodedFont.java b/src/java/org/apache/fop/afp/modca/MapCodedFont.java
index f305630bc..fb9637678 100644
--- a/src/java/org/apache/fop/render/afp/modca/MapCodedFont.java
+++ b/src/java/org/apache/fop/afp/modca/MapCodedFont.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -26,13 +26,13 @@ import java.io.UnsupportedEncodingException;
import java.util.Iterator;
import java.util.List;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.exceptions.FontRuntimeException;
-import org.apache.fop.render.afp.fonts.AFPFont;
-import org.apache.fop.render.afp.fonts.CharacterSet;
-import org.apache.fop.render.afp.fonts.OutlineFont;
-import org.apache.fop.render.afp.fonts.RasterFont;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.CharacterSet;
+import org.apache.fop.afp.fonts.FontRuntimeException;
+import org.apache.fop.afp.fonts.OutlineFont;
+import org.apache.fop.afp.fonts.RasterFont;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Map Coded Font structured field maps a unique coded font resource local
@@ -40,15 +40,13 @@ import org.apache.fop.render.afp.tools.BinaryUtils;
* descriptor, to the identifier of a coded font resource object. Additionally,
* the Map Coded Font structured field specifies a set of resource attributes
* for the coded font.
- *
- * @author <a href="mailto:pete@townsend.uk.com">Pete Townsend </a>
*/
public class MapCodedFont extends AbstractStructuredAFPObject {
/**
* The collection of map coded fonts (maximum of 254)
*/
- private List/*<FontDefinition>*/ fontList = new java.util.ArrayList();
+ private final List/*<FontDefinition>*/ fontList = new java.util.ArrayList();
/**
* Constructor for the MapCodedFont
@@ -240,7 +238,7 @@ public class MapCodedFont extends AbstractStructuredAFPObject {
}
}
-
+
/**
* Private utility class used as a container for font attributes
*/
diff --git a/src/java/org/apache/fop/render/afp/modca/MapContainerData.java b/src/java/org/apache/fop/afp/modca/MapContainerData.java
index 9ec157ee8..dba7616a8 100644
--- a/src/java/org/apache/fop/render/afp/modca/MapContainerData.java
+++ b/src/java/org/apache/fop/afp/modca/MapContainerData.java
@@ -15,15 +15,15 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.triplets.MappingOptionTriplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Map Container Data structured field specifies how a presentation data object
diff --git a/src/java/org/apache/fop/render/afp/modca/MapDataResource.java b/src/java/org/apache/fop/afp/modca/MapDataResource.java
index 09b18b9a7..7bebc4c07 100644
--- a/src/java/org/apache/fop/render/afp/modca/MapDataResource.java
+++ b/src/java/org/apache/fop/afp/modca/MapDataResource.java
@@ -17,12 +17,12 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Map Data Resource structured field specifies resources that are
diff --git a/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java b/src/java/org/apache/fop/afp/modca/MapPageOverlay.java
index 3143e80a0..9fd3c7059 100644
--- a/src/java/org/apache/fop/render/afp/modca/MapPageOverlay.java
+++ b/src/java/org/apache/fop/afp/modca/MapPageOverlay.java
@@ -17,15 +17,15 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.util.List;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Map Page Overlay structured field maps a Resource Local ID to the name of
diff --git a/src/java/org/apache/fop/render/afp/modca/MaximumSizeExceededException.java b/src/java/org/apache/fop/afp/modca/MaximumSizeExceededException.java
index a66fa9b30..6d1c74156 100644
--- a/src/java/org/apache/fop/render/afp/modca/MaximumSizeExceededException.java
+++ b/src/java/org/apache/fop/afp/modca/MaximumSizeExceededException.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
/**
* An exception to handle maximum sizes being exceeded.
diff --git a/src/java/org/apache/fop/render/afp/modca/NoOperation.java b/src/java/org/apache/fop/afp/modca/NoOperation.java
index 258fcf47d..cb5841346 100644
--- a/src/java/org/apache/fop/render/afp/modca/NoOperation.java
+++ b/src/java/org/apache/fop/afp/modca/NoOperation.java
@@ -17,13 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The No Operation structured field may be used to carry comments
diff --git a/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java b/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java
index 3bd271d5b..21c21e39f 100644
--- a/src/java/org/apache/fop/render/afp/modca/ObjectAreaDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/ObjectAreaDescriptor.java
@@ -17,17 +17,17 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.render.afp.modca.triplets.MeasurementUnitsTriplet;
-import org.apache.fop.render.afp.modca.triplets.ObjectAreaSizeTriplet;
-import org.apache.fop.render.afp.modca.triplets.PresentationSpaceResetMixingTriplet;
-import org.apache.fop.render.afp.modca.triplets.Triplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.MeasurementUnitsTriplet;
+import org.apache.fop.afp.modca.triplets.ObjectAreaSizeTriplet;
+import org.apache.fop.afp.modca.triplets.PresentationSpaceResetMixingTriplet;
+import org.apache.fop.afp.modca.triplets.Triplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Object Area Descriptor structured field specifies the size and attributes
diff --git a/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java b/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
index fbe8c7089..3929c1196 100644
--- a/src/java/org/apache/fop/render/afp/modca/ObjectAreaPosition.java
+++ b/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
@@ -17,11 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Object Area Position structured field specifies the origin and
diff --git a/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java b/src/java/org/apache/fop/afp/modca/ObjectContainer.java
index d9a7c2895..791f4da1b 100644
--- a/src/java/org/apache/fop/render/afp/modca/ObjectContainer.java
+++ b/src/java/org/apache/fop/afp/modca/ObjectContainer.java
@@ -17,19 +17,20 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.commons.io.IOUtils;
-import org.apache.fop.render.afp.AFPDataObjectInfo;
-import org.apache.fop.render.afp.AFPObjectAreaInfo;
-import org.apache.fop.render.afp.AFPResourceInfo;
-import org.apache.fop.render.afp.AFPResourceLevel;
-import org.apache.fop.render.afp.modca.triplets.MappingOptionTriplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPResourceLevel;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Object containers are MO:DCA objects that envelop and carry object data.
diff --git a/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java b/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java
index 7c44701bf..8cb610d9e 100644
--- a/src/java/org/apache/fop/render/afp/modca/ObjectEnvironmentGroup.java
+++ b/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* An Object Environment Group (OEG) may be associated with an object and is contained
diff --git a/src/java/org/apache/fop/render/afp/modca/Overlay.java b/src/java/org/apache/fop/afp/modca/Overlay.java
index 2791d3a15..ea9619b20 100644
--- a/src/java/org/apache/fop/render/afp/modca/Overlay.java
+++ b/src/java/org/apache/fop/afp/modca/Overlay.java
@@ -17,11 +17,13 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
+import org.apache.fop.afp.Factory;
+
/**
* An overlay is a MO:DCA-P resource object.
diff --git a/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java b/src/java/org/apache/fop/afp/modca/PageDescriptor.java
index 8f0d0dfae..502123def 100644
--- a/src/java/org/apache/fop/render/afp/modca/PageDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/PageDescriptor.java
@@ -17,11 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Page Descriptor structured field specifies the size and attributes of
diff --git a/src/java/org/apache/fop/render/afp/modca/PageGroup.java b/src/java/org/apache/fop/afp/modca/PageGroup.java
index f56e945e3..47e378d72 100644
--- a/src/java/org/apache/fop/render/afp/modca/PageGroup.java
+++ b/src/java/org/apache/fop/afp/modca/PageGroup.java
@@ -17,12 +17,14 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
+import org.apache.fop.afp.Factory;
+
/**
* A page group is used in the data stream to define a named, logical grouping
* of sequential pages. Page groups are delimited by begin-end structured fields
diff --git a/src/java/org/apache/fop/render/afp/modca/PageObject.java b/src/java/org/apache/fop/afp/modca/PageObject.java
index fae4a6252..33852d90b 100644
--- a/src/java/org/apache/fop/render/afp/modca/PageObject.java
+++ b/src/java/org/apache/fop/afp/modca/PageObject.java
@@ -17,16 +17,17 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.ioca.ImageCellPosition;
-import org.apache.fop.render.afp.ioca.ImageInputDescriptor;
-import org.apache.fop.render.afp.ioca.ImageOutputControl;
-import org.apache.fop.render.afp.ioca.ImageRasterData;
-import org.apache.fop.render.afp.ioca.ImageRasterPattern;
+import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.ioca.ImageCellPosition;
+import org.apache.fop.afp.ioca.ImageInputDescriptor;
+import org.apache.fop.afp.ioca.ImageOutputControl;
+import org.apache.fop.afp.ioca.ImageRasterData;
+import org.apache.fop.afp.ioca.ImageRasterPattern;
/**
* Pages contain the data objects that comprise a presentation document. Each
diff --git a/src/java/org/apache/fop/render/afp/modca/PageSegment.java b/src/java/org/apache/fop/afp/modca/PageSegment.java
index 292deb1b1..ab1388efb 100644
--- a/src/java/org/apache/fop/render/afp/modca/PageSegment.java
+++ b/src/java/org/apache/fop/afp/modca/PageSegment.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/PreparedAFPObject.java b/src/java/org/apache/fop/afp/modca/PreparedAFPObject.java
index 6856d3287..2771515bf 100644
--- a/src/java/org/apache/fop/render/afp/modca/PreparedAFPObject.java
+++ b/src/java/org/apache/fop/afp/modca/PreparedAFPObject.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
/**
* An AFP object which is able to know its own data length before write()
diff --git a/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java b/src/java/org/apache/fop/afp/modca/PreprocessPresentationObject.java
index 000988a3d..b1f95e236 100644
--- a/src/java/org/apache/fop/render/afp/modca/PreprocessPresentationObject.java
+++ b/src/java/org/apache/fop/afp/modca/PreprocessPresentationObject.java
@@ -17,13 +17,13 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.triplets.FullyQualifiedNameTriplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Preprocess Presentation Object structured field specifies presentation
diff --git a/src/java/org/apache/fop/render/afp/modca/PresentationEnvironmentControl.java b/src/java/org/apache/fop/afp/modca/PresentationEnvironmentControl.java
index f186f930c..49b33c0ef 100644
--- a/src/java/org/apache/fop/render/afp/modca/PresentationEnvironmentControl.java
+++ b/src/java/org/apache/fop/afp/modca/PresentationEnvironmentControl.java
@@ -15,15 +15,15 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.triplets.Triplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.Triplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Presentation Environment Control structured field specifies parameters that
diff --git a/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java b/src/java/org/apache/fop/afp/modca/PresentationTextData.java
index dc0512b6d..4bc2b914e 100644
--- a/src/java/org/apache/fop/render/afp/modca/PresentationTextData.java
+++ b/src/java/org/apache/fop/afp/modca/PresentationTextData.java
@@ -17,16 +17,16 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.awt.Color;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.render.afp.AFPLineDataInfo;
-import org.apache.fop.render.afp.AFPTextDataInfo;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPLineDataInfo;
+import org.apache.fop.afp.AFPTextDataInfo;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* Presentation text data contains the graphic characters and the control
diff --git a/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java b/src/java/org/apache/fop/afp/modca/PresentationTextDescriptor.java
index 807aba4d7..ef2696da8 100644
--- a/src/java/org/apache/fop/render/afp/modca/PresentationTextDescriptor.java
+++ b/src/java/org/apache/fop/afp/modca/PresentationTextDescriptor.java
@@ -17,11 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Presentation Text Descriptor specifies the units of measure for the
diff --git a/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java b/src/java/org/apache/fop/afp/modca/PresentationTextObject.java
index 4071ebb9d..070a33a84 100644
--- a/src/java/org/apache/fop/render/afp/modca/PresentationTextObject.java
+++ b/src/java/org/apache/fop/afp/modca/PresentationTextObject.java
@@ -17,14 +17,14 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.List;
-import org.apache.fop.render.afp.AFPLineDataInfo;
-import org.apache.fop.render.afp.AFPTextDataInfo;
+import org.apache.fop.afp.AFPLineDataInfo;
+import org.apache.fop.afp.AFPTextDataInfo;
/**
* The Presentation Text object is the data object used in document processing
diff --git a/src/java/org/apache/fop/render/afp/modca/Registry.java b/src/java/org/apache/fop/afp/modca/Registry.java
index 3311817eb..23c72cd39 100644
--- a/src/java/org/apache/fop/render/afp/modca/Registry.java
+++ b/src/java/org/apache/fop/afp/modca/Registry.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.util.Collections;
diff --git a/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java b/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
index 1d66f560f..cb0653ddd 100644
--- a/src/java/org/apache/fop/render/afp/modca/ResourceEnvironmentGroup.java
+++ b/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
@@ -17,7 +17,7 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java b/src/java/org/apache/fop/afp/modca/ResourceGroup.java
index c412f85f7..2218998a0 100644
--- a/src/java/org/apache/fop/render/afp/modca/ResourceGroup.java
+++ b/src/java/org/apache/fop/afp/modca/ResourceGroup.java
@@ -17,14 +17,14 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Iterator;
import java.util.Set;
-import org.apache.fop.render.afp.Streamable;
+import org.apache.fop.afp.Streamable;
/**
* A Resource Group contains a set of overlays.
diff --git a/src/java/org/apache/fop/render/afp/modca/ResourceObject.java b/src/java/org/apache/fop/afp/modca/ResourceObject.java
index edbe30226..a5b551e07 100644
--- a/src/java/org/apache/fop/render/afp/modca/ResourceObject.java
+++ b/src/java/org/apache/fop/afp/modca/ResourceObject.java
@@ -17,13 +17,13 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
-import org.apache.fop.render.afp.modca.triplets.Triplet;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.modca.triplets.Triplet;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* This resource structured field begins an envelope that is used to carry
diff --git a/src/java/org/apache/fop/render/afp/modca/StreamedResourceGroup.java b/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java
index abe2e1547..d6ab741b6 100644
--- a/src/java/org/apache/fop/render/afp/modca/StreamedResourceGroup.java
+++ b/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
diff --git a/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java b/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
index 64160c087..2e1fa5e07 100644
--- a/src/java/org/apache/fop/render/afp/modca/TagLogicalElement.java
+++ b/src/java/org/apache/fop/afp/modca/TagLogicalElement.java
@@ -17,14 +17,14 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* A Tag Logical Element structured field assigns an attribute name and an
diff --git a/src/java/org/apache/fop/render/afp/modca/TagLogicalElementBean.java b/src/java/org/apache/fop/afp/modca/TagLogicalElementBean.java
index c47abe9b2..5d4523777 100644
--- a/src/java/org/apache/fop/render/afp/modca/TagLogicalElementBean.java
+++ b/src/java/org/apache/fop/afp/modca/TagLogicalElementBean.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca;
+package org.apache.fop.afp.modca;
/**
* The TagLogicalElementBean provides a bean for holding the attributes of
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java
index a2d42feb9..a6059d3ec 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/ExtendedResourceLocalIdentifierTriplet.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Extended Resource Local Identifier triplet specifies a resource type and a
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/FullyQualifiedNameTriplet.java
index 68bef3e56..a949124c8 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/FullyQualifiedNameTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/FullyQualifiedNameTriplet.java
@@ -17,11 +17,11 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
+import org.apache.fop.afp.AFPConstants;
/**
* A Fully Qualified Name triplet enable the identification and referencing of
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/MappingOptionTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/MappingOptionTriplet.java
index daebb6183..9fe6dad79 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/MappingOptionTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/MappingOptionTriplet.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
/**
* Specifies the mapping of data object presentation space to object area
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/MeasurementUnitsTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/MeasurementUnitsTriplet.java
index 71da6e059..d39dc5f96 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/MeasurementUnitsTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/MeasurementUnitsTriplet.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Measurement Units triplet is used to specify the units of measure
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectAreaSizeTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/ObjectAreaSizeTriplet.java
index 6b9e25a69..64fba23c9 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectAreaSizeTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/ObjectAreaSizeTriplet.java
@@ -17,9 +17,9 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Object Area Size triplet is used to specify the extent of an object area
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectByteExtentTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/ObjectByteExtentTriplet.java
index b98a46a72..355fe8288 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectByteExtentTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/ObjectByteExtentTriplet.java
@@ -15,11 +15,11 @@
* limitations under the License.
*/
-/* $Id: $ */
+/* $Id$ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
-import org.apache.fop.render.afp.tools.BinaryUtils;
+import org.apache.fop.afp.util.BinaryUtils;
/**
* The Object Byte Extent triplet is used to specify the number of bytes contained in an object
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectClassificationTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/ObjectClassificationTriplet.java
index 8ba97b61d..1692339ac 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/ObjectClassificationTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/ObjectClassificationTriplet.java
@@ -17,13 +17,13 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.modca.Registry.ObjectType;
-import org.apache.fop.render.afp.tools.StringUtils;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.modca.Registry.ObjectType;
+import org.apache.fop.afp.util.StringUtils;
/**
* The Object Classification is used to classify and identify object data.
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java
index 0f2def9bf..0f087e4fd 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceMixingRulesTriplet.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
/**
* This triplet is used to specify the resulting appearance when data in a new
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java
index ebba65df5..38041f140 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/PresentationSpaceResetMixingTriplet.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
/**
* This triplet is used to specify the resulting appearance when data in a new
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/ResourceObjectTypeTriplet.java b/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java
index c157659d6..784975c43 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/ResourceObjectTypeTriplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java
@@ -17,5 +17,5 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
diff --git a/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java b/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
index 9c88f6862..b7f51466b 100644
--- a/src/java/org/apache/fop/render/afp/modca/triplets/Triplet.java
+++ b/src/java/org/apache/fop/afp/modca/triplets/Triplet.java
@@ -17,14 +17,14 @@
/* $Id: $ */
-package org.apache.fop.render.afp.modca.triplets;
+package org.apache.fop.afp.modca.triplets;
import java.io.IOException;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
-import org.apache.fop.render.afp.AFPConstants;
-import org.apache.fop.render.afp.Streamable;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.Streamable;
/**
* A simple implementation of a MOD:CA triplet
diff --git a/src/java/org/apache/fop/render/afp/tools/BinaryUtils.java b/src/java/org/apache/fop/afp/util/BinaryUtils.java
index 31ba45bcf..2b2649415 100644
--- a/src/java/org/apache/fop/render/afp/tools/BinaryUtils.java
+++ b/src/java/org/apache/fop/afp/util/BinaryUtils.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.tools;
+package org.apache.fop.afp.util;
import java.io.ByteArrayOutputStream;
diff --git a/src/java/org/apache/fop/render/afp/tools/DTDEntityResolver.java b/src/java/org/apache/fop/afp/util/DTDEntityResolver.java
index e9554ecea..dcf5ad7d9 100644
--- a/src/java/org/apache/fop/render/afp/tools/DTDEntityResolver.java
+++ b/src/java/org/apache/fop/afp/util/DTDEntityResolver.java
@@ -17,12 +17,12 @@
/* $Id$ */
-package org.apache.fop.render.afp.tools;
+package org.apache.fop.afp.util;
import java.io.IOException;
import java.net.URL;
-import org.apache.fop.render.afp.exceptions.FontRuntimeException;
+import org.apache.fop.afp.fonts.FontRuntimeException;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
diff --git a/src/java/org/apache/fop/render/afp/tools/StringUtils.java b/src/java/org/apache/fop/afp/util/StringUtils.java
index c49509aa0..ce68d27be 100644
--- a/src/java/org/apache/fop/render/afp/tools/StringUtils.java
+++ b/src/java/org/apache/fop/afp/util/StringUtils.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.tools;
+package org.apache.fop.afp.util;
/**
* Library of utility methods useful in dealing with strings.
diff --git a/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java b/src/java/org/apache/fop/afp/util/StructuredFieldReader.java
index 48beff023..34add3bbe 100644
--- a/src/java/org/apache/fop/render/afp/tools/StructuredFieldReader.java
+++ b/src/java/org/apache/fop/afp/util/StructuredFieldReader.java
@@ -17,7 +17,7 @@
/* $Id$ */
-package org.apache.fop.render.afp.tools;
+package org.apache.fop.afp.util;
import java.io.IOException;
import java.io.InputStream;
diff --git a/src/java/org/apache/fop/fonts/Base14Font.java b/src/java/org/apache/fop/fonts/Base14Font.java
index 04349a148..9b2e95bc7 100644
--- a/src/java/org/apache/fop/fonts/Base14Font.java
+++ b/src/java/org/apache/fop/fonts/Base14Font.java
@@ -19,6 +19,7 @@
package org.apache.fop.fonts;
+
/**
* Base class for all Base 14 fonts.
*/
diff --git a/src/java/org/apache/fop/fonts/CustomFont.java b/src/java/org/apache/fop/fonts/CustomFont.java
index 0b40dfecc..4cf24ae16 100644
--- a/src/java/org/apache/fop/fonts/CustomFont.java
+++ b/src/java/org/apache/fop/fonts/CustomFont.java
@@ -26,6 +26,7 @@ import java.util.Set;
import javax.xml.transform.Source;
+
/**
* Abstract base class for custom fonts loaded from files, for example.
*/
diff --git a/src/java/org/apache/fop/fonts/Font.java b/src/java/org/apache/fop/fonts/Font.java
index ebd45457d..e9740c00c 100644
--- a/src/java/org/apache/fop/fonts/Font.java
+++ b/src/java/org/apache/fop/fonts/Font.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.fonts.CodePointMapping;
/**
* This class holds font state information and provides access to the font
diff --git a/src/java/org/apache/fop/fonts/FontCollection.java b/src/java/org/apache/fop/fonts/FontCollection.java
index 3c9bba7f4..d481ae2f9 100644
--- a/src/java/org/apache/fop/fonts/FontCollection.java
+++ b/src/java/org/apache/fop/fonts/FontCollection.java
@@ -24,6 +24,7 @@ package org.apache.fop.fonts;
* Sets up a set of fonts
*/
public interface FontCollection {
+
/**
* Sets up fonts in a font info object.
*
diff --git a/src/java/org/apache/fop/fonts/FontDescriptor.java b/src/java/org/apache/fop/fonts/FontDescriptor.java
index fadc73834..e7c81c9f3 100644
--- a/src/java/org/apache/fop/fonts/FontDescriptor.java
+++ b/src/java/org/apache/fop/fonts/FontDescriptor.java
@@ -19,6 +19,7 @@
package org.apache.fop.fonts;
+
/**
* This interface enhances the font metrics interface with access methods to
* value needed to register fonts in various target formats like PDF or
diff --git a/src/java/org/apache/fop/fonts/FontEventListener.java b/src/java/org/apache/fop/fonts/FontEventListener.java
index b508d7053..740a05fdc 100644
--- a/src/java/org/apache/fop/fonts/FontEventListener.java
+++ b/src/java/org/apache/fop/fonts/FontEventListener.java
@@ -19,7 +19,6 @@
package org.apache.fop.fonts;
-
/**
* Event listener interface for font-related events.
*/
diff --git a/src/java/org/apache/fop/fonts/FontMetrics.java b/src/java/org/apache/fop/fonts/FontMetrics.java
index 7d5588690..29ade1ef3 100644
--- a/src/java/org/apache/fop/fonts/FontMetrics.java
+++ b/src/java/org/apache/fop/fonts/FontMetrics.java
@@ -23,6 +23,7 @@ import java.util.Map;
import java.util.Set;
+
/**
* Main interface for access to font metrics.
*/
diff --git a/src/java/org/apache/fop/fonts/FontTriplet.java b/src/java/org/apache/fop/fonts/FontTriplet.java
index 8e0acd8f2..f5cfe442a 100644
--- a/src/java/org/apache/fop/fonts/FontTriplet.java
+++ b/src/java/org/apache/fop/fonts/FontTriplet.java
@@ -21,6 +21,7 @@ package org.apache.fop.fonts;
import java.io.Serializable;
+
/**
* FontTriplet contains information on name, style and weight of one font
*/
diff --git a/src/java/org/apache/fop/fonts/FontType.java b/src/java/org/apache/fop/fonts/FontType.java
index 0abe06a10..95b594ca4 100644
--- a/src/java/org/apache/fop/fonts/FontType.java
+++ b/src/java/org/apache/fop/fonts/FontType.java
@@ -19,12 +19,10 @@
package org.apache.fop.fonts;
-import org.apache.avalon.framework.ValuedEnum;
-
/**
* This class enumerates all supported font types.
*/
-public class FontType extends ValuedEnum {
+public class FontType {
/**
* Collective identifier for "other" font types
@@ -51,12 +49,16 @@ public class FontType extends ValuedEnum {
*/
public static final FontType TRUETYPE = new FontType("TrueType", 5);
+ private final String name;
+ private final int value;
+
/**
* @see org.apache.avalon.framework.Enum#Enum(String)
*/
protected FontType(String name, int value) {
- super(name, value);
+ this.name = name;
+ this.value = value;
}
@@ -107,4 +109,22 @@ public class FontType extends ValuedEnum {
}
}
+ /**
+ * Returns the name
+ *
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the value
+ *
+ * @return the value
+ */
+ public int getValue() {
+ return value;
+ }
+
}
diff --git a/src/java/org/apache/fop/fonts/FontUtil.java b/src/java/org/apache/fop/fonts/FontUtil.java
index 6ec89631f..49f23c12f 100644
--- a/src/java/org/apache/fop/fonts/FontUtil.java
+++ b/src/java/org/apache/fop/fonts/FontUtil.java
@@ -19,6 +19,7 @@
package org.apache.fop.fonts;
+
/**
* Font utilities.
*/
diff --git a/src/java/org/apache/fop/fonts/MultiByteFont.java b/src/java/org/apache/fop/fonts/MultiByteFont.java
index f25ca4e7e..b22b92e2f 100644
--- a/src/java/org/apache/fop/fonts/MultiByteFont.java
+++ b/src/java/org/apache/fop/fonts/MultiByteFont.java
@@ -23,6 +23,7 @@ package org.apache.fop.fonts;
import java.text.DecimalFormat;
import java.util.Map;
+
/**
* Generic MultiByte (CID) font
*/
diff --git a/src/java/org/apache/fop/fonts/MutableFont.java b/src/java/org/apache/fop/fonts/MutableFont.java
index 5939bfed4..a5acf51b3 100644
--- a/src/java/org/apache/fop/fonts/MutableFont.java
+++ b/src/java/org/apache/fop/fonts/MutableFont.java
@@ -23,6 +23,7 @@ import java.util.Map;
import java.util.Set;
+
/**
* This interface is used to set the values of a font during configuration time.
*/
diff --git a/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
index 6b0e88cbb..dc8a020ae 100644
--- a/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
@@ -20,12 +20,12 @@
package org.apache.fop.layoutmgr.inline;
import org.apache.fop.fo.flow.PageNumber;
-import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.area.inline.TextArea;
-import org.apache.fop.area.Trait;
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontTriplet;
+import org.apache.fop.area.inline.InlineArea;
+import org.apache.fop.area.inline.TextArea;
+import org.apache.fop.area.Trait;
import org.apache.fop.layoutmgr.LayoutContext;
import org.apache.fop.layoutmgr.TraitSetter;
import org.apache.fop.traits.MinOptMax;
diff --git a/src/java/org/apache/fop/pdf/PDFState.java b/src/java/org/apache/fop/pdf/PDFState.java
index 0f3e06070..138458552 100644
--- a/src/java/org/apache/fop/pdf/PDFState.java
+++ b/src/java/org/apache/fop/pdf/PDFState.java
@@ -25,7 +25,7 @@ import java.awt.Shape;
import java.awt.geom.Area;
import java.awt.geom.GeneralPath;
-import org.apache.fop.render.AbstractState;
+import org.apache.fop.AbstractState;
/**
* This keeps information about the current state when writing to pdf.
@@ -44,7 +44,7 @@ import org.apache.fop.render.AbstractState;
* It is impossible to optimise the result without analysing the all
* the possible combinations after completing.
*/
-public class PDFState extends org.apache.fop.render.AbstractState {
+public class PDFState extends org.apache.fop.AbstractState {
private static final long serialVersionUID = 5384726143906371279L;
@@ -165,7 +165,7 @@ public class PDFState extends org.apache.fop.render.AbstractState {
return new PDFState();
}
- private class PDFData extends org.apache.fop.render.AbstractState.AbstractData {
+ private class PDFData extends org.apache.fop.AbstractState.AbstractData {
private static final long serialVersionUID = 3527950647293177764L;
diff --git a/src/java/org/apache/fop/render/StateStack.java b/src/java/org/apache/fop/render/StateStack.java
deleted file mode 100644
index ab68a3968..000000000
--- a/src/java/org/apache/fop/render/StateStack.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id: $ */
-
-package org.apache.fop.render;
-
-import java.util.Collection;
-
-/**
- * No copy constructor for java.util.Stack so extended and implemented one.
- */
-public class StateStack extends java.util.Stack {
-
- private static final long serialVersionUID = 4897178211223823041L;
-
- /**
- * Default constructor
- */
- public StateStack() {
- super();
- }
-
- /**
- * Copy constructor
- *
- * @param c initial contents of stack
- */
- public StateStack(Collection c) {
- elementCount = c.size();
- // 10% for growth
- elementData = new Object[
- (int)Math.min((elementCount * 110L) / 100, Integer.MAX_VALUE)];
- c.toArray(elementData);
- }
-} \ No newline at end of file
diff --git a/src/java/org/apache/fop/render/afp/AFPAbstractImageFactory.java b/src/java/org/apache/fop/render/afp/AFPAbstractImageFactory.java
index 565732b06..0c32204e2 100644
--- a/src/java/org/apache/fop/render/afp/AFPAbstractImageFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPAbstractImageFactory.java
@@ -21,6 +21,14 @@ package org.apache.fop.render.afp;
import java.io.IOException;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPForeignAttributeReader;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPUnitConverter;
+
+
/**
* Abstract image configurator
*/
@@ -51,7 +59,7 @@ public abstract class AFPAbstractImageFactory {
* @return the data object info
* @throws IOException thrown if an I/O exception of some sort has occurred.
*/
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
+ public AFPDataObjectInfo create(AFPRendererImageInfo afpImageInfo) throws IOException {
AFPDataObjectInfo dataObjectInfo = createDataObjectInfo();
// set resource information
diff --git a/src/java/org/apache/fop/render/afp/AFPBatikGraphicsObjectPainter.java b/src/java/org/apache/fop/render/afp/AFPBatikGraphicsObjectPainter.java
index 94da16d71..0aa77d61b 100644
--- a/src/java/org/apache/fop/render/afp/AFPBatikGraphicsObjectPainter.java
+++ b/src/java/org/apache/fop/render/afp/AFPBatikGraphicsObjectPainter.java
@@ -24,6 +24,8 @@ import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import org.apache.batik.gvt.GraphicsNode;
+import org.apache.fop.afp.AFPAbstractGraphicsObjectPainter;
+import org.apache.fop.afp.AFPGraphics2D;
/**
* Paints SVG as a GOCA Graphics Object using Batik
diff --git a/src/java/org/apache/fop/render/afp/AFPDataObjectInfoFactory.java b/src/java/org/apache/fop/render/afp/AFPDataObjectInfoFactory.java
index a4979eb89..dcf074262 100644
--- a/src/java/org/apache/fop/render/afp/AFPDataObjectInfoFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPDataObjectInfoFactory.java
@@ -19,8 +19,18 @@
package org.apache.fop.render.afp;
+import java.awt.Point;
+import java.awt.geom.Rectangle2D;
import java.io.IOException;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPForeignAttributeReader;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPUnitConverter;
+
+
/**
* Abstract image configurator
*/
@@ -47,33 +57,35 @@ public abstract class AFPDataObjectInfoFactory {
/**
* Configures the data object info
*
- * @param afpImageInfo the afp image info
+ * @param rendererImageInfo the afp image info
* @return the data object info
* @throws IOException thrown if an I/O exception of some sort has occurred.
*/
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
+ public AFPDataObjectInfo create(AFPRendererImageInfo rendererImageInfo) throws IOException {
AFPDataObjectInfo dataObjectInfo = createDataObjectInfo();
// set resource information
AFPResourceInfo resourceInfo
- = foreignAttributeReader.getResourceInfo(afpImageInfo.foreignAttributes);
- resourceInfo.setUri(afpImageInfo.uri);
+ = foreignAttributeReader.getResourceInfo(rendererImageInfo.getForeignAttributes());
+ resourceInfo.setUri(rendererImageInfo.getURI());
dataObjectInfo.setResourceInfo(resourceInfo);
// set object area
AFPObjectAreaInfo objectAreaInfo = new AFPObjectAreaInfo();
- float srcX = afpImageInfo.origin.x + (float)afpImageInfo.pos.getX();
- float srcY = afpImageInfo.origin.y + (float)afpImageInfo.pos.getY();
+ Point origin = rendererImageInfo.getOrigin();
+ Rectangle2D position = rendererImageInfo.getPosition();
+ float srcX = origin.x + (float)position.getX();
+ float srcY = origin.y + (float)position.getY();
AFPUnitConverter unitConv = state.getUnitConverter();
int[] coords = unitConv.mpts2units(new float[] {srcX, srcY});
objectAreaInfo.setX(coords[X]);
objectAreaInfo.setY(coords[Y]);
- int width = Math.round(unitConv.mpt2units((float)afpImageInfo.pos.getWidth()));
+ int width = Math.round(unitConv.mpt2units((float)position.getWidth()));
objectAreaInfo.setWidth(width);
- int height = Math.round(unitConv.mpt2units((float)afpImageInfo.pos.getHeight()));
+ int height = Math.round(unitConv.mpt2units((float)position.getHeight()));
objectAreaInfo.setHeight(height);
int resolution = state.getResolution();
diff --git a/src/java/org/apache/fop/render/afp/AFPDataObjectInfoProvider.java b/src/java/org/apache/fop/render/afp/AFPDataObjectInfoProvider.java
index b54479e53..4211fe360 100644
--- a/src/java/org/apache/fop/render/afp/AFPDataObjectInfoProvider.java
+++ b/src/java/org/apache/fop/render/afp/AFPDataObjectInfoProvider.java
@@ -22,6 +22,7 @@ package org.apache.fop.render.afp;
import java.util.Iterator;
import java.util.Map;
+import org.apache.fop.afp.AFPState;
import org.apache.xmlgraphics.image.loader.Image;
import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
diff --git a/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java b/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
index 6561902d9..453e16429 100644
--- a/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
+++ b/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
@@ -25,6 +25,10 @@ import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
+import org.apache.fop.afp.AFPGraphics2D;
+import org.apache.fop.afp.AFPGraphicsObjectInfo;
+import org.apache.fop.afp.AFPResourceManager;
+import org.apache.fop.afp.AFPState;
import org.apache.fop.render.AbstractGraphics2DAdapter;
import org.apache.fop.render.RendererContext;
import org.apache.fop.render.RendererContext.RendererContextWrapper;
@@ -56,7 +60,7 @@ public class AFPGraphics2DAdapter extends AbstractGraphics2DAdapter {
*
* @return the AFP graphics 2D implementation
*/
- protected AFPGraphics2D getGraphics2D() {
+ public AFPGraphics2D getGraphics2D() {
return g2d;
}
@@ -70,11 +74,12 @@ public class AFPGraphics2DAdapter extends AbstractGraphics2DAdapter {
AFPInfo afpInfo = AFPSVGHandler.getAFPInfo(context);
- g2d.setAFPInfo(afpInfo);
+ g2d.setResourceManager(afpInfo.getResourceManager());
+ g2d.setResourceInfo(afpInfo.getResourceInfo());
+ g2d.setState(afpInfo.getState());
g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
// // scale/convert to afp units
- AFPState state = afpInfo.getState();
// AFPUnitConverter unitConv = state.getUnitConverter();
// float scale = unitConv.mpt2units(1);
@@ -96,6 +101,7 @@ public class AFPGraphics2DAdapter extends AbstractGraphics2DAdapter {
RendererContextWrapper ctx = RendererContext.wrapRendererContext(context);
BufferedImage bi = paintToBufferedImage(painter, ctx, resolution, false, false);
+ AFPState state = afpInfo.getState();
AffineTransform trans = state.getData().getTransform();
float scale = AFPRenderer.NORMAL_AFP_RESOLUTION
/ context.getUserAgent().getTargetResolution();
diff --git a/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java b/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
index ab9cf7ef7..d76e26d57 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageGraphics2DFactory.java
@@ -26,7 +26,16 @@ import java.awt.geom.Rectangle2D;
import java.io.IOException;
import org.apache.batik.bridge.BridgeContext;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPGraphics2D;
+import org.apache.fop.afp.AFPGraphicsObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPResourceLevel;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPTextHandler;
import org.apache.fop.image.loader.batik.GenericGraphics2DImagePainter;
+import org.apache.fop.render.RendererContext;
import org.apache.fop.svg.SVGUserAgent;
import org.apache.xmlgraphics.image.loader.impl.ImageGraphics2D;
import org.apache.xmlgraphics.util.MimeConstants;
@@ -54,9 +63,9 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
private static final AFPResourceLevel inlineResourceLevel = new AFPResourceLevel(AFPResourceLevel.INLINE);
/** {@inheritDoc} */
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
+ public AFPDataObjectInfo create(AFPRendererImageInfo rendererImageInfo) throws IOException {
AFPGraphicsObjectInfo graphicsObjectInfo
- = (AFPGraphicsObjectInfo)super.create(afpImageInfo);
+ = (AFPGraphicsObjectInfo)super.create(rendererImageInfo);
AFPResourceInfo resourceInfo = graphicsObjectInfo.getResourceInfo();
// level not explicitly set/changed so default to inline for GOCA graphic objects
@@ -69,13 +78,17 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
graphicsObjectInfo.setMimeType(MimeConstants.MIME_AFP_GOCA);
// set graphics 2d
- AFPGraphics2DAdapter g2dAdapter = afpImageInfo.g2dAdapter;
+ AFPGraphics2DAdapter g2dAdapter = rendererImageInfo.getGraphics2DAdapter();
AFPGraphics2D g2d = g2dAdapter.getGraphics2D();
graphicsObjectInfo.setGraphics2D(g2d);
- // set afp info
- AFPInfo afpInfo = AFPSVGHandler.getAFPInfo(afpImageInfo.rendererContext);
- g2d.setAFPInfo(afpInfo);
+ // set resource, state and font info
+ RendererContext rendererContext = rendererImageInfo.getRendererContext();
+ AFPInfo afpInfo = AFPSVGHandler.getAFPInfo(rendererContext);
+ g2d.setResourceManager(afpInfo.getResourceManager());
+ g2d.setResourceInfo(afpInfo.getResourceInfo());
+ g2d.setState(afpInfo.getState());
+ g2d.setFontInfo(afpInfo.getFontInfo());
// set to default graphic context
g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
@@ -89,7 +102,7 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
// controls whether text painted by Batik is generated using text or path operations
SVGUserAgent svgUserAgent
- = new SVGUserAgent(afpImageInfo.rendererContext.getUserAgent(), new AffineTransform());
+ = new SVGUserAgent(rendererContext.getUserAgent(), new AffineTransform());
BridgeContext ctx = new BridgeContext(svgUserAgent);
if (!afpInfo.strokeText()) {
AFPTextHandler textHandler = new AFPTextHandler(g2d);
@@ -101,7 +114,7 @@ public class AFPImageGraphics2DFactory extends AFPDataObjectInfoFactory {
}
// set painter
- ImageGraphics2D imageG2D = (ImageGraphics2D)afpImageInfo.img;
+ ImageGraphics2D imageG2D = (ImageGraphics2D)rendererImageInfo.getImage();
GenericGraphics2DImagePainter painter
= (GenericGraphics2DImagePainter)imageG2D.getGraphics2DImagePainter();
painter = new AFPGraphics2DImagePainter(painter);
diff --git a/src/java/org/apache/fop/render/afp/AFPImageRawStreamFactory.java b/src/java/org/apache/fop/render/afp/AFPImageRawStreamFactory.java
index 172b67038..19504f6c9 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageRawStreamFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageRawStreamFactory.java
@@ -22,6 +22,10 @@ package org.apache.fop.render.afp;
import java.io.IOException;
import java.io.InputStream;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPState;
+import org.apache.xmlgraphics.image.loader.ImageInfo;
import org.apache.xmlgraphics.image.loader.impl.ImageRawStream;
/**
@@ -39,13 +43,14 @@ public class AFPImageRawStreamFactory extends AFPDataObjectInfoFactory {
}
/** {@inheritDoc} */
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
- AFPDataObjectInfo dataObjectInfo = super.create(afpImageInfo);
- String mimeType = afpImageInfo.info.getMimeType();
+ public AFPDataObjectInfo create(AFPRendererImageInfo rendererImageInfo) throws IOException {
+ AFPDataObjectInfo dataObjectInfo = super.create(rendererImageInfo);
+ ImageInfo imageInfo = rendererImageInfo.getImageInfo();
+ String mimeType = imageInfo.getMimeType();
if (mimeType != null) {
dataObjectInfo.setMimeType(mimeType);
}
- ImageRawStream rawStream = (ImageRawStream) afpImageInfo.img;
+ ImageRawStream rawStream = (ImageRawStream) rendererImageInfo.getImage();
int resolution = state.getResolution();
AFPObjectAreaInfo objectAreaInfo = dataObjectInfo.getObjectAreaInfo();
diff --git a/src/java/org/apache/fop/render/afp/AFPImageRenderedFactory.java b/src/java/org/apache/fop/render/afp/AFPImageRenderedFactory.java
index b3ffe31db..9c59e8b83 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageRenderedFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPImageRenderedFactory.java
@@ -23,9 +23,13 @@ import java.awt.image.RenderedImage;
import java.io.IOException;
import org.apache.commons.io.output.ByteArrayOutputStream;
-import org.apache.fop.apps.MimeConstants;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPImageObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPState;
import org.apache.xmlgraphics.image.loader.impl.ImageRendered;
import org.apache.xmlgraphics.ps.ImageEncodingHelper;
+import org.apache.xmlgraphics.util.MimeConstants;
/**
* A buffered image data object info factory
@@ -42,9 +46,9 @@ public class AFPImageRenderedFactory extends AFPDataObjectInfoFactory {
}
/** {@inheritDoc} */
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
+ public AFPDataObjectInfo create(AFPRendererImageInfo rendererImageInfo) throws IOException {
AFPImageObjectInfo imageObjectInfo
- = (AFPImageObjectInfo)super.create(afpImageInfo);
+ = (AFPImageObjectInfo)super.create(rendererImageInfo);
imageObjectInfo.setMimeType(MimeConstants.MIME_AFP_IOCA_FS45);
@@ -53,7 +57,7 @@ public class AFPImageRenderedFactory extends AFPDataObjectInfoFactory {
objectAreaInfo.setWidthRes(resolution);
objectAreaInfo.setHeightRes(resolution);
- ImageRendered imageRendered = (ImageRendered) afpImageInfo.img;
+ ImageRendered imageRendered = (ImageRendered) rendererImageInfo.img;
RenderedImage renderedImage = imageRendered.getRenderedImage();
int dataHeight = renderedImage.getHeight();
diff --git a/src/java/org/apache/fop/render/afp/AFPInfo.java b/src/java/org/apache/fop/render/afp/AFPInfo.java
index 73bbb24a3..5fd59c2aa 100644
--- a/src/java/org/apache/fop/render/afp/AFPInfo.java
+++ b/src/java/org/apache/fop/render/afp/AFPInfo.java
@@ -20,6 +20,9 @@
package org.apache.fop.render.afp;
import org.apache.avalon.framework.configuration.Configuration;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPResourceManager;
+import org.apache.fop.afp.AFPState;
import org.apache.fop.fonts.FontInfo;
/**
diff --git a/src/java/org/apache/fop/render/afp/AFPRawCCITTFaxFactory.java b/src/java/org/apache/fop/render/afp/AFPRawCCITTFaxFactory.java
index 2f090b0ba..17aff9fc0 100644
--- a/src/java/org/apache/fop/render/afp/AFPRawCCITTFaxFactory.java
+++ b/src/java/org/apache/fop/render/afp/AFPRawCCITTFaxFactory.java
@@ -21,6 +21,10 @@ package org.apache.fop.render.afp;
import java.io.IOException;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPImageObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPState;
import org.apache.xmlgraphics.image.loader.impl.ImageRawCCITTFax;
/**
@@ -38,10 +42,10 @@ public class AFPRawCCITTFaxFactory extends AFPDataObjectInfoFactory {
}
/** {@inheritDoc} */
- public AFPDataObjectInfo create(AFPImageInfo afpImageInfo) throws IOException {
- AFPImageObjectInfo imageObjectInfo = (AFPImageObjectInfo)super.create(afpImageInfo);
+ public AFPDataObjectInfo create(AFPRendererImageInfo rendererImageInfo) throws IOException {
+ AFPImageObjectInfo imageObjectInfo = (AFPImageObjectInfo)super.create(rendererImageInfo);
- ImageRawCCITTFax ccitt = (ImageRawCCITTFax) afpImageInfo.img;
+ ImageRawCCITTFax ccitt = (ImageRawCCITTFax) rendererImageInfo.img;
imageObjectInfo.setCompression(ccitt.getCompression());
AFPObjectAreaInfo objectAreaInfo = imageObjectInfo.getObjectAreaInfo();
diff --git a/src/java/org/apache/fop/render/afp/AFPRenderer.java b/src/java/org/apache/fop/render/afp/AFPRenderer.java
index 89ec9ad63..d0737ed70 100644
--- a/src/java/org/apache/fop/render/afp/AFPRenderer.java
+++ b/src/java/org/apache/fop/render/afp/AFPRenderer.java
@@ -33,6 +33,23 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import org.apache.fop.AbstractState;
+import org.apache.fop.afp.AFPBorderPainter;
+import org.apache.fop.afp.AFPConstants;
+import org.apache.fop.afp.AFPDataObjectInfo;
+import org.apache.fop.afp.AFPPageFonts;
+import org.apache.fop.afp.AFPRectanglePainter;
+import org.apache.fop.afp.AFPResourceManager;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPTextDataInfo;
+import org.apache.fop.afp.AFPUnitConverter;
+import org.apache.fop.afp.BorderPaintInfo;
+import org.apache.fop.afp.RectanglePaintInfo;
+import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.AFPFontAttributes;
+import org.apache.fop.afp.fonts.AFPFontCollection;
+import org.apache.fop.afp.modca.DataStream;
+import org.apache.fop.afp.modca.PageObject;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.MimeConstants;
@@ -51,15 +68,10 @@ import org.apache.fop.fonts.FontCollection;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontManager;
import org.apache.fop.render.AbstractPathOrientedRenderer;
-import org.apache.fop.render.AbstractState;
import org.apache.fop.render.Graphics2DAdapter;
import org.apache.fop.render.RendererContext;
import org.apache.fop.render.afp.extensions.AFPElementMapping;
import org.apache.fop.render.afp.extensions.AFPPageSetup;
-import org.apache.fop.render.afp.fonts.AFPFont;
-import org.apache.fop.render.afp.fonts.AFPFontCollection;
-import org.apache.fop.render.afp.modca.DataStream;
-import org.apache.fop.render.afp.modca.PageObject;
import org.apache.xmlgraphics.image.loader.ImageException;
import org.apache.xmlgraphics.image.loader.ImageFlavor;
import org.apache.xmlgraphics.image.loader.ImageInfo;
@@ -423,8 +435,8 @@ public class AFPRenderer extends AbstractPathOrientedRenderer {
Point origin = new Point(currentIPPosition, currentBPPosition);
AFPDataObjectInfoFactory factory = dataObjectInfoProvider.getFactory(img);
if (factory != null) {
- AFPImageInfo afpImageInfo
- = new AFPImageInfo(uri, pos, origin, info, img, foreignAttributes);
+ AFPRendererImageInfo afpImageInfo
+ = new AFPRendererImageInfo(uri, pos, origin, info, img, foreignAttributes);
if (factory instanceof AFPImageGraphics2DFactory) {
RendererContext rendererContext = createRendererContext(
x, y, posInt.width, posInt.height, foreignAttributes);
diff --git a/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java b/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
index aba38af2f..6a59d27e3 100644
--- a/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
+++ b/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
@@ -24,6 +24,11 @@ import java.util.List;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
+import org.apache.fop.afp.fonts.AFPFontInfo;
+import org.apache.fop.afp.fonts.CharacterSet;
+import org.apache.fop.afp.fonts.FopCharacterSet;
+import org.apache.fop.afp.fonts.OutlineFont;
+import org.apache.fop.afp.fonts.RasterFont;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fonts.FontTriplet;
@@ -31,11 +36,6 @@ import org.apache.fop.fonts.FontUtil;
import org.apache.fop.fonts.Typeface;
import org.apache.fop.render.PrintRendererConfigurator;
import org.apache.fop.render.Renderer;
-import org.apache.fop.render.afp.fonts.AFPFontInfo;
-import org.apache.fop.render.afp.fonts.CharacterSet;
-import org.apache.fop.render.afp.fonts.FopCharacterSet;
-import org.apache.fop.render.afp.fonts.OutlineFont;
-import org.apache.fop.render.afp.fonts.RasterFont;
import org.apache.fop.util.LogUtil;
/**
diff --git a/src/java/org/apache/fop/render/afp/AFPImageInfo.java b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java
index 9acc87b3f..d4a14d3c2 100644
--- a/src/java/org/apache/fop/render/afp/AFPImageInfo.java
+++ b/src/java/org/apache/fop/render/afp/AFPRendererImageInfo.java
@@ -30,7 +30,7 @@ import org.apache.xmlgraphics.image.loader.ImageInfo;
/**
* The AFP image information
*/
-public class AFPImageInfo {
+public class AFPRendererImageInfo {
/** the image uri */
protected final String uri;
@@ -66,7 +66,7 @@ public class AFPImageInfo {
* @param img the image
* @param foreignAttributes the foreign attributes
*/
- public AFPImageInfo(String uri, Rectangle2D pos, Point origin,
+ public AFPRendererImageInfo(String uri, Rectangle2D pos, Point origin,
ImageInfo info, Image img, Map foreignAttributes) {
this.uri = uri;
this.pos = pos;
@@ -94,4 +94,75 @@ public class AFPImageInfo {
this.g2dAdapter = adapter;
}
+ /**
+ * Returns the image info
+ *
+ * @return the image info
+ */
+ public ImageInfo getImageInfo() {
+ return this.info;
+ }
+
+ /**
+ * Returns the image
+ *
+ * @return the image
+ */
+ public Image getImage() {
+ return this.img;
+ }
+
+ /**
+ * Returns the graphics 2D adapter
+ *
+ * @return the graphics 2D adapter
+ */
+ public AFPGraphics2DAdapter getGraphics2DAdapter() {
+ return this.g2dAdapter;
+ }
+
+ /**
+ * Returns the renderer context
+ *
+ * @return the renderer context
+ */
+ public RendererContext getRendererContext() {
+ return this.rendererContext;
+ }
+
+ /**
+ * Return the foreign attributes
+ * @return the foreign attributes
+ */
+ public Map getForeignAttributes() {
+ return this.foreignAttributes;
+ }
+
+ /**
+ * Return the uri
+ *
+ * @return the uri
+ */
+ public String getURI() {
+ return this.uri;
+ }
+
+ /**
+ * Return the origin
+ *
+ * @return the origin
+ */
+ public Point getOrigin() {
+ return this.origin;
+ }
+
+ /**
+ * Return the position
+ *
+ * @return the position
+ */
+ public Rectangle2D getPosition() {
+ return this.pos;
+ }
+
}
diff --git a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
index b3632b70f..57837fb4f 100644
--- a/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
+++ b/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
@@ -32,6 +32,15 @@ import org.apache.batik.bridge.GVTBuilder;
import org.apache.batik.dom.AbstractDocument;
import org.apache.batik.dom.svg.SVGDOMImplementation;
import org.apache.batik.gvt.GraphicsNode;
+import org.apache.fop.afp.AFPForeignAttributeReader;
+import org.apache.fop.afp.AFPGraphics2D;
+import org.apache.fop.afp.AFPGraphicsObjectInfo;
+import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.AFPResourceInfo;
+import org.apache.fop.afp.AFPResourceManager;
+import org.apache.fop.afp.AFPState;
+import org.apache.fop.afp.AFPTextHandler;
+import org.apache.fop.afp.AFPUnitConverter;
import org.apache.fop.fo.extensions.ExtensionElementMapping;
import org.apache.fop.render.AbstractGenericSVGHandler;
import org.apache.fop.render.Renderer;
@@ -109,7 +118,6 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler {
protected void renderSVGDocument(final RendererContext context,
final Document doc) throws IOException {
- AFPRenderer renderer = (AFPRenderer)context.getRenderer();
AFPInfo afpInfo = getAFPInfo(context);
// fallback paint as bitmap
@@ -125,7 +133,7 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler {
}
String uri = ((AbstractDocument)doc).getDocumentURI();
- AFPState state = (AFPState)renderer.getState();
+ AFPState state = afpInfo.getState();
state.setImageUri(uri);
// set the data object parameters
@@ -160,8 +168,12 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler {
// Configure Graphics2D implementation
final boolean textAsShapes = false;
AFPGraphics2D g2d = new AFPGraphics2D(textAsShapes);
+
+ g2d.setResourceManager(afpInfo.getResourceManager());
+ g2d.setResourceInfo(afpInfo.getResourceInfo());
+ g2d.setState(afpInfo.getState());
g2d.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
- g2d.setAFPInfo(afpInfo);
+ g2d.setFontInfo(afpInfo.getFontInfo());
// Configure GraphicsObjectPainter with the Graphics2D implementation
AFPBatikGraphicsObjectPainter painter = new AFPBatikGraphicsObjectPainter(g2d);
@@ -172,9 +184,9 @@ public class AFPSVGHandler extends AbstractGenericSVGHandler {
= new SVGUserAgent(context.getUserAgent(), new AffineTransform());
BridgeContext ctx = new BridgeContext(svgUserAgent);
if (!afpInfo.strokeText()) {
- AFPTextHandler afpTextHandler = new AFPTextHandler(g2d);
- g2d.setCustomTextHandler(afpTextHandler);
- AFPTextPainter textPainter = new AFPTextPainter(afpTextHandler);
+ AFPTextHandler textHandler = new AFPTextHandler(g2d);
+ g2d.setCustomTextHandler(textHandler);
+ AFPTextPainter textPainter = new AFPTextPainter(textHandler);
ctx.setTextPainter(textPainter);
AFPTextElementBridge tBridge = new AFPTextElementBridge(textPainter);
ctx.putBridge(tBridge);
diff --git a/src/java/org/apache/fop/render/afp/AFPTextPainter.java b/src/java/org/apache/fop/render/afp/AFPTextPainter.java
index 3e908792d..7cc96d0cc 100644
--- a/src/java/org/apache/fop/render/afp/AFPTextPainter.java
+++ b/src/java/org/apache/fop/render/afp/AFPTextPainter.java
@@ -34,6 +34,11 @@ import java.util.Iterator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.afp.AFPGraphics2D;
+import org.apache.fop.afp.AFPTextHandler;
+import org.apache.fop.fonts.Font;
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.fonts.FontTriplet;
import org.apache.batik.dom.svg.SVGOMTextElement;
import org.apache.batik.gvt.text.Mark;
@@ -44,9 +49,6 @@ import org.apache.batik.gvt.text.TextPaintInfo;
import org.apache.batik.gvt.font.GVTFontFamily;
import org.apache.batik.gvt.renderer.StrokingTextPainter;
-import org.apache.fop.fonts.Font;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontTriplet;
/**
* Renders the attributed character iterator of a <tt>TextNode</tt>.
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index 61ed1ff07..cc1caea03 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -50,6 +50,7 @@ import org.apache.xmlgraphics.xmp.Metadata;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
+import org.apache.fop.AbstractState;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.MimeConstants;
@@ -112,7 +113,6 @@ import org.apache.fop.pdf.PDFTextUtil;
import org.apache.fop.pdf.PDFXMode;
import org.apache.fop.pdf.PDFXObject;
import org.apache.fop.render.AbstractPathOrientedRenderer;
-import org.apache.fop.render.AbstractState;
import org.apache.fop.render.Graphics2DAdapter;
import org.apache.fop.render.RendererContext;
import org.apache.fop.util.CharUtilities;
diff --git a/src/java/org/apache/fop/render/ps/PSTextPainter.java b/src/java/org/apache/fop/render/ps/PSTextPainter.java
index 31cb4b605..7c525dbf7 100644
--- a/src/java/org/apache/fop/render/ps/PSTextPainter.java
+++ b/src/java/org/apache/fop/render/ps/PSTextPainter.java
@@ -38,6 +38,9 @@ import java.util.Iterator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.fonts.Font;
+import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.fonts.FontTriplet;
import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
import org.apache.xmlgraphics.java2d.TextHandler;
@@ -51,9 +54,6 @@ import org.apache.batik.gvt.text.TextPaintInfo;
import org.apache.batik.gvt.font.GVTFontFamily;
import org.apache.batik.gvt.renderer.StrokingTextPainter;
-import org.apache.fop.fonts.Font;
-import org.apache.fop.fonts.FontInfo;
-import org.apache.fop.fonts.FontTriplet;
/**
* Renders the attributed character iterator of a <tt>TextNode</tt>.
diff --git a/src/java/org/apache/fop/store/FileStore.java b/src/java/org/apache/fop/store/FileStore.java
deleted file mode 100644
index 131daf32b..000000000
--- a/src/java/org/apache/fop/store/FileStore.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.File;
-import java.io.FileDescriptor;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.RandomAccessFile;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.xmlgraphics.image.loader.ImageManager;
-
-/**
- * A useful class which is able to easily store and retrieve large resources (such as images)
- */
-public class FileStore {
-
- /** logger */
- protected static Log log = LogFactory.getLog(ImageManager.class);
-
- /** Internal temporary storage buffer size */
- private static final int BUFFER_SIZE = 4096;
-
- /** Used for storage of data objects */
- protected RandomAccessFile raFile;
-
- /** The temporary cache file */
- private File tempFile;
-
- /** The file outputstream */
- protected FileOutputStream fos;
-
- /**
- * Default constructor
- *
- * @param prefix file store prefix
- */
- public FileStore(String prefix) {
- try {
- this.tempFile = File.createTempFile(prefix, null);
- this.raFile = new RandomAccessFile(tempFile, "rw");
- FileDescriptor fd = raFile.getFD();
- this.fos = new FileOutputStream(fd);
- } catch (IOException e) {
- // TODO
- log.error(e.getMessage());
- }
- }
-
- /**
- * Clears the resource store.
- *
- * @throws IOException if an error occurs while clearing the store
- */
- public void clear() throws IOException {
- if (tempFile != null) {
- raFile.close();
- raFile = null;
- fos = null;
- if (tempFile.exists() && !tempFile.delete()) {
- throw new IOException("Could not delete temporary file: " + tempFile);
- }
- tempFile = null;
- }
- }
-
- /** {@inheritDoc} */
- public void finalize() throws Throwable {
- try {
- clear();
- } finally {
- super.finalize();
- }
- }
-
- /**
- * Returns the storer of a given object
- *
- * @param object an object to be stored
- * @return a storer of the object
- */
- protected Storer getStorer(Object object) {
- Storer storer;
- if (object instanceof Writable) {
- storer = new WritableStorer(this, (Writable)object);
- } else if (object instanceof InputStream) {
- storer = new InputStreamStorer(this, (InputStream)object);
- } else {
- throw new IllegalArgumentException("Unsupported object " + object);
- }
- return storer;
- }
-
- /**
- * Stores an object in the cache
- *
- * @param object the object to store
- * @return a new save information record
- *
- * @throws java.io.IOException an I/O exception of some sort has occurred.
- */
- public StoreRecord write(Object object) throws IOException {
- return getStorer(object).store();
- }
-
- /**
- * Reads all the data from a given store information record
- * and returns it in a byte array.
- * This is potentially a memory hungry operation so use with care.
- *
- * @param storeInfo a store information record
- * @return the stored data in a byte array.
- * @throws java.io.IOException an I/O exception of some sort has occurred.
- */
- public byte[] read(StoreRecord storeInfo) throws IOException {
- raFile.seek(storeInfo.position);
- byte[] buff = new byte[storeInfo.size];
- raFile.read(buff);
- return buff;
- }
-
- /**
- * Writes out the resource in full using the store information to the given outputstream.
- *
- * @param storeInfo the save information
- * @param os the outputstream to write to
- *
- * @throws java.io.IOException an I/O exception of some sort has occurred.
- */
- public void writeToStream(StoreRecord storeInfo, OutputStream os) throws IOException {
- if (storeInfo == null) {
- throw new IllegalArgumentException("save is null");
- }
- double chunkCount = storeInfo.size / BUFFER_SIZE;
- byte[] buffer = new byte[BUFFER_SIZE];
- raFile.seek(storeInfo.position);
- for (int cnt = 0; cnt < chunkCount; cnt++) {
- raFile.read(buffer, 0, BUFFER_SIZE);
- os.write(buffer, 0, BUFFER_SIZE);
- }
- int lastChunkLength = storeInfo.size % BUFFER_SIZE;
- raFile.read(buffer, 0, lastChunkLength);
- os.write(buffer, 0, lastChunkLength);
- }
-}
diff --git a/src/java/org/apache/fop/store/InputStreamStorer.java b/src/java/org/apache/fop/store/InputStreamStorer.java
deleted file mode 100644
index 5d72c932f..000000000
--- a/src/java/org/apache/fop/store/InputStreamStorer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.apache.commons.io.IOUtils;
-
-/**
- * Storer of InputStreams
- */
-public final class InputStreamStorer extends Storer {
-
- /** an inputstream */
- private final InputStream in;
-
- /**
- * Constructor
- *
- * @param store our resource store
- * @param in an inputstream
- */
- protected InputStreamStorer(FileStore store, InputStream in) {
- super(store);
- this.in = in;
- }
-
- /** {@inheritDoc} */
- protected void doStore() throws IOException {
- IOUtils.copy(in, store.fos);
- }
-} \ No newline at end of file
diff --git a/src/java/org/apache/fop/store/StoreRecord.java b/src/java/org/apache/fop/store/StoreRecord.java
deleted file mode 100644
index f4dd8ff49..000000000
--- a/src/java/org/apache/fop/store/StoreRecord.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Store save information
- */
-public class StoreRecord {
-
- /** the resource store associated with this store information */
- private final FileStore store;
-
- /** data position */
- protected long position;
-
- /** data chunk size */
- protected int size;
-
- /**
- * Main constructor
- *
- * @param store our resource store
- */
- public StoreRecord(FileStore store) {
- this.store = store;
- }
-
- /**
- * Returns the storage position
- *
- * @return the storage position
- */
- public long getPosition() {
- return this.position;
- }
-
- /**
- * Returns the storage size
- *
- * @return the storage size
- */
- public int getLength() {
- return this.size;
- }
-
- /**
- * Returns the resource store associated with this store record
- *
- * @return the resource store associated with this store record
- */
- public FileStore getStore() {
- return this.store;
- }
-
- /**
- * Convenience method used to writes the data referenced
- * by this storage record to an outputstream
- *
- * @param os the outputstream to write to
- * @throws java.io.IOException an I/O exception of some sort has occurred.
- */
- public void writeToStream(OutputStream os) throws IOException {
- store.writeToStream(this, os);
- }
-
- /** {@inheritDoc} */
- public String toString() {
- return "pos=" + position + ", size=" + size;
- }
-} \ No newline at end of file
diff --git a/src/java/org/apache/fop/store/Storer.java b/src/java/org/apache/fop/store/Storer.java
deleted file mode 100644
index d8dbab191..000000000
--- a/src/java/org/apache/fop/store/Storer.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-
-/**
- * Base storer class
- */
-public class Storer {
-
- /** write session */
- protected final WriteSession session;
-
- /** file store */
- protected final FileStore store;
-
- /**
- * Constructor
- *
- * @param store our resource store
- */
- public Storer(FileStore store) {
- this.store = store;
- this.session = new WriteSession(this);
- }
-
- /**
- * Instantiates the store information record
- *
- * @return a new store information record
- */
- protected StoreRecord createRecord() {
- return new StoreRecord(store);
- }
-
- /**
- * Stores the object
- *
- * @return a store information record
- * @throws IOException thrown if an I/O exception of some sort has occurred.
- */
- public StoreRecord store() throws IOException {
- StoreRecord record = null;
- session.begin();
- try {
- doStore();
- } finally {
- record = session.end();
- }
- return record;
- }
-
- /**
- * Actually performs the store operation
- *
- * @throws IOException thrown if an I/O exception of some sort has occurred.
- */
- protected void doStore() throws IOException {
- }
-
- /**
- * Returns the file store associated with this storer
- *
- * @return the file store associated with this storer
- */
- protected FileStore getStore() {
- return store;
- }
-}
diff --git a/src/java/org/apache/fop/store/Writable.java b/src/java/org/apache/fop/store/Writable.java
deleted file mode 100644
index 8f6052261..000000000
--- a/src/java/org/apache/fop/store/Writable.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * Implementing object is able to write to an OutputStream
- */
-public interface Writable {
-
- /**
- * DataStream objects must implement the writeToStream()
- * method to write its data to the given OutputStream
- *
- * @param outputStream The outputsteam stream
- * @throws java.io.IOException an I/O exception of some sort has occurred.
- */
- void writeToStream(OutputStream outputStream) throws IOException;
-}
diff --git a/src/java/org/apache/fop/store/WritableStorer.java b/src/java/org/apache/fop/store/WritableStorer.java
deleted file mode 100644
index bba11287e..000000000
--- a/src/java/org/apache/fop/store/WritableStorer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-
-/**
- * Storer of objects that implement the Writable interface
- */
-public class WritableStorer extends Storer {
-
- /** a Writable object */
- protected final Writable writable;
-
- /**
- * Constructor
- *
- * @param store our resource store
- * @param writable an object implementing the Writable interface
- */
- public WritableStorer(FileStore store, Writable writable) {
- super(store);
- this.writable = writable;
- }
-
- /** {@inheritDoc} */
- protected void doStore() throws IOException {
- writable.writeToStream(store.fos);
- }
-}
diff --git a/src/java/org/apache/fop/store/WriteSession.java b/src/java/org/apache/fop/store/WriteSession.java
deleted file mode 100644
index 034357355..000000000
--- a/src/java/org/apache/fop/store/WriteSession.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* $Id$ */
-
-package org.apache.fop.store;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * A Write session
- */
-public class WriteSession {
- /** true if the session output was flushed */
- protected boolean flushed = false;
-
- /** the session storer */
- private final Storer storer;
-
- /** the storer's file store */
- private final FileStore store;
-
- /** the store information record */
- protected StoreRecord record;
-
- /**
- * Constructor
- *
- * @param store our store
- */
- public WriteSession(FileStore store) {
- this.storer = new Storer(store);
- this.store = store;
- }
-
- /**
- * Constructor
- *
- * @param storer our storer
- */
- public WriteSession(Storer storer) {
- this.storer = storer;
- this.store = storer.getStore();
- }
-
- /**
- * Begins the session
- *
- * @throws IOException thrown if an I/O exception of some sort has occurred.
- */
- public void begin() throws IOException {
- // always write to the end of the store
- long length = store.raFile.length();
- if (store.raFile.getFilePointer() < length) {
- store.raFile.seek(length);
- }
-
- this.record = storer.createRecord();
- record.position = store.raFile.getFilePointer();
- }
-
- /**
- * Ends the session
- *
- * @return a new store information record
- * @throws IOException thrown if an I/O exception of some sort has occurred.
- */
- public StoreRecord end() throws IOException {
- if (!flushed) {
- store.fos.flush();
- flushed = true;
- }
- record.size = (int)(store.raFile.getFilePointer() - record.position);
- return record;
- }
-
- /**
- * Returns the outputstream of this store
- *
- * @return the outputstream of this store
- */
- public OutputStream getOutputStream() {
- return store.fos;
- }
-
- /**
- * Returns the store record
- *
- * @return the store record
- */
- public StoreRecord getRecord() {
- return record;
- }
-} \ No newline at end of file
diff --git a/src/java/org/apache/fop/svg/GraphicsConfiguration.java b/src/java/org/apache/fop/svg/GraphicsConfiguration.java
index ca3b3363c..881096b9a 100644
--- a/src/java/org/apache/fop/svg/GraphicsConfiguration.java
+++ b/src/java/org/apache/fop/svg/GraphicsConfiguration.java
@@ -17,7 +17,6 @@
/* $Id$ */
-
package org.apache.fop.svg;
import java.awt.image.VolatileImage;
diff --git a/src/java/org/apache/fop/svg/PDFBridgeContext.java b/src/java/org/apache/fop/svg/PDFBridgeContext.java
index fdf83784f..6aa29cfa1 100644
--- a/src/java/org/apache/fop/svg/PDFBridgeContext.java
+++ b/src/java/org/apache/fop/svg/PDFBridgeContext.java
@@ -26,11 +26,11 @@ import org.apache.batik.bridge.Bridge;
import org.apache.batik.bridge.BridgeContext;
import org.apache.batik.bridge.DocumentLoader;
import org.apache.batik.bridge.UserAgent;
+import org.apache.fop.fonts.FontInfo;
import org.apache.xmlgraphics.image.loader.ImageManager;
import org.apache.xmlgraphics.image.loader.ImageSessionContext;
-import org.apache.fop.fonts.FontInfo;
/**
* BridgeContext which registers the custom bridges for PDF output.
diff --git a/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java b/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
index 83a431d5e..0204a2756 100644
--- a/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
+++ b/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
@@ -26,6 +26,7 @@ import java.awt.image.ColorModel;
import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
+
/**
* Our implementation of the class that returns information about
* roughly what we can handle and want to see (alpha for example).