nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / table.hxx
blobea13cf9b4071e5387b6e221350188dcc417b196f
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 #ifndef INCLUDED_SC_INC_TABLE_HXX
21 #define INCLUDED_SC_INC_TABLE_HXX
23 #include <algorithm>
24 #include <vector>
25 #include <tools/gen.hxx>
26 #include <tools/color.hxx>
27 #include "attarray.hxx"
28 #include "column.hxx"
29 #include "colcontainer.hxx"
30 #include "sortparam.hxx"
31 #include "types.hxx"
32 #include "cellvalue.hxx"
33 #include <formula/types.hxx>
34 #include "calcmacros.hxx"
35 #include <formula/errorcodes.hxx>
36 #include "document.hxx"
37 #include "drwlayer.hxx"
39 #include <set>
40 #include <memory>
42 template <typename A, typename D> class ScBitMaskCompressedArray;
43 template <typename A, typename D> class ScCompressedArray;
45 namespace utl {
46 class TextSearch;
49 namespace com::sun::star {
50 namespace sheet {
51 struct TablePageBreakData;
55 namespace formula { struct VectorRefArray; }
56 namespace sc {
58 class StartListeningContext;
59 class EndListeningContext;
60 class CopyFromClipContext;
61 class CopyToClipContext;
62 class CopyToDocContext;
63 class MixDocContext;
64 class ColumnSpanSet;
65 class RangeColumnSpanSet;
66 class ColumnSet;
67 struct ColumnBlockPosition;
68 class TableColumnBlockPositionSet;
69 struct RefUpdateContext;
70 struct RefUpdateInsertTabContext;
71 struct RefUpdateDeleteTabContext;
72 struct RefUpdateMoveTabContext;
73 struct NoteEntry;
74 class DocumentStreamAccess;
75 class CellValues;
76 class TableValues;
77 class RowHeightContext;
78 class CompileFormulaContext;
79 struct SetFormulaDirtyContext;
80 class ColumnIterator;
81 class ScDrawObjData;
84 class SfxItemSet;
85 class SfxStyleSheetBase;
86 class SvxBoxInfoItem;
87 class SvxBoxItem;
88 class SvxSearchItem;
90 class ScAutoFormatData;
91 class ScEditDataArray;
92 class ScFormulaCell;
93 class ScOutlineTable;
94 class ScPrintSaverTab;
95 class ScProgress;
96 class ScRangeList;
97 class ScSheetEvents;
98 class ScSortInfoArray;
99 class ScConditionalFormat;
100 class ScConditionalFormatList;
101 class ScStyleSheet;
102 class ScTableProtection;
103 class ScUserListData;
104 struct RowInfo;
105 class ScFunctionData;
106 class CollatorWrapper;
107 class ScFlatUInt16RowSegments;
108 class ScFlatBoolRowSegments;
109 class ScFlatBoolColSegments;
110 struct ScSetStringParam;
111 struct ScColWidthParam;
112 class ScRangeName;
113 class ScDBData;
114 class ScHint;
115 class ScPostIt;
116 struct ScInterpreterContext;
119 class ScColumnsRange final
121 public:
122 class Iterator final
124 std::vector<std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn>>>::const_iterator maColIter;
125 public:
126 typedef std::input_iterator_tag iterator_category;
127 typedef SCCOL value_type;
128 typedef SCCOL difference_type;
129 typedef const SCCOL* pointer;
130 typedef SCCOL reference;
132 explicit Iterator(const std::vector<std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn>>>::const_iterator& colIter) : maColIter(colIter) {}
134 Iterator& operator++() { ++maColIter; return *this;}
135 Iterator& operator--() { --maColIter; return *this;}
137 bool operator==(const Iterator & rOther) const {return maColIter == rOther.maColIter;}
138 bool operator!=(const Iterator & rOther) const {return !(*this == rOther);}
139 SCCOL operator*() const {return (*maColIter)->GetCol();}
142 ScColumnsRange(const Iterator & rBegin, const Iterator & rEnd) : maBegin(rBegin), maEnd(rEnd) {}
143 const Iterator & begin() { return maBegin; }
144 const Iterator & end() { return maEnd; }
145 std::reverse_iterator<Iterator> rbegin() { return std::reverse_iterator<Iterator>(maEnd); }
146 std::reverse_iterator<Iterator> rend() { return std::reverse_iterator<Iterator>(maBegin); }
147 private:
148 const Iterator maBegin;
149 const Iterator maEnd;
152 class ScTable
154 private:
155 typedef ::std::vector< ScRange > ScRangeVec;
157 mutable ScColContainer aCol;
159 OUString aName;
160 OUString aCodeName;
161 OUString aComment;
163 OUString aLinkDoc;
164 OUString aLinkFlt;
165 OUString aLinkOpt;
166 OUString aLinkTab;
167 sal_uLong nLinkRefreshDelay;
168 ScLinkMode nLinkMode;
170 // page style template
171 OUString aPageStyle;
172 Size aPageSizeTwips; // size of the print-page
173 SCCOL nRepeatStartX; // repeating rows/columns
174 SCCOL nRepeatEndX; // REPEAT_NONE, if not used
175 SCROW nRepeatStartY;
176 SCROW nRepeatEndY;
178 std::unique_ptr<ScTableProtection> pTabProtection;
180 std::unique_ptr<ScCompressedArray<SCCOL, sal_uInt16>> mpColWidth;
181 std::unique_ptr<ScFlatUInt16RowSegments> mpRowHeights;
183 std::unique_ptr<ScBitMaskCompressedArray<SCCOL, CRFlags>> mpColFlags;
184 std::unique_ptr<ScBitMaskCompressedArray< SCROW, CRFlags>> pRowFlags;
185 std::unique_ptr<ScFlatBoolColSegments> mpHiddenCols;
186 std::unique_ptr<ScFlatBoolRowSegments> mpHiddenRows;
187 std::unique_ptr<ScFlatBoolColSegments> mpFilteredCols;
188 std::unique_ptr<ScFlatBoolRowSegments> mpFilteredRows;
190 ::std::set<SCROW> maRowPageBreaks;
191 ::std::set<SCROW> maRowManualBreaks;
192 ::std::set<SCCOL> maColPageBreaks;
193 ::std::set<SCCOL> maColManualBreaks;
195 std::unique_ptr<ScOutlineTable> pOutlineTable;
197 std::unique_ptr<ScSheetEvents> pSheetEvents;
199 mutable SCCOL nTableAreaX;
200 mutable SCROW nTableAreaY;
202 SCTAB nTab;
203 ScDocument& rDocument;
204 std::unique_ptr<utl::TextSearch> pSearchText;
206 mutable OUString aUpperName; // #i62977# filled only on demand, reset in SetName
208 // sort parameter to minimize stack size of quicksort
209 ScSortParam aSortParam;
210 CollatorWrapper* pSortCollator;
212 ScRangeVec aPrintRanges;
214 std::unique_ptr<ScRange> pRepeatColRange;
215 std::unique_ptr<ScRange> pRepeatRowRange;
217 sal_uInt16 nLockCount;
219 std::unique_ptr<ScRangeList> pScenarioRanges;
220 Color aScenarioColor;
221 Color aTabBgColor;
222 ScScenarioFlags nScenarioFlags;
223 std::unique_ptr<ScDBData> pDBDataNoName;
224 mutable std::unique_ptr<ScRangeName> mpRangeName;
226 std::unique_ptr<ScConditionalFormatList> mpCondFormatList;
228 ScAddress maLOKFreezeCell;
230 bool bScenario:1;
231 bool bLayoutRTL:1;
232 bool bLoadingRTL:1;
233 bool bPageSizeValid:1;
234 mutable bool bTableAreaValid:1;
235 bool bVisible:1;
236 bool bStreamValid:1;
237 bool bPendingRowHeights:1;
238 bool bCalcNotification:1;
239 bool bGlobalKeepQuery:1;
240 bool bPrintEntireSheet:1;
241 bool bActiveScenario:1;
242 bool mbPageBreaksValid:1;
243 bool mbForceBreaks:1;
245 // Default attributes for the unallocated columns.
246 ScAttrArray aDefaultColAttrArray;
248 friend class ScDocument; // for FillInfo
249 friend class ScColumn;
250 friend class ScValueIterator;
251 friend class ScHorizontalValueIterator;
252 friend class ScDBQueryDataIterator;
253 friend class ScFormulaGroupIterator;
254 friend class ScCellIterator;
255 friend class ScQueryCellIterator;
256 friend class ScCountIfCellIterator;
257 friend class ScHorizontalCellIterator;
258 friend class ScHorizontalAttrIterator;
259 friend class ScDocAttrIterator;
260 friend class ScAttrRectIterator;
261 friend class ScColumnTextWidthIterator;
262 friend class ScDocumentImport;
263 friend class sc::DocumentStreamAccess;
264 friend class sc::ColumnSpanSet;
265 friend class sc::RangeColumnSpanSet;
266 friend class sc::EditTextIterator;
267 friend class sc::FormulaGroupAreaListener;
269 public:
270 ScTable( ScDocument& rDoc, SCTAB nNewTab, const OUString& rNewName,
271 bool bColInfo = true, bool bRowInfo = true );
272 ~ScTable() COVERITY_NOEXCEPT_FALSE;
273 ScTable(const ScTable&) = delete;
274 ScTable& operator=(const ScTable&) = delete;
276 ScDocument& GetDoc() { return rDocument;}
277 const ScDocument& GetDoc() const { return rDocument;}
278 SCTAB GetTab() const { return nTab; }
280 ScOutlineTable* GetOutlineTable() { return pOutlineTable.get(); }
282 ScColumn& CreateColumnIfNotExists( const SCCOL nScCol ) const
284 if ( nScCol >= aCol.size() )
285 CreateColumnIfNotExistsImpl(nScCol);
286 return aCol[nScCol];
288 // out-of-line the cold part of the function
289 void CreateColumnIfNotExistsImpl( const SCCOL nScCol ) const;
290 sal_uLong GetCellCount() const;
291 sal_uLong GetWeightedCount() const;
292 sal_uLong GetWeightedCount(SCROW nStartRow, SCROW nEndRow) const;
293 sal_uLong GetCodeCount() const; // RPN code in formula
295 sal_uInt16 GetTextWidth(SCCOL nCol, SCROW nRow) const;
297 bool SetOutlineTable( const ScOutlineTable* pNewOutline );
298 void StartOutlineTable();
300 void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
302 bool TestRemoveSubTotals( const ScSubTotalParam& rParam );
303 void RemoveSubTotals( ScSubTotalParam& rParam );
304 bool DoSubTotals( ScSubTotalParam& rParam );
306 const ScSheetEvents* GetSheetEvents() const { return pSheetEvents.get(); }
307 void SetSheetEvents( std::unique_ptr<ScSheetEvents> pNew );
309 bool IsVisible() const { return bVisible; }
310 void SetVisible( bool bVis );
312 bool IsStreamValid() const { return bStreamValid; }
313 void SetStreamValid( bool bSet, bool bIgnoreLock = false );
315 [[nodiscard]] bool IsColValid( const SCCOL nScCol ) const
317 return nScCol >= static_cast< SCCOL >( 0 ) && nScCol < aCol.size();
319 [[nodiscard]] bool IsColRowValid( const SCCOL nScCol, const SCROW nScRow ) const
321 return IsColValid( nScCol ) && GetDoc().ValidRow( nScRow );
323 [[nodiscard]] bool IsColRowTabValid( const SCCOL nScCol, const SCROW nScRow, const SCTAB nScTab ) const
325 return IsColValid( nScCol ) && GetDoc().ValidRow( nScRow ) && ValidTab( nScTab );
327 [[nodiscard]] bool ValidCol(SCCOL nCol) const { return GetDoc().ValidCol(nCol); }
328 [[nodiscard]] bool ValidRow(SCROW nRow) const { return GetDoc().ValidRow(nRow); }
329 [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return GetDoc().ValidColRow(nCol, nRow); }
331 bool IsPendingRowHeights() const { return bPendingRowHeights; }
332 void SetPendingRowHeights( bool bSet );
334 bool GetCalcNotification() const { return bCalcNotification; }
335 void SetCalcNotification( bool bSet );
337 bool IsLayoutRTL() const { return bLayoutRTL; }
338 bool IsLoadingRTL() const { return bLoadingRTL; }
339 void SetLayoutRTL( bool bSet );
340 void SetLoadingRTL( bool bSet );
342 bool IsScenario() const { return bScenario; }
343 void SetScenario( bool bFlag );
344 void GetScenarioComment( OUString& rComment) const { rComment = aComment; }
345 void SetScenarioComment( const OUString& rComment ) { aComment = rComment; }
346 const Color& GetScenarioColor() const { return aScenarioColor; }
347 void SetScenarioColor(const Color& rNew) { aScenarioColor = rNew; }
348 const Color& GetTabBgColor() const { return aTabBgColor; }
349 void SetTabBgColor(const Color& rColor);
350 ScScenarioFlags GetScenarioFlags() const { return nScenarioFlags; }
351 void SetScenarioFlags(ScScenarioFlags nNew) { nScenarioFlags = nNew; }
352 void SetActiveScenario(bool bSet) { bActiveScenario = bSet; }
353 bool IsActiveScenario() const { return bActiveScenario; }
355 ScLinkMode GetLinkMode() const { return nLinkMode; }
356 bool IsLinked() const { return nLinkMode != ScLinkMode::NONE; }
357 const OUString& GetLinkDoc() const { return aLinkDoc; }
358 const OUString& GetLinkFlt() const { return aLinkFlt; }
359 const OUString& GetLinkOpt() const { return aLinkOpt; }
360 const OUString& GetLinkTab() const { return aLinkTab; }
361 sal_uLong GetLinkRefreshDelay() const { return nLinkRefreshDelay; }
363 void SetLink( ScLinkMode nMode, const OUString& rDoc, const OUString& rFlt,
364 const OUString& rOpt, const OUString& rTab, sal_uLong nRefreshDelay );
366 sal_Int64 GetHashCode () const;
368 const OUString& GetName() const { return aName; }
369 void SetName( const OUString& rNewName );
371 void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
372 ScDBData* GetAnonymousDBData() { return pDBDataNoName.get();}
374 const OUString& GetCodeName() const { return aCodeName; }
375 void SetCodeName( const OUString& rNewName ) { aCodeName = rNewName; }
377 const OUString& GetUpperName() const;
379 const OUString& GetPageStyle() const { return aPageStyle; }
380 void SetPageStyle( const OUString& rName );
381 void PageStyleModified( const OUString& rNewName );
383 bool IsProtected() const;
384 void SetProtection(const ScTableProtection* pProtect);
385 ScTableProtection* GetProtection();
386 void GetUnprotectedCells( ScRangeList& rRangeList ) const;
388 bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCCOLROW nStart, SCCOLROW nEnd ) const;
390 Size GetPageSize() const;
391 void SetPageSize( const Size& rSize );
392 void SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
394 void LockTable();
395 void UnlockTable();
397 bool IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
398 SCROW nRow2, bool* pOnlyNotBecauseOfMatrix = nullptr,
399 bool bNoMatrixAtAll = false ) const;
400 bool IsSelectionEditable( const ScMarkData& rMark,
401 bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
403 bool HasBlockMatrixFragment( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2,
404 bool bNoMatrixAtAll = false ) const;
405 bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
407 bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const;
409 bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
410 const ScSetStringParam * pParam = nullptr );
412 bool SetEditText( SCCOL nCol, SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
413 void SetEditText( SCCOL nCol, SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
414 SCROW GetFirstEditTextRow( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
416 void SetEmptyCell( SCCOL nCol, SCROW nRow );
417 void SetFormula(
418 SCCOL nCol, SCROW nRow, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram );
419 void SetFormula(
420 SCCOL nCol, SCROW nRow, const OUString& rFormula, formula::FormulaGrammar::Grammar eGram );
423 * Takes ownership of pCell
425 * @return pCell if it was successfully inserted, NULL otherwise. pCell
426 * is deleted automatically on failure to insert.
428 ScFormulaCell* SetFormulaCell( SCCOL nCol, SCROW nRow, ScFormulaCell* pCell );
430 bool SetFormulaCells( SCCOL nCol, SCROW nRow, std::vector<ScFormulaCell*>& rCells );
432 bool HasFormulaCell( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 ) const;
434 svl::SharedString GetSharedString( SCCOL nCol, SCROW nRow ) const;
436 void SetValue( SCCOL nCol, SCROW nRow, const double& rVal );
437 void SetValues( const SCCOL nCol, const SCROW nRow, const std::vector<double>& rVals );
438 void SetError( SCCOL nCol, SCROW nRow, FormulaError nError);
439 SCSIZE GetPatternCount( SCCOL nCol ) const;
440 SCSIZE GetPatternCount( SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
441 bool ReservePatternCount( SCCOL nCol, SCSIZE nReserve );
443 void SetRawString( SCCOL nCol, SCROW nRow, const svl::SharedString& rStr );
444 void GetString( SCCOL nCol, SCROW nRow, OUString& rString,
445 const ScInterpreterContext* pContext = nullptr ) const;
446 double* GetValueCell( SCCOL nCol, SCROW nRow );
447 void GetInputString( SCCOL nCol, SCROW nRow, OUString& rString ) const;
448 double GetValue( SCCOL nCol, SCROW nRow ) const;
449 const EditTextObject* GetEditText( SCCOL nCol, SCROW nRow ) const;
450 void RemoveEditTextCharAttribs( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
451 void GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const;
452 const ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow ) const;
453 ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow );
455 CellType GetCellType( const ScAddress& rPos ) const
457 if (!GetDoc().ValidColRow(rPos.Col(),rPos.Row()))
458 return CELLTYPE_NONE;
459 if (rPos.Col() >= aCol.size())
460 return CELLTYPE_NONE;
461 return aCol[rPos.Col()].GetCellType( rPos.Row() );
463 CellType GetCellType( SCCOL nCol, SCROW nRow ) const;
464 ScRefCellValue GetCellValue( SCCOL nCol, SCROW nRow ) const;
466 void GetFirstDataPos(SCCOL& rCol, SCROW& rRow) const;
467 void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
469 std::unique_ptr<ScPostIt> ReleaseNote( SCCOL nCol, SCROW nRow );
471 size_t GetNoteCount( SCCOL nCol ) const;
472 SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const;
473 void CreateAllNoteCaptions();
474 void ForgetNoteCaptions( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bPreserveData );
476 void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
477 void GetNotesInRange( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
478 CommentCaptionState GetAllNoteCaptionsState( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes );
479 bool ContainsNotesInRange( const ScRange& rRange ) const;
481 bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ) const;
482 void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
483 void DeleteRow(
484 const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
485 bool* pUndoOutline, std::vector<ScAddress>* pGroupPos );
487 bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const;
488 void InsertCol(
489 const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize );
490 void DeleteCol(
491 const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline );
493 void DeleteArea(
494 SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag,
495 bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
497 void CopyToClip( sc::CopyToClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable );
498 void CopyToClip( sc::CopyToClipContext& rCxt, const ScRangeList& rRanges, ScTable* pTable );
500 void CopyStaticToDocument(
501 SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const SvNumberFormatterMergeMap& rMap,
502 ScTable* pDestTab );
504 void CopyCellToDocument( SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, SCROW nDestRow, ScTable& rDestTab );
506 bool InitColumnBlockPosition( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol );
508 void DeleteBeforeCopyFromClip(
509 sc::CopyFromClipContext& rCxt, const ScTable& rClipTab, sc::ColumnSpanSet& rBroadcastSpans );
511 void CopyOneCellFromClip(
512 sc::CopyFromClipContext& rCxt, const SCCOL nCol1, const SCROW nRow1,
513 const SCCOL nCol2, const SCROW nRow2,
514 const SCROW nSrcRow, const ScTable* pSrcTab );
516 void CopyFromClip(
517 sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
518 SCCOL nDx, SCROW nDy, ScTable* pTable );
520 void StartListeningFormulaCells(
521 sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt,
522 SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
524 void SetDirtyFromClip(
525 SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
527 void CopyToTable(
528 sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
529 InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab,
530 const ScMarkData* pMarkData, bool bAsLink, bool bColRowFlags,
531 bool bGlobalNamesToLocal, bool bCopyCaptions );
533 void CopyCaptionsToTable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pDestTab, bool bCloneCaption );
535 void UndoToTable(
536 sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
537 InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab );
539 void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
540 SCCOL nDx, SCROW nDy, const ScTable* pTable);
541 void TransposeClip( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
542 ScTable* pTransClip, InsertDeleteFlags nFlags, bool bAsLink );
544 // mark of this document
545 void MixMarked(
546 sc::MixDocContext& rCxt, const ScMarkData& rMark, ScPasteFunc nFunction,
547 bool bSkipEmpty, const ScTable* pSrcTab );
549 void MixData(
550 sc::MixDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
551 ScPasteFunc nFunction, bool bSkipEmpty, const ScTable* pSrcTab );
553 void CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
554 SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab );
556 void CopyScenarioFrom( const ScTable* pSrcTab );
557 void CopyScenarioTo( const ScTable* pDestTab ) const;
558 bool TestCopyScenarioTo( const ScTable* pDestTab ) const;
559 void MarkScenarioIn(ScMarkData& rMark, ScScenarioFlags nNeededBits) const;
560 bool HasScenarioRange( const ScRange& rRange ) const;
561 void InvalidateScenarioRanges();
562 const ScRangeList* GetScenarioRanges() const;
564 void CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const;
566 void InvalidateTableArea();
567 void InvalidatePageBreaks();
569 bool GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // FALSE = empty
570 bool GetTableArea( SCCOL& rEndCol, SCROW& rEndRow ) const;
571 bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes ) const;
572 bool GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
573 SCCOL& rEndCol ) const;
574 bool GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
575 SCROW& rEndRow, bool bNotes ) const;
577 bool GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const;
579 void ExtendPrintArea( OutputDevice* pDev,
580 SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow );
582 void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow,
583 bool bIncludeOld, bool bOnlyDown ) const;
585 bool GetDataAreaSubrange( ScRange& rRange ) const;
587 bool ShrinkToUsedDataArea( bool& o_bShrunk, SCCOL& rStartCol, SCROW& rStartRow,
588 SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
589 bool bStickyTopRow, bool bStickyLeftCol, bool bConsiderCellNotes,
590 bool bConsiderCellDrawObjects ) const;
592 SCROW GetLastDataRow( SCCOL nCol1, SCCOL nCol2, SCROW nLastRow,
593 bool bConsiderCellNotes = false, bool bConsiderCellDrawObjects = false ) const;
595 SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
596 SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const;
598 void FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const;
599 void GetNextPos( SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY,
600 bool bMarked, bool bUnprotected, const ScMarkData& rMark, SCCOL nTabStartCol ) const;
602 bool SkipRow( const SCCOL rCol, SCROW& rRow, const SCROW nMovY, const ScMarkData& rMark,
603 const bool bUp, const SCROW nUsedY, const bool bMarked, const bool bSheetProtected ) const;
604 void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
606 bool HasData( SCCOL nCol, SCROW nRow ) const;
607 bool HasStringData( SCCOL nCol, SCROW nRow ) const;
608 bool HasValueData( SCCOL nCol, SCROW nRow ) const;
609 bool HasStringCells( SCCOL nStartCol, SCROW nStartRow,
610 SCCOL nEndCol, SCROW nEndRow ) const;
612 sc::MultiDataCellState HasMultipleDataCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
614 FormulaError GetErrCode( const ScAddress& rPos ) const
616 return IsColRowValid(rPos.Col(),rPos.Row()) ?
617 aCol[rPos.Col()].GetErrCode( rPos.Row() ) :
618 FormulaError::NONE;
621 void ResetChanged( const ScRange& rRange );
623 void CheckVectorizationState();
624 void SetAllFormulasDirty( const sc::SetFormulaDirtyContext& rCxt );
625 void SetDirty( const ScRange&, ScColumn::BroadcastMode );
626 void SetDirtyAfterLoad();
627 void SetDirtyVar();
628 void SetTableOpDirty( const ScRange& );
629 void CalcAll();
630 void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
631 void CompileAll( sc::CompileFormulaContext& rCxt );
632 void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
634 /** Broadcast single broadcasters in range, without explicitly setting
635 anything dirty, not doing area broadcasts.
636 @param rHint address is modified to adapt to the actual broadcasted
637 position on each iteration and upon return points to the last
638 position broadcasted. */
639 bool BroadcastBroadcasters( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScHint& rHint );
641 bool CompileErrorCells( sc::CompileFormulaContext& rCxt, FormulaError nErrCode );
643 void UpdateReference(
644 sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr,
645 bool bIncludeDraw = true, bool bUpdateNoteCaptionPos = true );
647 void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
648 SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
649 SCCOL nDx, SCROW nDy, SCTAB nDz, bool bUpdateNoteCaptionPos = true );
651 void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
652 ScDocument* pUndoDoc );
654 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
656 void UpdateInsertTab( sc::RefUpdateInsertTabContext& rCxt );
657 void UpdateDeleteTab( sc::RefUpdateDeleteTabContext& rCxt );
658 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo, ScProgress* pProgress );
659 void UpdateCompile( bool bForceIfNameInUse = false );
660 void SetTabNo(SCTAB nNewTab);
661 void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
662 sc::UpdatedRangeNames& rIndexes) const;
663 void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
664 sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
665 double nStepValue, double nMaxValue, ScProgress* pProgress);
666 OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
668 void UpdateSelectionFunction( ScFunctionData& rData, const ScMarkData& rMark );
670 void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
671 sal_uInt16 nFormatNo );
672 void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData);
673 bool SearchAndReplace(
674 const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark,
675 ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
677 void FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2 );
679 bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, HasAttrFlags nMask ) const;
680 bool HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const;
681 bool IsMerged( SCCOL nCol, SCROW nRow ) const;
682 bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
683 SCCOL& rEndCol, SCROW& rEndRow,
684 bool bRefresh );
685 void SetMergedCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
687 const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const;
688 template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, TypedWhichId<T> nWhich ) const
690 return static_cast<const T*>(GetAttr(nCol, nRow, sal_uInt16(nWhich)));
692 const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow ) const;
693 const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
695 sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& rPos ) const;
696 sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nRow ) const;
697 sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
699 void SetNumberFormat( SCCOL nCol, SCROW nRow, sal_uInt32 nNumberFormat );
701 void MergeSelectionPattern( ScMergePatternState& rState,
702 const ScMarkData& rMark, bool bDeep ) const;
703 void MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1,
704 SCCOL nCol2, SCROW nRow2, bool bDeep ) const;
705 void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
706 ScLineFlags& rFlags,
707 SCCOL nStartCol, SCROW nStartRow,
708 SCCOL nEndCol, SCROW nEndRow ) const;
709 void ApplyBlockFrame(const SvxBoxItem& rLineOuter,
710 const SvxBoxInfoItem* pLineInner,
711 SCCOL nStartCol, SCROW nStartRow,
712 SCCOL nEndCol, SCROW nEndRow );
714 void ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
715 void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
716 void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
717 const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr,
718 bool* const pIsChanged = nullptr );
720 void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr );
721 const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPatternAttr> );
722 void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
723 void ApplyPatternIfNumberformatIncompatible( const ScRange& rRange,
724 const ScPatternAttr& rPattern, SvNumFormatType nNewType );
725 void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
726 void RemoveCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
727 void SetPatternAreaCondFormat( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
728 const ScPatternAttr& rAttr, const ScCondFormatIndexes& rCondFormatIndexes );
730 void ApplyStyle( SCCOL nCol, SCROW nRow, const ScStyleSheet* rStyle );
731 void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle );
732 void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
733 void ApplySelectionLineStyle( const ScMarkData& rMark,
734 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
736 const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow ) const;
737 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const;
738 const ScStyleSheet* GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow1,
739 SCCOL nCol2, SCROW nRow2 ) const;
741 void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
742 OutputDevice* pDev,
743 double nPPTX, double nPPTY,
744 const Fraction& rZoomX, const Fraction& rZoomY );
746 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
748 bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
749 bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
751 void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = nullptr, bool* const pIsChanged = nullptr );
752 void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
754 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
755 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
757 const ScRange* GetRepeatColRange() const { return pRepeatColRange.get(); }
758 const ScRange* GetRepeatRowRange() const { return pRepeatRowRange.get(); }
759 void SetRepeatColRange( std::unique_ptr<ScRange> pNew );
760 void SetRepeatRowRange( std::unique_ptr<ScRange> pNew );
762 sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); }
763 const ScRange* GetPrintRange(sal_uInt16 nPos) const;
764 /** Returns true, if the sheet is always printed. */
765 bool IsPrintEntireSheet() const { return bPrintEntireSheet; }
767 /** Removes all print ranges. */
768 void ClearPrintRanges();
769 /** Adds a new print ranges. */
770 void AddPrintRange( const ScRange& rNew );
771 /** Marks the specified sheet to be printed completely. Deletes old print ranges! */
772 void SetPrintEntireSheet();
774 void FillPrintSaver( ScPrintSaverTab& rSaveTab ) const;
775 void RestorePrintRanges( const ScPrintSaverTab& rSaveTab );
777 sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
778 double nPPTX, double nPPTY,
779 const Fraction& rZoomX, const Fraction& rZoomY,
780 bool bFormula, const ScMarkData* pMarkData,
781 const ScColWidthParam* pParam );
782 bool SetOptimalHeight(
783 sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
784 ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
786 void SetOptimalHeightOnly(
787 sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
788 ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
790 tools::Long GetNeededSize( SCCOL nCol, SCROW nRow,
791 OutputDevice* pDev,
792 double nPPTX, double nPPTY,
793 const Fraction& rZoomX, const Fraction& rZoomY,
794 bool bWidth, bool bTotalSize,
795 bool bInPrintTwips = false);
796 void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth );
797 void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth );
798 void SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight );
799 bool SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
800 double nPPTY );
803 * Set specified row height to specified ranges. Don't check for drawing
804 * objects etc. Just set the row height. Nothing else.
806 * Note that setting a new row height via this function will not
807 * invalidate page breaks.
809 void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight );
811 // nPPT to test for modification
812 void SetManualHeight( SCROW nStartRow, SCROW nEndRow, bool bManual );
814 sal_uInt16 GetColWidth( SCCOL nCol, bool bHiddenAsZero = true ) const;
815 sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const;
816 sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
817 sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const;
818 sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
819 sal_uLong GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const;
820 sal_uLong GetRowOffset( SCROW nRow, bool bHiddenAsZero = true ) const;
823 * Get the last row such that the height of row 0 to the end row is as
824 * high as possible without exceeding the specified height value.
826 * @param nHeight maximum desired height
828 * @return SCROW last row of the range within specified height.
830 SCROW GetRowForHeight(sal_uLong nHeight) const;
832 sal_uInt16 GetOriginalWidth( SCCOL nCol ) const;
833 sal_uInt16 GetOriginalHeight( SCROW nRow ) const;
835 sal_uInt16 GetCommonWidth( SCCOL nEndCol ) const;
837 SCROW GetHiddenRowCount( SCROW nRow ) const;
839 void ShowCol(SCCOL nCol, bool bShow);
840 void ShowRow(SCROW nRow, bool bShow);
841 void DBShowRow(SCROW nRow, bool bShow);
843 void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
844 void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
846 void SetRowFlags( SCROW nRow, CRFlags nNewFlags );
847 void SetRowFlags( SCROW nStartRow, SCROW nEndRow, CRFlags nNewFlags );
849 /// @return the index of the last row with any set flags (auto-pagebreak is ignored).
850 SCROW GetLastFlaggedRow() const;
852 /// @return the index of the last changed column (flags and column width, auto pagebreak is ignored).
853 SCCOL GetLastChangedCol() const;
854 /// @return the index of the last changed row (flags and row height, auto pagebreak is ignored).
855 SCROW GetLastChangedRow() const;
857 bool IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const;
858 bool IsDataFiltered(const ScRange& rRange) const;
859 CRFlags GetColFlags( SCCOL nCol ) const;
860 CRFlags GetRowFlags( SCROW nRow ) const;
862 const ScBitMaskCompressedArray< SCROW, CRFlags> * GetRowFlagsArray() const
863 { return pRowFlags.get(); }
865 bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, bool bShow );
866 bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, bool bShow );
868 void UpdatePageBreaks( const ScRange* pUserArea );
869 void RemoveManualBreaks();
870 bool HasManualBreaks() const;
871 void SetRowManualBreaks( const ::std::set<SCROW>& rBreaks );
872 void SetColManualBreaks( const ::std::set<SCCOL>& rBreaks );
874 void GetAllRowBreaks(::std::set<SCROW>& rBreaks, bool bPage, bool bManual) const;
875 void GetAllColBreaks(::std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const;
876 bool HasRowPageBreak(SCROW nRow) const;
877 bool HasColPageBreak(SCCOL nCol) const;
878 bool HasRowManualBreak(SCROW nRow) const;
879 bool HasColManualBreak(SCCOL nCol) const;
882 * Get the row position of the next manual break that occurs at or below
883 * specified row. When no more manual breaks are present at or below
884 * the specified row, -1 is returned.
886 * @param nRow row at which the search begins.
888 * @return SCROW next row position with manual page break, or -1 if no
889 * more manual breaks are present.
891 SCROW GetNextManualBreak(SCROW nRow) const;
893 void RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow);
894 void RemoveRowBreak(SCROW nRow, bool bPage, bool bManual);
895 void RemoveColBreak(SCCOL nCol, bool bPage, bool bManual);
896 void SetRowBreak(SCROW nRow, bool bPage, bool bManual);
897 void SetColBreak(SCCOL nCol, bool bPage, bool bManual);
898 css::uno::Sequence<
899 css::sheet::TablePageBreakData> GetRowBreakData() const;
901 bool RowHidden(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
902 bool RowHiddenLeaf(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
903 bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
904 bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
905 bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
906 void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
907 void CopyColHidden(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
908 void CopyRowHidden(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
909 void CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
910 SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
911 SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
912 SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
913 sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true) const;
915 SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
917 bool RowFiltered(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
918 bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
919 bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
920 void CopyColFiltered(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
921 void CopyRowFiltered(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
922 void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered);
923 void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered);
924 SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
925 SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
926 SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
928 bool IsManualRowHeight(SCROW nRow) const;
930 bool HasUniformRowHeight( SCROW nRow1, SCROW nRow2 ) const;
932 void SyncColRowFlags();
934 void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
935 void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
937 /** Sort a range of data. */
938 void Sort(
939 const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
940 ScProgress* pProgress, sc::ReorderParam* pUndo );
942 void Reorder( const sc::ReorderParam& rParam );
944 bool ValidQuery(
945 SCROW nRow, const ScQueryParam& rQueryParam, const ScRefCellValue* pCell = nullptr,
946 bool* pbTestEqualCondition = nullptr, const ScInterpreterContext* pContext = nullptr,
947 sc::TableColumnBlockPositionSet* pBlockPos = nullptr );
948 void TopTenQuery( ScQueryParam& );
949 SCSIZE Query(const ScQueryParam& rQueryParam, bool bKeepSub);
950 bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
952 void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, ScFilterEntries& rFilterEntries );
953 void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, ScFilterEntries& rFilterEntries );
954 [[nodiscard]]
955 bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& rStrings, bool bLimit);
957 bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const;
958 bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const;
960 sal_Int32 GetMaxStringLen( SCCOL nCol,
961 SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const;
962 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
963 SCCOL nCol,
964 SCROW nRowStart, SCROW nRowEnd ) const;
966 bool IsSortCollatorGlobal() const;
967 void InitSortCollator( const ScSortParam& rPar );
968 void DestroySortCollator();
969 void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true,
970 const ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
972 void SetRangeName(std::unique_ptr<ScRangeName> pNew);
973 ScRangeName* GetRangeName() const;
975 void PreprocessRangeNameUpdate(
976 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
978 void CompileHybridFormula(
979 sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
981 void PreprocessDBDataUpdate(
982 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
984 ScConditionalFormatList* GetCondFormList();
985 const ScConditionalFormatList* GetCondFormList() const;
986 void SetCondFormList( ScConditionalFormatList* pList );
988 void DeleteConditionalFormat(sal_uLong nOldIndex);
990 sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew );
992 SvtScriptType GetScriptType( SCCOL nCol, SCROW nRow ) const;
993 void SetScriptType( SCCOL nCol, SCROW nRow, SvtScriptType nType );
994 void UpdateScriptTypes( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 );
996 SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2 );
998 size_t GetFormulaHash( SCCOL nCol, SCROW nRow ) const;
1000 ScFormulaVectorState GetFormulaVectorState( SCCOL nCol, SCROW nRow ) const;
1001 formula::FormulaTokenRef ResolveStaticReference( SCCOL nCol, SCROW nRow );
1002 formula::FormulaTokenRef ResolveStaticReference( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1003 formula::VectorRefArray FetchVectorRefArray( SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1004 bool HandleRefArrayForParallelism( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup );
1005 #ifdef DBG_UTIL
1006 void AssertNoInterpretNeeded( SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1007 #endif
1009 void SplitFormulaGroups( SCCOL nCol, std::vector<SCROW>& rRows );
1010 void UnshareFormulaCells( SCCOL nCol, std::vector<SCROW>& rRows );
1011 void RegroupFormulaCells( SCCOL nCol );
1013 ScRefCellValue GetRefCellValue( SCCOL nCol, SCROW nRow );
1014 ScRefCellValue GetRefCellValue( SCCOL nCol, SCROW nRow, sc::ColumnBlockPosition& rBlockPos );
1016 SvtBroadcaster* GetBroadcaster( SCCOL nCol, SCROW nRow );
1017 const SvtBroadcaster* GetBroadcaster( SCCOL nCol, SCROW nRow ) const;
1018 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1020 void FillMatrix( ScMatrix& rMat, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool* pPool ) const;
1022 void InterpretDirtyCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1024 void SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults, size_t nLen );
1026 void CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nColStart, SCCOL nColEnd,
1027 SCROW nRowStart, SCROW nRowEnd, unsigned nThisThread, unsigned nThreadsTotal);
1028 void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, ScInterpreter* pInterpreter);
1031 * Either start all formula cells as listeners unconditionally, or start
1032 * those that are marked "needs listening".
1034 * @param rCxt context object.
1035 * @param bAll when true, start all formula cells as listeners. When
1036 * false, only start those that are marked "needs listening".
1038 void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
1041 * Mark formula cells dirty that have the mbPostponedDirty flag set or
1042 * contain named ranges with relative references.
1044 void SetDirtyIfPostponed();
1047 * Broadcast dirty formula cells that contain functions such as CELL(),
1048 * COLUMN() or ROW() which may change its value on move.
1050 void BroadcastRecalcOnRefMove();
1052 void TransferCellValuesTo( const SCCOL nCol, SCROW nRow, size_t nLen, sc::CellValues& rDest );
1053 void CopyCellValuesFrom( const SCCOL nCol, SCROW nRow, const sc::CellValues& rSrc );
1055 std::unique_ptr<sc::ColumnIterator> GetColumnIterator( SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
1057 bool EnsureFormulaCellResults( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, bool bSkipRunning = false );
1059 void ConvertFormulaToValue(
1060 sc::EndListeningContext& rCxt,
1061 const SCCOL nCol1, const SCROW nRow1, const SCCOL nCol2, const SCROW nRow2,
1062 sc::TableValues* pUndo );
1064 void SwapNonEmpty(
1065 sc::TableValues& rValues, sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt );
1067 void finalizeOutlineImport();
1069 void StoreToCache(SvStream& rStrm) const;
1071 void RestoreFromCache(SvStream& rStrm);
1073 #if DUMP_COLUMN_STORAGE
1074 void DumpColumnStorage( SCCOL nCol ) const;
1075 #endif
1077 /** Replace behaves differently to the Search; adjust the rCol and rRow accordingly.
1079 'Replace' replaces at the 'current' position, but in order to achieve
1080 that, we have to 'shift' the rCol / rRow to the 'previous' position -
1081 what it is depends on various settings in rSearchItem.
1083 static void UpdateSearchItemAddressForReplace( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow );
1085 ScColumnsRange GetColumnsRange(SCCOL begin, SCCOL end) const;
1086 SCCOL ClampToAllocatedColumns(SCCOL nCol) const { return std::min(nCol, static_cast<SCCOL>(aCol.size() - 1)); }
1087 SCCOL GetAllocatedColumnsCount() const { return aCol.size(); }
1090 * Serializes the sheet's geometry data.
1092 * @param bColumns - if true it dumps the data for columns, else it does for rows.
1093 * @param eGeomType indicates the type of data to be dumped for rows/columns.
1094 * @return the serialization of the sheet's geometry data as an OString.
1096 OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType);
1098 private:
1100 void FillFormulaVertical(
1101 const ScFormulaCell& rSrcCell,
1102 SCCOLROW& rInner, SCCOL nCol, SCROW nRow1, SCROW nRow2,
1103 ScProgress* pProgress, sal_uLong& rProgress );
1105 void FillSeriesSimple(
1106 const ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
1107 const SCCOLROW& rCol, const SCCOLROW& rRow, bool bVertical, ScProgress* pProgress, sal_uLong& rProgress );
1109 void FillAutoSimple(
1110 SCCOLROW nISrcStart, SCCOLROW nISrcEnd, SCCOLROW nIStart, SCCOLROW nIEnd,
1111 SCCOLROW& rInner, const SCCOLROW& rCol, const SCCOLROW& rRow,
1112 sal_uLong nActFormCnt, sal_uLong nMaxFormCnt,
1113 bool bHasFiltered, bool bVertical, bool bPositive,
1114 ScProgress* pProgress, sal_uLong& rProgress );
1116 void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1117 sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd,
1118 FillDateCmd eFillDateCmd,
1119 double nStepValue, double nMaxValue, sal_uInt16 nMinDigits,
1120 bool bAttribs, ScProgress* pProgress,
1121 bool bSkipOverlappedCells = false,
1122 std::vector<sal_Int32>* pNonOverlappedCellIdx = nullptr);
1123 void FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1124 FillCmd& rCmd, FillDateCmd& rDateCmd,
1125 double& rInc, sal_uInt16& rMinDigits,
1126 ScUserListData*& rListData, sal_uInt16& rListIndex,
1127 bool bHasFiltered, bool& rSkipOverlappedCells,
1128 std::vector<sal_Int32>& rNonOverlappedCellIdx );
1129 void FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1130 sal_uLong nFillCount, FillDir eFillDir, ScProgress* pProgress );
1132 bool ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
1133 bool bMarked, bool bUnprotected ) const;
1135 void AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1136 const ScPatternAttr& rAttr, sal_uInt16 nFormatNo);
1137 void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData);
1138 void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData);
1139 bool SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
1140 const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1141 bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1142 const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1143 bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1144 SCCOL nLastCol, SCROW nLastRow,
1145 const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1146 bool SearchAll(const SvxSearchItem& rSearchItem, const ScMarkData& rMark,
1147 ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
1148 bool Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1149 const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1150 bool ReplaceAll(
1151 const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1152 OUString& rUndoStr, ScDocument* pUndoDoc);
1154 bool SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1155 const ScMarkData& rMark);
1156 bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1157 const ScMarkData& rMark, bool bIsUndo);
1158 bool SearchAllStyle(
1159 const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges);
1160 bool ReplaceAllStyle(
1161 const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1162 ScDocument* pUndoDoc);
1163 bool SearchAndReplaceEmptyCells(
1164 const SvxSearchItem& rSearchItem,
1165 SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1166 OUString& rUndoStr, ScDocument* pUndoDoc);
1167 bool SearchRangeForEmptyCell(const ScRange& rRange,
1168 const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1169 OUString& rUndoStr);
1170 bool SearchRangeForAllEmptyCells(
1171 const ScRange& rRange, const SvxSearchItem& rSearchItem,
1172 ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
1174 // use the global sort parameter:
1175 bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const;
1176 static void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 );
1177 short CompareCell(
1178 sal_uInt16 nSort,
1179 ScRefCellValue& rCell1, SCCOL nCell1Col, SCROW nCell1Row,
1180 ScRefCellValue& rCell2, SCCOL nCell2Col, SCROW nCell2Row ) const;
1181 short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const;
1182 short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2) const;
1183 std::unique_ptr<ScSortInfoArray> CreateSortInfoArray( const sc::ReorderParam& rParam );
1184 std::unique_ptr<ScSortInfoArray> CreateSortInfoArray(
1185 const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2,
1186 bool bKeepQuery, bool bUpdateRefs );
1187 void QuickSort( ScSortInfoArray*, SCCOLROW nLo, SCCOLROW nHi);
1188 void SortReorderByColumn( const ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress* pProgress );
1190 void SortReorderByRow( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress );
1191 void SortReorderByRowRefUpdate( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2, ScProgress* pProgress );
1193 bool CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
1194 bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
1195 void GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr);
1197 bool RefVisible(const ScFormulaCell* pCell);
1199 bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol) const;
1201 void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd);
1202 void FillFormula(
1203 const ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast );
1204 void UpdateInsertTabAbs(SCTAB nNewPos);
1205 bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel,
1206 const ScMarkData& rMark) const;
1207 bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const;
1208 void TestTabRefAbs(SCTAB nTable) const;
1209 void CompileDBFormula( sc::CompileFormulaContext& rCxt );
1210 void CompileColRowNameFormula( sc::CompileFormulaContext& rCxt );
1212 void StartListening( const ScAddress& rAddress, SvtListener* pListener );
1213 void EndListening( const ScAddress& rAddress, SvtListener* pListener );
1214 void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
1215 void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
1217 void AttachFormulaCells( sc::StartListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1218 void DetachFormulaCells( sc::EndListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1220 void SetLoadingMedium(bool bLoading);
1222 SCSIZE FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2,
1223 SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY,
1224 const ScPatternAttr* pPattern, const SfxItemSet* pCondSet );
1226 // idle calculation of OutputDevice text width for cell
1227 // also invalidates script type, broadcasts for "calc as shown"
1228 void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
1229 bool bNumFormatChanged, bool bBroadcast );
1231 void SkipFilteredRows(SCROW& rRow, SCROW& rLastNonFilteredRow, bool bForward);
1234 * In case the cell text goes beyond the column width, move the max column
1235 * position to the right. This is called from ExtendPrintArea.
1237 void MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY);
1239 void CopyPrintRange(const ScTable& rTable);
1241 SCCOL FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow) const;
1243 SCCOL FindNextVisibleCol(SCCOL nCol, bool bRight) const;
1245 // Clipboard transpose for notes
1246 void TransposeColNotes(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2);
1248 ScColumn* FetchColumn( SCCOL nCol );
1249 const ScColumn* FetchColumn( SCCOL nCol ) const;
1251 void EndListeningIntersectedGroup(
1252 sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow, std::vector<ScAddress>* pGroupPos );
1254 void EndListeningIntersectedGroups(
1255 sc::EndListeningContext& rCxt, const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2,
1256 std::vector<ScAddress>* pGroupPos );
1258 void EndListeningGroup( sc::EndListeningContext& rCxt, const SCCOL nCol, SCROW nRow );
1259 void SetNeedsListeningGroup( SCCOL nCol, SCROW nRow );
1261 /// Returns list-of-spans representation of the column-widths/row-heights in twips encoded as an OString.
1262 OString dumpColumnRowSizes(bool bColumns);
1263 /// Returns list-of-spans representation of hidden/filtered states of columns/rows encoded as an OString.
1264 OString dumpHiddenFiltered(bool bColumns, bool bHidden);
1265 /// Returns list-of-spans representation of the column/row groupings encoded as an OString.
1266 OString dumpColumnRowGroups(bool bColumns) const;
1268 SCCOL GetLOKFreezeCol() const;
1269 SCROW GetLOKFreezeRow() const;
1270 bool SetLOKFreezeCol(SCCOL nFreezeCol);
1271 bool SetLOKFreezeRow(SCROW nFreezeRow);
1274 * Use this to iterate through non-empty visible cells in a single column.
1276 class VisibleDataCellIterator
1278 static constexpr SCROW ROW_NOT_FOUND = -1;
1280 public:
1281 explicit VisibleDataCellIterator(const ScDocument& rDoc, ScFlatBoolRowSegments& rRowSegs, ScColumn& rColumn);
1282 ~VisibleDataCellIterator();
1285 * Set the start row position. In case there is not visible data cell
1286 * at the specified row position, it will move to the position of the
1287 * first visible data cell below that point.
1289 * @return First visible data cell if found, or NULL otherwise.
1291 ScRefCellValue reset(SCROW nRow);
1294 * Find the next visible data cell position.
1296 * @return Next visible data cell if found, or NULL otherwise.
1298 ScRefCellValue next();
1301 * Get the current row position.
1303 * @return Current row position, or ROW_NOT_FOUND if the iterator
1304 * doesn't point to a valid data cell position.
1306 SCROW getRow() const { return mnCurRow;}
1308 private:
1309 const ScDocument& mrDocument;
1310 ScFlatBoolRowSegments& mrRowSegs;
1311 ScColumn& mrColumn;
1312 ScRefCellValue maCell;
1313 SCROW mnCurRow;
1314 SCROW mnUBound;
1319 #endif
1321 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */