toolkit/source/awt/vclxwindows.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 5d54cfab9e0eb3d98dfa1a39a60068b2d02c50da
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Aug 11 17:16:42 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Aug 12 10:15:24 2022 +0200

    crashtesting: assert on export forum-fr-40415.ods to ods
    
    0 is an invalid year
    
    Change-Id: I2c638e2e2c1db628b4014a04a1c26231c236075b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138152
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index 15b7b3c146cf..24006671bb04 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -4809,7 +4809,7 @@ void VCLXDateField::setProperty( const OUString& 
PropertyName, const css::uno::A
             else
             {
                 util::Date d;
-                if ( Value >>= d )
+                if ((Value >>= d) && d.Year != 0)
                      setDate( d );
             }
         }
@@ -4817,14 +4817,14 @@ void VCLXDateField::setProperty( const OUString& 
PropertyName, const css::uno::A
         case BASEPROPERTY_DATEMIN:
         {
             util::Date d;
-            if ( Value >>= d )
+            if ((Value >>= d) && d.Year != 0)
                  setMin( d );
         }
         break;
         case BASEPROPERTY_DATEMAX:
         {
             util::Date d;
-            if ( Value >>= d )
+            if ((Value >>= d) && d.Year != 0)
                  setMax( d );
         }
         break;

Reply via email to