hillion     02/03/21 07:26:52

  Modified:    sources/org/apache/batik/bridge SVGTextElementBridge.java
                        ScriptingEnvironment.java
  Log:
  - Fixed a regression on empty tspans,
  - When a piece of code scheduled by a call to setInterval throws
    an exception, the task is now cancelled.
  
  Revision  Changes    Path
  1.57      +2 -2      
xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java
  
  Index: SVGTextElementBridge.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- SVGTextElementBridge.java 21 Mar 2002 13:41:31 -0000      1.56
  +++ SVGTextElementBridge.java 21 Mar 2002 15:26:51 -0000      1.57
  @@ -69,7 +69,7 @@
    *
    * @author <a href="[EMAIL PROTECTED]">Stephane Hillion</a>
    * @author <a href="[EMAIL PROTECTED]">Bill Haneman</a>
  - * @version $Id: SVGTextElementBridge.java,v 1.56 2002/03/21 13:41:31 tkormann Exp $
  + * @version $Id: SVGTextElementBridge.java,v 1.57 2002/03/21 15:26:51 hillion Exp $
    */
   public class SVGTextElementBridge extends AbstractGraphicsNodeBridge {
   
  @@ -564,7 +564,7 @@
               String s = (String)strings.remove(count - 1);
               if (s.charAt(s.length() - 1) == ' ') {
                   if (s.length() == 1) {
  -                    attributes.remove(count - 1);
  +                    attributes.remove(--count);
                       return;
                   }
                   strings.add(s.substring(0, s.length() - 1));
  
  
  
  1.16      +12 -2     
xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java
  
  Index: ScriptingEnvironment.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/bridge/ScriptingEnvironment.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ScriptingEnvironment.java 19 Mar 2002 09:25:40 -0000      1.15
  +++ ScriptingEnvironment.java 21 Mar 2002 15:26:51 -0000      1.16
  @@ -29,7 +29,7 @@
    * This class contains the informations needed by the SVG scripting.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stephane Hillion</a>
  - * @version $Id: ScriptingEnvironment.java,v 1.15 2002/03/19 09:25:40 hillion Exp $
  + * @version $Id: ScriptingEnvironment.java,v 1.16 2002/03/21 15:26:51 hillion Exp $
    */
   public class ScriptingEnvironment extends BaseScriptingEnvironment {
   
  @@ -393,6 +393,7 @@
            * Incremented each time this runnable is added to the queue.
            */
           public int count;
  +        public boolean error;
   
           protected Interpreter interpreter;
           protected String script;
  @@ -407,6 +408,7 @@
                   interpreter.evaluate(script);
               } catch (InterpreterException ie) {
                   handleInterpreterException(ie);
  +                error = true;
               }
           }
       }
  @@ -419,6 +421,7 @@
            * Incremented each time this runnable is put in the queue.
            */
           public int count;
  +        public boolean error;
   
           protected Runnable runnable;
   
  @@ -433,6 +436,7 @@
                   if (userAgent != null) {
                       userAgent.displayError(e);
                   }
  +                error = true;
               }
           }
       }
  @@ -474,6 +478,9 @@
                           }
                           eir.count++;
                           updateRunnableQueue.invokeLater(eir);
  +                        if (eir.error) {
  +                            cancel();
  +                        }
                       }
                   };
   
  @@ -495,9 +502,12 @@
                           }
                           eihr.count++;
                           updateRunnableQueue.invokeLater(eihr);
  +                        if (eihr.error) {
  +                            cancel();
  +                        }
                       }
                   };
  -
  +            
               timer.schedule(tt, interval, interval);
               return tt;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to