--Thi--s line, and those below, will be ignored--
M src/java/org/apache/fop/render/ps/PSTextPainter.java
M src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java
M src/java/org/apache/fop/fo/FObj.java
M src/java/org/apache/fop/fo/FOValidationEventProducer.java
M src/java/org/apache/fop/fo/FOValidationEventProducer.xml
M status.xml
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@
1430746 13f79535-47bb-0310-9956-
ffa450edef68
String propName, String propValue, PropertyException e,
Locator loc);
+ /**
+ * An invalid property value was encountered.
+ * @param source the event source
+ * @param elementName the name of the context node
+ * @param propName the property name
+ * @param propValue the property value
+ * @param e the property exception caused by the invalid value
+ * @param loc the location of the error or null
+ * @event.severity WARN
+ */
+ void warnOnInvalidPropertyValue(Object source, String elementName,
+ String propName, String propValue, PropertyException e,
+ Locator loc);
+
/**
* A feature is not supported, yet.
* @param source the event source
<message key="markerNotUniqueForSameParent">fo:marker "marker-class-name" must be unique for same parent: {mcname}{{locator}}</message>
<message key="invalidProperty">Invalid property encountered on "{elementName}": {attr}{{locator}}</message>
<message key="invalidPropertyValue">Invalid property value encountered in {propName}="{propValue}"[: {e}]{{locator}}</message>
+ <message key="warnOnInvalidPropertyValue">Invalid property value encountered in {propName}="{propValue}"[: {e}]{{locator}}</message>
<message key="unimplementedFeature">The following feature isn't implemented by Apache FOP, yet: {feature} (on {elementName}){{locator}}</message>
<message key="missingLinkDestination">Missing attribute on {elementName}: Either external-destination or internal-destination must be specified.{{locator}}</message>
<message key="markerCloningFailed">Unable to clone subtree of fo:marker (marker-class-name="{markerClassName}") for fo:retrieve-marker.{{locator}}</message>
private void warnOnUnknownProperties(Attributes attlist, String objName, PropertyList propertyList)
throws FOPException {
Map<String, Property> unknowns = propertyList.getUnknownPropertyValues();
- for (Entry<String, Property> value : unknowns.entrySet()) {
- String unknownProperty = value.getKey();
+ for (Entry<String, Property> entry : unknowns.entrySet()) {
FOValidationEventProducer producer = FOValidationEventProducer.Provider.get(getUserAgent()
.getEventBroadcaster());
- producer.invalidPropertyValue(this, objName,
- getAttributeNameForValue(attlist, unknowns.get(unknownProperty), propertyList),
- unknownProperty, null,
+ producer.warnOnInvalidPropertyValue(this, objName,
+ getAttributeNameForValue(attlist, entry.getValue(), propertyList), entry.getKey(), null,
getLocator());
}
}
//Adjust viewport if not explicit
if (ipd == -1) {
ipd = constrainExtent(cwidth,
- props.getInlineProgressionDimension(), (foundNonAuto)
- ? props.getContentWidth() : new DefaultLength());
+ props.getInlineProgressionDimension(), (foundNonAuto) ?
+ props.getContentWidth() : new DefaultLength());
}
if (bpd == -1) {
bpd = constrainExtent(cheight,
- props.getBlockProgressionDimension(), (foundNonAuto)
- ? props.getContentHeight() : new DefaultLength());
+ props.getBlockProgressionDimension(), (foundNonAuto) ?
+ props.getContentHeight() : new DefaultLength());
}
this.clip = false;
import org.apache.batik.gvt.font.GVTGlyphVector;
import org.apache.batik.gvt.text.TextPaintInfo;
import org.apache.batik.gvt.text.TextSpanLayout;
-
-import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
-import org.apache.xmlgraphics.ps.PSGenerator;
-
import org.apache.fop.fonts.Font;
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fonts.FontMetrics;
import org.apache.fop.svg.NativeTextPainter;
import org.apache.fop.util.CharUtilities;
import org.apache.fop.util.HexEncoder;
+import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
+import org.apache.xmlgraphics.ps.PSGenerator;
/**
* Renders the attributed character iterator of a {@link org.apache.batik.gvt.TextNode TextNode}.
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
+ <action context="Code" dev="PH" type="fix" fixes-bug="FOP-1069" due-to="Robert Meyer">
+ Warn instead or error on invalid property values.
+ </action>
<action context="Layout" dev="CB" type="fix" fixes-bug="FOP-2174" due-to="Robert Meyer">
When using SVG drawings, if no content-width and content-height is specified, 72 will
be used instead of the source-resolution option.