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=40857>.
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=40857

           Summary: Problem on flowPara css style change
           Product: Batik
           Version: 2.0
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: regression
          Priority: P2
         Component: SVG DOM
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


The following exception is thrown when trying to set, alter or remove a style
property from a <flowPara ../> element.

org.w3c.dom.DOMException: 
        at
org.apache.batik.css.dom.CSSOMStyleDeclaration$1.textChanged(CSSOMStyleDeclaration.java:288)
        at org.apache.batik.css.dom.CSSOMValue.setCssText(CSSOMValue.java:127)
        at 
br.reunion.widgets.svgeditor.Helper.setStylePropertyValue(Helper.java:121)
        at
br.reunion.widgets.svgeditor.BasicSVGEditor$2.itemStateChanged(BasicSVGEditor.java:303)
        at javax.swing.AbstractButton.fireItemStateChanged(Unknown Source)
        at javax.swing.AbstractButton$Handler.itemStateChanged(Unknown Source)
        ...


I tryied two ways to set the css property, but both raise exceptions:

First way:
==========
CSSStyleDeclaration style = ((SVGStylableElement)svgElement).getStyle();
String propValue = style.getPropertyCSSValue("font-style").getCssText(); <<
error raised here!

Second way:
==========
CSSStyleDeclaration style = ((SVGStylableElement)svgElement).getStyle();
String propValue = style.getPropertyValue("font-weight"); << error raised here!

The same problems occurs for
        style.setPropertyValue("font-weight", "bold", "");
        style.removeProperty("font-weight");


Tested SVG code:
================
...  <flowRoot
     id="music-title-root"
     xml:space="preserve"><flowRegion
       id="flowRegion1313"><rect style="fill:none"
         width="775.87134"
         height="50.044106"
         x="10"
         y="10"
         id="rect1315" /></flowRegion><flowDiv><flowPara
style="font-size:36px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:middle;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffbd00;fill-opacity:1;font-family:Arial"
         id="music-title">I See the Lord</flowPara></flowDiv></flowRoot>...


These errors are a bit confusing because they don't occur everytime (but almost
all the time).

(I am using the lastest version of Batik from SVN)

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to