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 <tools/solar.h>
23#include <tools/color.hxx>
24#include "address.hxx"
25#include <formula/grammar.hxx>
26#include "scdllapi.h"
27#include "rangelst.hxx"
28#include "tokenarray.hxx"
29
30#include <svl/listener.hxx>
31
32#include <com/sun/star/sheet/ConditionOperator.hpp>
33
34#include <rtl/math.hxx>
35#include <tools/date.hxx>
36#include <tools/link.hxx>
37
38#include <optional>
39#include <map>
40#include <memory>
41#include <set>
42
43class ScFormulaCell;
44class ScTokenArray;
45struct ScRefCellValue;
46
47namespace sc {
48
49struct RefUpdateContext;
50struct RefUpdateInsertTabContext;
51struct RefUpdateDeleteTabContext;
52struct RefUpdateMoveTabContext;
53
54}
55
56// nOptions Flags
57#define SC_COND_NOBLANKS 1
58
60{
61 Equal,
62 Less,
63 Greater,
64 EqLess,
67 Between,
71 Direct,
72 Top10,
80 Error,
81 NoError,
86 NONE
87};
88
89// For use in SAL_DEBUG etc. Output format not guaranteed to be stable.
90template<typename charT, typename traits>
91inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScConditionMode& rMode)
92{
93 switch (rMode)
94 {
96 stream << "EQUAL";
97 break;
99 stream << "LESS";
100 break;
102 stream << "GREATER";
103 break;
105 stream << "EQLESS";
106 break;
108 stream << "EQGREATER";
109 break;
111 stream << "NOTEQUAL";
112 break;
114 stream << "BETWEEN";
115 break;
117 stream << "NOTBETWEEN";
118 break;
120 stream << "DUPLICATE";
121 break;
123 stream << "NOTDUPLICATE";
124 break;
126 stream << "DIRECT";
127 break;
129 stream << "TOP10";
130 break;
132 stream << "BOTTOM10";
133 break;
135 stream << "TOPPERCENT";
136 break;
138 stream << "BOTTOMPERCENT";
139 break;
141 stream << "ABOVEAVERAGE";
142 break;
144 stream << "BELOWAVERAGE";
145 break;
147 stream << "ABOVEEQUALAVERAGE";
148 break;
150 stream << "BELOWEQUALAVERAGE";
151 break;
153 stream << "ERROR";
154 break;
156 stream << "NOERROR";
157 break;
159 stream << "BEGINSWITH";
160 break;
162 stream << "ENDSWITH";
163 break;
165 stream << "CONTAINSTEXT";
166 break;
168 stream << "NOTCONTAINSTEXT";
169 break;
171 stream << "NONE";
172 break;
173 default:
174 stream << "?(" << static_cast<int>(rMode) << ")";
175 break;
176 }
177
178 return stream;
179}
180
181class ScFormulaListener final : public SvtListener
182{
183private:
184 mutable bool mbDirty;
186 std::function<void()> maCallbackFunction;
187
188 void startListening(const ScTokenArray* pTokens, const ScRange& rPos);
189 void startListening(const ScRangeList& rPos);
190
191public:
192 explicit ScFormulaListener(ScFormulaCell* pCell);
193 explicit ScFormulaListener(ScDocument& rDoc);
194 explicit ScFormulaListener(ScDocument& rDoc, const ScRangeList& rRange);
195 virtual ~ScFormulaListener() override;
196
197 void Notify( const SfxHint& rHint ) override;
198
199 bool NeedsRepaint() const;
200
201 void addTokenArray(const ScTokenArray* pTokens, const ScRange& rRange);
202 void stopListening();
203 void setCallback(const std::function<void()>& aCallbackFunction);
204
205};
206
208struct ScDataBarInfo;
209struct ScIconSetInfo;
210
212{
216
217 std::optional<Color> mxColorScale;
218 std::unique_ptr<ScDataBarInfo> pDataBar;
219 std::unique_ptr<ScIconSetInfo> pIconSet;
220 OUString aStyleName;
221};
222
224{
225public:
227 virtual ~ScFormatEntry() {}
228
229 enum class Type
230 {
231 Condition,
232 ExtCondition,
233 Colorscale,
234 Databar,
235 Iconset,
236 Date
237 };
238
239 virtual Type GetType() const = 0;
240 virtual void UpdateReference( sc::RefUpdateContext& rCxt ) = 0;
244
245 virtual ScFormatEntry* Clone( ScDocument* pDoc ) const = 0;
246
247 virtual void SetParent( ScConditionalFormat* pNew ) = 0;
248
249 bool operator==( const ScFormatEntry& ) const;
250 virtual bool IsEqual( const ScFormatEntry&, bool bIgnoreSrcPos ) const;
251
252 virtual void startRendering();
253 virtual void endRendering();
254 virtual void updateValues();
255protected:
257
258};
259
260template<typename charT, typename traits>
261inline 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{
292public:
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
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;
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
347public:
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
411protected:
412 virtual void DataChanged() const;
413 ScDocument* GetDocument() const { return mpDoc; }
415
416private:
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;
434 typedef std::map<double, sal_Int32, approx_less> ValueCacheType;
436
437 // cache them for easier access
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
453public:
455 const OUString& rExpr1, const OUString& rExpr2,
456 ScDocument& rDocument, const ScAddress& rPos,
457 OUString aStyle,
458 const OUString& rExprNmsp1 = OUString(),
459 const OUString& rExprNmsp2 = OUString(),
462 Type eType = Type::Condition);
464 const ScTokenArray* pArr1, const ScTokenArray* pArr2,
465 ScDocument& rDocument, const ScAddress& rPos,
466 OUString aStyle );
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
478private:
479 virtual void DataChanged() const override;
480};
481
482namespace condformat {
483
485{
500
501}
502
504{
505public:
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 {}
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
530private:
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
547public:
548 ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
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 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 void updateValues();
603
604 // Forced recalculation for formulas
605 void CalcAll();
606};
607
609{
610 using is_transparent = void;
611 bool operator()(std::unique_ptr<ScConditionalFormat> const& lhs,
612 std::unique_ptr<ScConditionalFormat> const& rhs) const
613 {
614 return (*lhs) < (*rhs);
615 }
616 bool operator()(sal_uInt32 nKey, std::unique_ptr<ScConditionalFormat> const& rpFormat) const
617 {
618 return nKey < rpFormat->GetKey();
619 }
620 bool operator()(std::unique_ptr<ScConditionalFormat> const& rpFormat, sal_uInt32 nKey) const
621 {
622 return rpFormat->GetKey() < nKey;
623 }
624};
625
626// List of all conditional formats in a sheet
628{
629private:
630 typedef std::set<std::unique_ptr<ScConditionalFormat>,
633
634 void operator =(ScConditionalFormatList const &) = delete;
635
636public:
640
641 void InsertNew( std::unique_ptr<ScConditionalFormat> pNew );
642
649 bool CheckAllEntries(const Link<ScConditionalFormat*,void>& rLink = Link<ScConditionalFormat*,void>());
650
651 ScConditionalFormat* GetFormat( sal_uInt32 nKey );
652 const ScConditionalFormat* GetFormat( sal_uInt32 nKey ) const;
653
654 void CompileAll();
655 void CompileXML();
656 void UpdateReference( sc::RefUpdateContext& rCxt );
657 void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
658 void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
659 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt );
660
661 void InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCSIZE nSize);
662 void InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColStart, SCSIZE nSize);
663
664 void RenameCellStyle( std::u16string_view rOld, const OUString& rNew );
665 void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
666
667 typedef ConditionalFormatContainer::iterator iterator;
668 typedef ConditionalFormatContainer::const_iterator const_iterator;
669
670 ScRangeList GetCombinedRange() const;
671
672 void RemoveFromDocument(ScDocument& rDoc) const;
673 void AddToDocument(ScDocument& rDoc) const;
674
675 iterator begin();
676 const_iterator begin() const;
677 iterator end();
678 const_iterator end() const;
679
680 size_t size() const;
681 bool empty() const;
682
683 void erase(sal_uLong nIndex);
684 void clear();
685
686 void startRendering();
687 void endRendering();
688
689 void updateValues();
690
691 sal_uInt32 getMaxKey() const;
692
694 void CalcAll();
695};
696
697/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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
std::unique_ptr< Date > mpCache
Definition: conditio.hxx:533
condformat::ScCondFormatDateType GetDateType() const
Definition: conditio.hxx:512
virtual Type GetType() const override
Definition: conditio.hxx:517
virtual void UpdateInsertTab(sc::RefUpdateInsertTabContext &) override
Definition: conditio.hxx:519
virtual void SetParent(ScConditionalFormat *) override
Definition: conditio.hxx:525
condformat::ScCondFormatDateType meType
Definition: conditio.hxx:531
virtual void UpdateReference(sc::RefUpdateContext &) override
Definition: conditio.hxx:518
virtual void UpdateMoveTab(sc::RefUpdateMoveTabContext &) override
Definition: conditio.hxx:521
virtual void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &) override
Definition: conditio.hxx:520
const OUString & GetStyleName() const
Definition: conditio.hxx:514
const OUString & GetStyle() const
Definition: conditio.hxx:473
virtual Type GetType() const override
Definition: conditio.hxx:476
OUString aStyleName
Definition: conditio.hxx:450
ScCondFormatEntry(ScConditionMode eOper, const OUString &rExpr1, const OUString &rExpr2, ScDocument &rDocument, const ScAddress &rPos, OUString aStyle, const OUString &rExprNmsp1=OUString(), const OUString &rExprNmsp2=OUString(), formula::FormulaGrammar::Grammar eGrammar1=formula::FormulaGrammar::GRAM_DEFAULT, formula::FormulaGrammar::Grammar eGrammar2=formula::FormulaGrammar::GRAM_DEFAULT, Type eType=Type::Condition)
void UpdateStyleName(const OUString &rNew)
Definition: conditio.hxx:474
ScConditionEntry(ScConditionMode eOper, const OUString &rExpr1, const OUString &rExpr2, ScDocument &rDocument, const ScAddress &rPos, const OUString &rExprNmsp1, const OUString &rExprNmsp2, formula::FormulaGrammar::Grammar eGrammar1, formula::FormulaGrammar::Grammar eGrammar2, Type eType=Type::Condition)
const OUString aStrNmsp2
Definition: conditio.hxx:312
const OUString aStrNmsp1
Definition: conditio.hxx:311
const formula::FormulaGrammar::Grammar eTempGrammar1
Definition: conditio.hxx:313
const formula::FormulaGrammar::Grammar eTempGrammar2
Definition: conditio.hxx:314
std::unique_ptr< ScFormulaCell > pFCell1
Definition: conditio.hxx:322
virtual Type GetType() const override
Definition: conditio.hxx:399
std::unique_ptr< ScFormulaCell > pFCell2
Definition: conditio.hxx:323
std::unique_ptr< ScFormulaListener > mpListener
Definition: conditio.hxx:327
std::unique_ptr< ScConditionEntryCache > mpCache
Definition: conditio.hxx:444
ScConditionMode eOp
Definition: conditio.hxx:305
OUString aStrVal1
Definition: conditio.hxx:309
std::unique_ptr< ScTokenArray > pFormula1
Definition: conditio.hxx:317
ScConditionMode GetOperation() const
Definition: conditio.hxx:369
ScDocument * GetDocument() const
Definition: conditio.hxx:413
ScConditionalFormat * pCondFormat
Definition: conditio.hxx:414
OUString aStrVal2
Definition: conditio.hxx:310
ScAddress aSrcPos
Definition: conditio.hxx:319
const ScAddress & GetSrcPos() const
Definition: conditio.hxx:374
sal_uInt16 nOptions
Definition: conditio.hxx:306
std::unique_ptr< ScTokenArray > pFormula2
Definition: conditio.hxx:318
bool IsIgnoreBlank() const
Definition: conditio.hxx:371
const OUString & GetSrcString() const
Definition: conditio.hxx:373
OUString aSrcString
Definition: conditio.hxx:321
ConditionalFormatContainer::iterator iterator
Definition: conditio.hxx:667
ConditionalFormatContainer m_ConditionalFormats
Definition: conditio.hxx:632
std::set< std::unique_ptr< ScConditionalFormat >, CompareScConditionalFormat > ConditionalFormatContainer
Definition: conditio.hxx:631
ConditionalFormatContainer::const_iterator const_iterator
Definition: conditio.hxx:668
ScDocument * pDoc
Definition: conditio.hxx:541
void SetKey(sal_uInt32 nNew)
Definition: conditio.hxx:592
ScRangeList maRanges
Definition: conditio.hxx:545
ScRangeList & GetRangeList()
Definition: conditio.hxx:561
const ScRangeList & GetRange() const
Definition: conditio.hxx:559
std::vector< std::unique_ptr< ScFormatEntry > > maEntries
Definition: conditio.hxx:544
sal_uInt32 GetKey() const
Definition: conditio.hxx:591
ScConditionalFormat(const ScConditionalFormat &)=delete
const ScConditionalFormat & operator=(const ScConditionalFormat &)=delete
virtual Type GetType() const =0
virtual ScFormatEntry * Clone(ScDocument *pDoc) const =0
virtual void UpdateReference(sc::RefUpdateContext &rCxt)=0
virtual ~ScFormatEntry()
Definition: conditio.hxx:227
virtual void SetParent(ScConditionalFormat *pNew)=0
virtual void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &rCxt)=0
virtual void UpdateMoveTab(sc::RefUpdateMoveTabContext &rCxt)=0
ScDocument * mpDoc
Definition: conditio.hxx:256
virtual void UpdateInsertTab(sc::RefUpdateInsertTabContext &rCxt)=0
ScDocument & mrDoc
Definition: conditio.hxx:185
void Notify(const SfxHint &rHint) override
Definition: colorscale.cxx:136
std::function< void()> maCallbackFunction
Definition: conditio.hxx:186
bool NeedsRepaint() const
Definition: colorscale.cxx:147
void addTokenArray(const ScTokenArray *pTokens, const ScRange &rRange)
Definition: colorscale.cxx:113
virtual ~ScFormulaListener() override
Definition: colorscale.cxx:131
void startListening(const ScTokenArray *pTokens, const ScRange &rPos)
Definition: colorscale.cxx:48
void setCallback(const std::function< void()> &aCallbackFunction)
Definition: colorscale.cxx:118
ScFormulaListener(ScFormulaCell *pCell)
Definition: colorscale.cxx:28
bool operator()(double nVal1, double nVal2) const
Definition: conditio.hxx:293
ScConditionMode
Definition: conditio.hxx:60
std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > &stream, const ScConditionMode &rMode)
Definition: conditio.hxx:91
#define SC_COND_NOBLANKS
Definition: conditio.hxx:57
virtual SotClipboardFormatId GetFormat(const TransferableDataHelper &aHelper) override
Reference< XOutputStream > stream
bool operator<(const ScDPCollection::DBType &left, const ScDPCollection::DBType &right)
Definition: dpobject.cxx:3969
DocumentType eType
@ StartListening
If set, cloned formula cells will start to listen to the document.
NONE
size
ScCondFormatDateType
Definition: conditio.hxx:485
Type
Error
enumrange< T >::Iterator begin(enumrange< T >)
end
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
sal_uIntPtr sal_uLong
bool operator()(std::unique_ptr< ScConditionalFormat > const &rpFormat, sal_uInt32 nKey) const
Definition: conditio.hxx:620
bool operator()(std::unique_ptr< ScConditionalFormat > const &lhs, std::unique_ptr< ScConditionalFormat > const &rhs) const
Definition: conditio.hxx:611
bool operator()(sal_uInt32 nKey, std::unique_ptr< ScConditionalFormat > const &rpFormat) const
Definition: conditio.hxx:616
std::unique_ptr< ScIconSetInfo > pIconSet
Definition: conditio.hxx:219
ScCondFormatData(ScCondFormatData &&)
std::optional< Color > mxColorScale
Definition: conditio.hxx:217
OUString aStyleName
Definition: conditio.hxx:220
std::unique_ptr< ScDataBarInfo > pDataBar
Definition: conditio.hxx:218
std::map< double, sal_Int32, approx_less > ValueCacheType
Definition: conditio.hxx:434
std::map< OUString, sal_Int32 > StringCacheType
Definition: conditio.hxx:432
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
Context for reference update during shifting, moving or copying of cell ranges.
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
RedlineType meType
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518