LibreOffice Module sc (master)  1
xmlfilti.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 "xmlfilti.hxx"
21 #include "xmlimprt.hxx"
22 #include "xmldrani.hxx"
23 #include "xmldpimp.hxx"
24 #include <rangeutl.hxx>
25 #include <queryentry.hxx>
26 #include <document.hxx>
27 
28 #include <o3tl/safeint.hxx>
29 #include <svl/sharedstringpool.hxx>
30 #include <xmloff/xmltoken.hxx>
31 #include <xmloff/xmlnmspe.hxx>
32 
33 using namespace com::sun::star;
34 using namespace xmloff::token;
35 
36 using ::com::sun::star::uno::Reference;
37 
38 ScXMLFilterContext::ConnStackItem::ConnStackItem(bool bOr) : mbOr(bOr), mnCondCount(0) {}
39 
42  ScQueryParam& rParam,
43  ScXMLDatabaseRangeContext* pTempDatabaseRangeContext) :
44  ScXMLImportContext( rImport ),
45  mrQueryParam(rParam),
46  pDatabaseRangeContext(pTempDatabaseRangeContext),
47  bSkipDuplicates(false),
48  bCopyOutputData(false),
50 {
51  ScDocument* pDoc(GetScImport().GetDocument());
52 
53  if ( !rAttrList.is() )
54  return;
55 
56  for (auto &aIter : *rAttrList)
57  {
58  switch (aIter.getToken())
59  {
61  {
62  ScRange aScRange;
63  sal_Int32 nOffset(0);
64  if (ScRangeStringConverter::GetRangeFromString( aScRange, aIter.toString(), pDoc, ::formula::FormulaGrammar::CONV_OOO, nOffset ))
65  {
66  aOutputPosition = aScRange.aStart;
67  bCopyOutputData = true;
68  }
69  }
70  break;
72  {
73  sal_Int32 nOffset(0);
75  bConditionSourceRange = true;
76  }
77  break;
79  {
80  // not supported by StarOffice
81  }
82  break;
84  {
86  }
87  break;
88  }
89  }
90 }
91 
93 {
94 }
95 
96 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLFilterContext::createFastChildContext(
97  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
98 {
99  SvXMLImportContext *pContext(nullptr);
100  sax_fastparser::FastAttributeList *pAttribList =
102 
103  switch (nElement)
104  {
106  {
107  pContext = new ScXMLAndContext(
108  GetScImport(), mrQueryParam, this);
109  }
110  break;
112  {
113  pContext = new ScXMLOrContext(
114  GetScImport(), mrQueryParam, this);
115  }
116  break;
118  {
119  pContext = new ScXMLConditionContext(
120  GetScImport(), nElement, pAttribList, mrQueryParam, this);
121  }
122  break;
123  }
124 
125  return pContext;
126 }
127 
128 void SAL_CALL ScXMLFilterContext::endFastElement( sal_Int32 /*nElement*/ )
129 {
132 
133  if (bCopyOutputData)
134  {
138  }
139 
142 }
143 
145 {
146  maConnStack.emplace_back(b);
147 }
148 
150 {
151  maConnStack.pop_back();
152 }
153 
155 {
156  // For condition items in each stack, the first one gets the connection of
157  // the last stack, while the rest of them get that of the current stack.
158 
159  if (maConnStack.empty())
160  // This should never happen.
161  return true;
162 
163  ConnStackItem& rItem = maConnStack.back();
164  if (rItem.mnCondCount)
165  // secondary item gets the current connection.
166  return rItem.mbOr;
167 
168  // The next condition of this stack will get the current connection.
169  ++rItem.mnCondCount;
170 
171  if (maConnStack.size() < 2)
172  // There is no last stack. Likely the first condition in the first
173  // stack whose connection is not used. Default in
174  // ScQueryEntry::eConnect is SC_AND, so return false (AND instead of
175  // OR) here. Otherwise, when saving the document again, we'd write a
176  // uselessly stacked
177  // <table:filter-or><table:filter-and>...</table:filter-and></table:filter-or>
178  // for two conditions connected with AND.
179  return false;
180 
181  std::vector<ConnStackItem>::reverse_iterator itr = maConnStack.rbegin();
182  ++itr;
183  return itr->mbOr; // connection of the last stack.
184 }
185 
187  ScQueryParam& rParam,
188  ScXMLFilterContext* pTempFilterContext) :
189  ScXMLImportContext( rImport ),
190  mrQueryParam(rParam),
191  pFilterContext(pTempFilterContext)
192 {
194 }
195 
197 {
198 }
199 
200 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLAndContext::createFastChildContext(
201  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
202 {
203  SvXMLImportContext *pContext(nullptr);
204  sax_fastparser::FastAttributeList *pAttribList =
206 
207  switch (nElement)
208  {
210  {
211  // not supported in StarOffice
212  }
213  break;
215  {
216  pContext = new ScXMLConditionContext(
217  GetScImport(), nElement, pAttribList, mrQueryParam, pFilterContext);
218  }
219  break;
220  }
221 
222  return pContext;
223 }
224 
225 void SAL_CALL ScXMLAndContext::endFastElement( sal_Int32 /*nElement*/ )
226 {
228 }
229 
231  ScQueryParam& rParam,
232  ScXMLFilterContext* pTempFilterContext) :
233  ScXMLImportContext( rImport ),
234  mrQueryParam(rParam),
235  pFilterContext(pTempFilterContext)
236 {
238 }
239 
241 {
242 }
243 
244 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLOrContext::createFastChildContext(
245  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
246 {
247  SvXMLImportContext *pContext(nullptr);
248  sax_fastparser::FastAttributeList *pAttribList =
250 
251  switch (nElement)
252  {
254  {
255  pContext = new ScXMLAndContext(
257  }
258  break;
260  {
261  pContext = new ScXMLConditionContext(
262  GetScImport(), nElement, pAttribList, mrQueryParam, pFilterContext);
263  }
264  break;
265  }
266 
267  return pContext;
268 }
269 
270 void SAL_CALL ScXMLOrContext::endFastElement( sal_Int32 /*nElement*/ )
271 {
273 }
274 
276  ScXMLImport& rImport, sal_Int32 /*nElement*/,
278  ScQueryParam& rParam,
279  ScXMLFilterContext* pTempFilterContext) :
280  ScXMLImportContext( rImport ),
281  mrQueryParam(rParam),
282  pFilterContext(pTempFilterContext),
283  sDataType(GetXMLToken(XML_TEXT)),
284  nField(0),
285  bIsCaseSensitive(false)
286 {
287 
288  if ( !rAttrList.is() )
289  return;
290 
291  for (auto &aIter : *rAttrList)
292  {
293  switch (aIter.getToken())
294  {
296  {
297  nField = aIter.toInt32();
298  }
299  break;
301  {
303  }
304  break;
306  {
307  sDataType = aIter.toString();
308  }
309  break;
310  case XML_ELEMENT( TABLE, XML_VALUE ):
311  {
312  sConditionValue = aIter.toString();
313  }
314  break;
315  case XML_ELEMENT( TABLE, XML_OPERATOR ):
316  {
317  sOperator = aIter.toString();
318  }
319  break;
320  }
321  }
322 }
323 
325 {
326 }
327 
328 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLConditionContext::createFastChildContext(
329  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
330 {
331  SvXMLImportContext *pContext = nullptr;
332  sax_fastparser::FastAttributeList *pAttribList =
334 
335  switch (nElement)
336  {
338  {
339  pContext = new ScXMLSetItemContext(
340  GetScImport(), nElement, pAttribList, *this);
341  }
342  break;
343  }
344 
345  return pContext;
346 }
347 
349  const OUString& aOpStr, ScQueryParam& rParam, ScQueryEntry& rEntry)
350 {
352  if (IsXMLToken(aOpStr, XML_MATCH))
353  {
355  rEntry.eOp = SC_EQUAL;
356  }
357  else if (IsXMLToken(aOpStr, XML_NOMATCH))
358  {
360  rEntry.eOp = SC_NOT_EQUAL;
361  }
362  else if (aOpStr == "=")
363  rEntry.eOp = SC_EQUAL;
364  else if (aOpStr == "!=")
365  rEntry.eOp = SC_NOT_EQUAL;
366  else if (IsXMLToken(aOpStr, XML_BOTTOM_PERCENT))
367  rEntry.eOp = SC_BOTPERC;
368  else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
369  rEntry.eOp = SC_BOTVAL;
370  else if (IsXMLToken(aOpStr, XML_EMPTY))
371  rEntry.SetQueryByEmpty();
372  else if (aOpStr == ">")
373  rEntry.eOp = SC_GREATER;
374  else if (aOpStr == ">=")
375  rEntry.eOp = SC_GREATER_EQUAL;
376  else if (aOpStr == "<")
377  rEntry.eOp = SC_LESS;
378  else if (aOpStr == "<=")
379  rEntry.eOp = SC_LESS_EQUAL;
380  else if (IsXMLToken(aOpStr, XML_NOEMPTY))
381  rEntry.SetQueryByNonEmpty();
382  else if (IsXMLToken(aOpStr, XML_TOP_PERCENT))
383  rEntry.eOp = SC_TOPPERC;
384  else if (IsXMLToken(aOpStr, XML_TOP_VALUES))
385  rEntry.eOp = SC_TOPVAL;
386  else if (IsXMLToken(aOpStr, XML_CONTAINS))
387  rEntry.eOp = SC_CONTAINS;
388  else if (IsXMLToken(aOpStr, XML_DOES_NOT_CONTAIN))
389  rEntry.eOp = SC_DOES_NOT_CONTAIN;
390  else if (IsXMLToken(aOpStr, XML_BEGINS_WITH))
391  rEntry.eOp = SC_BEGINS_WITH;
392  else if (IsXMLToken(aOpStr, XML_DOES_NOT_BEGIN_WITH))
393  rEntry.eOp = SC_DOES_NOT_BEGIN_WITH;
394  else if (IsXMLToken(aOpStr, XML_ENDS_WITH))
395  rEntry.eOp = SC_ENDS_WITH;
396  else if (IsXMLToken(aOpStr, XML_DOES_NOT_END_WITH))
397  rEntry.eOp = SC_DOES_NOT_END_WITH;
398 }
399 
401 {
402  maQueryItems.push_back(rItem);
403 }
404 
405 void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
406 {
408 
409  // We currently don't support per-condition case sensitivity.
411 
412  rEntry.bDoQuery = true;
414 
417  rEntry.nField = o3tl::saturating_add(nField, nStartPos);
418 
419  if (maQueryItems.empty())
420  {
421  ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
423  {
424  rItem.mfVal = sConditionValue.toDouble();
426  }
427  else
428  {
430  rItem.maString = rPool.intern(sConditionValue);
432  }
433  }
434  else
435  rEntry.GetQueryItems().swap(maQueryItems);
436 }
437 
439  ScXMLImport& rImport, sal_Int32 /*nElement*/,
441  ScXMLImportContext(rImport)
442 {
443  if ( !rAttrList.is() )
444  return;
445 
446  for (auto &aIter : *rAttrList)
447  {
448  switch (aIter.getToken())
449  {
450  case XML_ELEMENT( TABLE, XML_VALUE ):
451  {
453  ScQueryEntry::Item aItem;
454  aItem.maString = rPool.intern(aIter.toString());
456  aItem.mfVal = 0.0;
457  rParent.AddSetItem(aItem);
458  }
459  break;
460  }
461  }
462 }
463 
465 {
466 }
467 
470  ScXMLDataPilotTableContext* pTempDataPilotTableContext) :
471  ScXMLImportContext( rImport ),
472  pDataPilotTable(pTempDataPilotTableContext),
473  aFilterFields(),
474  eSearchType(utl::SearchParam::SearchType::Normal),
475  nFilterFieldCount(0),
476  bSkipDuplicates(false),
477  bIsCaseSensitive(false),
478  bConnectionOr(true),
479  bNextConnectionOr(true)
480 {
481  if ( !rAttrList.is() )
482  return;
483 
484  for (auto &aIter : *rAttrList)
485  {
486  switch (aIter.getToken())
487  {
489  {
490  // not supported
491  }
492  break;
494  {
495  // not supported
496  }
497  break;
499  {
500  // not supported by StarOffice
501  }
502  break;
504  {
506  }
507  break;
508  }
509  }
510 }
511 
513 {
514 }
515 
516 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPFilterContext::createFastChildContext(
517  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
518 {
519  SvXMLImportContext *pContext(nullptr);
520  sax_fastparser::FastAttributeList *pAttribList =
522 
523  switch (nElement)
524  {
526  {
527  pContext = new ScXMLDPAndContext( GetScImport(), this);
528  }
529  break;
531  {
532  pContext = new ScXMLDPOrContext( GetScImport(), this);
533  }
534  break;
536  {
537  pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, this);
538  }
539  break;
540  }
541 
542  return pContext;
543 }
544 
545 void SAL_CALL ScXMLDPFilterContext::endFastElement( sal_Int32 /*nElement*/ )
546 {
550 
552 }
553 
555 {
558  rEntry = aFilterField;
559  rEntry.bDoQuery = true;
561 }
562 
564  ScXMLDPFilterContext* pTempFilterContext) :
565  ScXMLImportContext( rImport )
566 {
567  pFilterContext = pTempFilterContext;
569 }
570 
572 {
573 }
574 
575 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPAndContext::createFastChildContext(
576  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
577 {
578  SvXMLImportContext *pContext(nullptr);
579  sax_fastparser::FastAttributeList *pAttribList =
581 
582  switch (nElement)
583  {
585  {
586  // not supported in StarOffice
587  }
588  break;
590  {
591  pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, pFilterContext);
592  }
593  break;
594  }
595 
596  return pContext;
597 }
598 
599 void SAL_CALL ScXMLDPAndContext::endFastElement( sal_Int32 /*nElement*/ )
600 {
602 }
603 
605  ScXMLDPFilterContext* pTempFilterContext) :
606  ScXMLImportContext( rImport ),
607  pFilterContext(pTempFilterContext)
608 {
610 }
611 
613 {
614 }
615 
616 uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLDPOrContext::createFastChildContext(
617  sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList >& xAttrList )
618 {
619  SvXMLImportContext *pContext(nullptr);
620  sax_fastparser::FastAttributeList *pAttribList =
622 
623  switch (nElement)
624  {
626  {
627  pContext = new ScXMLDPAndContext( GetScImport(), pFilterContext);
628  }
629  break;
631  {
632  pContext = new ScXMLDPConditionContext( GetScImport(), nElement, pAttribList, pFilterContext);
633  }
634  break;
635  }
636 
637  return pContext;
638 }
639 
640 void SAL_CALL ScXMLDPOrContext::endFastElement( sal_Int32 /*nElement*/ )
641 {
643 }
644 
646  sal_Int32 /*nElement*/,
648  ScXMLDPFilterContext* pTempFilterContext) :
649  ScXMLImportContext( rImport ),
650  pFilterContext(pTempFilterContext),
651  sDataType(GetXMLToken(XML_TEXT)),
652  nField(0),
653  bIsCaseSensitive(false)
654 {
655 
656  if ( !rAttrList.is() )
657  return;
658 
659  for (auto &aIter : *rAttrList)
660  {
661  switch (aIter.getToken())
662  {
664  {
665  nField = aIter.toInt32();
666  }
667  break;
669  {
671  }
672  break;
674  {
675  sDataType = aIter.toString();
676  }
677  break;
678  case XML_ELEMENT( TABLE, XML_VALUE ):
679  {
680  sConditionValue = aIter.toString();
681  }
682  break;
683  case XML_ELEMENT( TABLE, XML_OPERATOR ):
684  {
685  sOperator = aIter.toString();
686  }
687  break;
688  }
689  }
690 }
691 
693 {
694 }
695 
697  const OUString& sTempOperator, ScQueryOp& aFilterOperator, utl::SearchParam::SearchType& rSearchType)
698 {
700  if (IsXMLToken(sTempOperator, XML_MATCH))
701  {
703  aFilterOperator = SC_EQUAL;
704  }
705  else if (IsXMLToken(sTempOperator, XML_NOMATCH))
706  {
708  aFilterOperator = SC_NOT_EQUAL;
709  }
710  else if (sTempOperator == "=")
711  aFilterOperator = SC_EQUAL;
712  else if (sTempOperator == "!=")
713  aFilterOperator = SC_NOT_EQUAL;
714  else if (IsXMLToken(sTempOperator, XML_BOTTOM_PERCENT))
715  aFilterOperator = SC_BOTPERC;
716  else if (IsXMLToken(sTempOperator, XML_BOTTOM_VALUES))
717  aFilterOperator = SC_BOTVAL;
718  else if (sTempOperator == ">")
719  aFilterOperator = SC_GREATER;
720  else if (sTempOperator == ">=")
721  aFilterOperator = SC_GREATER_EQUAL;
722  else if (sTempOperator == "<")
723  aFilterOperator = SC_LESS;
724  else if (sTempOperator == "<=")
725  aFilterOperator = SC_LESS_EQUAL;
726  else if (IsXMLToken(sTempOperator, XML_TOP_PERCENT))
727  aFilterOperator = SC_TOPPERC;
728  else if (IsXMLToken(sTempOperator, XML_TOP_VALUES))
729  aFilterOperator = SC_TOPVAL;
730 }
731 
732 void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
733 {
734  ScQueryEntry aFilterField;
736  aFilterField.eConnect = SC_OR;
737  else
738  aFilterField.eConnect = SC_AND;
741  aFilterField.SetQueryByEmpty();
742  else if (IsXMLToken(sOperator, XML_NOEMPTY))
743  aFilterField.SetQueryByNonEmpty();
744  else
745  {
747  getOperatorXML(sOperator, aFilterField.eOp, eSearchType);
748  pFilterContext->SetSearchType(eSearchType);
749  aFilterField.nField = nField;
750  ScQueryEntry::Item& rItem = aFilterField.GetQueryItem();
752 
754  {
755  rItem.mfVal = sConditionValue.toDouble();
756  rItem.maString = rPool.intern(sConditionValue);
758  }
759  else
760  {
761  rItem.maString = rPool.intern(sConditionValue);
763  rItem.mfVal = 0.0;
764  }
765  }
766  pFilterContext->AddFilterField(aFilterField);
767 }
768 
769 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static bool GetRangeFromString(ScRange &rRange, const OUString &rRangeStr, const ScDocument *pDocument, formula::FormulaGrammar::AddressConvention eConv, sal_Int32 &nOffset, sal_Unicode cSeparator= ' ', sal_Unicode cQuote= '\'')
static void getOperatorXML(const OUString &sTempOperator, ScQueryOp &aFilterOperator, utl::SearchParam::SearchType &rSearchType)
Definition: xmlfilti.cxx:696
ScXMLAndContext(ScXMLImport &rImport, ScQueryParam &rParam, ScXMLFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:186
bool IsXMLToken(const OUString &rString, enum XMLTokenEnum eToken)
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: xmlfilti.cxx:200
void SetQueryByEmpty()
Definition: queryentry.cxx:74
void OpenConnection(bool b)
Definition: xmlfilti.cxx:144
virtual ~ScXMLDPOrContext() override
Definition: xmlfilti.cxx:612
ScAddress aStart
Definition: address.hxx:500
SharedString intern(const OUString &rStr)
ScXMLConditionContext(ScXMLImport &rImport, sal_Int32 nElement, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScQueryParam &rParam, ScXMLFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:275
SC_DLLPUBLIC svl::SharedStringPool & GetSharedStringPool()
Definition: documen2.cxx:563
ScXMLFilterContext * pFilterContext
Definition: xmlfilti.hxx:113
SCROW Row() const
Definition: address.hxx:262
XML_BOTTOM_PERCENT
ScXMLDPConditionContext(ScXMLImport &rImport, sal_Int32 nElement, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDPFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:645
void SetIsCaseSensitive(const bool bTemp)
Definition: xmlfilti.hxx:178
std::vector< ConnStackItem > maConnStack
Definition: xmlfilti.hxx:51
void SetSourceQueryParam(const ScQueryParam &aValue)
Definition: xmldpimp.hxx:132
XML_FIELD_NUMBER
ScDocument * GetDocument()
Definition: xmlimprt.hxx:296
ScXMLDPFilterContext * pFilterContext
Definition: xmlfilti.hxx:245
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: xmlfilti.cxx:96
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:270
QueryItemsType & GetQueryItems()
Definition: queryentry.hxx:65
XML_VALUE
virtual ~ScXMLOrContext() override
Definition: xmlfilti.cxx:240
SCCOLROW nField
Definition: queryentry.hxx:51
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: xmlfilti.cxx:244
ScXMLSetItemContext(ScXMLImport &rImport, sal_Int32 nElement, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLConditionContext &rParent)
Definition: xmlfilti.cxx:438
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
void CloseConnection()
Definition: xmlfilti.cxx:149
XML_EMPTY
ScQueryParam & mrQueryParam
Definition: xmlfilti.hxx:93
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:225
ScXMLOrContext(ScXMLImport &rImport, ScQueryParam &rParam, ScXMLFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:230
const Item & GetQueryItem() const
Definition: queryentry.cxx:118
XML_CONTAINS
ScQueryParam & mrQueryParam
Definition: xmlfilti.hxx:74
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:732
ScXMLDPOrContext(ScXMLImport &rImport, ScXMLDPFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:604
XML_FILTER_CONDITION
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:24
XML_FILTER_OR
bool bConditionSourceRange
Definition: xmlfilti.hxx:50
virtual ~ScXMLConditionContext() override
Definition: xmlfilti.cxx:324
ScXMLFilterContext * pFilterContext
Definition: xmlfilti.hxx:75
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
Definition: queryparam.cxx:124
XML_BEGINS_WITH
ScXMLDPAndContext(ScXMLImport &rImport, ScXMLDPFilterContext *pTempFilterContext)
Definition: xmlfilti.cxx:563
SCTAB Tab() const
Definition: address.hxx:271
ScXMLDPFilterContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScXMLDataPilotTableContext *pTempDataPilotTableContext)
Definition: xmlfilti.cxx:468
virtual ~ScXMLFilterContext() override
Definition: xmlfilti.cxx:92
ScRange aConditionSourceRangeAddress
Definition: xmlfilti.hxx:47
XML_NOEMPTY
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:545
OUString sConditionValue
Definition: xmlfilti.hxx:117
XML_CASE_SENSITIVE
This class exists only to provide GetScImport() to its derived classes.
XML_FILTER_AND
XML_DOES_NOT_CONTAIN
ScQueryParam aFilterFields
Definition: xmlfilti.hxx:156
std::enable_if< std::is_signed< T >::value, T >::type saturating_add(T a, T b)
virtual ~ScXMLDPFilterContext() override
Definition: xmlfilti.cxx:512
virtual ~ScXMLDPConditionContext() override
Definition: xmlfilti.cxx:692
void Resize(size_t nNew)
Definition: queryparam.cxx:204
XML_TOP_PERCENT
ScAddress aOutputPosition
Definition: xmlfilti.hxx:46
XML_CONDITION_SOURCE
XML_ENDS_WITH
ScXMLImport & GetScImport()
XML_FILTER_SET_ITEM
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: xmlfilti.cxx:575
virtual ~ScXMLSetItemContext() override
Definition: xmlfilti.cxx:464
utl::SearchParam::SearchType eSearchType
Definition: xmlfilti.hxx:157
XML_TEXT
XML_DOES_NOT_BEGIN_WITH
XML_TOP_VALUES
svl::SharedString maString
Definition: queryentry.hxx:41
void SetSearchType(const utl::SearchParam::SearchType eTemp)
Definition: xmlfilti.hxx:179
SCCOL Col() const
Definition: address.hxx:267
XML_DATA_TYPE
sal_uInt8 nFilterFieldCount
Definition: xmlfilti.hxx:158
XML_BOTTOM_VALUES
TABLE
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:405
void OpenConnection(const bool bVal)
Definition: xmlfilti.hxx:185
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:128
void AddFilterField(const ScQueryEntry &aFilterField)
Definition: xmlfilti.cxx:554
XML_OPERATOR
SC_DLLPUBLIC ScQueryEntry & AppendEntry()
Definition: queryparam.cxx:134
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: xmlfilti.cxx:328
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: xmlfilti.cxx:616
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
XML_NUMBER
XML_DOES_NOT_END_WITH
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:640
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
Definition: xmlfilti.cxx:599
ScXMLDatabaseRangeContext * pDatabaseRangeContext
Definition: xmlfilti.hxx:44
XML_NOMATCH
void SetFilterConditionSourceRangeAddress(const ScRange &aRange)
Definition: xmldrani.hxx:116
#define XML_ELEMENT(prefix, name)
ScXMLDPFilterContext * pFilterContext
Definition: xmlfilti.hxx:229
ScXMLDataPilotTableContext * pDataPilotTable
Definition: xmlfilti.hxx:154
XML_TARGET_RANGE_ADDRESS
ScQueryConnect eConnect
Definition: queryentry.hxx:53
void AddSetItem(const ScQueryEntry::Item &rItem)
Definition: xmlfilti.cxx:400
static void GetOperator(const OUString &aOpStr, ScQueryParam &rParam, ScQueryEntry &rEntry)
Definition: xmlfilti.cxx:348
ScQueryOp
Definition: global.hxx:821
ScXMLFilterContext * pFilterContext
Definition: xmlfilti.hxx:94
XML_TRUE
XML_CONDITION_SOURCE_RANGE_ADDRESS
ScQueryParam & mrQueryParam
Definition: xmlfilti.hxx:43
virtual ~ScXMLAndContext() override
Definition: xmlfilti.cxx:196
XML_MATCH
ScXMLFilterContext(ScXMLImport &rImport, const rtl::Reference< sax_fastparser::FastAttributeList > &rAttrList, ScQueryParam &rParam, ScXMLDatabaseRangeContext *pTempDatabaseRangeContext)
Definition: xmlfilti.cxx:40
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: xmlfilti.cxx:516
ScQueryOp eOp
Definition: queryentry.hxx:52
ScQueryEntry::QueryItemsType maQueryItems
Definition: xmlfilti.hxx:115
ScXMLDPFilterContext * pFilterContext
Definition: xmlfilti.hxx:213
Each instance of this struct represents a single filtering criteria.
Definition: queryentry.hxx:33
void SetQueryByNonEmpty()
Definition: queryentry.cxx:96
utl::SearchParam::SearchType eSearchType
Definition: queryparam.hxx:44
XML_DISPLAY_DUPLICATES
ScQueryParam & mrQueryParam
Definition: xmlfilti.hxx:112
virtual ~ScXMLDPAndContext() override
Definition: xmlfilti.cxx:571