#88592# #i1064# add: isValid()

This commit is contained in:
Eike Rathke 2001-07-10 11:55:05 +00:00
parent 9cde4238cd
commit 7a7d46dc50
2 changed files with 24 additions and 4 deletions

View file

@ -2,9 +2,9 @@
*
* $RCSfile: calendarwrapper.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: er $ $Date: 2000-11-18 20:02:42 $
* last change: $Author: er $ $Date: 2001-07-10 12:54:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -113,6 +113,7 @@ public:
void setDateTime( double nTimeInDays );
double getDateTime() const;
void setValue( sal_Int16 nFieldIndex, sal_Int16 nValue );
sal_Bool isValid() const;
sal_Int16 getValue( sal_Int16 nFieldIndex ) const;
void addValue( sal_Int16 nFieldIndex, sal_Int32 nAmount );
sal_Int16 getFirstDayOfWeek() const;

View file

@ -2,9 +2,9 @@
*
* $RCSfile: calendarwrapper.cxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: er $ $Date: 2001-03-08 17:12:18 $
* last change: $Author: er $ $Date: 2001-07-10 12:55:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -298,6 +298,25 @@ void CalendarWrapper::setValue( sal_Int16 nFieldIndex, sal_Int16 nValue )
}
sal_Bool CalendarWrapper::isValid() const
{
try
{
if ( xC.is() )
return xC->isValid();
}
catch ( Exception& e )
{
#ifndef PRODUCT
ByteString aMsg( "isValid: Exception caught\n" );
aMsg += ByteString( String( e.Message ), RTL_TEXTENCODING_UTF8 );
DBG_ERRORFILE( aMsg.GetBuffer() );
#endif
}
return sal_False;
}
sal_Int16 CalendarWrapper::getValue( sal_Int16 nFieldIndex ) const
{
try