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