tdf#154546 skip dispatch when presenter controller is not set
[LibreOffice.git] / sc / inc / conditio.hxx
blobafd16ba273657b88d3278f03ee390d38bdbe4b6c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
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"
30 #include <svl/listener.hxx>
32 #include <com/sun/star/sheet/ConditionOperator.hpp>
34 #include <rtl/math.hxx>
35 #include <tools/date.hxx>
36 #include <tools/link.hxx>
38 #include <optional>
39 #include <map>
40 #include <memory>
41 #include <set>
43 class ScFormulaCell;
44 class ScTokenArray;
45 struct ScRefCellValue;
47 namespace sc {
49 struct RefUpdateContext;
50 struct RefUpdateInsertTabContext;
51 struct RefUpdateDeleteTabContext;
52 struct RefUpdateMoveTabContext;
56 // nOptions Flags
57 #define SC_COND_NOBLANKS 1
59 enum class ScConditionMode
61 Equal,
62 Less,
63 Greater,
64 EqLess,
65 EqGreater,
66 NotEqual,
67 Between,
68 NotBetween,
69 Duplicate,
70 NotDuplicate,
71 Direct,
72 Top10,
73 Bottom10,
74 TopPercent,
75 BottomPercent,
76 AboveAverage,
77 BelowAverage,
78 AboveEqualAverage,
79 BelowEqualAverage,
80 Error,
81 NoError,
82 BeginsWith,
83 EndsWith,
84 ContainsText,
85 NotContainsText,
86 NONE
89 // For use in SAL_DEBUG etc. Output format not guaranteed to be stable.
90 template<typename charT, typename traits>
91 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScConditionMode& rMode)
93 switch (rMode)
95 case ScConditionMode::Equal:
96 stream << "EQUAL";
97 break;
98 case ScConditionMode::Less:
99 stream << "LESS";
100 break;
101 case ScConditionMode::Greater:
102 stream << "GREATER";
103 break;
104 case ScConditionMode::EqLess:
105 stream << "EQLESS";
106 break;
107 case ScConditionMode::EqGreater:
108 stream << "EQGREATER";
109 break;
110 case ScConditionMode::NotEqual:
111 stream << "NOTEQUAL";
112 break;
113 case ScConditionMode::Between:
114 stream << "BETWEEN";
115 break;
116 case ScConditionMode::NotBetween:
117 stream << "NOTBETWEEN";
118 break;
119 case ScConditionMode::Duplicate:
120 stream << "DUPLICATE";
121 break;
122 case ScConditionMode::NotDuplicate:
123 stream << "NOTDUPLICATE";
124 break;
125 case ScConditionMode::Direct:
126 stream << "DIRECT";
127 break;
128 case ScConditionMode::Top10:
129 stream << "TOP10";
130 break;
131 case ScConditionMode::Bottom10:
132 stream << "BOTTOM10";
133 break;
134 case ScConditionMode::TopPercent:
135 stream << "TOPPERCENT";
136 break;
137 case ScConditionMode::BottomPercent:
138 stream << "BOTTOMPERCENT";
139 break;
140 case ScConditionMode::AboveAverage:
141 stream << "ABOVEAVERAGE";
142 break;
143 case ScConditionMode::BelowAverage:
144 stream << "BELOWAVERAGE";
145 break;
146 case ScConditionMode::AboveEqualAverage:
147 stream << "ABOVEEQUALAVERAGE";
148 break;
149 case ScConditionMode::BelowEqualAverage:
150 stream << "BELOWEQUALAVERAGE";
151 break;
152 case ScConditionMode::Error:
153 stream << "ERROR";
154 break;
155 case ScConditionMode::NoError:
156 stream << "NOERROR";
157 break;
158 case ScConditionMode::BeginsWith:
159 stream << "BEGINSWITH";
160 break;
161 case ScConditionMode::EndsWith:
162 stream << "ENDSWITH";
163 break;
164 case ScConditionMode::ContainsText:
165 stream << "CONTAINSTEXT";
166 break;
167 case ScConditionMode::NotContainsText:
168 stream << "NOTCONTAINSTEXT";
169 break;
170 case ScConditionMode::NONE:
171 stream << "NONE";
172 break;
173 default:
174 stream << "?(" << static_cast<int>(rMode) << ")";
175 break;
178 return stream;
181 class ScFormulaListener final : public SvtListener
183 private:
184 mutable bool mbDirty;
185 ScDocument& mrDoc;
186 std::function<void()> maCallbackFunction;
188 void startListening(const ScTokenArray* pTokens, const ScRange& rPos);
189 void startListening(const ScRangeList& rPos);
191 public:
192 explicit ScFormulaListener(ScFormulaCell* pCell);
193 explicit ScFormulaListener(ScDocument& rDoc);
194 explicit ScFormulaListener(ScDocument& rDoc, const ScRangeList& rRange);
195 virtual ~ScFormulaListener() override;
197 void Notify( const SfxHint& rHint ) override;
199 bool NeedsRepaint() const;
201 void addTokenArray(const ScTokenArray* pTokens, const ScRange& rRange);
202 void stopListening();
203 void setCallback(const std::function<void()>& aCallbackFunction);
207 class ScConditionalFormat;
208 struct ScDataBarInfo;
209 struct ScIconSetInfo;
211 struct ScCondFormatData
213 ScCondFormatData();
214 ScCondFormatData(ScCondFormatData&&);
215 ~ScCondFormatData();
217 std::optional<Color> mxColorScale;
218 std::unique_ptr<ScDataBarInfo> pDataBar;
219 std::unique_ptr<ScIconSetInfo> pIconSet;
220 OUString aStyleName;
223 class SC_DLLPUBLIC ScFormatEntry
225 public:
226 ScFormatEntry(ScDocument* pDoc);
227 virtual ~ScFormatEntry() {}
229 enum class Type
231 Condition,
232 ExtCondition,
233 Colorscale,
234 Databar,
235 Iconset,
236 Date
239 virtual Type GetType() const = 0;
240 virtual void UpdateReference( sc::RefUpdateContext& rCxt ) = 0;
241 virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ) = 0;
242 virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) = 0;
243 virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) = 0;
245 virtual ScFormatEntry* Clone( ScDocument* pDoc ) const = 0;
247 virtual void SetParent( ScConditionalFormat* pNew ) = 0;
249 bool operator==( const ScFormatEntry& ) const;
250 virtual bool IsEqual( const ScFormatEntry&, bool bIgnoreSrcPos ) const;
252 virtual void startRendering();
253 virtual void endRendering();
254 protected:
255 ScDocument* mpDoc;
259 template<typename charT, typename traits>
260 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScFormatEntry::Type& rType)
262 switch (rType)
264 case ScFormatEntry::Type::Condition:
265 stream << "Condition";
266 break;
267 case ScFormatEntry::Type::ExtCondition:
268 stream << "ExtCondition";
269 break;
270 case ScFormatEntry::Type::Colorscale:
271 stream << "Colorscale";
272 break;
273 case ScFormatEntry::Type::Databar:
274 stream << "Databar";
275 break;
276 case ScFormatEntry::Type::Iconset:
277 stream << "Iconset";
278 break;
279 case ScFormatEntry::Type::Date:
280 stream << "Date";
281 break;
282 default:
283 stream << "?(" << static_cast<int>(rType) << ")";
284 break;
286 return stream;
289 class approx_less
291 public:
292 bool operator() (double nVal1, double nVal2) const
294 if(nVal1 < nVal2 && !rtl::math::approxEqual(nVal1, nVal2))
295 return true;
297 return false;
301 class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry
303 // stored data:
304 ScConditionMode eOp;
305 sal_uInt16 nOptions;
306 double nVal1; // input or calculated
307 double nVal2;
308 OUString aStrVal1; // input or calculated
309 OUString aStrVal2;
310 const OUString aStrNmsp1; // namespace to be used on (re)compilation, e.g. in XML import
311 const OUString aStrNmsp2; // namespace to be used on (re)compilation, e.g. in XML import
312 const formula::FormulaGrammar::Grammar eTempGrammar1; // grammar to be used on (re)compilation, e.g. in XML import
313 const formula::FormulaGrammar::Grammar eTempGrammar2; // grammar to be used on (re)compilation, e.g. in XML import
314 bool bIsStr1; // for recognition of empty strings
315 bool bIsStr2;
316 std::unique_ptr<ScTokenArray> pFormula1; // entered formula
317 std::unique_ptr<ScTokenArray> pFormula2;
318 ScAddress aSrcPos; // source position for formulas
319 // temporary data:
320 OUString aSrcString; // formula source position as text during XML import
321 std::unique_ptr<ScFormulaCell> pFCell1;
322 std::unique_ptr<ScFormulaCell> pFCell2;
323 bool bRelRef1;
324 bool bRelRef2;
325 bool bFirstRun;
326 std::unique_ptr<ScFormulaListener> mpListener;
327 Type eConditionType; //It can be Condition or ExtCondition
329 static void SimplifyCompiledFormula( std::unique_ptr<ScTokenArray>& rFormula,
330 double& rVal,
331 bool& rIsStr,
332 OUString& rStrVal );
334 void MakeCells( const ScAddress& rPos );
335 void Compile( const OUString& rExpr1, const OUString& rExpr2,
336 const OUString& rExprNmsp1, const OUString& rExprNmsp2,
337 formula::FormulaGrammar::Grammar eGrammar1,
338 formula::FormulaGrammar::Grammar eGrammar2,
339 bool bTextToReal );
340 void Interpret( const ScAddress& rPos );
342 bool IsValid( double nArg, const ScAddress& rPos ) const;
343 bool IsValidStr( const OUString& rArg, const ScAddress& rPos ) const;
344 void StartListening();
346 public:
347 ScConditionEntry( ScConditionMode eOper,
348 const OUString& rExpr1, const OUString& rExpr2,
349 ScDocument& rDocument, const ScAddress& rPos,
350 const OUString& rExprNmsp1, const OUString& rExprNmsp2,
351 formula::FormulaGrammar::Grammar eGrammar1,
352 formula::FormulaGrammar::Grammar eGrammar2,
353 Type eType = Type::Condition );
354 ScConditionEntry( ScConditionMode eOper,
355 const ScTokenArray* pArr1, const ScTokenArray* pArr2,
356 ScDocument& rDocument, const ScAddress& rPos );
357 ScConditionEntry( const ScConditionEntry& r ); // flat copy of formulas
358 // true copy of formulas (for Ref-Undo):
359 ScConditionEntry( ScDocument& rDocument, const ScConditionEntry& r );
360 virtual ~ScConditionEntry() override;
362 bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
364 virtual void SetParent( ScConditionalFormat* pNew ) override;
366 bool IsCellValid( ScRefCellValue& rCell, const ScAddress& rPos ) const;
368 ScConditionMode GetOperation() const { return eOp; }
369 void SetOperation(ScConditionMode eMode);
370 bool IsIgnoreBlank() const { return ( nOptions & SC_COND_NOBLANKS ) == 0; }
371 void SetIgnoreBlank(bool bSet);
372 const OUString& GetSrcString() const { return aSrcString; }
373 const ScAddress& GetSrcPos() const { return aSrcPos; }
375 ScAddress GetValidSrcPos() const; // adjusted to allow textual representation of expressions
377 void SetSrcString( const OUString& rNew ); // for XML import
379 void SetFormula1( const ScTokenArray& rArray );
380 void SetFormula2( const ScTokenArray& rArray );
382 OUString GetExpression( const ScAddress& rCursor, sal_uInt16 nPos, sal_uInt32 nNumFmt = 0,
383 const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
385 /** Create a flat copy using ScTokenArray copy-ctor with
386 shared tokens. */
387 std::unique_ptr<ScTokenArray> CreateFlatCopiedTokenArray( sal_uInt16 nPos ) const;
389 void CompileAll();
390 void CompileXML();
391 virtual void UpdateReference( sc::RefUpdateContext& rCxt ) override;
392 virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt ) override;
393 virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt ) override;
394 virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt ) override;
396 bool MarkUsedExternalReferences() const;
398 virtual Type GetType() const override { return eConditionType; }
400 virtual ScFormatEntry* Clone(ScDocument* pDoc) const override;
402 static ScConditionMode GetModeFromApi(css::sheet::ConditionOperator nOperator);
404 virtual void endRendering() override;
405 virtual void startRendering() override;
407 bool NeedsRepaint() const;
408 void CalcAll();
410 protected:
411 virtual void DataChanged() const;
412 ScDocument* GetDocument() const { return mpDoc; }
413 ScConditionalFormat* pCondFormat;
415 private:
417 bool IsDuplicate(double nArg, const OUString& rStr) const;
418 bool IsTopNElement( double nArg ) const;
419 bool IsTopNPercent( double nArg ) const;
420 bool IsBottomNElement( double nArg ) const;
421 bool IsBottomNPercent( double nArg ) const;
422 bool IsAboveAverage( double nArg, bool bEqual ) const;
423 bool IsBelowAverage( double nArg, bool bEqual ) const;
425 bool IsError( const ScAddress& rPos ) const;
427 void FillCache() const;
429 struct ScConditionEntryCache
431 typedef std::map<OUString, sal_Int32> StringCacheType;
432 StringCacheType maStrings;
433 typedef std::map<double, sal_Int32, approx_less> ValueCacheType;
434 ValueCacheType maValues;
436 // cache them for easier access
437 size_t nValueItems;
439 ScConditionEntryCache():
440 nValueItems(0) {}
443 mutable std::unique_ptr<ScConditionEntryCache> mpCache;
446 // single condition entry for conditional formatting
447 class SC_DLLPUBLIC ScCondFormatEntry final : public ScConditionEntry
449 OUString aStyleName;
450 Type eCondFormatType = Type::Condition;
452 public:
453 ScCondFormatEntry( ScConditionMode eOper,
454 const OUString& rExpr1, const OUString& rExpr2,
455 ScDocument& rDocument, const ScAddress& rPos,
456 OUString aStyle,
457 const OUString& rExprNmsp1 = OUString(),
458 const OUString& rExprNmsp2 = OUString(),
459 formula::FormulaGrammar::Grammar eGrammar1 = formula::FormulaGrammar::GRAM_DEFAULT,
460 formula::FormulaGrammar::Grammar eGrammar2 = formula::FormulaGrammar::GRAM_DEFAULT,
461 Type eType = Type::Condition);
462 ScCondFormatEntry( ScConditionMode eOper,
463 const ScTokenArray* pArr1, const ScTokenArray* pArr2,
464 ScDocument& rDocument, const ScAddress& rPos,
465 OUString aStyle );
466 ScCondFormatEntry( const ScCondFormatEntry& r );
467 ScCondFormatEntry( ScDocument& rDocument, const ScCondFormatEntry& r );
468 virtual ~ScCondFormatEntry() override;
470 bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
472 const OUString& GetStyle() const { return aStyleName; }
473 void UpdateStyleName(const OUString& rNew) { aStyleName=rNew; }
474 virtual ScFormatEntry* Clone(ScDocument* pDoc) const override;
475 virtual Type GetType() const override { return eCondFormatType; }
477 private:
478 virtual void DataChanged() const override;
481 namespace condformat {
483 enum ScCondFormatDateType
485 TODAY,
486 YESTERDAY,
487 TOMORROW,
488 LAST7DAYS,
489 THISWEEK,
490 LASTWEEK,
491 NEXTWEEK,
492 THISMONTH,
493 LASTMONTH,
494 NEXTMONTH,
495 THISYEAR,
496 LASTYEAR,
497 NEXTYEAR
502 class SC_DLLPUBLIC ScCondDateFormatEntry final : public ScFormatEntry
504 public:
505 ScCondDateFormatEntry(ScDocument* pDoc);
506 ScCondDateFormatEntry(ScDocument* pDoc, const ScCondDateFormatEntry& rEntry);
508 bool IsValid( const ScAddress& rPos ) const;
510 void SetDateType(condformat::ScCondFormatDateType eType);
511 condformat::ScCondFormatDateType GetDateType() const { return meType;}
513 const OUString& GetStyleName() const { return maStyleName;}
514 void SetStyleName( const OUString& rStyleName );
516 virtual Type GetType() const override { return Type::Date; }
517 virtual void UpdateReference( sc::RefUpdateContext& ) override {}
518 virtual void UpdateInsertTab( sc::RefUpdateInsertTabContext& ) override {}
519 virtual void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& ) override {}
520 virtual void UpdateMoveTab( sc::RefUpdateMoveTabContext& ) override {}
522 virtual ScFormatEntry* Clone( ScDocument* pDoc ) const override;
524 virtual void SetParent( ScConditionalFormat* ) override {}
526 virtual void startRendering() override;
527 virtual void endRendering() override;
529 private:
530 condformat::ScCondFormatDateType meType;
532 mutable std::unique_ptr<Date> mpCache;
534 OUString maStyleName;
537 // complete conditional formatting
538 class SC_DLLPUBLIC ScConditionalFormat
540 ScDocument* pDoc;
541 sal_uInt32 nKey; // Index in attributes
543 std::vector<std::unique_ptr<ScFormatEntry>> maEntries;
544 ScRangeList maRanges; // Ranges for conditional format
546 public:
547 ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
548 ~ScConditionalFormat();
549 ScConditionalFormat(const ScConditionalFormat&) = delete;
550 const ScConditionalFormat& operator=(const ScConditionalFormat&) = delete;
552 // true copy of formulas (for Ref-Undo / between documents)
553 std::unique_ptr<ScConditionalFormat> Clone(ScDocument* pNewDoc = nullptr) const;
555 void AddEntry( ScFormatEntry* pNew );
556 void RemoveEntry(size_t nIndex);
557 void SetRange( const ScRangeList& rRanges );
558 const ScRangeList& GetRange() const { return maRanges; }
559 // don't use the same name as for the const version
560 ScRangeList& GetRangeList() { return maRanges; }
562 bool IsEmpty() const;
563 size_t size() const;
565 ScDocument* GetDocument();
567 void CompileAll();
568 void CompileXML();
569 void UpdateReference( sc::RefUpdateContext& rCxt, bool bCopyAsMove = false );
570 void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
571 void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
572 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt );
574 void InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCSIZE nSize);
575 void InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColStart, SCSIZE nSize);
577 void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
578 void RenameCellStyle( std::u16string_view rOld, const OUString& rNew );
580 const ScFormatEntry* GetEntry( sal_uInt16 nPos ) const;
582 OUString GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const;
584 ScCondFormatData GetData( ScRefCellValue& rCell, const ScAddress& rPos ) const;
586 bool EqualEntries( const ScConditionalFormat& r, bool bIgnoreSrcPos = false ) const;
588 void DoRepaint();
590 sal_uInt32 GetKey() const { return nKey; }
591 void SetKey(sal_uInt32 nNew) { nKey = nNew; } // only if not inserted!
593 bool MarkUsedExternalReferences() const;
595 // sorted (via std::set) by Index
596 bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; }
598 void startRendering();
599 void endRendering();
601 // Forced recalculation for formulas
602 void CalcAll();
605 struct CompareScConditionalFormat
607 using is_transparent = void;
608 bool operator()(std::unique_ptr<ScConditionalFormat> const& lhs,
609 std::unique_ptr<ScConditionalFormat> const& rhs) const
611 return (*lhs) < (*rhs);
613 bool operator()(sal_uInt32 nKey, std::unique_ptr<ScConditionalFormat> const& rpFormat) const
615 return nKey < rpFormat->GetKey();
617 bool operator()(std::unique_ptr<ScConditionalFormat> const& rpFormat, sal_uInt32 nKey) const
619 return rpFormat->GetKey() < nKey;
623 // List of all conditional formats in a sheet
624 class SC_DLLPUBLIC ScConditionalFormatList
626 private:
627 typedef std::set<std::unique_ptr<ScConditionalFormat>,
628 CompareScConditionalFormat> ConditionalFormatContainer;
629 ConditionalFormatContainer m_ConditionalFormats;
631 void operator =(ScConditionalFormatList const &) = delete;
633 public:
634 ScConditionalFormatList() {}
635 ScConditionalFormatList(const ScConditionalFormatList& rList);
636 ScConditionalFormatList(ScDocument& rDoc, const ScConditionalFormatList& rList);
638 void InsertNew( std::unique_ptr<ScConditionalFormat> pNew );
641 * Checks that all cond formats have a non empty range.
642 * Deletes empty cond formats. Optionally call rLink
643 * on the empty format before deleting it.
644 * @return true if all cond formats were valid
646 bool CheckAllEntries(const Link<ScConditionalFormat*,void>& rLink = Link<ScConditionalFormat*,void>());
648 ScConditionalFormat* GetFormat( sal_uInt32 nKey );
649 const ScConditionalFormat* GetFormat( sal_uInt32 nKey ) const;
651 void CompileAll();
652 void CompileXML();
653 void UpdateReference( sc::RefUpdateContext& rCxt );
654 void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
655 void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
656 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt );
658 void InsertRow(SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCSIZE nSize);
659 void InsertCol(SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColStart, SCSIZE nSize);
661 void RenameCellStyle( std::u16string_view rOld, const OUString& rNew );
662 void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
664 typedef ConditionalFormatContainer::iterator iterator;
665 typedef ConditionalFormatContainer::const_iterator const_iterator;
667 ScRangeList GetCombinedRange() const;
669 void RemoveFromDocument(ScDocument& rDoc) const;
670 void AddToDocument(ScDocument& rDoc) const;
672 iterator begin();
673 const_iterator begin() const;
674 iterator end();
675 const_iterator end() const;
677 size_t size() const;
678 bool empty() const;
680 void erase(sal_uLong nIndex);
681 void clear();
683 void startRendering();
684 void endRendering();
686 sal_uInt32 getMaxKey() const;
688 /// Forced recalculation of formulas
689 void CalcAll();
692 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */