You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by bu...@apache.org on 2005/06/27 17:19:18 UTC

DO NOT REPLY [Bug 35515] New: - Problem with converting WMF files to SVG Documents

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35515>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35515

           Summary: Problem with converting WMF files to SVG Documents
           Product: Batik
           Version: 2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVGGraphics2D
        AssignedTo: batik-dev@xml.apache.org
        ReportedBy: herve.girod@club-internet.fr


It seems not possible to convert directly WMF files to SVG Documents. An
Exception is explicitely raised in WMFTranscoder if  trying to do so. Further,
if trying to removed this Exception raising, the resulting SVG Document has no
content, appart for the svg root Element.

The cause of this problem seems in fact to be the getRoot() method in the
SVGGraphics2D class : the code is simply :
    public Element getRoot(){
        return getRoot(null);
    }
which calls in the same class :
    public Element getRoot(Element svgRoot) {
        svgRoot = domTreeManager.getRoot(svgRoot);
        ...
        return svgRoot;
    }

The DOMTreemanager creates a new svg Element in the tree, even if it already
exists. I think the code in SVGGraphics2D  should be something like that :
    public Element getRoot(){
        Document doc = getDOMFactory();
        Element elt = doc.getDocumentElement();
        if (elt.getTagName().equals(SVGConstants.SVG_SVG_TAG)) return getRoot(elt);
        else {
            NodeList list = elt.getElementsByTagName(SVGConstants.SVG_SVG_TAG);
            if ((list == null) || (list.getLength() == 0))  return getRoot(null);
            else return getRoot((Element)(list.item(0)));
        }
        return getRoot(null);
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org