diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-01-13 16:01:16 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-01-13 16:01:16 +0000 |
commit | 9a00138cfd13ce3a697054f06a4277e08d5970b8 (patch) | |
tree | 40b52c751260b61439d5c9c94ec48a9e470c9b20 /sc | |
parent | 9a49a8f7b1fdc342e3405f30e3798e3a689a6eca (diff) |
INTEGRATION: CWS dr43 (1.22.10); FILE MERGED
2005/11/23 14:37:37 nn 1.22.10.1: #b6343997# GetCondition: always initialize type and operator
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/xml/xmlcvali.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx index 1434af2eafb5..087dbaa9723a 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xmlcvali.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.23 $ * - * last change: $Author: kz $ $Date: 2005-11-02 17:38:55 $ + * last change: $Author: rt $ $Date: 2006-01-13 17:01:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -358,6 +358,8 @@ void ScXMLContentValidationContext::GetAlertStyle(const rtl::OUString& sMessageT aAlertStyle = sheet::ValidationAlertStyle_WARNING; else if (IsXMLToken(sMessageType, XML_INFORMATION)) aAlertStyle = sheet::ValidationAlertStyle_INFO; + else // don't leave uninitialized + aAlertStyle = sheet::ValidationAlertStyle_STOP; } void ScXMLContentValidationContext::SetFormulas(const rtl::OUString& sFormulas, rtl::OUString& sFormula1, rtl::OUString& sFormula2) const @@ -386,6 +388,9 @@ void ScXMLContentValidationContext::GetCondition(const rtl::OUString& sTempCondi com::sun::star::sheet::ValidationType& aValidationType, com::sun::star::sheet::ConditionOperator& aOperator) { + aValidationType = sheet::ValidationType_ANY; // #b6343997# default if no condition is given + aOperator = sheet::ConditionOperator_NONE; + rtl::OUString sCondition(sTempCondition); if (sCondition.getLength()) { @@ -522,6 +527,10 @@ void ScXMLContentValidationContext::GetCondition(const rtl::OUString& sTempCondi } } } + + // a validation type (date, integer) without a condition isn't possible + if ( aOperator == sheet::ConditionOperator_NONE ) + aValidationType = sheet::ValidationType_ANY; } void ScXMLContentValidationContext::EndElement() |