LibreOffice Module sc (master)  1
conditio.hxx
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 #ifndef INCLUDED_SC_INC_CONDITIO_HXX
21 #define INCLUDED_SC_INC_CONDITIO_HXX
22 
23 #include "global.hxx"
24 #include <tools/solar.h>
25 #include <tools/color.hxx>
26 #include "address.hxx"
27 #include <formula/grammar.hxx>
28 #include "scdllapi.h"
29 #include "rangelst.hxx"
30 #include "tokenarray.hxx"
31 
32 #include <svl/listener.hxx>
33 
34 #include <com/sun/star/sheet/ConditionOperator.hpp>
35 
36 #include <rtl/math.hxx>
37 #include <tools/date.hxx>
38 #include <tools/link.hxx>
39 
40 #include <optional>
41 #include <map>
42 #include <memory>
43 #include <set>
44 
45 class ScFormulaCell;
46 class ScTokenArray;
47 struct ScRefCellValue;
48 
49 namespace sc {
50 
51 struct RefUpdateContext;
52 struct RefUpdateInsertTabContext;
53 struct RefUpdateDeleteTabContext;
54 struct RefUpdateMoveTabContext;
55 
56 }
57 
58 // nOptions Flags
59 #define SC_COND_NOBLANKS 1
60 
61 enum class ScConditionMode
62 {
63  Equal,
64  Less,
65  Greater,
66  EqLess,
67  EqGreater,
68  NotEqual,
69  Between,
70  NotBetween,
71  Duplicate,
73  Direct,
74  Top10,
75  Bottom10,
76  TopPercent,
82  Error,
83  NoError,
84  BeginsWith,
85  EndsWith,
88  NONE
89 };
90 
91 // For use in SAL_DEBUG etc. Output format not guaranteed to be stable.
92 template<typename charT, typename traits>
93 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScConditionMode& rMode)
94 {
95  switch (rMode)
96  {
98  stream << "EQUAL";
99  break;
101  stream << "LESS";
102  break;
104  stream << "GREATER";
105  break;
107  stream << "EQLESS";
108  break;
110  stream << "EQGREATER";
111  break;
113  stream << "NOTEQUAL";
114  break;
116  stream << "BETWEEN";
117  break;
119  stream << "NOTBETWEEN";
120  break;
122  stream << "DUPLICATE";
123  break;
125  stream << "NOTDUPLICATE";
126  break;
128  stream << "DIRECT";
129  break;
131  stream << "TOP10";
132  break;
134  stream << "BOTTOM10";
135  break;
137  stream << "TOPPERCENT";
138  break;
140  stream << "BOTTOMPERCENT";
141  break;
143  stream << "ABOVEAVERAGE";
144  break;
146  stream << "BELOWAVERAGE";
147  break;
149  stream << "ABOVEEQUALAVERAGE";
150  break;
152  stream << "BELOWEQUALAVERAGE";
153  break;
155  stream << "ERROR";
156  break;
158  stream << "NOERROR";
159  break;
161  stream << "BEGINSWITH";
162  break;
164  stream << "ENDSWITH";
165  break;
167  stream << "CONTAINSTEXT";
168  break;
170  stream << "NOTCONTAINSTEXT";
171  break;
173  stream << "NONE";
174  break;
175  default:
176  stream << "?(" << static_cast<int>(rMode) << ")";
177  break;
178  }
179 
180  return stream;
181 }
182 
183 class ScFormulaListener final : public SvtListener
184 {
185 private:
186  mutable bool mbDirty;
188  std::function<void()> maCallbackFunction;
189 
190  void startListening(const ScTokenArray* pTokens, const ScRange& rPos);
191  void startListening(const ScRangeList& rPos);
192 
193 public:
194  explicit ScFormulaListener(ScFormulaCell* pCell);
195  explicit ScFormulaListener(ScDocument* pDoc);
196  explicit ScFormulaListener(ScDocument* pDoc, const ScRangeList& rRange);
197  virtual ~ScFormulaListener() override;
198 
199  void Notify( const SfxHint& rHint ) override;
200 
201  bool NeedsRepaint() const;
202 
203  void addTokenArray(const ScTokenArray* pTokens, const ScRange& rRange);
204  void stopListening();
205  void setCallback(const std::function<void()>& aCallbackFunction);
206 
207 };
208 
209 class ScConditionalFormat;
210 struct ScDataBarInfo;
211 struct ScIconSetInfo;
212 
214 {
218 
219  std::optional<Color> mxColorScale;
220  std::unique_ptr<ScDataBarInfo> pDataBar;
221  std::unique_ptr<ScIconSetInfo> pIconSet;
222  OUString aStyleName;
223 };
224 
226 {
227 public:
228  ScFormatEntry(ScDocument* pDoc);
229  virtual ~ScFormatEntry() {}
230 
231  enum class Type
232  {
233  Condition,
234  ExtCondition,
235  Colorscale,
236  Databar,
237  Iconset,
238  Date
239  };
240 
241  virtual Type GetType() const = 0;
242  virtual void UpdateReference( sc::RefUpdateContext& rCxt ) = 0;
243  virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ) = 0;
244  virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) = 0;
245  virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) = 0;
246 
247  virtual ScFormatEntry* Clone( ScDocument* pDoc ) const = 0;
248 
249  virtual void SetParent( ScConditionalFormat* pNew ) = 0;
250 
251  bool operator==( const ScFormatEntry& ) const;
252  virtual bool IsEqual( const ScFormatEntry&, bool bIgnoreSrcPos ) const;
253 
254  virtual void startRendering();
255  virtual void endRendering();
256 protected:
258 
259 };
260 
261 template<typename charT, typename traits>
262 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScFormatEntry::Type& rType)
263 {
264  switch (rType)
265  {
267  stream << "Condition";
268  break;
270  stream << "ExtCondition";
271  break;
273  stream << "Colorscale";
274  break;
276  stream << "Databar";
277  break;
279  stream << "Iconset";
280  break;
282  stream << "Date";
283  break;
284  default:
285  stream << "?(" << static_cast<int>(rType) << ")";
286  break;
287  }
288  return stream;
289 }
290 
292 {
293 public:
294  bool operator() (double nVal1, double nVal2) const
295  {
296  if(nVal1 < nVal2 && !rtl::math::approxEqual(nVal1, nVal2))
297  return true;
298 
299  return false;
300  }
301 };
302 
304 {
305  // stored data:
307  sal_uInt16 nOptions;
308  double nVal1; // input or calculated
309  double nVal2;
310  OUString aStrVal1; // input or calculated
311  OUString aStrVal2;
312  const OUString aStrNmsp1; // namespace to be used on (re)compilation, e.g. in XML import
313  const OUString aStrNmsp2; // namespace to be used on (re)compilation, e.g. in XML import
314  const formula::FormulaGrammar::Grammar eTempGrammar1; // grammar to be used on (re)compilation, e.g. in XML import
315  const formula::FormulaGrammar::Grammar eTempGrammar2; // grammar to be used on (re)compilation, e.g. in XML import
316  bool bIsStr1; // for recognition of empty strings
317  bool bIsStr2;
318  std::unique_ptr<ScTokenArray> pFormula1; // entered formula
319  std::unique_ptr<ScTokenArray> pFormula2;
320  ScAddress aSrcPos; // source position for formulas
321  // temporary data:
322  OUString aSrcString; // formula source position as text during XML import
323  std::unique_ptr<ScFormulaCell> pFCell1;
324  std::unique_ptr<ScFormulaCell> pFCell2;
325  bool bRelRef1;
326  bool bRelRef2;
327  bool bFirstRun;
328  std::unique_ptr<ScFormulaListener> mpListener;
329  Type eConditionType; //It can be Condition or ExtCondition
330 
331  static void SimplifyCompiledFormula( std::unique_ptr<ScTokenArray>& rFormula,
332  double& rVal,
333  bool& rIsStr,
334  OUString& rStrVal );
335 
336  void MakeCells( const ScAddress& rPos );
337  void Compile( const OUString& rExpr1, const OUString& rExpr2,
338  const OUString& rExprNmsp1, const OUString& rExprNmsp2,
341  bool bTextToReal );
342  void Interpret( const ScAddress& rPos );
343 
344  bool IsValid( double nArg, const ScAddress& rPos ) const;
345  bool IsValidStr( const OUString& rArg, const ScAddress& rPos ) const;
346  void StartListening();
347 
348 public:
350  const OUString& rExpr1, const OUString& rExpr2,
351  ScDocument* pDocument, const ScAddress& rPos,
352  const OUString& rExprNmsp1, const OUString& rExprNmsp2,
355  Type eType = Type::Condition );
357  const ScTokenArray* pArr1, const ScTokenArray* pArr2,
358  ScDocument* pDocument, const ScAddress& rPos );
359  ScConditionEntry( const ScConditionEntry& r ); // flat copy of formulas
360  // true copy of formulas (for Ref-Undo):
361  ScConditionEntry( ScDocument* pDocument, const ScConditionEntry& r );
362  virtual ~ScConditionEntry() override;
363 
364  bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
365 
366  virtual void SetParent( ScConditionalFormat* pNew ) override;
367 
368  bool IsCellValid( ScRefCellValue& rCell, const ScAddress& rPos ) const;
369 
370  ScConditionMode GetOperation() const { return eOp; }
371  void SetOperation(ScConditionMode eMode);
372  bool IsIgnoreBlank() const { return ( nOptions & SC_COND_NOBLANKS ) == 0; }
373  void SetIgnoreBlank(bool bSet);
374  const OUString& GetSrcString() const { return aSrcString; }
375  const ScAddress& GetSrcPos() const { return aSrcPos; }
376 
377  ScAddress GetValidSrcPos() const; // adjusted to allow textual representation of expressions
378 
379  void SetSrcString( const OUString& rNew ); // for XML import
380 
381  void SetFormula1( const ScTokenArray& rArray );
382  void SetFormula2( const ScTokenArray& rArray );
383 
384  OUString GetExpression( const ScAddress& rCursor, sal_uInt16 nPos, sal_uInt32 nNumFmt = 0,
386 
389  std::unique_ptr<ScTokenArray> CreateFlatCopiedTokenArray( sal_uInt16 nPos ) const;
390 
391  void CompileAll();
392  void CompileXML();
393  virtual void UpdateReference( sc::RefUpdateContext& rCxt ) override;
394  virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ) override;
395  virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) override;
396  virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) override;
397 
398  bool MarkUsedExternalReferences() const;
399 
400  virtual Type GetType() const override { return eConditionType; }
401 
402  virtual ScFormatEntry* Clone(ScDocument* pDoc) const override;
403 
404  static ScConditionMode GetModeFromApi(css::sheet::ConditionOperator nOperator);
405 
406  virtual void endRendering() override;
407  virtual void startRendering() override;
408 
409  bool NeedsRepaint() const;
410  void CalcAll();
411 
412 protected:
413  virtual void DataChanged() const;
414  ScDocument* GetDocument() const { return mpDoc; }
416 
417 private:
418 
419  bool IsDuplicate(double nArg, const OUString& rStr) const;
420  bool IsTopNElement( double nArg ) const;
421  bool IsTopNPercent( double nArg ) const;
422  bool IsBottomNElement( double nArg ) const;
423  bool IsBottomNPercent( double nArg ) const;
424  bool IsAboveAverage( double nArg, bool bEqual ) const;
425  bool IsBelowAverage( double nArg, bool bEqual ) const;
426 
427  bool IsError( const ScAddress& rPos ) const;
428 
429  void FillCache() const;
430 
432  {
433  typedef std::map<OUString, sal_Int32> StringCacheType;
434  StringCacheType maStrings;
435  typedef std::map<double, sal_Int32, approx_less> ValueCacheType;
436  ValueCacheType maValues;
437 
438  // cache them for easier access
439  size_t nValueItems;
440 
442  nValueItems(0) {}
443  };
444 
445  mutable std::unique_ptr<ScConditionEntryCache> mpCache;
446 };
447 
448 // single condition entry for conditional formatting
450 {
451  OUString aStyleName;
452  Type eCondFormatType = Type::Condition;
453 
454 public:
456  const OUString& rExpr1, const OUString& rExpr2,
457  ScDocument* pDocument, const ScAddress& rPos,
458  const OUString& rStyle,
459  const OUString& rExprNmsp1 = EMPTY_OUSTRING,
460  const OUString& rExprNmsp2 = EMPTY_OUSTRING,
463  Type eType = Type::Condition);
465  const ScTokenArray* pArr1, const ScTokenArray* pArr2,
466  ScDocument* pDocument, const ScAddress& rPos,
467  const OUString& rStyle );
469  ScCondFormatEntry( ScDocument* pDocument, const ScCondFormatEntry& r );
470  virtual ~ScCondFormatEntry() override;
471 
472  bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
473 
474  const OUString& GetStyle() const { return aStyleName; }
475  void UpdateStyleName(const OUString& rNew) { aStyleName=rNew; }
476  virtual ScFormatEntry* Clone(ScDocument* pDoc) const override;
477  virtual Type GetType() const override { return eCondFormatType; }
478 
479 private:
480  virtual void DataChanged() const override;
481 };
482 
483 namespace condformat {
484 
486 {
500 };
501 
502 }
503 
505 {
506 public:
509 
510  bool IsValid( const ScAddress& rPos ) const;
511 
512  void SetDateType(condformat::ScCondFormatDateType eType);
514 
515  const OUString& GetStyleName() const { return maStyleName;}
516  void SetStyleName( const OUString& rStyleName );
517 
518  virtual Type GetType() const override { return Type::Date; }
519  virtual void UpdateReference( sc::RefUpdateContext& ) override {}
520  virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& ) override {}
521  virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& ) override {}
522  virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& ) override {}
523 
524  virtual ScFormatEntry* Clone( ScDocument* pDoc ) const override;
525 
526  virtual void SetParent( ScConditionalFormat* ) override {}
527 
528  virtual void startRendering() override;
529  virtual void endRendering() override;
530 
531 private:
533 
534  mutable std::unique_ptr<Date> mpCache;
535 
536  OUString maStyleName;
537 };
538 
539 // complete conditional formatting
541 {
543  sal_uInt32 nKey; // Index in attributes
544 
545  std::vector<std::unique_ptr<ScFormatEntry>> maEntries;
546  ScRangeList maRanges; // Ranges for conditional format
547 
548 public:
549  ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
551  ScConditionalFormat(const ScConditionalFormat&) = delete;
552  const ScConditionalFormat& operator=(const ScConditionalFormat&) = delete;
553 
554  // true copy of formulas (for Ref-Undo / between documents)
555  std::unique_ptr<ScConditionalFormat> Clone(ScDocument* pNewDoc = nullptr) const;
556 
557  void AddEntry( ScFormatEntry* pNew );
558  void RemoveEntry(size_t nIndex);
559  void SetRange( const ScRangeList& rRanges );
560  const ScRangeList& GetRange() const { return maRanges; }
561  // don't use the same name as for the const version
562  ScRangeList& GetRangeList() { return maRanges; }
563 
564  bool IsEmpty() const;
565  size_t size() const;
566 
567  ScDocument* GetDocument();
568 
569  void CompileAll();
570  void CompileXML();
571  void UpdateReference( sc::RefUpdateContext& rCxt, bool bCopyAsMove = false );
572  void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
573  void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
574  void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt );
575 
576  void InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCSIZE nSize);
577  void InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColStart, SCSIZE nSize);
578 
579  void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
580  void RenameCellStyle( const OUString& rOld, const OUString& rNew );
581 
582  const ScFormatEntry* GetEntry( sal_uInt16 nPos ) const;
583 
584  const OUString& GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const;
585 
586  ScCondFormatData GetData( ScRefCellValue& rCell, const ScAddress& rPos ) const;
587 
588  bool EqualEntries( const ScConditionalFormat& r, bool bIgnoreSrcPos = false ) const;
589 
590  void DoRepaint();
591 
592  sal_uInt32 GetKey() const { return nKey; }
593  void SetKey(sal_uInt32 nNew) { nKey = nNew; } // only if not inserted!
594 
595  bool MarkUsedExternalReferences() const;
596 
597  // sorted (via std::set) by Index
598  bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; }
599 
600  void startRendering();
601  void endRendering();
602 
603  // Forced recalculation for formulas
604  void CalcAll();
605 };
606 
608 {
610  bool operator()(std::unique_ptr<ScConditionalFormat> const& lhs,
611  std::unique_ptr<ScConditionalFormat> const& rhs) const
612  {
613  return (*lhs) < (*rhs);
614  }
615  bool operator()(sal_uInt32 nKey, std::unique_ptr<ScConditionalFormat> const& rpFormat) const
616  {
617  return nKey < rpFormat->GetKey();
618  }
619  bool operator()(std::unique_ptr<ScConditionalFormat> const& rpFormat, sal_uInt32 nKey) const
620  {
621  return rpFormat->GetKey() < nKey;
622  }
623 };
624 
625 // List of all conditional formats in a sheet
627 {
628 private:
629  typedef std::set<std::unique_ptr<ScConditionalFormat>,
631  ConditionalFormatContainer m_ConditionalFormats;
632 
633  void operator =(ScConditionalFormatList const &) = delete;
634 
635 public:
639 
640  void InsertNew( std::unique_ptr<ScConditionalFormat> pNew );
641 
648  bool CheckAllEntries(const Link<ScConditionalFormat*,void>& rLink = Link<ScConditionalFormat*,void>());
649 
650  ScConditionalFormat* GetFormat( sal_uInt32 nKey );
651  const ScConditionalFormat* GetFormat( sal_uInt32 nKey ) const;
652 
653  void CompileAll();
654  void CompileXML();
655  void UpdateReference( sc::RefUpdateContext& rCxt );
656  void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
657  void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
658  void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt );
659 
660  void InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCSIZE nSize);
661  void InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColStart, SCSIZE nSize);
662 
663  void RenameCellStyle( const OUString& rOld, const OUString& rNew );
664  void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
665 
666  typedef ConditionalFormatContainer::iterator iterator;
667  typedef ConditionalFormatContainer::const_iterator const_iterator;
668 
669  ScRangeList GetCombinedRange() const;
670 
671  void RemoveFromDocument(ScDocument* pDoc) const;
672  void AddToDocument(ScDocument* pDoc) const;
673 
674  iterator begin();
675  const_iterator begin() const;
676  iterator end();
677  const_iterator end() const;
678 
679  size_t size() const;
680  bool empty() const;
681 
682  void erase(sal_uLong nIndex);
683  void clear();
684 
685  void startRendering();
686  void endRendering();
687 
688  sal_uInt32 getMaxKey() const;
689 
691  void CalcAll();
692 };
693 
694 #endif
695 
696 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
If set, cloned formula cells will start to listen to the document.
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:517
Type
bool operator()(sal_uInt32 nKey, std::unique_ptr< ScConditionalFormat > const &rpFormat) const
Definition: conditio.hxx:615
virtual Type GetType() const override
Definition: conditio.hxx:477
#define EMPTY_OUSTRING
Definition: global.hxx:214
ScFormulaListener(ScFormulaCell *pCell)
Definition: colorscale.cxx:26
std::unique_ptr< ScTokenArray > pFormula2
Definition: conditio.hxx:319
OUString aStrVal1
Definition: conditio.hxx:310
std::unique_ptr< ScConditionEntryCache > mpCache
Definition: conditio.hxx:445
ScRangeList & GetRangeList()
Definition: conditio.hxx:562
virtual void UpdateReference(sc::RefUpdateContext &) override
Definition: conditio.hxx:519
sal_uIntPtr sal_uLong
Context for reference update during shifting, moving or copying of cell ranges.
ScRangeList maRanges
Definition: conditio.hxx:546
const OUString & GetStyle() const
Definition: conditio.hxx:474
std::optional< Color > mxColorScale
Definition: conditio.hxx:219
condformat::ScCondFormatDateType GetDateType() const
Definition: conditio.hxx:513
virtual void UpdateMoveTab(sc::RefUpdateMoveTabContext &rCxt)=0
virtual void DataChanged() const
Definition: conditio.cxx:1374
std::set< std::unique_ptr< ScConditionalFormat >, CompareScConditionalFormat > ConditionalFormatContainer
Definition: conditio.hxx:630
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:104
ScCondFormatDateType
Definition: conditio.hxx:485
bool NeedsRepaint() const
Definition: colorscale.cxx:145
std::map< OUString, sal_Int32 > StringCacheType
Definition: conditio.hxx:433
bool operator()(double nVal1, double nVal2) const
Definition: conditio.hxx:294
std::function< void()> maCallbackFunction
Definition: conditio.hxx:188
ScConditionMode GetOperation() const
Definition: conditio.hxx:370
bool operator()(std::unique_ptr< ScConditionalFormat > const &rpFormat, sal_uInt32 nKey) const
Definition: conditio.hxx:619
bool operator()(std::unique_ptr< ScConditionalFormat > const &lhs, std::unique_ptr< ScConditionalFormat > const &rhs) const
Definition: conditio.hxx:610
virtual void endRendering()
Definition: conditio.cxx:72
std::vector< std::unique_ptr< ScFormatEntry > > maEntries
Definition: conditio.hxx:545
const ScRangeList & GetRange() const
Definition: conditio.hxx:560
virtual void UpdateInsertTab(sc::RefUpdateInsertTabContext &) override
Definition: conditio.hxx:520
ScConditionMode eOp
Definition: conditio.hxx:306
virtual void UpdateInsertTab(sc::RefUpdateInsertTabContext &rCxt)=0
void setCallback(const std::function< void()> &aCallbackFunction)
Definition: colorscale.cxx:116
enumrange< T >::Iterator begin(enumrange< T >)
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:45
OUString aSrcString
Definition: conditio.hxx:322
const OUString aStrNmsp1
Definition: conditio.hxx:312
const OUString & GetSrcString() const
Definition: conditio.hxx:374
ScAddress aSrcPos
Definition: conditio.hxx:320
ConditionalFormatContainer::const_iterator const_iterator
Definition: conditio.hxx:667
ScDocument * mpDoc
Definition: conditio.hxx:187
ScConditionMode
Definition: conditio.hxx:61
OUString aStyleName
Definition: conditio.hxx:451
void Notify(const SfxHint &rHint) override
Definition: colorscale.cxx:134
ConditionalFormatContainer m_ConditionalFormats
Definition: conditio.hxx:631
virtual void SetParent(ScConditionalFormat *pNew)=0
DocumentType eType
std::unique_ptr< ScFormulaListener > mpListener
Definition: conditio.hxx:328
sal_uInt32 GetKey() const
Definition: conditio.hxx:592
virtual void UpdateReference(sc::RefUpdateContext &rCxt)=0
std::unique_ptr< ScFormulaCell > pFCell1
Definition: conditio.hxx:323
virtual bool IsEqual(const ScFormatEntry &, bool bIgnoreSrcPos) const
Definition: conditio.cxx:61
Reference< XAnimationNode > Clone(const Reference< XAnimationNode > &xSourceNode, const SdPage *pSource, const SdPage *pTarget)
std::unique_ptr< ScIconSetInfo > pIconSet
Definition: conditio.hxx:221
void addTokenArray(const ScTokenArray *pTokens, const ScRange &rRange)
Definition: colorscale.cxx:111
virtual void UpdateMoveTab(sc::RefUpdateMoveTabContext &) override
Definition: conditio.hxx:522
sal_Int16 SCCOL
Definition: types.hxx:22
condformat::ScCondFormatDateType meType
Definition: conditio.hxx:532
virtual Type GetType() const override
Definition: conditio.hxx:400
bool IsEqual(const ScFormatEntry &r, bool bIgnoreSrcPos) const override
Definition: conditio.cxx:611
ConditionalFormatContainer::iterator iterator
Definition: conditio.hxx:666
virtual ~ScFormatEntry()
Definition: conditio.hxx:229
size
virtual ScFormatEntry * Clone(ScDocument *pDoc) const =0
const OUString aStrNmsp2
Definition: conditio.hxx:313
void UpdateStyleName(const OUString &rNew)
Definition: conditio.hxx:475
const ScAddress & GetSrcPos() const
Definition: conditio.hxx:375
ScDocument * pDoc
Definition: conditio.hxx:542
enumrange< T >::Iterator end(enumrange< T >)
Reference< XOutputStream > stream
virtual ScFormatEntry * Clone(ScDocument *pDoc) const override
Definition: conditio.cxx:1391
sal_Int32 SCROW
Definition: types.hxx:18
bool operator<(const ScDPCollection::DBType &left, const ScDPCollection::DBType &right)
Definition: dpobject.cxx:3929
std::unique_ptr< Date > mpCache
Definition: conditio.hxx:534
virtual void SetParent(ScConditionalFormat *) override
Definition: conditio.hxx:526
std::unique_ptr< ScTokenArray > pFormula1
Definition: conditio.hxx:318
const OUString & GetStyleName() const
Definition: conditio.hxx:515
std::unique_ptr< ScDataBarInfo > pDataBar
Definition: conditio.hxx:220
const formula::FormulaGrammar::Grammar eTempGrammar2
Definition: conditio.hxx:315
virtual void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &rCxt)=0
sal_uInt16 nOptions
Definition: conditio.hxx:307
virtual void startRendering()
Definition: conditio.cxx:68
ScDocument * mpDoc
Definition: conditio.hxx:257
ScDocument * GetDocument() const
Definition: conditio.hxx:414
ScConditionalFormat * pCondFormat
Definition: conditio.hxx:415
bool IsIgnoreBlank() const
Definition: conditio.hxx:372
virtual ~ScFormulaListener() override
Definition: colorscale.cxx:129
virtual Type GetType() const override
Definition: conditio.hxx:518
std::map< double, sal_Int32, approx_less > ValueCacheType
Definition: conditio.hxx:435
void SetKey(sal_uInt32 nNew)
Definition: conditio.hxx:593
OUString aStyleName
Definition: conditio.hxx:222
RedlineType meType
#define SC_DLLPUBLIC
Definition: scdllapi.h:28
OUString aStrVal2
Definition: conditio.hxx:311
const formula::FormulaGrammar::Grammar eTempGrammar1
Definition: conditio.hxx:314
#define SC_COND_NOBLANKS
Definition: conditio.hxx:59
sal_Int16 SCTAB
Definition: types.hxx:23
std::unique_ptr< ScFormulaCell > pFCell2
Definition: conditio.hxx:324
void startListening(const ScTokenArray *pTokens, const ScRange &rPos)
Definition: colorscale.cxx:46
virtual void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &) override
Definition: conditio.hxx:521
typedef void(CALLTYPE *GetFuncDataPtr)(sal_uInt16 &nNo