diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLCalculationSettingsContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx index 9365a791c901..fbe54c96d0f8 100644 --- a/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx +++ b/xmloff/source/chart/SchXMLCalculationSettingsContext.cxx @@ -44,8 +44,10 @@ SchXMLCalculationSettingsContext::SchXMLCalculationSettingsContext( SvXMLImport& if ( aIter.getToken() == XML_ELEMENT(TABLE, XML_DATE_VALUE) ) { util::DateTime aNullDate; - ::sax::Converter::parseDateTime(aNullDate, aIter.toView()); - m_aNullDate <<= aNullDate; + if (::sax::Converter::parseDateTime(aNullDate, aIter.toView())) + m_aNullDate <<= aNullDate; + else + SAL_WARN("xmloff", "SchXMLCalculationSettingsContext: broken DateTime '" << aIter.toView() << "'"); } else XMLOFF_WARN_UNKNOWN("xmloff", aIter); diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index b21010b07c81..9052a8dbaa81 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -462,8 +462,10 @@ void XMLConfigItemContext::endFastElement(sal_Int32 ) else if (IsXMLToken(msType, XML_DATETIME)) { util::DateTime aDateTime; - ::sax::Converter::parseDateTime(aDateTime, sValue); - mrAny <<= aDateTime; + if (::sax::Converter::parseDateTime(aDateTime, sValue)) + mrAny <<= aDateTime; + else + SAL_WARN("xmloff.core", "XMLConfigItemContext: broken DateTime '" << sValue << "'"); } else if (IsXMLToken(msType, XML_BASE64BINARY)) { |