diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 16:26:33 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-28 16:26:33 +0000 |
commit | 22d8700636cbd0efd934338377c4681438c39afa (patch) | |
tree | 3b9f7cb2ac7907c568f7ca4291707a6852315c53 /svx/source/unoedit | |
parent | 218e31560d046fe85cca6bbe638e8b41d91c5328 (diff) |
INTEGRATION: CWS calc28 (1.23.478); FILE MERGED
2005/01/14 13:21:59 nn 1.23.478.1: #i35416# don't use invalid 0000-00-00 date for variable date field
Diffstat (limited to 'svx/source/unoedit')
-rw-r--r-- | svx/source/unoedit/unofield.cxx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/svx/source/unoedit/unofield.cxx b/svx/source/unoedit/unofield.cxx index b63dcbfd30e6..cc7670a7a094 100644 --- a/svx/source/unoedit/unofield.cxx +++ b/svx/source/unoedit/unofield.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unofield.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: obo $ $Date: 2004-04-29 16:28:38 $ + * last change: $Author: rt $ $Date: 2005-01-28 17:26:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -381,10 +381,17 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co { case ID_DATEFIELD: case ID_EXT_DATEFIELD: - mpImpl->mbBoolean2 = sal_True; - mpImpl->maDateTime = getDate( ((SvxDateField*)pData)->GetFixDate() ); - mpImpl->mnInt32 = ((SvxDateField*)pData)->GetFormat(); - mpImpl->mbBoolean1 = ((SvxDateField*)pData)->GetType() == SVXDATETYPE_FIX; + { + mpImpl->mbBoolean2 = sal_True; + // #i35416# for variable date field, don't use invalid "0000-00-00" date, + // use current date instead + sal_Bool bFixed = ((SvxDateField*)pData)->GetType() == SVXDATETYPE_FIX; + mpImpl->maDateTime = getDate( bFixed ? + ((SvxDateField*)pData)->GetFixDate() : + Date().GetDate() ); + mpImpl->mnInt32 = ((SvxDateField*)pData)->GetFormat(); + mpImpl->mbBoolean1 = bFixed; + } break; case ID_TIMEFIELD: |