LibreOffice Module sc (master)  1
xmlcvali.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #include "xmlcvali.hxx"
21 #include "xmlimprt.hxx"
22 #include "xmlconti.hxx"
23 #include <document.hxx>
24 #include "XMLConverter.hxx"
25 
26 #include <xmloff/xmltoken.hxx>
27 #include <xmloff/xmlnamespace.hxx>
29 #include <com/sun/star/sheet/TableValidationVisibility.hpp>
30 
31 using namespace com::sun::star;
32 using namespace xmloff::token;
33 using namespace ::formula;
34 
35 namespace {
36 
37 class ScXMLContentValidationContext : public ScXMLImportContext
38 {
39  OUString sName;
40  OUString sHelpTitle;
41  OUString sHelpMessage;
42  OUString sErrorTitle;
43  OUString sErrorMessage;
44  OUString sErrorMessageType;
45  OUString sBaseCellAddress;
46  OUString sCondition;
47  sal_Int16 nShowList;
48  bool bAllowEmptyCell;
49  bool bDisplayHelp;
50  bool bDisplayError;
51 
52  SvXMLImportContextRef xEventContext;
53 
54  css::sheet::ValidationAlertStyle GetAlertStyle() const;
55  void SetFormula( OUString& rFormula, OUString& rFormulaNmsp, FormulaGrammar::Grammar& reGrammar,
56  const OUString& rCondition, const OUString& rGlobNmsp, FormulaGrammar::Grammar eGlobGrammar, bool bHasNmsp ) const;
57  void GetCondition( ScMyImportValidation& rValidation ) const;
58 
59 public:
60 
61  ScXMLContentValidationContext( ScXMLImport& rImport,
63 
64  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
65  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
66 
67  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
68 
69  void SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay);
70  void SetErrorMessage(const OUString& sTitle, const OUString& sMessage, const OUString& sMessageType, const bool bDisplay);
71  void SetErrorMacro(const bool bExecute);
72 };
73 
74 class ScXMLHelpMessageContext : public ScXMLImportContext
75 {
76  OUString sTitle;
77  OUStringBuffer sMessage;
78  sal_Int32 nParagraphCount;
79  bool bDisplay;
80 
81  ScXMLContentValidationContext* pValidationContext;
82 
83 public:
84 
85  ScXMLHelpMessageContext( ScXMLImport& rImport,
87  ScXMLContentValidationContext* pValidationContext);
88 
89  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
90  sal_Int32 nElement,
91  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
92 
93  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
94 };
95 
96 class ScXMLErrorMessageContext : public ScXMLImportContext
97 {
98  OUString sTitle;
99  OUStringBuffer sMessage;
100  OUString sMessageType;
101  sal_Int32 nParagraphCount;
102  bool bDisplay;
103 
104  ScXMLContentValidationContext* pValidationContext;
105 
106 public:
107 
108  ScXMLErrorMessageContext( ScXMLImport& rImport,
110  ScXMLContentValidationContext* pValidationContext);
111 
112  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
113  sal_Int32 nElement,
114  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
115 
116  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
117 };
118 
119 class ScXMLErrorMacroContext : public ScXMLImportContext
120 {
121  bool bExecute;
122  ScXMLContentValidationContext* pValidationContext;
123 
124 public:
125 
126  ScXMLErrorMacroContext( ScXMLImport& rImport,
128  ScXMLContentValidationContext* pValidationContext);
129 
130  virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
131  sal_Int32 nElement,
132  const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
133  virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
134 };
135 
136 }
137 
139  ScXMLImportContext( rImport )
140 {
141  // here are no attributes
142 }
143 
145 {
146 }
147 
148 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationsContext::createFastChildContext(
149  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
150 {
151  SvXMLImportContext *pContext = nullptr;
152  sax_fastparser::FastAttributeList *pAttribList =
154 
155  switch (nElement)
156  {
158  pContext = new ScXMLContentValidationContext( GetScImport(), pAttribList );
159  break;
160  }
161 
162  return pContext;
163 }
164 
165 ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImport,
167  ScXMLImportContext( rImport ),
168  nShowList(sheet::TableValidationVisibility::UNSORTED),
169  bAllowEmptyCell(true),
170  bDisplayHelp(false),
171  bDisplayError(false)
172 {
173  if ( !rAttrList.is() )
174  return;
175 
176  for (auto &aIter : *rAttrList)
177  {
178  switch (aIter.getToken())
179  {
180  case XML_ELEMENT( TABLE, XML_NAME ):
181  sName = aIter.toString();
182  break;
183  case XML_ELEMENT( TABLE, XML_CONDITION ):
184  sCondition = aIter.toString();
185  break;
186  case XML_ELEMENT( TABLE, XML_BASE_CELL_ADDRESS ):
187  sBaseCellAddress = aIter.toString();
188  break;
189  case XML_ELEMENT( TABLE, XML_ALLOW_EMPTY_CELL ):
190  if (IsXMLToken(aIter, XML_FALSE))
191  bAllowEmptyCell = false;
192  break;
193  case XML_ELEMENT( TABLE, XML_DISPLAY_LIST ):
194  if (IsXMLToken(aIter, XML_NO))
195  {
196  nShowList = sheet::TableValidationVisibility::INVISIBLE;
197  }
198  else if (IsXMLToken(aIter, XML_UNSORTED))
199  {
200  nShowList = sheet::TableValidationVisibility::UNSORTED;
201  }
202  else if (IsXMLToken(aIter, XML_SORT_ASCENDING))
203  {
204  nShowList = sheet::TableValidationVisibility::SORTEDASCENDING;
205  }
206  else if (IsXMLToken(aIter, XML_SORTED_ASCENDING))
207  {
208  // Read old wrong value, fdo#72548
209  nShowList = sheet::TableValidationVisibility::SORTEDASCENDING;
210  }
211  break;
212  }
213  }
214 }
215 
216 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLContentValidationContext::createFastChildContext(
217  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
218 {
219  SvXMLImportContext *pContext = nullptr;
220  sax_fastparser::FastAttributeList *pAttribList =
222 
223  switch (nElement)
224  {
225  case XML_ELEMENT( TABLE, XML_HELP_MESSAGE ):
226  pContext = new ScXMLHelpMessageContext( GetScImport(), pAttribList, this);
227  break;
228  case XML_ELEMENT( TABLE, XML_ERROR_MESSAGE ):
229  pContext = new ScXMLErrorMessageContext( GetScImport(), pAttribList, this);
230  break;
231  case XML_ELEMENT( TABLE, XML_ERROR_MACRO ):
232  pContext = new ScXMLErrorMacroContext( GetScImport(), pAttribList, this);
233  break;
234  case XML_ELEMENT(OFFICE, XML_EVENT_LISTENERS):
235  pContext = new XMLEventsImportContext( GetImport() );
236  xEventContext = pContext;
237  }
238 
239  return pContext;
240 }
241 
242 sheet::ValidationAlertStyle ScXMLContentValidationContext::GetAlertStyle() const
243 {
244  if (IsXMLToken(sErrorMessageType, XML_MACRO))
245  return sheet::ValidationAlertStyle_MACRO;
246  if (IsXMLToken(sErrorMessageType, XML_STOP))
247  return sheet::ValidationAlertStyle_STOP;
248  if (IsXMLToken(sErrorMessageType, XML_WARNING))
249  return sheet::ValidationAlertStyle_WARNING;
250  if (IsXMLToken(sErrorMessageType, XML_INFORMATION))
251  return sheet::ValidationAlertStyle_INFO;
252  // default for unknown
253  return sheet::ValidationAlertStyle_STOP;
254 }
255 
256 void ScXMLContentValidationContext::SetFormula( OUString& rFormula, OUString& rFormulaNmsp, FormulaGrammar::Grammar& reGrammar,
257  const OUString& rCondition, const OUString& rGlobNmsp, FormulaGrammar::Grammar eGlobGrammar, bool bHasNmsp ) const
258 {
259  reGrammar = FormulaGrammar::GRAM_UNSPECIFIED;
260  if( bHasNmsp )
261  {
262  // the entire attribute contains a namespace: internal namespace not allowed
263  rFormula = rCondition;
264  rFormulaNmsp = rGlobNmsp;
265  reGrammar = eGlobGrammar;
266  }
267  else
268  {
269  // the attribute does not contain a namespace: try to find a namespace of an external grammar
270  GetScImport().ExtractFormulaNamespaceGrammar( rFormula, rFormulaNmsp, reGrammar, rCondition, true );
271  if( reGrammar != FormulaGrammar::GRAM_EXTERNAL )
272  reGrammar = eGlobGrammar;
273  }
274 }
275 
276 void ScXMLContentValidationContext::GetCondition( ScMyImportValidation& rValidation ) const
277 {
278  rValidation.aValidationType = sheet::ValidationType_ANY; // default if no condition is given
279  rValidation.aOperator = sheet::ConditionOperator_NONE;
280 
281  if( sCondition.isEmpty() )
282  return;
283 
284  // extract leading namespace from condition string
285  OUString aCondition, aConditionNmsp;
286  FormulaGrammar::Grammar eGrammar = FormulaGrammar::GRAM_UNSPECIFIED;
287  GetScImport().ExtractFormulaNamespaceGrammar( aCondition, aConditionNmsp, eGrammar, sCondition );
288  bool bHasNmsp = aCondition.getLength() < sCondition.getLength();
289 
290  // parse a condition from the attribute string
291  ScXMLConditionParseResult aParseResult;
292  ScXMLConditionHelper::parseCondition( aParseResult, aCondition, 0 );
293 
294  /* Check the result. A valid value in aParseResult.meToken implies
295  that the other members of aParseResult are filled with valid data
296  for that token. */
297  bool bSecondaryPart = false;
298  switch( aParseResult.meToken )
299  {
300  case XML_COND_TEXTLENGTH: // condition is 'cell-content-text-length()<operator><expression>'
301  case XML_COND_TEXTLENGTH_ISBETWEEN: // condition is 'cell-content-text-length-is-between(<expression1>,<expression2>)'
302  case XML_COND_TEXTLENGTH_ISNOTBETWEEN: // condition is 'cell-content-text-length-is-not-between(<expression1>,<expression2>)'
303  case XML_COND_ISINLIST: // condition is 'cell-content-is-in-list(<expression>)'
304  case XML_COND_ISTRUEFORMULA: // condition is 'is-true-formula(<expression>)'
305  rValidation.aValidationType = aParseResult.meValidation;
306  rValidation.aOperator = aParseResult.meOperator;
307  break;
308 
309  case XML_COND_ISWHOLENUMBER: // condition is 'cell-content-is-whole-number() and <condition>'
310  case XML_COND_ISDECIMALNUMBER: // condition is 'cell-content-is-decimal-number() and <condition>'
311  case XML_COND_ISDATE: // condition is 'cell-content-is-date() and <condition>'
312  case XML_COND_ISTIME: // condition is 'cell-content-is-time() and <condition>'
313  rValidation.aValidationType = aParseResult.meValidation;
314  bSecondaryPart = true;
315  break;
316 
317  default:; // unacceptable or unknown condition
318  }
319 
320  /* Parse the following 'and <condition>' part of some conditions. This
321  updates the members of aParseResult that will contain the operands
322  and comparison operator then. */
323  if( bSecondaryPart )
324  {
325  ScXMLConditionHelper::parseCondition( aParseResult, aCondition, aParseResult.mnEndIndex );
326  if( aParseResult.meToken == XML_COND_AND )
327  {
328  ScXMLConditionHelper::parseCondition( aParseResult, aCondition, aParseResult.mnEndIndex );
329  switch( aParseResult.meToken )
330  {
331  case XML_COND_CELLCONTENT: // condition is 'and cell-content()<operator><expression>'
332  case XML_COND_ISBETWEEN: // condition is 'and cell-content-is-between(<expression1>,<expression2>)'
333  case XML_COND_ISNOTBETWEEN: // condition is 'and cell-content-is-not-between(<expression1>,<expression2>)'
334  rValidation.aOperator = aParseResult.meOperator;
335  break;
336  default:; // unacceptable or unknown condition
337  }
338  }
339  }
340 
341  // a validation type (date, integer) without a condition isn't possible
342  if( rValidation.aOperator == sheet::ConditionOperator_NONE )
343  rValidation.aValidationType = sheet::ValidationType_ANY;
344 
345  // parse the formulas
346  if( rValidation.aValidationType != sheet::ValidationType_ANY )
347  {
348  SetFormula( rValidation.sFormula1, rValidation.sFormulaNmsp1, rValidation.eGrammar1,
349  aParseResult.maOperand1, aConditionNmsp, eGrammar, bHasNmsp );
350  SetFormula( rValidation.sFormula2, rValidation.sFormulaNmsp2, rValidation.eGrammar2,
351  aParseResult.maOperand2, aConditionNmsp, eGrammar, bHasNmsp );
352  }
353 }
354 
355 void SAL_CALL ScXMLContentValidationContext::endFastElement( sal_Int32 /*nElement*/ )
356 {
357  // #i36650# event-listeners element moved up one level
358  if (xEventContext.is())
359  {
360  XMLEventsImportContext* pEvents =
361  static_cast<XMLEventsImportContext*>(xEventContext.get());
362  uno::Sequence<beans::PropertyValue> aValues;
363  pEvents->GetEventSequence( "OnError", aValues );
364 
365  auto pValue = std::find_if(aValues.begin(), aValues.end(),
366  [](const beans::PropertyValue& rValue) {
367  return rValue.Name == "MacroName" || rValue.Name == "Script"; });
368  if (pValue != aValues.end())
369  pValue->Value >>= sErrorTitle;
370  }
371 
372  ScMyImportValidation aValidation;
373  aValidation.eGrammar1 = aValidation.eGrammar2 = GetScImport().GetDocument()->GetStorageGrammar();
374  aValidation.sName = sName;
375  aValidation.sBaseCellAddress = sBaseCellAddress;
376  aValidation.sInputTitle = sHelpTitle;
377  aValidation.sInputMessage = sHelpMessage;
378  aValidation.sErrorTitle = sErrorTitle;
379  aValidation.sErrorMessage = sErrorMessage;
380  GetCondition( aValidation );
381  aValidation.aAlertStyle = GetAlertStyle();
382  aValidation.bShowErrorMessage = bDisplayError;
383  aValidation.bShowInputMessage = bDisplayHelp;
384  aValidation.bIgnoreBlanks = bAllowEmptyCell;
385  aValidation.nShowList = nShowList;
386  GetScImport().AddValidation(aValidation);
387 }
388 
389 void ScXMLContentValidationContext::SetHelpMessage(const OUString& sTitle, const OUString& sMessage, const bool bDisplay)
390 {
391  sHelpTitle = sTitle;
392  sHelpMessage = sMessage;
393  bDisplayHelp = bDisplay;
394 }
395 
396 void ScXMLContentValidationContext::SetErrorMessage(const OUString& sTitle, const OUString& sMessage,
397  const OUString& sMessageType, const bool bDisplay)
398 {
399  sErrorTitle = sTitle;
400  sErrorMessage = sMessage;
401  sErrorMessageType = sMessageType;
402  bDisplayError = bDisplay;
403 }
404 
405 void ScXMLContentValidationContext::SetErrorMacro(const bool bExecute)
406 {
407  sErrorMessageType = "macro";
408  bDisplayError = bExecute;
409 }
410 
411 ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport,
413  ScXMLContentValidationContext* pTempValidationContext) :
414  ScXMLImportContext( rImport ),
415  sTitle(),
416  sMessage(),
417  nParagraphCount(0),
418  bDisplay(false)
419 {
420  pValidationContext = pTempValidationContext;
421  if ( !rAttrList.is() )
422  return;
423 
424  for (auto &aIter : *rAttrList)
425  {
426  switch (aIter.getToken())
427  {
428  case XML_ELEMENT( TABLE, XML_TITLE ):
429  sTitle = aIter.toString();
430  break;
431  case XML_ELEMENT( TABLE, XML_DISPLAY ):
432  bDisplay = IsXMLToken(aIter, XML_TRUE);
433  break;
434  }
435  }
436 }
437 
438 css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLHelpMessageContext::createFastChildContext(
439  sal_Int32 nElement,
440  const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ )
441 {
442  SvXMLImportContext *pContext = nullptr;
443 
444  switch( nElement )
445  {
446  case XML_ELEMENT(TEXT, XML_P):
447  {
448  if(nParagraphCount)
449  sMessage.append('\n');
450  ++nParagraphCount;
451  pContext = new ScXMLContentContext( GetScImport(), sMessage );
452  }
453  break;
454  }
455 
456  return pContext;
457 }
458 
459 void SAL_CALL ScXMLHelpMessageContext::endFastElement( sal_Int32 /*nElement*/ )
460 {
461  pValidationContext->SetHelpMessage(sTitle, sMessage.makeStringAndClear(), bDisplay);
462 }
463 
464 ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport,
466  ScXMLContentValidationContext* pTempValidationContext) :
467  ScXMLImportContext( rImport ),
468  sTitle(),
469  sMessage(),
470  sMessageType(),
471  nParagraphCount(0),
472  bDisplay(false)
473 {
474  pValidationContext = pTempValidationContext;
475  if ( !rAttrList.is() )
476  return;
477 
478  for (auto &aIter : *rAttrList)
479  {
480  switch (aIter.getToken())
481  {
482  case XML_ELEMENT( TABLE, XML_TITLE ):
483  sTitle = aIter.toString();
484  break;
485  case XML_ELEMENT( TABLE, XML_MESSAGE_TYPE ):
486  sMessageType = aIter.toString();
487  break;
488  case XML_ELEMENT( TABLE, XML_DISPLAY ):
489  bDisplay = IsXMLToken(aIter, XML_TRUE);
490  break;
491  }
492  }
493 }
494 
495 css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLErrorMessageContext::createFastChildContext(
496  sal_Int32 nElement,
497  const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ )
498 {
499  SvXMLImportContext *pContext = nullptr;
500 
501  switch( nElement )
502  {
503  case XML_ELEMENT(TEXT, XML_P):
504  {
505  if(nParagraphCount)
506  sMessage.append('\n');
507  ++nParagraphCount;
508  pContext = new ScXMLContentContext( GetScImport(), sMessage);
509  }
510  break;
511  }
512 
513  return pContext;
514 }
515 
516 void SAL_CALL ScXMLErrorMessageContext::endFastElement( sal_Int32 /*nElement*/ )
517 {
518  pValidationContext->SetErrorMessage(sTitle, sMessage.makeStringAndClear(), sMessageType, bDisplay);
519 }
520 
521 ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport,
523  ScXMLContentValidationContext* pTempValidationContext) :
524  ScXMLImportContext( rImport ),
525  bExecute(false)
526 {
527  pValidationContext = pTempValidationContext;
528  if ( !rAttrList.is() )
529  return;
530 
531  for (auto &aIter : *rAttrList)
532  {
533  switch (aIter.getToken())
534  {
535  case XML_ELEMENT( TABLE, XML_NAME ):
536  break;
537  case XML_ELEMENT( TABLE, XML_EXECUTE ):
538  bExecute = IsXMLToken(aIter, XML_TRUE);
539  break;
540  }
541  }
542 }
543 
544 css::uno::Reference< css::xml::sax::XFastContextHandler > ScXMLErrorMacroContext::createFastChildContext(
545  sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& /*xAttrList*/ )
546 {
547  SvXMLImportContext *pContext = nullptr;
548 
549  if (nElement == XML_ELEMENT(SCRIPT, XML_EVENTS))
550  {
551  pContext = new XMLEventsImportContext(GetImport());
552  }
553 
554  return pContext;
555 }
556 
557 void SAL_CALL ScXMLErrorMacroContext::endFastElement( sal_Int32 /*nElement*/ )
558 {
559  pValidationContext->SetErrorMacro( bExecute );
560 }
561 
562 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Token not recognized.
OUString sFormulaNmsp2
Definition: xmlimprt.hxx:98
OUString sMessage
The 'cell-content-is-whole-number' token.
The 'cell-content-text-length' token.
OUString sFormulaNmsp1
Definition: xmlimprt.hxx:97
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
Definition: xmlcvali.cxx:148
The 'cell-content-is-in-list' token.
css::sheet::ConditionOperator meOperator
A data validation type if existing.
Result of an attempt to parse a single condition in a 'condition' attribute value of e...
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
exports com.sun.star. sheet
ScXMLContentValidationsContext(ScXMLImport &rImport)
Definition: xmlcvali.cxx:138
css::uno::Any const & rValue
css::sheet::ConditionOperator aOperator
Definition: xmlimprt.hxx:102
XML_NO
void GetEventSequence(const OUString &rName, css::uno::Sequence< css::beans::PropertyValue > &rSequence)
XML_FALSE
const char * sName
The 'cell-content-text-length-is-between' token.
OUString sInputTitle
Definition: xmlimprt.hxx:91
This class exists only to provide GetScImport() to its derived classes.
The 'cell-content-is-decimal-number' token.
The 'cell-content-text-length-is-not-between' token.
ScXMLConditionToken meToken
css::sheet::ValidationType aValidationType
Definition: xmlimprt.hxx:101
The 'cell-content-is-time' token.
OUString maOperand2
First operand of the token or comparison value.
ScXMLImport & GetScImport()
The 'cell-content' token.
OUString maOperand1
A comparison operator if existing.
OUString sBaseCellAddress
Definition: xmlimprt.hxx:99
formula::FormulaGrammar::Grammar eGrammar2
Definition: xmlimprt.hxx:104
TABLE
void parseCondition(ScXMLConditionParseResult &rParseResult, const OUString &rAttribute, sal_Int32 nStartIndex)
Parses the next condition in a 'condition' attribute value of e.g.
OUString sErrorMessage
Definition: xmlimprt.hxx:94
css::sheet::ValidationAlertStyle aAlertStyle
Definition: xmlimprt.hxx:100
#define XML_ELEMENT(prefix, name)
The 'cell-content-is-not-between' token.
The 'cell-content-is-date' token.
XML_TRUE
OUString sInputMessage
Definition: xmlimprt.hxx:92
formula::FormulaGrammar::Grammar eGrammar1
Definition: xmlimprt.hxx:103
virtual ~ScXMLContentValidationsContext() override
Definition: xmlcvali.cxx:144
The 'and' token.
if(!pCandidateA->getEnd().equal(pCandidateB->getStart()))
The 'cell-content-is-between' token.
XML_CONTENT_VALIDATION
sal_Int32 mnEndIndex
Second operand of 'between' conditions.
css::sheet::ValidationType meValidation
The leading condition token.
OUString sErrorTitle
Definition: xmlimprt.hxx:93
OUString toString(OptionInfo const *info)