Browse Source

prevents class cast exceptions when these methods are called

not relevent for these objects


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194288 13f79535-47bb-0310-9956-ffa450edef68
tags/PRE_CODEFORMATTING
Keiron Liddle 23 years ago
parent
commit
02990cfee3
1 changed files with 27 additions and 3 deletions
  1. 27
    3
      src/org/apache/fop/svg/SVGObj.java

+ 27
- 3
src/org/apache/fop/svg/SVGObj.java View File

@@ -1,7 +1,7 @@
/* $Id$
* Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
* For details on use and redistribution please refer to the
* LICENSE file included with these sources."
* LICENSE file included with these sources.
*/

package org.apache.fop.svg;
@@ -11,6 +11,7 @@ import org.apache.fop.fo.*;
import org.apache.fop.layout.Area;
import org.apache.fop.layout.FontState;
import org.apache.fop.apps.FOPException;
import org.apache.fop.layout.LinkSet;

import org.apache.batik.dom.svg.*;

@@ -52,11 +53,9 @@ public abstract class SVGObj extends FObj {
} else {
String pref = props[count].substring(0,
props[count].indexOf(":"));
System.out.println(pref);
if (pref.equals("xmlns")) {
ns.put(props[count].substring(
props[count].indexOf(":") + 1), rf);
System.out.println(ns);
}
ns.put("xlink", "http://www.w3.org/1999/xlink");
element.setAttributeNS((String) ns.get(pref),
@@ -91,5 +90,30 @@ public abstract class SVGObj extends FObj {
/* return status */
return new Status(Status.OK);
}

/**
* These method overrides prevent problems with the different types.
*/
public void setIsInTableCell() {
}

public void forceStartOffset(int offset) {
}

public void forceWidth(int width) {
}

public void resetMarker() {
}

public void setLinkSet(LinkSet linkSet) {
}

public Vector getMarkerSnapshot(Vector snapshot) {
return snapshot;
}

public void rollback(Vector snapshot) {
}
}


Loading…
Cancel
Save