Kaydet (Commit) 2001da98 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS jsc3 (1.3.34); FILE MERGED

2006/02/22 14:31:46 jsc 1.3.34.1: #i62418# insert use of AnyConverter
üst a087939c
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: ControlValidator.java,v $ * $RCSfile: ControlValidator.java,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: rt $ $Date: 2005-09-07 20:06:52 $ * last change: $Author: vg $ $Date: 2006-03-15 09:27:11 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -57,8 +57,8 @@ public abstract class ControlValidator implements com.sun.star.form.validation.X ...@@ -57,8 +57,8 @@ public abstract class ControlValidator implements com.sun.star.form.validation.X
{ {
try try
{ {
com.sun.star.uno.Any anyValue = (com.sun.star.uno.Any)Value; return ( com.sun.star.uno.AnyConverter.getType(Value).getTypeClass()
return ( anyValue.getType().getTypeClass() == com.sun.star.uno.TypeClass.VOID ); == com.sun.star.uno.TypeClass.VOID );
} }
catch( java.lang.ClassCastException e ) catch( java.lang.ClassCastException e )
{ {
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: DateValidator.java,v $ * $RCSfile: DateValidator.java,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: rt $ $Date: 2005-09-07 20:07:13 $ * last change: $Author: vg $ $Date: 2006-03-15 09:27:30 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -75,7 +75,9 @@ public class DateValidator extends ControlValidator ...@@ -75,7 +75,9 @@ public class DateValidator extends ControlValidator
if ( isVoid( Value ) ) if ( isVoid( Value ) )
return false; return false;
com.sun.star.util.Date dateValue = (com.sun.star.util.Date)Value; com.sun.star.util.Date dateValue = (com.sun.star.util.Date)
com.sun.star.uno.AnyConverter.toObject(
com.sun.star.util.Date.class, Value);
if ( isDedicatedInvalidDate( dateValue ) ) if ( isDedicatedInvalidDate( dateValue ) )
return false; return false;
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: TimeValidator.java,v $ * $RCSfile: TimeValidator.java,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: rt $ $Date: 2005-09-07 20:11:22 $ * last change: $Author: vg $ $Date: 2006-03-15 09:28:06 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -74,7 +74,9 @@ public class TimeValidator extends ControlValidator ...@@ -74,7 +74,9 @@ public class TimeValidator extends ControlValidator
if ( isVoid( Value ) ) if ( isVoid( Value ) )
return false; return false;
com.sun.star.util.Time timeValue = (com.sun.star.util.Time)Value; com.sun.star.util.Time timeValue = (com.sun.star.util.Time)
com.sun.star.uno.AnyConverter.toObject(
com.sun.star.util.Time.class, Value);
if ( isInvalidTime( timeValue ) ) if ( isInvalidTime( timeValue ) )
return false; return false;
if ( !isFullHour( timeValue ) ) if ( !isFullHour( timeValue ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment