LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / conditio.hxx
blob5a131e5f6a10a5da71e39ea6020607f2d8991a08
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 "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"
31 #include <svl/listener.hxx>
33 #include <com/sun/star/sheet/ConditionOperator.hpp>
35 #include <rtl/math.hxx>
36 #include <tools/date.hxx>
37 #include <tools/link.hxx>
39 #include <optional>
40 #include <map>
41 #include <memory>
42 #include <set>
44 class ScFormulaCell;
45 class ScTokenArray;
46 struct ScRefCellValue;
48 namespace sc {
50 struct RefUpdateContext;
51 struct RefUpdateInsertTabContext;
52 struct RefUpdateDeleteTabContext;
53 struct RefUpdateMoveTabContext;
57 // nOptions Flags
58 #define SC_COND_NOBLANKS 1
60 enum class ScConditionMode
62 Equal,
63 Less,
64 Greater,
65 EqLess,
66 EqGreater,
67 NotEqual,
68 Between,
69 NotBetween,
70 Duplicate,
71 NotDuplicate,
72 Direct,
73 Top10,
74 Bottom10,
75 TopPercent,
76 BottomPercent,
77 AboveAverage,
78 BelowAverage,
79 AboveEqualAverage,
80 BelowEqualAverage,
81 Error,
82 NoError,
83 BeginsWith,
84 EndsWith,
85 ContainsText,
86 NotContainsText,
87 NONE
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)
94 switch (rMode)
96 case ScConditionMode::Equal:
97 stream << "EQUAL";
98 break;
99 case ScConditionMode::Less:
100 stream << "LESS";
101 break;
102 case ScConditionMode::Greater:
103 stream << "GREATER";
104 break;
105 case ScConditionMode::EqLess:
106 stream << "EQLESS";
107 break;
108 case ScConditionMode::EqGreater:
109 stream << "EQGREATER";
110 break;
111 case ScConditionMode::NotEqual:
112 stream << "NOTEQUAL";
113 break;
114 case ScConditionMode::Between:
115 stream << "BETWEEN";
116 break;
117 case ScConditionMode::NotBetween:
118 stream << "NOTBETWEEN";
119 break;
120 case ScConditionMode::Duplicate:
121 stream << "DUPLICATE";
122 break;
123 case ScConditionMode::NotDuplicate:
124 stream << "NOTDUPLICATE";
125 break;
126 case ScConditionMode::Direct:
127 stream << "DIRECT";
128 break;
129 case ScConditionMode::Top10:
130 stream << "TOP10";
131 break;
132 case ScConditionMode::Bottom10:
133 stream << "BOTTOM10";
134 break;
135 case ScConditionMode::TopPercent:
136 stream << "TOPPERCENT";
137 break;
138 case ScConditionMode::BottomPercent:
139 stream << "BOTTOMPERCENT";
140 break;
141 case ScConditionMode::AboveAverage:
142 stream << "ABOVEAVERAGE";
143 break;
144 case ScConditionMode::BelowAverage:
145 stream << "BELOWAVERAGE";
146 break;
147 case ScConditionMode::AboveEqualAverage:
148 stream << "ABOVEEQUALAVERAGE";
149 break;
150 case ScConditionMode::BelowEqualAverage:
151 stream << "BELOWEQUALAVERAGE";
152 break;
153 case ScConditionMode::Error:
154 stream << "ERROR";
155 break;
156 case ScConditionMode::NoError:
157 stream << "NOERROR";
158 break;
159 case ScConditionMode::BeginsWith:
160 stream << "BEGINSWITH";
161 break;
162 case ScConditionMode::EndsWith:
163 stream << "ENDSWITH";
164 break;
165 case ScConditionMode::ContainsText:
166 stream << "CONTAINSTEXT";
167 break;
168 case ScConditionMode::NotContainsText:
169 stream << "NOTCONTAINSTEXT";
170 break;
171 case ScConditionMode::NONE:
172 stream << "NONE";
173 break;
174 default:
175 stream << "?(" << static_cast<int>(rMode) << ")";
176 break;
179 return stream;
182 class ScFormulaListener final : public SvtListener
184 private:
185 mutable bool mbDirty;
186 ScDocument& mrDoc;
187 std::function<void()> maCallbackFunction;
189 void startListening(const ScTokenArray* pTokens, const ScRange& rPos);
190 void startListening(const ScRangeList& rPos);
192 public:
193 explicit ScFormulaListener(ScFormulaCell* pCell);
194 explicit ScFormulaListener(ScDocument& rDoc);
195 explicit ScFormulaListener(ScDocument& rDoc, const ScRangeList& rRange);
196 virtual ~ScFormulaListener() override;
198 void Notify( const SfxHint& rHint ) override;
200 bool NeedsRepaint() const;
202 void addTokenArray(const ScTokenArray* pTokens, const ScRange& rRange);
203 void stopListening();
204 void setCallback(const std::function<void()>& aCallbackFunction);
208 class ScConditionalFormat;
209 struct ScDataBarInfo;
210 struct ScIconSetInfo;
212 struct ScCondFormatData
214 ScCondFormatData();
215 ScCondFormatData(ScCondFormatData&&);
216 ~ScCondFormatData();
218 std::optional<Color> mxColorScale;
219 std::unique_ptr<ScDataBarInfo> pDataBar;
220 std::unique_ptr<ScIconSetInfo> pIconSet;
221 OUString aStyleName;
224 class SC_DLLPUBLIC ScFormatEntry
226 public:
227 ScFormatEntry(ScDocument* pDoc);
228 virtual ~ScFormatEntry() {}
230 enum class Type
232 Condition,
233 ExtCondition,
234 Colorscale,
235 Databar,
236 Iconset,
237 Date
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;
246 virtual ScFormatEntry* Clone( ScDocument* pDoc ) const = 0;
248 virtual void SetParent( ScConditionalFormat* pNew ) = 0;
250 bool operator==( const ScFormatEntry& ) const;
251 virtual bool IsEqual( const ScFormatEntry&, bool bIgnoreSrcPos ) const;
253 virtual void startRendering();
254 virtual void endRendering();
255 protected:
256 ScDocument* mpDoc;
260 template<typename charT, typename traits>
261 inline std::basic_ostream<charT, traits> & operator <<(std::basic_ostream<charT, traits> & stream, const ScFormatEntry::Type& rType)
263 switch (rType)
265 case ScFormatEntry::Type::Condition:
266 stream << "Condition";
267 break;
268 case ScFormatEntry::Type::ExtCondition:
269 stream << "ExtCondition";
270 break;
271 case ScFormatEntry::Type::Colorscale:
272 stream << "Colorscale";
273 break;
274 case ScFormatEntry::Type::Databar:
275 stream << "Databar";
276 break;
277 case ScFormatEntry::Type::Iconset:
278 stream << "Iconset";
279 break;
280 case ScFormatEntry::Type::Date:
281 stream << "Date";
282 break;
283 default:
284 stream << "?(" << static_cast<int>(rType) << ")";
285 break;
287 return stream;
290 class approx_less
292 public:
293 bool operator() (double nVal1, double nVal2) const
295 if(nVal1 < nVal2 && !rtl::math::approxEqual(nVal1, nVal2))
296 return true;
298 return false;
302 class SC_DLLPUBLIC ScConditionEntry : public ScFormatEntry
304 // stored data:
305 ScConditionMode eOp;
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
330 static void SimplifyCompiledFormula( std::unique_ptr<ScTokenArray>& rFormula,
331 double& rVal,
332 bool& rIsStr,
333 OUString& rStrVal );
335 void MakeCells( const ScAddress& rPos );
336 void Compile( const OUString& rExpr1, const OUString& rExpr2,
337 const OUString& rExprNmsp1, const OUString& rExprNmsp2,
338 formula::FormulaGrammar::Grammar eGrammar1,
339 formula::FormulaGrammar::Grammar eGrammar2,
340 bool bTextToReal );
341 void Interpret( const ScAddress& rPos );
343 bool IsValid( double nArg, const ScAddress& rPos ) const;
344 bool IsValidStr( const OUString& rArg, const ScAddress& rPos ) const;
345 void StartListening();
347 public:
348 ScConditionEntry( ScConditionMode eOper,
349 const OUString& rExpr1, const OUString& rExpr2,
350 ScDocument& rDocument, const ScAddress& rPos,
351 const OUString& rExprNmsp1, const OUString& rExprNmsp2,
352 formula::FormulaGrammar::Grammar eGrammar1,
353 formula::FormulaGrammar::Grammar eGrammar2,
354 Type eType = Type::Condition );
355 ScConditionEntry( ScConditionMode eOper,
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;
363 bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
365 virtual void SetParent( ScConditionalFormat* pNew ) override;
367 bool IsCellValid( ScRefCellValue& rCell, const ScAddress& rPos ) const;
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; }
376 ScAddress GetValidSrcPos() const; // adjusted to allow textual representation of expressions
378 void SetSrcString( const OUString& rNew ); // for XML import
380 void SetFormula1( const ScTokenArray& rArray );
381 void SetFormula2( const ScTokenArray& rArray );
383 OUString GetExpression( const ScAddress& rCursor, sal_uInt16 nPos, sal_uInt32 nNumFmt = 0,
384 const formula::FormulaGrammar::Grammar eGrammar = formula::FormulaGrammar::GRAM_DEFAULT ) const;
386 /** Create a flat copy using ScTokenArray copy-ctor with
387 shared tokens. */
388 std::unique_ptr<ScTokenArray> CreateFlatCopiedTokenArray( sal_uInt16 nPos ) const;
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;
397 bool MarkUsedExternalReferences() const;
399 virtual Type GetType() const override { return eConditionType; }
401 virtual ScFormatEntry* Clone(ScDocument* pDoc) const override;
403 static ScConditionMode GetModeFromApi(css::sheet::ConditionOperator nOperator);
405 virtual void endRendering() override;
406 virtual void startRendering() override;
408 bool NeedsRepaint() const;
409 void CalcAll();
411 protected:
412 virtual void DataChanged() const;
413 ScDocument* GetDocument() const { return mpDoc; }
414 ScConditionalFormat* pCondFormat;
416 private:
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;
426 bool IsError( const ScAddress& rPos ) const;
428 void FillCache() const;
430 struct ScConditionEntryCache
432 typedef std::map<OUString, sal_Int32> StringCacheType;
433 StringCacheType maStrings;
434 typedef std::map<double, sal_Int32, approx_less> ValueCacheType;
435 ValueCacheType maValues;
437 // cache them for easier access
438 size_t nValueItems;
440 ScConditionEntryCache():
441 nValueItems(0) {}
444 mutable std::unique_ptr<ScConditionEntryCache> mpCache;
447 // single condition entry for conditional formatting
448 class SC_DLLPUBLIC ScCondFormatEntry final : public ScConditionEntry
450 OUString aStyleName;
451 Type eCondFormatType = Type::Condition;
453 public:
454 ScCondFormatEntry( ScConditionMode eOper,
455 const OUString& rExpr1, const OUString& rExpr2,
456 ScDocument& rDocument, const ScAddress& rPos,
457 const OUString& rStyle,
458 const OUString& rExprNmsp1 = OUString(),
459 const OUString& rExprNmsp2 = OUString(),
460 formula::FormulaGrammar::Grammar eGrammar1 = formula::FormulaGrammar::GRAM_DEFAULT,
461 formula::FormulaGrammar::Grammar eGrammar2 = formula::FormulaGrammar::GRAM_DEFAULT,
462 Type eType = Type::Condition);
463 ScCondFormatEntry( ScConditionMode eOper,
464 const ScTokenArray* pArr1, const ScTokenArray* pArr2,
465 ScDocument& rDocument, const ScAddress& rPos,
466 const OUString& rStyle );
467 ScCondFormatEntry( const ScCondFormatEntry& r );
468 ScCondFormatEntry( ScDocument& rDocument, const ScCondFormatEntry& r );
469 virtual ~ScCondFormatEntry() override;
471 bool IsEqual( const ScFormatEntry& r, bool bIgnoreSrcPos ) const override;
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; }
478 private:
479 virtual void DataChanged() const override;
482 namespace condformat {
484 enum ScCondFormatDateType
486 TODAY,
487 YESTERDAY,
488 TOMORROW,
489 LAST7DAYS,
490 THISWEEK,
491 LASTWEEK,
492 NEXTWEEK,
493 THISMONTH,
494 LASTMONTH,
495 NEXTMONTH,
496 THISYEAR,
497 LASTYEAR,
498 NEXTYEAR
503 class SC_DLLPUBLIC ScCondDateFormatEntry final : public ScFormatEntry
505 public:
506 ScCondDateFormatEntry(ScDocument* pDoc);
507 ScCondDateFormatEntry(ScDocument* pDoc, const ScCondDateFormatEntry& rEntry);
509 bool IsValid( const ScAddress& rPos ) const;
511 void SetDateType(condformat::ScCondFormatDateType eType);
512 condformat::ScCondFormatDateType GetDateType() const { return meType;}
514 const OUString& GetStyleName() const { return maStyleName;}
515 void SetStyleName( const OUString& rStyleName );
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 {}
523 virtual ScFormatEntry* Clone( ScDocument* pDoc ) const override;
525 virtual void SetParent( ScConditionalFormat* ) override {}
527 virtual void startRendering() override;
528 virtual void endRendering() override;
530 private:
531 condformat::ScCondFormatDateType meType;
533 mutable std::unique_ptr<Date> mpCache;
535 OUString maStyleName;
538 // complete conditional formatting
539 class SC_DLLPUBLIC ScConditionalFormat
541 ScDocument* pDoc;
542 sal_uInt32 nKey; // Index in attributes
544 std::vector<std::unique_ptr<ScFormatEntry>> maEntries;
545 ScRangeList maRanges; // Ranges for conditional format
547 public:
548 ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
549 ~ScConditionalFormat();
550 ScConditionalFormat(const ScConditionalFormat&) = delete;
551 const ScConditionalFormat& operator=(const ScConditionalFormat&) = delete;
553 // true copy of formulas (for Ref-Undo / between documents)
554 std::unique_ptr<ScConditionalFormat> Clone(ScDocument* pNewDoc = nullptr) const;
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; }
563 bool IsEmpty() const;
564 size_t size() const;
566 ScDocument* GetDocument();
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 );
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);
578 void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
579 void RenameCellStyle( std::u16string_view rOld, const OUString& rNew );
581 const ScFormatEntry* GetEntry( sal_uInt16 nPos ) const;
583 OUString GetCellStyle( ScRefCellValue& rCell, const ScAddress& rPos ) const;
585 ScCondFormatData GetData( ScRefCellValue& rCell, const ScAddress& rPos ) const;
587 bool EqualEntries( const ScConditionalFormat& r, bool bIgnoreSrcPos = false ) const;
589 void DoRepaint();
591 sal_uInt32 GetKey() const { return nKey; }
592 void SetKey(sal_uInt32 nNew) { nKey = nNew; } // only if not inserted!
594 bool MarkUsedExternalReferences() const;
596 // sorted (via std::set) by Index
597 bool operator < ( const ScConditionalFormat& r ) const { return nKey < r.nKey; }
599 void startRendering();
600 void endRendering();
602 // Forced recalculation for formulas
603 void CalcAll();
606 struct CompareScConditionalFormat
608 using is_transparent = void;
609 bool operator()(std::unique_ptr<ScConditionalFormat> const& lhs,
610 std::unique_ptr<ScConditionalFormat> const& rhs) const
612 return (*lhs) < (*rhs);
614 bool operator()(sal_uInt32 nKey, std::unique_ptr<ScConditionalFormat> const& rpFormat) const
616 return nKey < rpFormat->GetKey();
618 bool operator()(std::unique_ptr<ScConditionalFormat> const& rpFormat, sal_uInt32 nKey) const
620 return rpFormat->GetKey() < nKey;
624 // List of all conditional formats in a sheet
625 class SC_DLLPUBLIC ScConditionalFormatList
627 private:
628 typedef std::set<std::unique_ptr<ScConditionalFormat>,
629 CompareScConditionalFormat> ConditionalFormatContainer;
630 ConditionalFormatContainer m_ConditionalFormats;
632 void operator =(ScConditionalFormatList const &) = delete;
634 public:
635 ScConditionalFormatList() {}
636 ScConditionalFormatList(const ScConditionalFormatList& rList);
637 ScConditionalFormatList(ScDocument& rDoc, const ScConditionalFormatList& rList);
639 void InsertNew( std::unique_ptr<ScConditionalFormat> pNew );
642 * Checks that all cond formats have a non empty range.
643 * Deletes empty cond formats. Optionally call rLink
644 * on the empty format before deleting it.
645 * @return true if all cond formats were valid
647 bool CheckAllEntries(const Link<ScConditionalFormat*,void>& rLink = Link<ScConditionalFormat*,void>());
649 ScConditionalFormat* GetFormat( sal_uInt32 nKey );
650 const ScConditionalFormat* GetFormat( sal_uInt32 nKey ) const;
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 );
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);
662 void RenameCellStyle( std::u16string_view rOld, const OUString& rNew );
663 void DeleteArea( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
665 typedef ConditionalFormatContainer::iterator iterator;
666 typedef ConditionalFormatContainer::const_iterator const_iterator;
668 ScRangeList GetCombinedRange() const;
670 void RemoveFromDocument(ScDocument& rDoc) const;
671 void AddToDocument(ScDocument& rDoc) const;
673 iterator begin();
674 const_iterator begin() const;
675 iterator end();
676 const_iterator end() const;
678 size_t size() const;
679 bool empty() const;
681 void erase(sal_uLong nIndex);
682 void clear();
684 void startRendering();
685 void endRendering();
687 sal_uInt32 getMaxKey() const;
689 /// Forced recalculation of formulas
690 void CalcAll();
693 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */