LibreOffice Module sc (master)  1
table.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include <tools/gen.hxx>
23 #include <tools/color.hxx>
24 #include "attarray.hxx"
25 #include "column.hxx"
26 #include "colcontainer.hxx"
27 #include "sortparam.hxx"
28 #include "types.hxx"
29 #include "cellvalue.hxx"
30 #include <formula/types.hxx>
31 #include "calcmacros.hxx"
32 #include <formula/errorcodes.hxx>
33 #include "document.hxx"
34 #include "drwlayer.hxx"
35 
36 #include <algorithm>
37 #include <atomic>
38 #include <memory>
39 #include <optional>
40 #include <set>
41 #include <vector>
42 
43 template <typename A, typename D> class ScBitMaskCompressedArray;
44 template <typename A, typename D> class ScCompressedArray;
45 
46 namespace utl {
47  class TextSearch;
48 }
49 
50 namespace com::sun::star {
51  namespace sheet {
52  struct TablePageBreakData;
53  }
54 }
55 
56 namespace formula { struct VectorRefArray; }
57 namespace sc {
58 
59 class StartListeningContext;
60 class EndListeningContext;
61 class CopyFromClipContext;
62 class CopyToClipContext;
63 class CopyToDocContext;
64 class MixDocContext;
65 class ColumnSpanSet;
66 class RangeColumnSpanSet;
67 class ColumnSet;
68 struct ColumnBlockPosition;
69 class TableColumnBlockPositionSet;
70 struct RefUpdateContext;
71 struct RefUpdateInsertTabContext;
72 struct RefUpdateDeleteTabContext;
73 struct RefUpdateMoveTabContext;
74 struct NoteEntry;
75 class DocumentStreamAccess;
76 class CellValues;
77 class TableValues;
78 class RowHeightContext;
79 class CompileFormulaContext;
80 struct SetFormulaDirtyContext;
81 class ColumnIterator;
82 class ScDrawObjData;
83 }
84 
85 class SfxItemSet;
86 class SfxStyleSheetBase;
87 class SvxBoxInfoItem;
88 class SvxBoxItem;
89 class SvxSearchItem;
90 
91 class ScAutoFormatData;
92 class ScEditDataArray;
93 class ScFormulaCell;
94 class ScOutlineTable;
95 class ScPrintSaverTab;
96 class ScProgress;
97 class ScRangeList;
98 class ScSheetEvents;
99 class ScSortInfoArray;
100 class ScConditionalFormat;
102 class ScStyleSheet;
103 class ScTableProtection;
104 class ScUserListData;
105 struct RowInfo;
106 class ScFunctionData;
107 class CollatorWrapper;
111 struct ScSetStringParam;
112 struct ScColWidthParam;
113 class ScRangeName;
114 class ScDBData;
115 class ScHint;
116 class ScPostIt;
117 struct ScInterpreterContext;
118 
119 
120 class ScColumnsRange final
121 {
122  public:
123  class Iterator final
124  {
125  std::vector<std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn>>>::const_iterator maColIter;
126  public:
127  typedef std::input_iterator_tag iterator_category;
128  typedef SCCOL value_type;
130  typedef const SCCOL* pointer;
131  typedef SCCOL reference;
132 
133  explicit Iterator(const std::vector<std::unique_ptr<ScColumn, o3tl::default_delete<ScColumn>>>::const_iterator& colIter) : maColIter(colIter) {}
134 
135  Iterator& operator++() { ++maColIter; return *this;}
136  Iterator& operator--() { --maColIter; return *this;}
137 
138  bool operator==(const Iterator & rOther) const {return maColIter == rOther.maColIter;}
139  bool operator!=(const Iterator & rOther) const {return !(*this == rOther);}
140  SCCOL operator*() const {return (*maColIter)->GetCol();}
141  };
142 
143  ScColumnsRange(const Iterator & rBegin, const Iterator & rEnd) : maBegin(rBegin), maEnd(rEnd) {}
144  const Iterator & begin() { return maBegin; }
145  const Iterator & end() { return maEnd; }
146  std::reverse_iterator<Iterator> rbegin() { return std::reverse_iterator<Iterator>(maEnd); }
147  std::reverse_iterator<Iterator> rend() { return std::reverse_iterator<Iterator>(maBegin); }
148 private:
151 };
152 
153 class ScTable
154 {
155 private:
156  typedef ::std::vector< ScRange > ScRangeVec;
157 
159 
160  OUString aName;
161  OUString aCodeName;
162  OUString aComment;
163 
164  OUString aLinkDoc;
165  OUString aLinkFlt;
166  OUString aLinkOpt;
167  OUString aLinkTab;
170 
171  // page style template
172  OUString aPageStyle;
173  Size aPageSizeTwips; // size of the print-page
174  SCCOL nRepeatStartX; // repeating rows/columns
175  SCCOL nRepeatEndX; // REPEAT_NONE, if not used
178 
179  std::unique_ptr<ScTableProtection> pTabProtection;
180 
181  std::unique_ptr<ScCompressedArray<SCCOL, sal_uInt16>> mpColWidth;
182  std::unique_ptr<ScFlatUInt16RowSegments> mpRowHeights;
183 
184  std::unique_ptr<ScBitMaskCompressedArray<SCCOL, CRFlags>> mpColFlags;
185  std::unique_ptr<ScBitMaskCompressedArray< SCROW, CRFlags>> pRowFlags;
186  std::unique_ptr<ScFlatBoolColSegments> mpHiddenCols;
187  std::unique_ptr<ScFlatBoolRowSegments> mpHiddenRows;
188  std::unique_ptr<ScFlatBoolColSegments> mpFilteredCols;
189  std::unique_ptr<ScFlatBoolRowSegments> mpFilteredRows;
190 
191  ::std::set<SCROW> maRowPageBreaks;
192  ::std::set<SCROW> maRowManualBreaks;
193  ::std::set<SCCOL> maColPageBreaks;
194  ::std::set<SCCOL> maColManualBreaks;
195 
196  std::unique_ptr<ScOutlineTable> pOutlineTable;
197 
198  std::unique_ptr<ScSheetEvents> pSheetEvents;
199 
204 
207  std::unique_ptr<utl::TextSearch> pSearchText;
208 
209  mutable OUString aUpperName; // #i62977# filled only on demand, reset in SetName
210 
211  // sort parameter to minimize stack size of quicksort
214 
215  ScRangeVec aPrintRanges;
216 
217  std::unique_ptr<ScRange> pRepeatColRange;
218  std::unique_ptr<ScRange> pRepeatRowRange;
219 
220  sal_uInt16 nLockCount;
221 
222  std::unique_ptr<ScRangeList> pScenarioRanges;
226  std::unique_ptr<ScDBData> pDBDataNoName;
227  mutable std::unique_ptr<ScRangeName> mpRangeName;
228 
229  std::unique_ptr<ScConditionalFormatList> mpCondFormatList;
230 
232 
233  bool bScenario:1;
234  bool bLayoutRTL:1;
235  bool bLoadingRTL:1;
237  mutable bool bTableAreaValid:1;
238  mutable bool bTableAreaVisibleValid:1;
239  bool bVisible:1;
248  std::atomic<bool> bStreamValid;
249 
250  // Default attributes for the unallocated columns.
252 
253 friend class ScDocument; // for FillInfo
254 friend class ScColumn;
255 friend class ScValueIterator;
259 friend class ScCellIterator;
260 friend class ScQueryCellIterator;
264 friend class ScDocAttrIterator;
265 friend class ScAttrRectIterator;
267 friend class ScDocumentImport;
269 friend class sc::ColumnSpanSet;
271 friend class sc::EditTextIterator;
273 
274 public:
275  ScTable( ScDocument& rDoc, SCTAB nNewTab, const OUString& rNewName,
276  bool bColInfo = true, bool bRowInfo = true );
277  ~ScTable() COVERITY_NOEXCEPT_FALSE;
278  ScTable(const ScTable&) = delete;
279  ScTable& operator=(const ScTable&) = delete;
280 
282  const ScDocument& GetDoc() const { return rDocument;}
283  SCTAB GetTab() const { return nTab; }
284 
285  ScOutlineTable* GetOutlineTable() { return pOutlineTable.get(); }
286 
287  ScColumn& CreateColumnIfNotExists( const SCCOL nScCol ) const
288  {
289  if ( nScCol >= aCol.size() )
291  return aCol[nScCol];
292  }
293  // out-of-line the cold part of the function
294  void CreateColumnIfNotExistsImpl( const SCCOL nScCol ) const;
295  sal_uLong GetCellCount() const;
296  sal_uLong GetWeightedCount() const;
297  sal_uLong GetWeightedCount(SCROW nStartRow, SCROW nEndRow) const;
298  sal_uLong GetCodeCount() const; // RPN code in formula
299 
300  sal_uInt16 GetTextWidth(SCCOL nCol, SCROW nRow) const;
301 
302  bool SetOutlineTable( const ScOutlineTable* pNewOutline );
303  void StartOutlineTable();
304 
305  void DoAutoOutline( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow );
306 
307  bool TestRemoveSubTotals( const ScSubTotalParam& rParam );
308  void RemoveSubTotals( ScSubTotalParam& rParam );
309  bool DoSubTotals( ScSubTotalParam& rParam );
310 
311  const ScSheetEvents* GetSheetEvents() const { return pSheetEvents.get(); }
312  void SetSheetEvents( std::unique_ptr<ScSheetEvents> pNew );
313 
314  bool IsVisible() const { return bVisible; }
315  void SetVisible( bool bVis );
316 
317  bool IsStreamValid() const { return bStreamValid; }
318  void SetStreamValid( bool bSet, bool bIgnoreLock = false );
319 
320  [[nodiscard]] bool IsColValid( const SCCOL nScCol ) const
321  {
322  return nScCol >= static_cast< SCCOL >( 0 ) && nScCol < aCol.size();
323  }
324  [[nodiscard]] bool IsColRowValid( const SCCOL nScCol, const SCROW nScRow ) const
325  {
326  return IsColValid( nScCol ) && GetDoc().ValidRow( nScRow );
327  }
328  [[nodiscard]] bool IsColRowTabValid( const SCCOL nScCol, const SCROW nScRow, const SCTAB nScTab ) const
329  {
330  return IsColValid( nScCol ) && GetDoc().ValidRow( nScRow ) && ValidTab( nScTab );
331  }
332  [[nodiscard]] bool ValidCol(SCCOL nCol) const { return GetDoc().ValidCol(nCol); }
333  [[nodiscard]] bool ValidRow(SCROW nRow) const { return GetDoc().ValidRow(nRow); }
334  [[nodiscard]] bool ValidColRow(SCCOL nCol, SCROW nRow) const { return GetDoc().ValidColRow(nCol, nRow); }
335 
336  bool IsPendingRowHeights() const { return bPendingRowHeights; }
337  void SetPendingRowHeights( bool bSet );
338 
339  bool GetCalcNotification() const { return bCalcNotification; }
340  void SetCalcNotification( bool bSet );
341 
342  bool IsLayoutRTL() const { return bLayoutRTL; }
343  bool IsLoadingRTL() const { return bLoadingRTL; }
344  void SetLayoutRTL( bool bSet );
345  void SetLoadingRTL( bool bSet );
346 
347  bool IsScenario() const { return bScenario; }
348  void SetScenario( bool bFlag );
349  void GetScenarioComment( OUString& rComment) const { rComment = aComment; }
350  void SetScenarioComment( const OUString& rComment ) { aComment = rComment; }
351  const Color& GetScenarioColor() const { return aScenarioColor; }
352  void SetScenarioColor(const Color& rNew) { aScenarioColor = rNew; }
353  const Color& GetTabBgColor() const { return aTabBgColor; }
354  void SetTabBgColor(const Color& rColor);
356  void SetScenarioFlags(ScScenarioFlags nNew) { nScenarioFlags = nNew; }
357  void SetActiveScenario(bool bSet) { bActiveScenario = bSet; }
358  bool IsActiveScenario() const { return bActiveScenario; }
359 
360  ScLinkMode GetLinkMode() const { return nLinkMode; }
361  bool IsLinked() const { return nLinkMode != ScLinkMode::NONE; }
362  const OUString& GetLinkDoc() const { return aLinkDoc; }
363  const OUString& GetLinkFlt() const { return aLinkFlt; }
364  const OUString& GetLinkOpt() const { return aLinkOpt; }
365  const OUString& GetLinkTab() const { return aLinkTab; }
367 
368  void SetLink( ScLinkMode nMode, const OUString& rDoc, const OUString& rFlt,
369  const OUString& rOpt, const OUString& rTab, sal_uLong nRefreshDelay );
370 
371  sal_Int64 GetHashCode () const;
372 
373  const OUString& GetName() const { return aName; }
374  void SetName( const OUString& rNewName );
375 
376  void SetAnonymousDBData(std::unique_ptr<ScDBData> pDBData);
377  ScDBData* GetAnonymousDBData() { return pDBDataNoName.get();}
378 
379  const OUString& GetCodeName() const { return aCodeName; }
380  void SetCodeName( const OUString& rNewName ) { aCodeName = rNewName; }
381 
382  const OUString& GetUpperName() const;
383 
384  const OUString& GetPageStyle() const { return aPageStyle; }
385  void SetPageStyle( const OUString& rName );
386  void PageStyleModified( const OUString& rNewName );
387 
388  bool IsProtected() const;
389  void SetProtection(const ScTableProtection* pProtect);
390  const ScTableProtection* GetProtection() const;
391  void GetUnprotectedCells( ScRangeList& rRangeList ) const;
392 
393  bool IsEditActionAllowed( sc::ColRowEditAction eAction, SCCOLROW nStart, SCCOLROW nEnd ) const;
394 
395  Size GetPageSize() const;
396  void SetPageSize( const Size& rSize );
397  void SetRepeatArea( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow );
398 
399  void LockTable();
400  void UnlockTable();
401 
402  bool IsBlockEditable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2,
403  SCROW nRow2, bool* pOnlyNotBecauseOfMatrix = nullptr,
404  bool bNoMatrixAtAll = false ) const;
405  bool IsSelectionEditable( const ScMarkData& rMark,
406  bool* pOnlyNotBecauseOfMatrix = nullptr ) const;
407 
408  bool HasBlockMatrixFragment( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2,
409  bool bNoMatrixAtAll = false ) const;
410  bool HasSelectionMatrixFragment( const ScMarkData& rMark ) const;
411 
412  bool IsBlockEmpty( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes ) const;
413 
414  bool SetString( SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString& rString,
415  const ScSetStringParam * pParam = nullptr );
416 
417  bool SetEditText( SCCOL nCol, SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
418  void SetEditText( SCCOL nCol, SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
419  SCROW GetFirstEditTextRow( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
420 
421  void SetEmptyCell( SCCOL nCol, SCROW nRow );
422  void SetFormula(
423  SCCOL nCol, SCROW nRow, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram );
424  void SetFormula(
425  SCCOL nCol, SCROW nRow, const OUString& rFormula, formula::FormulaGrammar::Grammar eGram );
426 
433  ScFormulaCell* SetFormulaCell( SCCOL nCol, SCROW nRow, ScFormulaCell* pCell );
434 
435  bool SetFormulaCells( SCCOL nCol, SCROW nRow, std::vector<ScFormulaCell*>& rCells );
436 
437  bool HasFormulaCell( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 ) const;
438 
439  svl::SharedString GetSharedString( SCCOL nCol, SCROW nRow ) const;
440 
441  void SetValue( SCCOL nCol, SCROW nRow, const double& rVal );
442  void SetValues( const SCCOL nCol, const SCROW nRow, const std::vector<double>& rVals );
443  void SetError( SCCOL nCol, SCROW nRow, FormulaError nError);
444  SCSIZE GetPatternCount( SCCOL nCol ) const;
445  SCSIZE GetPatternCount( SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
446  bool ReservePatternCount( SCCOL nCol, SCSIZE nReserve );
447 
448  void SetRawString( SCCOL nCol, SCROW nRow, const svl::SharedString& rStr );
449  void GetString( SCCOL nCol, SCROW nRow, OUString& rString,
450  const ScInterpreterContext* pContext = nullptr ) const;
451  double* GetValueCell( SCCOL nCol, SCROW nRow );
452  void GetInputString( SCCOL nCol, SCROW nRow, OUString& rString ) const;
453  double GetValue( SCCOL nCol, SCROW nRow ) const;
454  const EditTextObject* GetEditText( SCCOL nCol, SCROW nRow ) const;
455  void RemoveEditTextCharAttribs( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
456  void GetFormula( SCCOL nCol, SCROW nRow, OUString& rFormula ) const;
457  const ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow ) const;
458  ScFormulaCell* GetFormulaCell( SCCOL nCol, SCROW nRow );
459 
460  CellType GetCellType( const ScAddress& rPos ) const
461  {
462  if (!GetDoc().ValidColRow(rPos.Col(),rPos.Row()))
463  return CELLTYPE_NONE;
464  if (rPos.Col() >= aCol.size())
465  return CELLTYPE_NONE;
466  return aCol[rPos.Col()].GetCellType( rPos.Row() );
467  }
468  CellType GetCellType( SCCOL nCol, SCROW nRow ) const;
469  ScRefCellValue GetCellValue( SCCOL nCol, SCROW nRow ) const;
470 
471  void GetFirstDataPos(SCCOL& rCol, SCROW& rRow) const;
472  void GetLastDataPos(SCCOL& rCol, SCROW& rRow) const;
473 
474  std::unique_ptr<ScPostIt> ReleaseNote( SCCOL nCol, SCROW nRow );
475 
476  size_t GetNoteCount( SCCOL nCol ) const;
477  SCROW GetNotePosition( SCCOL nCol, size_t nIndex ) const;
478  void CreateAllNoteCaptions();
479  void ForgetNoteCaptions( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bPreserveData );
480 
481  void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
482  void GetNotesInRange( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes ) const;
483  CommentCaptionState GetAllNoteCaptionsState( const ScRange& rRange, std::vector<sc::NoteEntry>& rNotes );
484  bool ContainsNotesInRange( const ScRange& rRange ) const;
485 
486  bool TestInsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize ) const;
487  void InsertRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize );
488  void DeleteRow(
489  const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize,
490  bool* pUndoOutline, std::vector<ScAddress>* pGroupPos );
491 
492  bool TestInsertCol( SCROW nStartRow, SCROW nEndRow, SCSIZE nSize ) const;
493  void InsertCol(
494  const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize );
495  void DeleteCol(
496  const sc::ColumnSet& rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool* pUndoOutline );
497 
498  void DeleteArea(
499  SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag,
500  bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
501 
502  void CopyToClip( sc::CopyToClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pTable );
503  void CopyToClip( sc::CopyToClipContext& rCxt, const ScRangeList& rRanges, ScTable* pTable );
504 
506  SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const SvNumberFormatterMergeMap& rMap,
507  ScTable* pDestTab );
508 
509  void CopyCellToDocument( SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, SCROW nDestRow, ScTable& rDestTab );
510 
511  bool InitColumnBlockPosition( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol );
512 
514  sc::CopyFromClipContext& rCxt, const ScTable& rClipTab, sc::ColumnSpanSet& rBroadcastSpans );
515 
516  void CopyOneCellFromClip(
517  sc::CopyFromClipContext& rCxt, const SCCOL nCol1, const SCROW nRow1,
518  const SCCOL nCol2, const SCROW nRow2,
519  const SCROW nSrcRow, const ScTable* pSrcTab );
520 
521  void CopyFromClip(
522  sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
523  SCCOL nDx, SCROW nDy, ScTable* pTable );
524 
527  SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
528 
529  void SetDirtyFromClip(
530  SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
531 
532  void CopyToTable(
533  sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
534  InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab,
535  const ScMarkData* pMarkData, bool bAsLink, bool bColRowFlags,
536  bool bGlobalNamesToLocal, bool bCopyCaptions );
537 
538  void CopyCaptionsToTable( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable* pDestTab, bool bCloneCaption );
539 
540  void UndoToTable(
541  sc::CopyToDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
542  InsertDeleteFlags nFlags, bool bMarked, ScTable* pDestTab );
543 
544  void CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
545  SCCOL nDx, SCROW nDy, const ScTable* pTable);
553  void TransposeClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCROW nCombinedStartRow,
554  SCROW nRowDestOffset, ScTable* pTransClip, InsertDeleteFlags nFlags,
555  bool bAsLink, bool bIncludeFiltered);
556 
557  // mark of this document
558  void MixMarked(
559  sc::MixDocContext& rCxt, const ScMarkData& rMark, ScPasteFunc nFunction,
560  bool bSkipEmpty, const ScTable* pSrcTab );
561 
562  void MixData(
563  sc::MixDocContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
564  ScPasteFunc nFunction, bool bSkipEmpty, const ScTable* pSrcTab );
565 
566  void CopyData( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
567  SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab );
568 
569  void CopyScenarioFrom( const ScTable* pSrcTab );
570  void CopyScenarioTo( const ScTable* pDestTab ) const;
571  bool TestCopyScenarioTo( const ScTable* pDestTab ) const;
572  void MarkScenarioIn(ScMarkData& rMark, ScScenarioFlags nNeededBits) const;
573  bool HasScenarioRange( const ScRange& rRange ) const;
575  const ScRangeList* GetScenarioRanges() const;
576 
577  void CopyUpdated( const ScTable* pPosTab, ScTable* pDestTab ) const;
578 
579  void InvalidateTableArea();
580  void InvalidatePageBreaks();
581 
582  bool GetCellArea( SCCOL& rEndCol, SCROW& rEndRow ) const; // FALSE = empty
583  bool GetTableArea( SCCOL& rEndCol, SCROW& rEndRow, bool bCalcHiddens = false) const;
584  bool GetPrintArea( SCCOL& rEndCol, SCROW& rEndRow, bool bNotes, bool bCalcHiddens = false) const;
585  bool GetPrintAreaHor( SCROW nStartRow, SCROW nEndRow,
586  SCCOL& rEndCol ) const;
587  bool GetPrintAreaVer( SCCOL nStartCol, SCCOL nEndCol,
588  SCROW& rEndRow, bool bNotes ) const;
589 
590  bool GetDataStart( SCCOL& rStartCol, SCROW& rStartRow ) const;
591 
592  void ExtendPrintArea( OutputDevice* pDev,
593  SCCOL nStartCol, SCROW nStartRow, SCCOL& rEndCol, SCROW nEndRow );
594 
595  void GetDataArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow,
596  bool bIncludeOld, bool bOnlyDown ) const;
597 
598  bool GetDataAreaSubrange( ScRange& rRange ) const;
599 
600  bool ShrinkToUsedDataArea( bool& o_bShrunk, SCCOL& rStartCol, SCROW& rStartRow,
601  SCCOL& rEndCol, SCROW& rEndRow, bool bColumnsOnly,
602  bool bStickyTopRow, bool bStickyLeftCol,
603  ScDataAreaExtras* pDataAreaExtras ) const;
604 
605  SCROW GetLastDataRow( SCCOL nCol1, SCCOL nCol2, SCROW nLastRow,
606  ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
607 
608  SCSIZE GetEmptyLinesInBlock( SCCOL nStartCol, SCROW nStartRow,
609  SCCOL nEndCol, SCROW nEndRow, ScDirection eDir ) const;
610 
611  void FindAreaPos( SCCOL& rCol, SCROW& rRow, ScMoveDirection eDirection ) const;
612  void GetNextPos( SCCOL& rCol, SCROW& rRow, SCCOL nMovX, SCROW nMovY,
613  bool bMarked, bool bUnprotected, const ScMarkData& rMark, SCCOL nTabStartCol ) const;
614 
615  bool SkipRow( const SCCOL rCol, SCROW& rRow, const SCROW nMovY, const ScMarkData& rMark,
616  const bool bUp, const SCROW nUsedY, const bool bMarked, const bool bSheetProtected ) const;
617  void LimitChartArea( SCCOL& rStartCol, SCROW& rStartRow, SCCOL& rEndCol, SCROW& rEndRow ) const;
618 
619  bool HasData( SCCOL nCol, SCROW nRow ) const;
620  bool HasStringData( SCCOL nCol, SCROW nRow ) const;
621  bool HasValueData( SCCOL nCol, SCROW nRow ) const;
622  bool HasStringCells( SCCOL nStartCol, SCROW nStartRow,
623  SCCOL nEndCol, SCROW nEndRow ) const;
624 
625  sc::MultiDataCellState HasMultipleDataCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 ) const;
626 
627  FormulaError GetErrCode( const ScAddress& rPos ) const
628  {
629  return IsColRowValid(rPos.Col(),rPos.Row()) ?
630  aCol[rPos.Col()].GetErrCode( rPos.Row() ) :
631  FormulaError::NONE;
632  }
633 
634  void ResetChanged( const ScRange& rRange );
635 
638  void SetDirty( const ScRange&, ScColumn::BroadcastMode );
639  void SetDirtyAfterLoad();
640  void SetDirtyVar();
641  void SetTableOpDirty( const ScRange& );
642  void CalcAll();
643  void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
645  void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
646 
652  bool BroadcastBroadcasters( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScHint& rHint );
653 
655 
656  void UpdateReference(
657  sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr,
658  bool bIncludeDraw = true, bool bUpdateNoteCaptionPos = true );
659 
660  void UpdateDrawRef( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1,
661  SCCOL nCol2, SCROW nRow2, SCTAB nTab2,
662  SCCOL nDx, SCROW nDy, SCTAB nDz, bool bUpdateNoteCaptionPos = true );
663 
664  void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
665  ScDocument* pUndoDoc );
666 
667  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
668 
671  void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo, ScProgress* pProgress );
672  void UpdateCompile( bool bForceIfNameInUse = false );
673  void SetTabNo(SCTAB nNewTab);
674  void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
675  sc::UpdatedRangeNames& rIndexes) const;
676  void Fill( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
677  sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd,
678  double nStepValue, double nMaxValue, ScProgress* pProgress);
679  OUString GetAutoFillPreview( const ScRange& rSource, SCCOL nEndX, SCROW nEndY );
680 
681  void UpdateSelectionFunction( ScFunctionData& rData, const ScMarkData& rMark );
682 
683  void AutoFormat( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
684  sal_uInt16 nFormatNo );
685  void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData& rData);
686  bool SearchAndReplace(
687  const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark,
688  ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
689 
690  void FindMaxRotCol( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2 );
691 
692  bool HasAttrib( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, HasAttrFlags nMask ) const;
693  bool HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const;
694  bool IsMerged( SCCOL nCol, SCROW nRow ) const;
695  bool ExtendMerge( SCCOL nStartCol, SCROW nStartRow,
696  SCCOL& rEndCol, SCROW& rEndRow,
697  bool bRefresh );
698  void SetMergedCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
699 
700  const SfxPoolItem* GetAttr( SCCOL nCol, SCROW nRow, sal_uInt16 nWhich ) const;
701  template<class T> const T* GetAttr( SCCOL nCol, SCROW nRow, TypedWhichId<T> nWhich ) const
702  {
703  return static_cast<const T*>(GetAttr(nCol, nRow, sal_uInt16(nWhich)));
704  }
705  const ScPatternAttr* GetPattern( SCCOL nCol, SCROW nRow ) const;
706  const ScPatternAttr* GetMostUsedPattern( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
707 
708  sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, const ScAddress& rPos ) const;
709  sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nRow ) const;
710  sal_uInt32 GetNumberFormat( SCCOL nCol, SCROW nStartRow, SCROW nEndRow ) const;
711 
712  void SetNumberFormat( SCCOL nCol, SCROW nRow, sal_uInt32 nNumberFormat );
713 
715  const ScMarkData& rMark, bool bDeep ) const;
716  void MergePatternArea( ScMergePatternState& rState, SCCOL nCol1, SCROW nRow1,
717  SCCOL nCol2, SCROW nRow2, bool bDeep ) const;
718  void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
719  ScLineFlags& rFlags,
720  SCCOL nStartCol, SCROW nStartRow,
721  SCCOL nEndCol, SCROW nEndRow ) const;
722  void ApplyBlockFrame(const SvxBoxItem& rLineOuter,
723  const SvxBoxInfoItem* pLineInner,
724  SCCOL nStartCol, SCROW nStartRow,
725  SCCOL nEndCol, SCROW nEndRow );
726 
727  void ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr );
728  void ApplyPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
729  void ApplyPatternArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
730  const ScPatternAttr& rAttr, ScEditDataArray* pDataArray = nullptr,
731  bool* const pIsChanged = nullptr );
732 
733  void SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr );
734  const ScPatternAttr* SetPattern( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPatternAttr> );
735  void SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr );
737  const ScPatternAttr& rPattern, SvNumFormatType nNewType );
738  void AddCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
739  void RemoveCondFormatData( const ScRangeList& rRange, sal_uInt32 nIndex );
740  void SetPatternAreaCondFormat( SCCOL nCol, SCROW nStartRow, SCROW nEndRow,
741  const ScPatternAttr& rAttr, const ScCondFormatIndexes& rCondFormatIndexes );
742 
743  void ApplyStyle( SCCOL nCol, SCROW nRow, const ScStyleSheet* rStyle );
744  void ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle );
745  void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
746  void ApplySelectionLineStyle( const ScMarkData& rMark,
747  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
748 
749  const ScStyleSheet* GetStyle( SCCOL nCol, SCROW nRow ) const;
750  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const;
751  const ScStyleSheet* GetAreaStyle( bool& rFound, SCCOL nCol1, SCROW nRow1,
752  SCCOL nCol2, SCROW nRow2 ) const;
753 
754  void StyleSheetChanged( const SfxStyleSheetBase* pStyleSheet, bool bRemoved,
755  OutputDevice* pDev,
756  double nPPTX, double nPPTY,
757  const Fraction& rZoomX, const Fraction& rZoomY );
758 
759  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
760 
761  bool ApplyFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
762  bool RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags );
763 
764  void ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray = nullptr, bool* const pIsChanged = nullptr );
765  void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast = true );
766 
767  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
768  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
769 
770  const ScRange* GetRepeatColRange() const { return pRepeatColRange.get(); }
771  const ScRange* GetRepeatRowRange() const { return pRepeatRowRange.get(); }
772  void SetRepeatColRange( std::unique_ptr<ScRange> pNew );
773  void SetRepeatRowRange( std::unique_ptr<ScRange> pNew );
774 
775  sal_uInt16 GetPrintRangeCount() const { return static_cast< sal_uInt16 >( aPrintRanges.size() ); }
776  const ScRange* GetPrintRange(sal_uInt16 nPos) const;
778  bool IsPrintEntireSheet() const { return bPrintEntireSheet; }
779 
781  void ClearPrintRanges();
783  void AddPrintRange( const ScRange& rNew );
785  void SetPrintEntireSheet();
786 
787  void FillPrintSaver( ScPrintSaverTab& rSaveTab ) const;
788  void RestorePrintRanges( const ScPrintSaverTab& rSaveTab );
789 
790  sal_uInt16 GetOptimalColWidth( SCCOL nCol, OutputDevice* pDev,
791  double nPPTX, double nPPTY,
792  const Fraction& rZoomX, const Fraction& rZoomY,
793  bool bFormula, const ScMarkData* pMarkData,
794  const ScColWidthParam* pParam );
795  bool SetOptimalHeight(
796  sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, bool bApi,
797  ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
798 
800  sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow,
801  ScProgress* pOuterProgress = nullptr, sal_uLong nProgressStart = 0 );
802 
803  tools::Long GetNeededSize( SCCOL nCol, SCROW nRow,
804  OutputDevice* pDev,
805  double nPPTX, double nPPTY,
806  const Fraction& rZoomX, const Fraction& rZoomY,
807  bool bWidth, bool bTotalSize,
808  bool bInPrintTwips = false);
809  void SetColWidth( SCCOL nCol, sal_uInt16 nNewWidth );
810  void SetColWidthOnly( SCCOL nCol, sal_uInt16 nNewWidth );
811  void SetRowHeight( SCROW nRow, sal_uInt16 nNewHeight );
812  bool SetRowHeightRange( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight,
813  double nPPTY, bool bApi );
814 
822  void SetRowHeightOnly( SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight );
823 
824  // nPPT to test for modification
825  void SetManualHeight( SCROW nStartRow, SCROW nEndRow, bool bManual );
826 
827  sal_uInt16 GetColWidth( SCCOL nCol, bool bHiddenAsZero = true ) const;
828  sal_uLong GetColWidth( SCCOL nStartCol, SCCOL nEndCol ) const;
829  sal_uInt16 GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero = true ) const;
830  sal_uLong GetRowHeight( SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true ) const;
831  sal_uLong GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale, const sal_uLong* pnMaxHeight = nullptr ) const;
832  sal_uLong GetColOffset( SCCOL nCol, bool bHiddenAsZero = true ) const;
833  sal_uLong GetRowOffset( SCROW nRow, bool bHiddenAsZero = true ) const;
834 
843  SCROW GetRowForHeight(sal_uLong nHeight) const;
844 
845  sal_uInt16 GetOriginalWidth( SCCOL nCol ) const;
846  sal_uInt16 GetOriginalHeight( SCROW nRow ) const;
847 
848  sal_uInt16 GetCommonWidth( SCCOL nEndCol ) const;
849 
850  SCROW GetHiddenRowCount( SCROW nRow ) const;
851 
852  void ShowCol(SCCOL nCol, bool bShow);
853  void ShowRow(SCROW nRow, bool bShow);
854  void DBShowRow(SCROW nRow, bool bShow);
855 
856  void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
857  void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow);
858 
859  void SetRowFlags( SCROW nRow, CRFlags nNewFlags );
860  void SetRowFlags( SCROW nStartRow, SCROW nEndRow, CRFlags nNewFlags );
861 
863  SCROW GetLastFlaggedRow() const;
864 
866  SCCOL GetLastChangedCol() const;
868  SCROW GetLastChangedRow() const;
869 
870  bool IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const;
871  bool IsDataFiltered(const ScRange& rRange) const;
872  CRFlags GetColFlags( SCCOL nCol ) const;
873  CRFlags GetRowFlags( SCROW nRow ) const;
874 
876  { return pRowFlags.get(); }
877 
878  bool UpdateOutlineCol( SCCOL nStartCol, SCCOL nEndCol, bool bShow );
879  bool UpdateOutlineRow( SCROW nStartRow, SCROW nEndRow, bool bShow );
880 
881  void UpdatePageBreaks( const ScRange* pUserArea );
882  void RemoveManualBreaks();
883  bool HasManualBreaks() const;
884  void SetRowManualBreaks( ::std::set<SCROW>&& rBreaks );
885  void SetColManualBreaks( ::std::set<SCCOL>&& rBreaks );
886 
887  void GetAllRowBreaks(::std::set<SCROW>& rBreaks, bool bPage, bool bManual) const;
888  void GetAllColBreaks(::std::set<SCCOL>& rBreaks, bool bPage, bool bManual) const;
889  bool HasRowPageBreak(SCROW nRow) const;
890  bool HasColPageBreak(SCCOL nCol) const;
891  bool HasRowManualBreak(SCROW nRow) const;
892  bool HasColManualBreak(SCCOL nCol) const;
893 
904  SCROW GetNextManualBreak(SCROW nRow) const;
905 
906  void RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow);
907  void RemoveRowBreak(SCROW nRow, bool bPage, bool bManual);
908  void RemoveColBreak(SCCOL nCol, bool bPage, bool bManual);
909  void SetRowBreak(SCROW nRow, bool bPage, bool bManual);
910  void SetColBreak(SCCOL nCol, bool bPage, bool bManual);
911  css::uno::Sequence<
912  css::sheet::TablePageBreakData> GetRowBreakData() const;
913 
914  bool RowHidden(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
915  bool RowHiddenLeaf(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
916  bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const;
917  bool ColHidden(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
918  bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden);
919  void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden);
920  void CopyColHidden(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
921  void CopyRowHidden(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
922  void CopyRowHeight(const ScTable& rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset);
923  SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
924  SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const;
925  SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const;
926  sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero = true) const;
927 
928  SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const;
929 
930  bool RowFiltered(SCROW nRow, SCROW* pFirstRow = nullptr, SCROW* pLastRow = nullptr) const;
931  bool ColFiltered(SCCOL nCol, SCCOL* pFirstCol = nullptr, SCCOL* pLastCol = nullptr) const;
932  bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
933  void CopyColFiltered(const ScTable& rTable, SCCOL nStartCol, SCCOL nEndCol);
934  void CopyRowFiltered(const ScTable& rTable, SCROW nStartRow, SCROW nEndRow);
935  void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered);
936  void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered);
937  SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
938  SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const;
939  SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const;
940 
941  bool IsManualRowHeight(SCROW nRow) const;
942 
943  bool HasUniformRowHeight( SCROW nRow1, SCROW nRow2 ) const;
944 
945  void SyncColRowFlags();
946 
947  void StripHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
948  void ExtendHidden( SCCOL& rX1, SCROW& rY1, SCCOL& rX2, SCROW& rY2 );
949 
951  void Sort(
952  const ScSortParam& rSortParam, bool bKeepQuery, bool bUpdateRefs,
953  ScProgress* pProgress, sc::ReorderParam* pUndo );
954 
955  void Reorder( const sc::ReorderParam& rParam );
956 
957  bool ValidQuery(
958  SCROW nRow, const ScQueryParam& rQueryParam, const ScRefCellValue* pCell = nullptr,
959  bool* pbTestEqualCondition = nullptr, const ScInterpreterContext* pContext = nullptr,
960  sc::TableColumnBlockPositionSet* pBlockPos = nullptr );
961  void TopTenQuery( ScQueryParam& );
962  void PrepareQuery( ScQueryParam& rQueryParam );
963  SCSIZE Query(const ScQueryParam& rQueryParam, bool bKeepSub);
964  bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
965 
966  void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, ScFilterEntries& rFilterEntries, bool bFiltering = false);
967  void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam& rParam, ScFilterEntries& rFilterEntries, bool bFiltering );
968  [[nodiscard]]
969  bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set<ScTypedStrData>& rStrings);
970 
971  bool HasColHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const;
972  bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const;
973 
974  sal_Int32 GetMaxStringLen( SCCOL nCol,
975  SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const;
976  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
977  SCCOL nCol,
978  SCROW nRowStart, SCROW nRowEnd ) const;
979 
980  bool IsSortCollatorGlobal() const;
981  void InitSortCollator( const ScSortParam& rPar );
982  void DestroySortCollator();
983  void SetDrawPageSize( bool bResetStreamValid = true, bool bUpdateNoteCaptionPos = true,
984  const ScObjectHandling eObjectHandling = ScObjectHandling::RecalcPosMode);
985 
986  void SetRangeName(std::unique_ptr<ScRangeName> pNew);
987  ScRangeName* GetRangeName() const;
988 
990  sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
991 
993  sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
994 
996  sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
997 
1001 
1002  void DeleteConditionalFormat(sal_uLong nOldIndex);
1003 
1004  sal_uLong AddCondFormat( std::unique_ptr<ScConditionalFormat> pNew );
1005 
1006  SvtScriptType GetScriptType( SCCOL nCol, SCROW nRow ) const;
1007  void SetScriptType( SCCOL nCol, SCROW nRow, SvtScriptType nType );
1008  void UpdateScriptTypes( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2 );
1009 
1010  SvtScriptType GetRangeScriptType( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1011 
1013  formula::FormulaTokenRef ResolveStaticReference( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1015  bool HandleRefArrayForParallelism( SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup );
1016 #ifdef DBG_UTIL
1017  void AssertNoInterpretNeeded( SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1018 #endif
1019 
1020  void SplitFormulaGroups( SCCOL nCol, std::vector<SCROW>& rRows );
1021  void UnshareFormulaCells( SCCOL nCol, std::vector<SCROW>& rRows );
1022  void RegroupFormulaCells( SCCOL nCol );
1023 
1024  ScRefCellValue GetRefCellValue( SCCOL nCol, SCROW nRow );
1026 
1027  SvtBroadcaster* GetBroadcaster( SCCOL nCol, SCROW nRow );
1028  const SvtBroadcaster* GetBroadcaster( SCCOL nCol, SCROW nRow ) const;
1029  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2 );
1030 
1031  void FillMatrix( ScMatrix& rMat, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool* pPool ) const;
1032 
1033  void InterpretDirtyCells( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1034 
1035  void SetFormulaResults( SCCOL nCol, SCROW nRow, const double* pResults, size_t nLen );
1036 
1037  void CalculateInColumnInThread( ScInterpreterContext& rContext, SCCOL nColStart, SCCOL nColEnd,
1038  SCROW nRowStart, SCROW nRowEnd, unsigned nThisThread, unsigned nThreadsTotal);
1039  void HandleStuffAfterParallelCalculation( SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, ScInterpreter* pInterpreter);
1040 
1049  void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
1050 
1055  void SetDirtyIfPostponed();
1056 
1061  void BroadcastRecalcOnRefMove();
1062 
1063  void TransferCellValuesTo( const SCCOL nCol, SCROW nRow, size_t nLen, sc::CellValues& rDest );
1064  void CopyCellValuesFrom( const SCCOL nCol, SCROW nRow, const sc::CellValues& rSrc );
1065 
1066  std::optional<sc::ColumnIterator> GetColumnIterator( SCCOL nCol, SCROW nRow1, SCROW nRow2 ) const;
1067 
1068  bool EnsureFormulaCellResults( const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, bool bSkipRunning = false );
1069 
1070  void ConvertFormulaToValue(
1072  const SCCOL nCol1, const SCROW nRow1, const SCCOL nCol2, const SCROW nRow2,
1073  sc::TableValues* pUndo );
1074 
1075  void SwapNonEmpty(
1076  sc::TableValues& rValues, sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt );
1077 
1078  void finalizeOutlineImport();
1079 
1080  void StoreToCache(SvStream& rStrm) const;
1081 
1082  void RestoreFromCache(SvStream& rStrm);
1083 
1084 #if DUMP_COLUMN_STORAGE
1085  void DumpColumnStorage( SCCOL nCol ) const;
1086 #endif
1087 
1094  static void UpdateSearchItemAddressForReplace( const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow );
1095 
1096  ScColumnsRange GetColumnsRange(SCCOL begin, SCCOL end) const;
1097  SCCOL ClampToAllocatedColumns(SCCOL nCol) const { return std::min(nCol, static_cast<SCCOL>(aCol.size() - 1)); }
1098  SCCOL GetAllocatedColumnsCount() const { return aCol.size(); }
1099 
1107  OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType);
1108 
1109 private:
1110 
1111  void FillFormulaVertical(
1112  const ScFormulaCell& rSrcCell,
1113  SCCOLROW& rInner, SCCOL nCol, SCROW nRow1, SCROW nRow2,
1114  ScProgress* pProgress, sal_uLong& rProgress );
1115 
1116  void FillSeriesSimple(
1117  const ScCellValue& rSrcCell, SCCOLROW& rInner, SCCOLROW nIMin, SCCOLROW nIMax,
1118  const SCCOLROW& rCol, const SCCOLROW& rRow, bool bVertical, ScProgress* pProgress, sal_uLong& rProgress );
1119 
1120  void FillAutoSimple(
1121  SCCOLROW nISrcStart, SCCOLROW nISrcEnd, SCCOLROW nIStart, SCCOLROW nIEnd,
1122  SCCOLROW& rInner, const SCCOLROW& rCol, const SCCOLROW& rRow,
1123  sal_uLong nActFormCnt, sal_uLong nMaxFormCnt,
1124  bool bHasFiltered, bool bVertical, bool bPositive,
1125  ScProgress* pProgress, sal_uLong& rProgress );
1126 
1127  void FillSeries( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1128  sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd,
1129  FillDateCmd eFillDateCmd,
1130  double nStepValue, double nMaxValue, sal_uInt16 nMinDigits,
1131  bool bAttribs, ScProgress* pProgress,
1132  bool bSkipOverlappedCells = false,
1133  std::vector<sal_Int32>* pNonOverlappedCellIdx = nullptr);
1134  void FillAnalyse( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1135  FillCmd& rCmd, FillDateCmd& rDateCmd,
1136  double& rInc, sal_uInt16& rMinDigits,
1137  ScUserListData*& rListData, sal_uInt16& rListIndex,
1138  bool bHasFiltered, bool& rSkipOverlappedCells,
1139  std::vector<sal_Int32>& rNonOverlappedCellIdx );
1140  void FillAuto( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2,
1141  sal_uLong nFillCount, FillDir eFillDir, ScProgress* pProgress );
1142 
1143  bool ValidNextPos( SCCOL nCol, SCROW nRow, const ScMarkData& rMark,
1144  bool bMarked, bool bUnprotected ) const;
1145 
1146  void AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow,
1147  const ScPatternAttr& rAttr, sal_uInt16 nFormatNo);
1148  void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData& rData);
1149  void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData& rData);
1150  bool SearchCell(const SvxSearchItem& rSearchItem, SCCOL nCol, sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
1151  const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1152  bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1153  const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1154  bool Search(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1155  SCCOL nLastCol, SCROW nLastRow,
1156  const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1157  bool SearchAll(const SvxSearchItem& rSearchItem, const ScMarkData& rMark,
1158  ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
1159  bool Replace(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1160  const ScMarkData& rMark, OUString& rUndoStr, ScDocument* pUndoDoc);
1161  bool ReplaceAll(
1162  const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1163  OUString& rUndoStr, ScDocument* pUndoDoc);
1164 
1165  bool SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1166  const ScMarkData& rMark);
1167  bool ReplaceStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1168  const ScMarkData& rMark, bool bIsUndo);
1169  bool SearchAllStyle(
1170  const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges);
1171  bool ReplaceAllStyle(
1172  const SvxSearchItem& rSearchItem, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1173  ScDocument* pUndoDoc);
1175  const SvxSearchItem& rSearchItem,
1176  SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark, ScRangeList& rMatchedRanges,
1177  OUString& rUndoStr, ScDocument* pUndoDoc);
1178  bool SearchRangeForEmptyCell(const ScRange& rRange,
1179  const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& rRow,
1180  OUString& rUndoStr);
1182  const ScRange& rRange, const SvxSearchItem& rSearchItem,
1183  ScRangeList& rMatchedRanges, OUString& rUndoStr, ScDocument* pUndoDoc);
1184 
1185  // use the global sort parameter:
1186  bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const;
1187  static void DecoladeRow( ScSortInfoArray*, SCROW nRow1, SCROW nRow2 );
1188  short CompareCell(
1189  sal_uInt16 nSort,
1190  ScRefCellValue& rCell1, SCCOL nCell1Col, SCROW nCell1Row,
1191  ScRefCellValue& rCell2, SCCOL nCell2Col, SCROW nCell2Row ) const;
1192  short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const;
1193  short Compare( ScSortInfoArray*, SCCOLROW nIndex1, SCCOLROW nIndex2) const;
1194  std::unique_ptr<ScSortInfoArray> CreateSortInfoArray( const sc::ReorderParam& rParam );
1195  std::unique_ptr<ScSortInfoArray> CreateSortInfoArray(
1196  const ScSortParam& rSortParam, SCCOLROW nInd1, SCCOLROW nInd2,
1197  bool bKeepQuery, bool bUpdateRefs );
1198  void QuickSort( ScSortInfoArray*, SCCOLROW nLo, SCCOLROW nHi);
1199  void SortReorderByColumn( const ScSortInfoArray* pArray, SCROW nRow1, SCROW nRow2,
1200  bool bPattern, ScProgress* pProgress );
1201  void SortReorderAreaExtrasByColumn( const ScSortInfoArray* pArray, SCROW nDataRow1, SCROW nDataRow2,
1202  const ScDataAreaExtras& rDataAreaExtras, ScProgress* pProgress );
1203 
1204  void SortReorderByRow( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2,
1205  ScProgress* pProgress, bool bOnlyDataAreaExtras );
1206  void SortReorderByRowRefUpdate( ScSortInfoArray* pArray, SCCOL nCol1, SCCOL nCol2,
1207  ScProgress* pProgress );
1208  void SortReorderAreaExtrasByRow( ScSortInfoArray* pArray, SCCOL nDataCol1, SCCOL nDataCol2,
1209  const ScDataAreaExtras& rDataAreaExtras, ScProgress* pProgress );
1210 
1211  bool CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
1212  bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam& rQueryParam);
1213  void GetUpperCellString(SCCOL nCol, SCROW nRow, OUString& rStr);
1214 
1215  bool RefVisible(const ScFormulaCell* pCell);
1216 
1217  bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol) const;
1218 
1219  void IncDate(double& rVal, sal_uInt16& nDayOfMonth, double nStep, FillDateCmd eCmd);
1220  void FillFormula(
1221  const ScFormulaCell* pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast );
1222  void UpdateInsertTabAbs(SCTAB nNewPos);
1223  bool GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel,
1224  const ScMarkData& rMark) const;
1225  bool GetNextMarkedCell( SCCOL& rCol, SCROW& rRow, const ScMarkData& rMark ) const;
1226  void TestTabRefAbs(SCTAB nTable) const;
1229 
1230  void StartListening( const ScAddress& rAddress, SvtListener* pListener );
1231  void EndListening( const ScAddress& rAddress, SvtListener* pListener );
1232  void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
1233  void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
1234 
1235  void AttachFormulaCells( sc::StartListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1236  void DetachFormulaCells( sc::EndListeningContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
1237 
1238  void SetLoadingMedium(bool bLoading);
1239 
1240  SCSIZE FillMaxRot( RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2,
1241  SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY,
1242  const ScPatternAttr* pPattern, const SfxItemSet* pCondSet );
1243 
1244  // idle calculation of OutputDevice text width for cell
1245  // also invalidates script type, broadcasts for "calc as shown"
1246  void InvalidateTextWidth( const ScAddress* pAdrFrom, const ScAddress* pAdrTo,
1247  bool bNumFormatChanged, bool bBroadcast );
1248 
1249  void SkipFilteredRows(SCROW& rRow, SCROW& rLastNonFilteredRow, bool bForward);
1250 
1255  void MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY);
1256 
1257  void CopyPrintRange(const ScTable& rTable);
1258 
1259  SCCOL FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow) const;
1260 
1261  SCCOL FindNextVisibleCol(SCCOL nCol, bool bRight) const;
1262 
1271  void TransposeColPatterns(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1,
1272  SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered,
1273  const std::vector<SCROW>& rFilteredRows, SCROW nRowDestOffset);
1274 
1283  void TransposeColNotes(ScTable* pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2,
1284  SCROW nCombinedStartRow, bool bIncludeFiltered, SCROW nRowDestOffset);
1285 
1286  ScColumn* FetchColumn( SCCOL nCol );
1287  const ScColumn* FetchColumn( SCCOL nCol ) const;
1288 
1290  sc::EndListeningContext& rCxt, SCCOL nCol, SCROW nRow, std::vector<ScAddress>* pGroupPos );
1291 
1293  sc::EndListeningContext& rCxt, const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2,
1294  std::vector<ScAddress>* pGroupPos );
1295 
1296  void EndListeningGroup( sc::EndListeningContext& rCxt, const SCCOL nCol, SCROW nRow );
1297  void SetNeedsListeningGroup( SCCOL nCol, SCROW nRow );
1298 
1300  OString dumpColumnRowSizes(bool bColumns);
1302  OString dumpHiddenFiltered(bool bColumns, bool bHidden);
1304  OString dumpColumnRowGroups(bool bColumns) const;
1305 
1306  SCCOL GetLOKFreezeCol() const;
1307  SCROW GetLOKFreezeRow() const;
1308  bool SetLOKFreezeCol(SCCOL nFreezeCol);
1309  bool SetLOKFreezeRow(SCROW nFreezeRow);
1310 
1315  {
1316  static constexpr SCROW ROW_NOT_FOUND = -1;
1317 
1318  public:
1319  explicit VisibleDataCellIterator(const ScDocument& rDoc, ScFlatBoolRowSegments& rRowSegs, ScColumn& rColumn);
1321 
1329  ScRefCellValue reset(SCROW nRow);
1330 
1336  ScRefCellValue next();
1337 
1344  SCROW getRow() const { return mnCurRow;}
1345 
1346  private:
1353  };
1354 
1355 };
1356 
1357 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OUString GetAutoFillPreview(const ScRange &rSource, SCCOL nEndX, SCROW nEndY)
Definition: table4.cxx:1212
formula::FormulaTokenRef ResolveStaticReference(SCCOL nCol, SCROW nRow)
Definition: table1.cxx:2421
SCROW GetLastDataRow(SCCOL nCol1, SCCOL nCol2, SCROW nLastRow, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Definition: table1.cxx:1101
void FindMaxRotCol(RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2)
Definition: table2.cxx:2366
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
void SetFormula(SCCOL nCol, SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
Definition: table2.cxx:1686
void SetMergedCells(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: table2.cxx:2262
void PrepareQuery(ScQueryParam &rQueryParam)
Definition: table3.cxx:3365
void CalcAfterLoad(sc::CompileFormulaContext &rCxt, bool bStartListening)
Definition: table2.cxx:2129
void CopyUpdated(const ScTable *pPosTab, ScTable *pDestTab) const
Definition: table2.cxx:1517
svl::SharedString GetSharedString(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1723
constexpr double nPPTY
bool TestCopyScenarioTo(const ScTable *pDestTab) const
Definition: table2.cxx:1607
SCTAB nTab
Definition: table.hxx:205
const ScPatternAttr * GetPattern(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:2192
void UpdatePageBreaks(const ScRange *pUserArea)
Definition: table5.cxx:52
sal_Int64 GetHashCode() const
Definition: table1.cxx:346
bool SetRowHeightRange(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight, double nPPTY, bool bApi)
Definition: table2.cxx:3186
SCCOL GetLastChangedCol() const
Definition: table2.cxx:3753
Iterator(const std::vector< std::unique_ptr< ScColumn, o3tl::default_delete< ScColumn >>>::const_iterator &colIter)
Definition: table.hxx:133
bool HasColHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
Definition: table3.cxx:3699
void Fill(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, double nStepValue, double nMaxValue, ScProgress *pProgress)
Definition: table4.cxx:2489
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
OUString aComment
Definition: table.hxx:162
bool ColFiltered(SCCOL nCol, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: table5.cxx:849
const Iterator maEnd
Definition: table.hxx:150
bool operator==(const Iterator &rOther) const
Definition: table.hxx:138
ScFormulaCell * SetFormulaCell(SCCOL nCol, SCROW nRow, ScFormulaCell *pCell)
Takes ownership of pCell.
Definition: table2.cxx:1704
void ApplyStyleArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScStyleSheet &rStyle)
Definition: table2.cxx:2874
bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, HasAttrFlags nMask) const
Definition: table2.cxx:2212
bool SearchCell(const SvxSearchItem &rSearchItem, SCCOL nCol, sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, const ScMarkData &rMark, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:50
void TransferCellValuesTo(const SCCOL nCol, SCROW nRow, size_t nLen, sc::CellValues &rDest)
Definition: table7.cxx:189
void SetActiveScenario(bool bSet)
Definition: table.hxx:357
bool ReplaceStyle(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark, bool bIsUndo)
Definition: table6.cxx:706
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
void UnlockTable()
Definition: table2.cxx:2728
sal_uLong GetWeightedCount() const
Definition: table3.cxx:3821
bool HasBlockMatrixFragment(const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, bool bNoMatrixAtAll=false) const
Definition: table2.cxx:2443
void CompileAll(sc::CompileFormulaContext &rCxt)
Definition: table2.cxx:2094
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:34
~ScTable() COVERITY_NOEXCEPT_FALSE
Definition: table1.cxx:317
bool HasRowManualBreak(SCROW nRow) const
Definition: table5.cxx:376
void SetLink(ScLinkMode nMode, const OUString &rDoc, const OUString &rFlt, const OUString &rOpt, const OUString &rTab, sal_uLong nRefreshDelay)
Definition: table1.cxx:412
std::optional< sc::ColumnIterator > GetColumnIterator(SCCOL nCol, SCROW nRow1, SCROW nRow2) const
Definition: table7.cxx:425
void ForgetNoteCaptions(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bPreserveData)
Definition: table2.cxx:1843
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: table2.cxx:2016
void CompileColRowNameFormula(sc::CompileFormulaContext &rCxt)
Definition: table4.cxx:2850
void SetRowFlags(SCROW nRow, CRFlags nNewFlags)
Definition: table2.cxx:3687
bool IsBlockEmpty(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bIgnoreNotes) const
Definition: table2.cxx:2277
void SetRowHeight(SCROW nRow, sal_uInt16 nNewHeight)
Definition: table2.cxx:3125
void DeleteConditionalFormat(sal_uLong nOldIndex)
Definition: table1.cxx:2591
void DestroySortCollator()
Definition: table3.cxx:649
std::unique_ptr< ScFlatUInt16RowSegments > mpRowHeights
Definition: table.hxx:182
bool ReplaceAll(const SvxSearchItem &rSearchItem, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:580
HasAttrFlags
Definition: global.hxx:193
void SetPatternAreaCondFormat(SCCOL nCol, SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &rAttr, const ScCondFormatIndexes &rCondFormatIndexes)
Definition: table2.cxx:2850
void InvalidateTextWidth(const ScAddress *pAdrFrom, const ScAddress *pAdrTo, bool bNumFormatChanged, bool bBroadcast)
Definition: table5.cxx:1203
SCROW Row() const
Definition: address.hxx:261
Simple container to keep track of sheet - column pair.
Definition: columnset.hxx:23
void SetValues(const SCCOL nCol, const SCROW nRow, const std::vector< double > &rVals)
Definition: table7.cxx:181
bool ShrinkToUsedDataArea(bool &o_bShrunk, SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bColumnsOnly, bool bStickyTopRow, bool bStickyLeftCol, ScDataAreaExtras *pDataAreaExtras) const
Definition: table1.cxx:977
const ScRange * GetPrintRange(sal_uInt16 nPos) const
Definition: table1.cxx:2258
SCCOL FindNextVisibleColWithContent(SCCOL nCol, bool bRight, SCROW nRow) const
Definition: table1.cxx:1234
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
Definition: table1.cxx:1880
bool bLoadingRTL
Definition: table.hxx:235
Size GetPageSize() const
Definition: table5.cxx:1098
FillDir
Definition: global.hxx:318
void SetName(const OUString &rNewName)
Definition: table1.cxx:351
void TestTabRefAbs(SCTAB nTable) const
Definition: table4.cxx:2837
SCCOL nTableAreaX
Definition: table.hxx:200
bool GetPrintArea(SCCOL &rEndCol, SCROW &rEndRow, bool bNotes, bool bCalcHiddens=false) const
Definition: table1.cxx:577
bool GetNextSpellingCell(SCCOL &rCol, SCROW &rRow, bool bInSel, const ScMarkData &rMark) const
Definition: table4.cxx:2804
void InitSortCollator(const ScSortParam &rPar)
Definition: table3.cxx:633
void UpdateScriptTypes(const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2)
Definition: table7.cxx:246
bool IsDataFiltered(SCCOL nColStart, SCROW nRowStart, SCCOL nColEnd, SCROW nRowEnd) const
Definition: table2.cxx:3666
bool IsSelectionEditable(const ScMarkData &rMark, bool *pOnlyNotBecauseOfMatrix=nullptr) const
Definition: table2.cxx:2639
Provides methods to allow direct shifting of document content without broadcasting or shifting of bro...
SCROW LastNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:950
void SetRowHeightOnly(SCROW nStartRow, SCROW nEndRow, sal_uInt16 nNewHeight)
Set specified row height to specified ranges.
Definition: table2.cxx:3242
void PageStyleModified(const OUString &rNewName)
Definition: table5.cxx:1197
void SortReorderByColumn(const ScSortInfoArray *pArray, SCROW nRow1, SCROW nRow2, bool bPattern, ScProgress *pProgress)
Definition: table3.cxx:948
void SetScenario(bool bFlag)
Definition: table1.cxx:407
bool mbForceBreaks
Definition: table.hxx:246
void RemoveRowPageBreaks(SCROW nStartRow, SCROW nEndRow)
Definition: table5.cxx:398
SCTAB GetTab() const
Definition: table.hxx:283
size_t GetNoteCount(SCCOL nCol) const
Definition: table2.cxx:1821
::std::set< SCROW > maRowPageBreaks
Definition: table.hxx:191
void ApplyPattern(SCCOL nCol, SCROW nRow, const ScPatternAttr &rAttr)
Definition: table2.cxx:2787
ScColumn * FetchColumn(SCCOL nCol)
Definition: table2.cxx:1228
const ScSheetEvents * GetSheetEvents() const
Definition: table.hxx:311
sheet protection state container
void InterpretDirtyCells(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: table1.cxx:2532
ScObjectHandling
Definition: drwlayer.hxx:89
void SetScenarioColor(const Color &rNew)
Definition: table.hxx:352
bool HasFormulaCell(const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2) const
Definition: table7.cxx:294
const Iterator maBegin
Definition: table.hxx:149
bool IsPendingRowHeights() const
Definition: table.hxx:336
std::unique_ptr< ScPostIt > ReleaseNote(SCCOL nCol, SCROW nRow)
Definition: table2.cxx:1813
void SetScriptType(SCCOL nCol, SCROW nRow, SvtScriptType nType)
Definition: table1.cxx:2403
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:40
ScScenarioFlags
Definition: global.hxx:236
void StartListening(const ScAddress &rAddress, SvtListener *pListener)
Definition: table5.cxx:1119
sal_uInt16 GetPrintRangeCount() const
Definition: table.hxx:775
void SetPrintEntireSheet()
Marks the specified sheet to be printed completely.
Definition: table1.cxx:2249
void CopyData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCCOL nDestCol, SCROW nDestRow, SCTAB nDestTab)
Definition: table2.cxx:3975
void FillAutoSimple(SCCOLROW nISrcStart, SCCOLROW nISrcEnd, SCCOLROW nIStart, SCCOLROW nIEnd, SCCOLROW &rInner, const SCCOLROW &rCol, const SCCOLROW &rRow, sal_uLong nActFormCnt, sal_uLong nMaxFormCnt, bool bHasFiltered, bool bVertical, bool bPositive, ScProgress *pProgress, sal_uLong &rProgress)
Definition: table4.cxx:1760
SCCOL size() const
ScSortParam aSortParam
Definition: table.hxx:212
sal_uIntPtr sal_uLong
long Long
bool TestInsertRow(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize) const
Definition: table2.cxx:135
Context for reference update during shifting, moving or copying of cell ranges.
void CopyRowFiltered(const ScTable &rTable, SCROW nStartRow, SCROW nEndRow)
Definition: table5.cxx:897
SvtScriptType GetScriptType(SCCOL nCol, SCROW nRow) const
Definition: table1.cxx:2395
CellType GetCellType(const ScAddress &rPos) const
Definition: table.hxx:460
SCCOL FindNextVisibleCol(SCCOL nCol, bool bRight) const
Definition: table1.cxx:1210
void SetCalcNotification(bool bSet)
Definition: table2.cxx:130
void SetPageSize(const Size &rSize)
Definition: table5.cxx:1070
void GetString(SCCOL nCol, SCROW nRow, OUString &rString, const ScInterpreterContext *pContext=nullptr) const
Definition: table2.cxx:1743
bool GetPrintAreaVer(SCCOL nStartCol, SCCOL nEndCol, SCROW &rEndRow, bool bNotes) const
Definition: table1.cxx:707
void DetachFormulaCells(sc::EndListeningContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: table2.cxx:1272
std::unique_ptr< ScFlatBoolColSegments > mpFilteredCols
Definition: table.hxx:188
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark, bool &rFound) const
Definition: table2.cxx:2931
bool HasScenarioRange(const ScRange &rRange) const
Definition: table2.cxx:1565
bool IsVisible() const
Definition: table.hxx:314
ScLinkMode nLinkMode
Definition: table.hxx:169
CommentCaptionState GetAllNoteCaptionsState(const ScRange &rRange, std::vector< sc::NoteEntry > &rNotes)
Definition: table2.cxx:1869
sal_uInt16 nLockCount
Definition: table.hxx:220
ScRefCellValue reset(SCROW nRow)
Set the start row position.
Definition: table1.cxx:2295
SCROW getRow() const
Get the current row position.
Definition: table.hxx:1344
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap
void SetFormulaResults(SCCOL nCol, SCROW nRow, const double *pResults, size_t nLen)
Definition: table1.cxx:2539
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd) const
Definition: table3.cxx:3861
OUString aLinkFlt
Definition: table.hxx:165
const SCCOL * pointer
Definition: table.hxx:130
Store position data for column array storage.
bool mbPageBreaksValid
Definition: table.hxx:245
void TransposeColPatterns(ScTable *pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered, const std::vector< SCROW > &rFilteredRows, SCROW nRowDestOffset)
Transpose clipboard patterns.
Definition: table2.cxx:1042
Stores cell values for multiple tables.
Definition: cellvalues.hxx:85
bool CompileErrorCells(sc::CompileFormulaContext &rCxt, FormulaError nErrCode)
Definition: table2.cxx:2117
sal_uInt16 GetTextWidth(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:86
void GetFirstDataPos(SCCOL &rCol, SCROW &rRow) const
Definition: table2.cxx:1938
SCCOLROW LastHiddenColRow(SCCOLROW nPos, bool bCol) const
Definition: table5.cxx:807
void SetManualHeight(SCROW nStartRow, SCROW nEndRow, bool bManual)
Definition: table2.cxx:3253
SCSIZE Query(const ScQueryParam &rQueryParam, bool bKeepSub)
Definition: table3.cxx:3370
void SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
Definition: table5.cxx:634
const OUString & GetLinkDoc() const
Definition: table.hxx:362
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
void UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr, bool bIncludeDraw=true, bool bUpdateNoteCaptionPos=true)
Definition: table1.cxx:1751
bool bVisible
Definition: table.hxx:239
void CopyScenarioTo(const ScTable *pDestTab) const
Definition: table2.cxx:1536
static void DecoladeRow(ScSortInfoArray *, SCROW nRow1, SCROW nRow2)
Definition: table3.cxx:1773
void SetCodeName(const OUString &rNewName)
Definition: table.hxx:380
void SetLoadingRTL(bool bSet)
Definition: table1.cxx:392
void UndoToTable(sc::CopyToDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScTable *pDestTab)
Definition: table2.cxx:1465
void GetFilteredFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScQueryParam &rParam, ScFilterEntries &rFilterEntries, bool bFiltering)
Definition: table3.cxx:3783
std::reverse_iterator< Iterator > rbegin()
Definition: table.hxx:146
void DeleteRow(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize, bool *pUndoOutline, std::vector< ScAddress > *pGroupPos)
Definition: table2.cxx:196
sal_uInt16 GetOriginalHeight(SCROW nRow) const
Definition: table2.cxx:3497
Accessor class to ScDocument.
void RemoveEditTextCharAttribs(SCCOL nCol, SCROW nRow, const ScPatternAttr &rAttr)
Definition: table2.cxx:1782
void SkipFilteredRows(SCROW &rRow, SCROW &rLastNonFilteredRow, bool bForward)
Definition: table6.cxx:281
const ScStyleSheet * GetStyle(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:2921
void TransposeClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCROW nCombinedStartRow, SCROW nRowDestOffset, ScTable *pTransClip, InsertDeleteFlags nFlags, bool bAsLink, bool bIncludeFiltered)
Definition: table2.cxx:980
void MixData(sc::MixDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty, const ScTable *pSrcTab)
Definition: table2.cxx:777
void SetColFiltered(SCCOL nStartCol, SCCOL nEndCol, bool bFiltered)
Definition: table5.cxx:919
bool HasData(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1964
SCCOL operator*() const
Definition: table.hxx:140
void SetDirtyAfterLoad()
Definition: table2.cxx:2045
void RemoveSubTotals(ScSubTotalParam &rParam)
Definition: table3.cxx:1979
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
Definition: table2.cxx:2759
void CompileHybridFormula(sc::StartListeningContext &rStartListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: table7.cxx:239
void LimitChartArea(SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow) const
Definition: table1.cxx:1185
void UpdateSelectionFunction(ScFunctionData &rData, const ScMarkData &rMark)
Definition: table3.cxx:3870
void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: table2.cxx:2905
std::unique_ptr< ScRangeName > mpRangeName
Definition: table.hxx:227
void RestoreFromCache(SvStream &rStrm)
Definition: table7.cxx:475
SCROW GetRowForHeight(sal_uLong nHeight) const
Get the last row such that the height of row 0 to the end row is as high as possible without exceedin...
Definition: table2.cxx:4123
std::vector< std::unique_ptr< ScColumn, o3tl::default_delete< ScColumn > > >::const_iterator maColIter
Definition: table.hxx:125
SCROW LastVisibleRow(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:740
SCROW nTableAreaVisibleY
Definition: table.hxx:203
bool bTableAreaVisibleValid
Definition: table.hxx:238
void MaybeAddExtraColumn(SCCOL &rCol, SCROW nRow, OutputDevice *pDev, double nPPTX, double nPPTY)
In case the cell text goes beyond the column width, move the max column position to the right...
Definition: table1.cxx:2083
void SetRepeatColRange(std::unique_ptr< ScRange > pNew)
Definition: table1.cxx:2210
void ApplyAttr(SCCOL nCol, SCROW nRow, const SfxPoolItem &rAttr)
Definition: table2.cxx:3065
bool HasRowHeader(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
Definition: table3.cxx:3736
ScOutlineTable * GetOutlineTable()
Definition: table.hxx:285
ScRangeVec aPrintRanges
Definition: table.hxx:215
exports com.sun.star. sheet
void PreprocessDBDataUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: table7.cxx:232
const ScDocument & mrDocument
Definition: table.hxx:1347
void MarkScenarioIn(ScMarkData &rMark, ScScenarioFlags nNeededBits) const
Definition: table2.cxx:1554
Row-wise value iterator.
Definition: dociter.hxx:478
void FillFormula(const ScFormulaCell *pSrcCell, SCCOL nDestCol, SCROW nDestRow, bool bLast)
Definition: table4.cxx:748
bool SearchAllStyle(const SvxSearchItem &rSearchItem, const ScMarkData &rMark, ScRangeList &rMatchedRanges)
Definition: table6.cxx:731
void FillPrintSaver(ScPrintSaverTab &rSaveTab) const
Definition: table1.cxx:2263
bool ValidRow(SCROW nRow) const
Definition: table.hxx:333
void RemoveRowBreak(SCROW nRow, bool bPage, bool bManual)
Definition: table5.cxx:408
void StartListeners(sc::StartListeningContext &rCxt, bool bAll)
Either start all formula cells as listeners unconditionally, or start those that are marked "needs li...
Definition: table2.cxx:1244
void SetStreamValid(bool bSet, bool bIgnoreLock=false)
Definition: table1.cxx:374
ScColumn & CreateColumnIfNotExists(const SCCOL nScCol) const
Definition: table.hxx:287
void SetRowBreak(SCROW nRow, bool bPage, bool bManual)
Definition: table5.cxx:438
void AttachFormulaCells(sc::StartListeningContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: table2.cxx:1264
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:35
bool IsEditActionAllowed(sc::ColRowEditAction eAction, SCCOLROW nStart, SCCOLROW nEnd) const
Definition: table7.cxx:344
void CalculateInColumnInThread(ScInterpreterContext &rContext, SCCOL nColStart, SCCOL nColEnd, SCROW nRowStart, SCROW nRowEnd, unsigned nThisThread, unsigned nThreadsTotal)
Definition: table1.cxx:2547
void ResetChanged(const ScRange &rRange)
Definition: table2.cxx:2135
sal_uLong GetColOffset(SCCOL nCol, bool bHiddenAsZero=true) const
Definition: table2.cxx:4190
static constexpr SCROW ROW_NOT_FOUND
Definition: table.hxx:1316
Stores individual user-defined sort list.
Definition: userlist.hxx:32
void SetNumberFormat(SCCOL nCol, SCROW nRow, sal_uInt32 nNumberFormat)
Definition: table2.cxx:2184
std::reverse_iterator< Iterator > rend()
Definition: table.hxx:147
void Reorder(const sc::ReorderParam &rParam)
Definition: table3.cxx:1870
void UpdateDrawRef(UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, SCCOL nDx, SCROW nDy, SCTAB nDz, bool bUpdateNoteCaptionPos=true)
Definition: table1.cxx:1729
bool IsBlockEditable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool *pOnlyNotBecauseOfMatrix=nullptr, bool bNoMatrixAtAll=false) const
Definition: table2.cxx:2555
void InsertRow(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE nSize)
Definition: table2.cxx:148
bool ValidNextPos(SCCOL nCol, SCROW nRow, const ScMarkData &rMark, bool bMarked, bool bUnprotected) const
Definition: table1.cxx:1359
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
Definition: address.hxx:44
void SetTableOpDirty(const ScRange &)
Definition: table2.cxx:2035
void finalizeOutlineImport()
Definition: table7.cxx:451
void SetAnonymousDBData(std::unique_ptr< ScDBData > pDBData)
Definition: table1.cxx:2377
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW
Definition: types.hxx:23
Additional class containing cell annotation data.
Definition: postit.hxx:161
void FillMatrix(ScMatrix &rMat, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, svl::SharedStringPool *pPool) const
Definition: table1.cxx:2525
void EndListening(const ScAddress &rAddress, SvtListener *pListener)
Definition: table5.cxx:1127
const ScTableProtection * GetProtection() const
Definition: table5.cxx:1096
const OUString & GetName() const
Definition: table.hxx:373
void TransposeColNotes(ScTable *pTransClip, SCCOL nCol1, SCCOL nCol, SCROW nRow1, SCROW nRow2, SCROW nCombinedStartRow, bool bIncludeFiltered, SCROW nRowDestOffset)
Transpose clipboard notes.
Definition: table2.cxx:1113
void GetFormula(SCCOL nCol, SCROW nRow, OUString &rFormula) const
Definition: table2.cxx:1790
sal_uLong GetScaledRowHeight(SCROW nStartRow, SCROW nEndRow, double fScale, const sal_uLong *pnMaxHeight=nullptr) const
Definition: table2.cxx:3433
bool UpdateOutlineCol(SCCOL nStartCol, SCCOL nEndCol, bool bShow)
Definition: table2.cxx:3785
FillDateCmd
Definition: global.hxx:343
void SetPageStyle(const OUString &rName)
Definition: table5.cxx:1155
void ConvertFormulaToValue(sc::EndListeningContext &rCxt, const SCCOL nCol1, const SCROW nRow1, const SCCOL nCol2, const SCROW nRow2, sc::TableValues *pUndo)
Definition: table7.cxx:205
double * GetValueCell(SCCOL nCol, SCROW nRow)
Definition: table2.cxx:1751
void ClearPrintRanges()
Removes all print ranges.
Definition: table1.cxx:2228
void SortReorderAreaExtrasByColumn(const ScSortInfoArray *pArray, SCROW nDataRow1, SCROW nDataRow2, const ScDataAreaExtras &rDataAreaExtras, ScProgress *pProgress)
Definition: table3.cxx:928
void SetColWidthOnly(SCCOL nCol, sal_uInt16 nNewWidth)
Definition: table2.cxx:3113
void PreprocessRangeNameUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: table7.cxx:225
void HandleStuffAfterParallelCalculation(SCCOL nColStart, SCCOL nColEnd, SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
Definition: table1.cxx:2564
Walk through all cells in an area.
Definition: dociter.hxx:207
bool GetDataEntries(SCCOL nCol, SCROW nRow, std::set< ScTypedStrData > &rStrings)
Definition: table3.cxx:3806
ScLinkMode
Definition: global.hxx:225
void CopyToClip(sc::CopyToClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable *pTable)
Definition: table2.cxx:482
void StripHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
Definition: table2.cxx:3833
bool IsLinked() const
Definition: table.hxx:361
void SetRowManualBreaks(::std::set< SCROW > &&rBreaks)
Definition: table5.cxx:322
SCROW nRepeatStartY
Definition: table.hxx:176
std::input_iterator_tag iterator_category
Definition: table.hxx:127
void CopyColHidden(const ScTable &rTable, SCCOL nStartCol, SCCOL nEndCol)
Definition: table5.cxx:668
short CompareCell(sal_uInt16 nSort, ScRefCellValue &rCell1, SCCOL nCell1Col, SCROW nCell1Row, ScRefCellValue &rCell2, SCCOL nCell2Col, SCROW nCell2Row) const
Definition: table3.cxx:1528
bool SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
Definition: table5.cxx:584
ScRefCellValue next()
Find the next visible data cell position.
Definition: table1.cxx:2339
void SetColWidth(SCCOL nCol, sal_uInt16 nNewWidth)
Definition: table2.cxx:3092
bool HasValueData(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1980
void CopyCellValuesFrom(const SCCOL nCol, SCROW nRow, const sc::CellValues &rSrc)
Definition: table7.cxx:197
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, std::vector< ScAddress > *pGroupPos)
Definition: table7.cxx:317
SCROW FirstNonFilteredRow(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:927
bool HasUniformRowHeight(SCROW nRow1, SCROW nRow2) const
Definition: table7.cxx:257
Optimized ColumnSpanSet version that operates on a single ScRange.
void SetValue(SCCOL nCol, SCROW nRow, const double &rVal)
Definition: table2.cxx:1731
void SetPendingRowHeights(bool bSet)
Definition: table1.cxx:382
bool ValidQuery(SCROW nRow, const ScQueryParam &rQueryParam, const ScRefCellValue *pCell=nullptr, bool *pbTestEqualCondition=nullptr, const ScInterpreterContext *pContext=nullptr, sc::TableColumnBlockPositionSet *pBlockPos=nullptr)
Definition: table3.cxx:2981
void FindAreaPos(SCCOL &rCol, SCROW &rRow, ScMoveDirection eDirection) const
Definition: table1.cxx:1297
std::unique_ptr< ScOutlineTable > pOutlineTable
Definition: table.hxx:196
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: table2.cxx:3903
std::atomic< bool > bStreamValid
this is touched from formula group threading context
Definition: table.hxx:248
bool Search(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:317
void SetRangeName(std::unique_ptr< ScRangeName > pNew)
Definition: table2.cxx:4085
void SetPattern(const ScAddress &rPos, const ScPatternAttr &rAttr)
Definition: table2.cxx:3046
bool RemoveFlags(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags)
Definition: table2.cxx:3034
sal_uInt16 GetOptimalColWidth(SCCOL nCol, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bFormula, const ScMarkData *pMarkData, const ScColWidthParam *pParam)
Definition: table1.cxx:426
void SetNeedsListeningGroup(SCCOL nCol, SCROW nRow)
Definition: table7.cxx:336
bool SkipRow(const SCCOL rCol, SCROW &rRow, const SCROW nMovY, const ScMarkData &rMark, const bool bUp, const SCROW nUsedY, const bool bMarked, const bool bSheetProtected) const
Definition: table1.cxx:1395
const OUString & GetLinkFlt() const
Definition: table.hxx:363
sal_uInt16 GetOriginalWidth(SCCOL nCol) const
Definition: table2.cxx:3305
bool HasSelectionMatrixFragment(const ScMarkData &rMark) const
Definition: table2.cxx:2539
std::unique_ptr< ScBitMaskCompressedArray< SCCOL, CRFlags > > mpColFlags
Definition: table.hxx:184
void SetRepeatRowRange(std::unique_ptr< ScRange > pNew)
Definition: table1.cxx:2219
VisibleDataCellIterator(const ScDocument &rDoc, ScFlatBoolRowSegments &rRowSegs, ScColumn &rColumn)
Definition: table1.cxx:2282
bool SearchAll(const SvxSearchItem &rSearchItem, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:517
bool IsLayoutRTL() const
Definition: table.hxx:342
std::unique_ptr< utl::TextSearch > pSearchText
Definition: table.hxx:207
bool IsColValid(const SCCOL nScCol) const
Definition: table.hxx:320
constexpr double nPPTX
void CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, const SCCOL nCol1, const SCROW nRow1, const SCCOL nCol2, const SCROW nRow2, const SCROW nSrcRow, const ScTable *pSrcTab)
Definition: table7.cxx:126
bool SetOutlineTable(const ScOutlineTable *pNewOutline)
Definition: table2.cxx:91
OString dumpColumnRowGroups(bool bColumns) const
Returns list-of-spans representation of the column/row groupings encoded as an OString.
Definition: table7.cxx:578
void FillAuto(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nFillCount, FillDir eFillDir, ScProgress *pProgress)
Definition: table4.cxx:790
std::unique_ptr< ScFlatBoolColSegments > mpHiddenCols
Definition: table.hxx:186
void IncDate(double &rVal, sal_uInt16 &nDayOfMonth, double nStep, FillDateCmd eCmd)
Definition: table4.cxx:1486
bool SetFormulaCells(SCCOL nCol, SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Definition: table2.cxx:1715
ScPasteFunc
Definition: global.hxx:189
sal_uLong GetLinkRefreshDelay() const
Definition: table.hxx:366
void ShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
Definition: table2.cxx:3624
void ApplyStyle(SCCOL nCol, SCROW nRow, const ScStyleSheet *rStyle)
Definition: table2.cxx:2867
SCSIZE GetEmptyLinesInBlock(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScDirection eDir) const
Definition: table1.cxx:1119
void SetScenarioFlags(ScScenarioFlags nNew)
Definition: table.hxx:356
void SetDrawPageSize(bool bResetStreamValid=true, bool bUpdateNoteCaptionPos=true, const ScObjectHandling eObjectHandling=ScObjectHandling::RecalcPosMode)
Definition: table2.cxx:4056
OUString aCodeName
Definition: table.hxx:161
bool ColHidden(SCCOL nCol, SCCOL *pFirstCol=nullptr, SCCOL *pLastCol=nullptr) const
Definition: table5.cxx:567
bool IsProtected() const
Definition: table5.cxx:1084
SvtScriptType
FillCmd
Definition: global.hxx:326
bool ValidCol(SCCOL nCol) const
Definition: table.hxx:332
Set of column block positions only for one table.
bool CreateStarQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam &rQueryParam)
Definition: table3.cxx:3552
const ScFormulaCell * GetFormulaCell(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1798
ScDocument & GetDoc()
Definition: table.hxx:281
Keep track of all named expressions that have been updated during reference update.
bool IsColRowTabValid(const SCCOL nScCol, const SCROW nScRow, const SCTAB nScTab) const
Definition: table.hxx:328
void AssertNoInterpretNeeded(SCCOL nCol, SCROW nRow1, SCROW nRow2)
Definition: table1.cxx:2468
bool operator!=(const Iterator &rOther) const
Definition: table.hxx:139
void SetOptimalHeightOnly(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, ScProgress *pOuterProgress=nullptr, sal_uLong nProgressStart=0)
Definition: table1.cxx:489
void SetColManualBreaks(::std::set< SCCOL > &&rBreaks)
Definition: table5.cxx:329
void SetDirtyVar()
Definition: table2.cxx:2002
CollatorWrapper * pSortCollator
Definition: table.hxx:213
void AddCondFormatData(const ScRangeList &rRange, sal_uInt32 nIndex)
Definition: table2.cxx:2816
void FindRangeNamesInUse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::UpdatedRangeNames &rIndexes) const
Definition: table1.cxx:1987
std::unique_ptr< ScRange > pRepeatColRange
Definition: table.hxx:217
bool HasColManualBreak(SCCOL nCol) const
Definition: table5.cxx:384
const ScRangeList * GetScenarioRanges() const
Definition: table2.cxx:1593
void CheckVectorizationState()
Definition: table2.cxx:2008
ScMoveDirection
Definition: global.hxx:335
void RestorePrintRanges(const ScPrintSaverTab &rSaveTab)
Definition: table1.cxx:2269
void UpdateInsertTab(sc::RefUpdateInsertTabContext &rCxt)
Definition: table1.cxx:1886
void GetAutoFormatFrame(SCCOL nCol, SCROW nRow, sal_uInt16 nFlags, sal_uInt16 nIndex, ScAutoFormatData &rData)
Definition: table4.cxx:2660
sal_Int16 SCCOL
Definition: types.hxx:21
sal_uInt16 GetColWidth(SCCOL nCol, bool bHiddenAsZero=true) const
Definition: table2.cxx:3268
InsertDeleteFlags
Definition: global.hxx:158
bool ValidCol(SCCOL nCol) const
Definition: document.hxx:874
const ScRange * GetRepeatRowRange() const
Definition: table.hxx:771
void InvalidateScenarioRanges()
Definition: table2.cxx:1588
static void UpdateSearchItemAddressForReplace(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow)
Replace behaves differently to the Search; adjust the rCol and rRow accordingly.
Definition: table6.cxx:546
OUString aUpperName
Definition: table.hxx:209
bool GetPrintAreaHor(SCROW nStartRow, SCROW nEndRow, SCCOL &rEndCol) const
Definition: table1.cxx:670
Struct to hold non-data extended area, used with ScDocument::ShrinkToUsedDataArea().
Definition: sortparam.hxx:43
void CopyCaptionsToTable(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScTable *pDestTab, bool bCloneCaption)
Definition: table2.cxx:1451
std::unique_ptr< ScDBData > pDBDataNoName
Definition: table.hxx:226
void UnshareFormulaCells(SCCOL nCol, std::vector< SCROW > &rRows)
Definition: table7.cxx:278
void RemoveColBreak(SCCOL nCol, bool bPage, bool bManual)
Definition: table5.cxx:423
bool TestRemoveSubTotals(const ScSubTotalParam &rParam)
Definition: table3.cxx:1945
void CreateColumnIfNotExistsImpl(const SCCOL nScCol) const
Definition: table1.cxx:2642
void CopyRowHidden(const ScTable &rTable, SCROW nStartRow, SCROW nEndRow)
Definition: table5.cxx:683
ScFlatBoolRowSegments & mrRowSegs
Definition: table.hxx:1348
CRFlags GetRowFlags(SCROW nRow) const
Definition: table2.cxx:3715
void SetEmptyCell(SCCOL nCol, SCROW nRow)
Definition: table2.cxx:1678
const SfxPoolItem * GetAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nWhich) const
Definition: table2.cxx:2148
OUString aLinkDoc
Definition: table.hxx:164
ScScenarioFlags nScenarioFlags
Definition: table.hxx:225
void AutoFormatArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr &rAttr, sal_uInt16 nFormatNo)
Definition: table4.cxx:2500
void GetUnprotectedCells(ScRangeList &rRangeList) const
Definition: table2.cxx:1902
void UpdateCompile(bool bForceIfNameInUse=false)
Definition: table1.cxx:1972
sc::MultiDataCellState HasMultipleDataCells(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: table7.cxx:35
void ShowCol(SCCOL nCol, bool bShow)
Definition: table2.cxx:3523
bool HasAttribSelection(const ScMarkData &rMark, HasAttrFlags nMask) const
Definition: table2.cxx:2225
void CopyFromClip(sc::CopyFromClipContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCCOL nDx, SCROW nDy, ScTable *pTable)
Definition: table2.cxx:716
void AddPrintRange(const ScRange &rNew)
Adds a new print ranges.
Definition: table1.cxx:2238
bool IsActiveScenario() const
Definition: table.hxx:358
const EditTextObject * GetEditText(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1774
const Color & GetScenarioColor() const
Definition: table.hxx:351
void DBShowRows(SCROW nRow1, SCROW nRow2, bool bShow)
Definition: table2.cxx:3592
ScAddress maLOKFreezeCell
Definition: table.hxx:231
void GetNotesInRange(const ScRange &rRange, std::vector< sc::NoteEntry > &rNotes) const
Definition: table2.cxx:1858
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
std::unique_ptr< ScTableProtection > pTabProtection
Definition: table.hxx:179
ScRefCellValue GetRefCellValue(SCCOL nCol, SCROW nRow)
Definition: table1.cxx:2492
void GetLastDataPos(SCCOL &rCol, SCROW &rRow) const
Definition: table2.cxx:1953
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
OString dumpHiddenFiltered(bool bColumns, bool bHidden)
Returns list-of-spans representation of hidden/filtered states of columns/rows encoded as an OString...
Definition: table7.cxx:558
void AutoFormat(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, sal_uInt16 nFormatNo)
Definition: table4.cxx:2511
void GetAutoFormatData(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScAutoFormatData &rData)
Definition: table4.cxx:2720
bool GetNextMarkedCell(SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark) const
Definition: table1.cxx:1677
void CompileXML(sc::CompileFormulaContext &rCxt, ScProgress &rProgress)
Definition: table2.cxx:2103
SvNumFormatType
bool bTableAreaValid
Definition: table.hxx:237
OUString aName
Definition: table.hxx:160
ScColContainer aCol
Definition: table.hxx:158
void SetRawString(SCCOL nCol, SCROW nRow, const svl::SharedString &rStr)
Definition: table2.cxx:1737
bool CreateExcelQuery(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam &rQueryParam)
Definition: table3.cxx:3473
void GetAllRowBreaks(::std::set< SCROW > &rBreaks, bool bPage, bool bManual) const
Definition: table5.cxx:336
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2)
Definition: table2.cxx:1291
bool GetTableArea(SCCOL &rEndCol, SCROW &rEndRow, bool bCalcHiddens=false) const
Definition: table1.cxx:549
void LockTable()
Definition: table2.cxx:2723
void DBShowRow(SCROW nRow, bool bShow)
Definition: table2.cxx:3566
const OUString & GetCodeName() const
Definition: table.hxx:379
::std::set< SCROW > maRowManualBreaks
Definition: table.hxx:192
std::unique_ptr< ScConditionalFormatList > mpCondFormatList
Definition: table.hxx:229
bool DoSubTotals(ScSubTotalParam &rParam)
Definition: table3.cxx:2058
Color aTabBgColor
Definition: table.hxx:224
const Iterator & end()
Definition: table.hxx:145
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: table2.cxx:2911
SvtScriptType GetRangeScriptType(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2)
Definition: table1.cxx:2411
Iterator & operator--()
Definition: table.hxx:136
void BroadcastRecalcOnRefMove()
Broadcast dirty formula cells that contain functions such as CELL(), COLUMN() or ROW() which may chan...
Definition: table2.cxx:2063
void UpdateTranspose(const ScRange &rSource, const ScAddress &rDest, ScDocument *pUndoDoc)
Definition: table1.cxx:1873
sal_Int32 GetMaxStringLen(SCCOL nCol, SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Definition: table3.cxx:3852
CommentCaptionState
Definition: document.hxx:253
void ExtendHidden(SCCOL &rX1, SCROW &rY1, SCCOL &rX2, SCROW &rY2)
Definition: table2.cxx:3803
bool ReservePatternCount(SCCOL nCol, SCSIZE nReserve)
Definition: table4.cxx:2872
void SetTabNo(SCTAB nNewTab)
Definition: table1.cxx:1980
bool IsStreamValid() const
Definition: table.hxx:317
const ScBitMaskCompressedArray< SCROW, CRFlags > * GetRowFlagsArray() const
Definition: table.hxx:875
ScTable(ScDocument &rDoc, SCTAB nNewTab, const OUString &rNewName, bool bColInfo=true, bool bRowInfo=true)
Definition: table1.cxx:235
bool HasRowPageBreak(SCROW nRow) const
Definition: table5.cxx:360
bool ApplyFlags(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, ScMF nFlags)
Definition: table2.cxx:3024
bool IsScenario() const
Definition: table.hxx:347
bool bLayoutRTL
Definition: table.hxx:234
void SortReorderByRow(ScSortInfoArray *pArray, SCCOL nCol1, SCCOL nCol2, ScProgress *pProgress, bool bOnlyDataAreaExtras)
Definition: table3.cxx:1090
BroadcastMode
Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode).
Definition: column.hxx:172
bool IsEmptyLine(SCROW nRow, SCCOL nStartCol, SCCOL nEndCol) const
Definition: table1.cxx:1170
bool ContainsNotesInRange(const ScRange &rRange) const
Definition: table2.cxx:1908
FormulaError
SCCOL Col() const
Definition: address.hxx:266
bool SetString(SCCOL nCol, SCROW nRow, SCTAB nTab, const OUString &rString, const ScSetStringParam *pParam=nullptr)
Definition: table2.cxx:1620
SCCOL nTableAreaVisibleX
Definition: table.hxx:202
void SetCondFormList(ScConditionalFormatList *pList)
Definition: table1.cxx:2596
Iterate through all edit text cells in a given sheet.
void GetScenarioComment(OUString &rComment) const
Definition: table.hxx:349
SheetGeomType
Represents the type of sheet geometry data.
Definition: document.hxx:267
bool RefVisible(const ScFormulaCell *pCell)
Definition: table2.cxx:4026
bool SearchAndReplaceEmptyCells(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:856
void UpdateMoveTab(sc::RefUpdateMoveTabContext &rCxt, SCTAB nTabNo, ScProgress *pProgress)
Definition: table1.cxx:1944
void DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: table2.cxx:414
void EndListeningGroup(sc::EndListeningContext &rCxt, const SCCOL nCol, SCROW nRow)
Definition: table7.cxx:328
void MergePatternArea(ScMergePatternState &rState, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bDeep) const
Definition: table2.cxx:2751
SCROW GetLOKFreezeRow() const
Definition: table7.cxx:594
const OUString & GetLinkTab() const
Definition: table.hxx:365
void CopyToTable(sc::CopyToDocContext &rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScTable *pDestTab, const ScMarkData *pMarkData, bool bAsLink, bool bColRowFlags, bool bGlobalNamesToLocal, bool bCopyCaptions)
Definition: table2.cxx:1303
bool GetDataAreaSubrange(ScRange &rRange) const
Definition: table1.cxx:936
bool SetLOKFreezeCol(SCCOL nFreezeCol)
Definition: table7.cxx:599
SCSIZE GetPatternCount(SCCOL nCol) const
Definition: table4.cxx:2856
::std::vector< ScRange > ScRangeVec
Definition: table.hxx:156
Iterator & operator++()
Definition: table.hxx:135
void FillSeriesSimple(const ScCellValue &rSrcCell, SCCOLROW &rInner, SCCOLROW nIMin, SCCOLROW nIMax, const SCCOLROW &rCol, const SCCOLROW &rRow, bool bVertical, ScProgress *pProgress, sal_uLong &rProgress)
Definition: table4.cxx:1680
bool ReplaceAllStyle(const SvxSearchItem &rSearchItem, const ScMarkData &rMark, ScRangeList &rMatchedRanges, ScDocument *pUndoDoc)
Definition: table6.cxx:767
void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &rCxt)
Definition: table1.cxx:1915
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: document.hxx:876
void InvalidatePageBreaks()
Definition: table2.cxx:1531
bool HasManualBreaks() const
Definition: table5.cxx:317
SCROW CountVisibleRows(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:763
void GetAllColBreaks(::std::set< SCCOL > &rBreaks, bool bPage, bool bManual) const
Definition: table5.cxx:348
OUString aLinkOpt
Definition: table.hxx:166
::std::set< SCCOL > maColPageBreaks
Definition: table.hxx:193
SCCOL nRepeatEndX
Definition: table.hxx:175
void GetAutoFormatAttr(SCCOL nCol, SCROW nRow, sal_uInt16 nIndex, ScAutoFormatData &rData)
Definition: table4.cxx:2647
bool RowHidden(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: table5.cxx:492
UpdateRefMode
Definition: global.hxx:310
tools::Long GetNeededSize(SCCOL nCol, SCROW nRow, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bWidth, bool bTotalSize, bool bInPrintTwips=false)
Definition: table1.cxx:439
CRFlags
Definition: global.hxx:135
sal_Int32 SCROW
Definition: types.hxx:17
To calculate a single subtotal function.
Definition: subtotal.hxx:60
void SetProtection(const ScTableProtection *pProtect)
Definition: table5.cxx:1086
void GetFilterEntries(SCCOL nCol, SCROW nRow1, SCROW nRow2, ScFilterEntries &rFilterEntries, bool bFiltering=false)
Definition: table3.cxx:3773
void UpdateInsertTabAbs(SCTAB nNewPos)
Definition: table4.cxx:2798
OUString aPageStyle
Definition: table.hxx:172
const Iterator & begin()
Definition: table.hxx:144
void SetScenarioComment(const OUString &rComment)
Definition: table.hxx:350
void SetTabBgColor(const Color &rColor)
Definition: table1.cxx:397
ColRowEditAction
Definition: global.hxx:436
bool IsColRowValid(const SCCOL nScCol, const SCROW nScRow) const
Definition: table.hxx:324
bool CreateQueryParam(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScQueryParam &rQueryParam)
Definition: table3.cxx:3659
const OUString & GetPageStyle() const
Definition: table.hxx:384
bool IsPrintEntireSheet() const
Returns true, if the sheet is always printed.
Definition: table.hxx:778
bool SearchStyle(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark)
Definition: table6.cxx:614
bool ValidRow(SCROW nRow) const
Definition: document.hxx:875
void TopTenQuery(ScQueryParam &)
Definition: table3.cxx:3123
ScMF
Definition: attrib.hxx:34
std::unique_ptr< ScFlatBoolRowSegments > mpFilteredRows
Definition: table.hxx:189
void FillAnalyse(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, FillCmd &rCmd, FillDateCmd &rDateCmd, double &rInc, sal_uInt16 &rMinDigits, ScUserListData *&rListData, sal_uInt16 &rListIndex, bool bHasFiltered, bool &rSkipOverlappedCells, std::vector< sal_Int32 > &rNonOverlappedCellIdx)
Definition: table4.cxx:218
void CopyScenarioFrom(const ScTable *pSrcTab)
Definition: table2.cxx:1544
sal_uInt32 GetTotalRowHeight(SCROW nStartRow, SCROW nEndRow, bool bHiddenAsZero=true) const
Definition: table5.cxx:784
ScRangeName * GetRangeName() const
Definition: table2.cxx:4093
void GetDataArea(SCCOL &rStartCol, SCROW &rStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bIncludeOld, bool bOnlyDown) const
Definition: table1.cxx:813
SCROW nRepeatEndY
Definition: table.hxx:177
ScRefCellValue GetCellValue(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1930
void DeleteCol(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize, bool *pUndoOutline)
Definition: table2.cxx:348
std::unique_ptr< ScSortInfoArray > CreateSortInfoArray(const sc::ReorderParam &rParam)
Definition: table3.cxx:468
bool IsLoadingRTL() const
Definition: table.hxx:343
bool ValidColRow(SCCOL nCol, SCROW nRow) const
Definition: table.hxx:334
const ScDocument & GetDoc() const
Definition: table.hxx:282
void SetLayoutRTL(bool bSet)
Definition: table1.cxx:387
CellType
Definition: global.hxx:281
bool BroadcastBroadcasters(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, ScHint &rHint)
Broadcast single broadcasters in range, without explicitly setting anything dirty, not doing area broadcasts.
Definition: table2.cxx:2070
sal_uInt16 GetCommonWidth(SCCOL nEndCol) const
Definition: table2.cxx:3315
void CopyConditionalFormat(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, SCCOL nDx, SCROW nDy, const ScTable *pTable)
Definition: table2.cxx:623
void MergeSelectionPattern(ScMergePatternState &rState, const ScMarkData &rMark, bool bDeep) const
Definition: table2.cxx:2738
short Compare(SCCOLROW nIndex1, SCCOLROW nIndex2) const
Definition: table3.cxx:1734
sal_uLong GetCellCount() const
Definition: table3.cxx:3811
ScLinkMode GetLinkMode() const
Definition: table.hxx:360
void DumpColumnStorage(SCCOL nCol) const
ScColumnsRange GetColumnsRange(SCCOL begin, SCCOL end) const
Definition: table1.cxx:2614
bool HasFilteredRows(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:867
const ScPatternAttr * GetMostUsedPattern(SCCOL nCol, SCROW nStartRow, SCROW nEndRow) const
Definition: table2.cxx:2203
SCROW GetLastChangedRow() const
Definition: table2.cxx:3768
::std::set< SCCOL > maColManualBreaks
Definition: table.hxx:194
void SetRepeatArea(SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCROW nEndRow)
Definition: table5.cxx:1106
bool GetCellArea(SCCOL &rEndCol, SCROW &rEndRow) const
Definition: table1.cxx:513
Color aScenarioColor
Definition: table.hxx:223
SCROW CountNonFilteredRows(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:973
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol, SCROW nRow1, SCROW nRow2)
Definition: table1.cxx:2516
void CopyRowHeight(const ScTable &rSrcTable, SCROW nStartRow, SCROW nEndRow, SCROW nSrcOffset)
Definition: table5.cxx:697
bool HasHiddenRows(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:552
void SetVisible(bool bVis)
Definition: table1.cxx:366
void CalcAll()
Definition: table2.cxx:2086
void GetInputString(SCCOL nCol, SCROW nRow, OUString &rString) const
Definition: table2.cxx:1759
bool bPendingRowHeights
Definition: table.hxx:240
formula::VectorRefArray FetchVectorRefArray(SCCOL nCol, SCROW nRow1, SCROW nRow2)
Definition: table1.cxx:2456
void SortReorderAreaExtrasByRow(ScSortInfoArray *pArray, SCCOL nDataCol1, SCCOL nDataCol2, const ScDataAreaExtras &rDataAreaExtras, ScProgress *pProgress)
Definition: table3.cxx:903
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast=true)
Definition: table2.cxx:446
std::unique_ptr< ScCompressedArray< SCCOL, sal_uInt16 > > mpColWidth
Definition: table.hxx:181
void InvalidateTableArea()
Definition: table2.cxx:1525
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: table2.cxx:3084
void SortReorderByRowRefUpdate(ScSortInfoArray *pArray, SCCOL nCol1, SCCOL nCol2, ScProgress *pProgress)
Definition: table3.cxx:1252
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow, SCSIZE nSize) const
Definition: table2.cxx:254
bool bGlobalKeepQuery
Definition: table.hxx:242
bool HandleRefArrayForParallelism(SCCOL nCol, SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef &mxGroup)
Definition: table1.cxx:2476
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
SvtBroadcaster * GetBroadcaster(SCCOL nCol, SCROW nRow)
Definition: table1.cxx:2508
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: table2.cxx:1852
void Sort(const ScSortParam &rSortParam, bool bKeepQuery, bool bUpdateRefs, ScProgress *pProgress, sc::ReorderParam *pUndo)
Sort a range of data.
Definition: table3.cxx:1784
SCROW nTableAreaY
Definition: table.hxx:201
void SetDirty(const ScRange &, ScColumn::BroadcastMode)
Definition: table2.cxx:2024
void FillSeries(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal_uLong nFillCount, FillDir eFillDir, FillCmd eFillCmd, FillDateCmd eFillDateCmd, double nStepValue, double nMaxValue, sal_uInt16 nMinDigits, bool bAttribs, ScProgress *pProgress, bool bSkipOverlappedCells=false, std::vector< sal_Int32 > *pNonOverlappedCellIdx=nullptr)
Definition: table4.cxx:2043
ScScenarioFlags GetScenarioFlags() const
Definition: table.hxx:355
const OUString & GetLinkOpt() const
Definition: table.hxx:364
void SetColBreak(SCCOL nCol, bool bPage, bool bManual)
Definition: table5.cxx:453
SCROW GetNotePosition(SCCOL nCol, size_t nIndex) const
Definition: table2.cxx:1829
bool SetLOKFreezeRow(SCROW nFreezeRow)
Definition: table7.cxx:616
void CopyPrintRange(const ScTable &rTable)
Definition: table1.cxx:2183
Compressed array of row (or column) entries, e.g.
SCSIZE FillMaxRot(RowInfo *pRowInfo, SCSIZE nArrCount, SCCOL nX1, SCCOL nX2, SCCOL nCol, SCROW nAttrRow1, SCROW nAttrRow2, SCSIZE nArrY, const ScPatternAttr *pPattern, const SfxItemSet *pCondSet)
Definition: table2.cxx:2297
SCCOL nRepeatStartX
Definition: table.hxx:174
FormulaError GetErrCode(const ScAddress &rPos) const
Definition: table.hxx:627
sal_uLong GetCodeCount() const
Definition: table3.cxx:3841
void SetDirtyIfPostponed()
Mark formula cells dirty that have the mbPostponedDirty flag set or contain named ranges with relativ...
Definition: table2.cxx:2054
std::unique_ptr< ScRange > pRepeatRowRange
Definition: table.hxx:218
bool EnsureFormulaCellResults(const SCCOL nCol1, SCROW nRow1, const SCCOL nCol2, SCROW nRow2, bool bSkipRunning=false)
Definition: table7.cxx:433
void CopyStaticToDocument(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScTable *pDestTab)
Definition: table2.cxx:538
const T * GetAttr(SCCOL nCol, SCROW nRow, TypedWhichId< T > nWhich) const
Definition: table.hxx:701
void SetDirtyFromClip(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sc::ColumnSpanSet &rBroadcastSpans)
Definition: table2.cxx:1280
SCROW GetFirstEditTextRow(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: table2.cxx:1651
bool RowFiltered(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: table5.cxx:831
void RegroupFormulaCells(SCCOL nCol)
Definition: table7.cxx:286
void SetLoadingMedium(bool bLoading)
Definition: table2.cxx:2081
bool HasStringCells(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow) const
Definition: table2.cxx:1988
bool IsManualRowHeight(SCROW nRow) const
Definition: table5.cxx:994
SCROW GetNextManualBreak(SCROW nRow) const
Get the row position of the next manual break that occurs at or below specified row.
Definition: table5.cxx:392
bool HasStringData(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1972
bool SetEditText(SCCOL nCol, SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
Definition: table2.cxx:1632
bool ExtendMerge(SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW &rEndRow, bool bRefresh)
Definition: table2.cxx:2240
std::unique_ptr< ScRangeList > pScenarioRanges
Definition: table.hxx:222
void StyleSheetChanged(const SfxStyleSheetBase *pStyleSheet, bool bRemoved, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY)
Definition: table2.cxx:2998
The data type represents bits, manageable by bitwise operations.
void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: table2.cxx:2806
ScDirection
Definition: global.hxx:352
sal_uLong GetRowOffset(SCROW nRow, bool bHiddenAsZero=true) const
Definition: table2.cxx:4100
OUString aLinkTab
Definition: table.hxx:167
bool Replace(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:564
SCCOL ClampToAllocatedColumns(SCCOL nCol) const
Definition: table.hxx:1097
ScDocument & rDocument
Definition: table.hxx:206
void QuickSort(ScSortInfoArray *, SCCOLROW nLo, SCCOLROW nHi)
Definition: table3.cxx:1692
bool SetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, bool bApi, ScProgress *pOuterProgress=nullptr, sal_uLong nProgressStart=0)
Definition: table1.cxx:456
void SetSheetEvents(std::unique_ptr< ScSheetEvents > pNew)
Definition: table2.cxx:121
sal_uLong AddCondFormat(std::unique_ptr< ScConditionalFormat > pNew)
Definition: table1.cxx:2382
void GetNextPos(SCCOL &rCol, SCROW &rRow, SCCOL nMovX, SCROW nMovY, bool bMarked, bool bUnprotected, const ScMarkData &rMark, SCCOL nTabStartCol) const
Definition: table1.cxx:1432
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScTable &rClipTab, sc::ColumnSpanSet &rBroadcastSpans)
Definition: table7.cxx:98
const ScStyleSheet * GetAreaStyle(bool &rFound, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) const
Definition: table2.cxx:2957
bool GetCalcNotification() const
Definition: table.hxx:339
void FillFormulaVertical(const ScFormulaCell &rSrcCell, SCCOLROW &rInner, SCCOL nCol, SCROW nRow1, SCROW nRow2, ScProgress *pProgress, sal_uLong &rProgress)
Definition: table4.cxx:1615
void CopyCellToDocument(SCCOL nSrcCol, SCROW nSrcRow, SCCOL nDestCol, SCROW nDestRow, ScTable &rDestTab)
Definition: table2.cxx:576
sal_uInt32 GetNumberFormat(const ScInterpreterContext &rContext, const ScAddress &rPos) const
Definition: table2.cxx:2156
void SyncColRowFlags()
Definition: table5.cxx:1049
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow)
Definition: table2.cxx:2773
bool InitColumnBlockPosition(sc::ColumnBlockPosition &rBlockPos, SCCOL nCol)
Definition: table2.cxx:705
bool HasColPageBreak(SCCOL nCol) const
Definition: table5.cxx:368
void CreateAllNoteCaptions()
Definition: table2.cxx:1837
bool IsSorted(SCCOLROW nStart, SCCOLROW nEnd) const
Definition: table3.cxx:1763
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, SCCOL nCol, SCROW nRow, std::vector< ScAddress > *pGroupPos)
Definition: table7.cxx:308
bool bActiveScenario
Definition: table.hxx:244
std::unique_ptr< ScBitMaskCompressedArray< SCROW, CRFlags > > pRowFlags
Definition: table.hxx:185
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: table2.cxx:2983
bool RowHiddenLeaf(SCROW nRow, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
Definition: table5.cxx:522
bool bPageSizeValid
Definition: table.hxx:236
void SwapNonEmpty(sc::TableValues &rValues, sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt)
Definition: table7.cxx:216
bool bPrintEntireSheet
Definition: table.hxx:243
void StoreToCache(SvStream &rStrm) const
Definition: table7.cxx:459
ScColumnsRange(const Iterator &rBegin, const Iterator &rEnd)
Definition: table.hxx:143
std::unique_ptr< ScFlatBoolRowSegments > mpHiddenRows
Definition: table.hxx:187
const Color & GetTabBgColor() const
Definition: table.hxx:353
bool SearchAndReplace(const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, const ScMarkData &rMark, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:794
const ScRange * GetRepeatColRange() const
Definition: table.hxx:770
SCCOL GetAllocatedColumnsCount() const
Definition: table.hxx:1098
sal_uInt16 GetRowHeight(SCROW nRow, SCROW *pStartRow, SCROW *pEndRow, bool bHiddenAsZero=true) const
Definition: table2.cxx:3366
void RemoveManualBreaks()
Definition: table5.cxx:308
void ApplyPatternArea(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, const ScPatternAttr &rAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
Definition: table2.cxx:2793
CRFlags GetColFlags(SCCOL nCol) const
Definition: table2.cxx:3707
ScDBData * GetAnonymousDBData()
Definition: table.hxx:377
bool SearchRangeForAllEmptyCells(const ScRange &rRange, const SvxSearchItem &rSearchItem, ScRangeList &rMatchedRanges, OUString &rUndoStr, ScDocument *pUndoDoc)
Definition: table6.cxx:1068
void CompileDBFormula(sc::CompileFormulaContext &rCxt)
Definition: table4.cxx:2844
SCCOL GetLOKFreezeCol() const
Definition: table7.cxx:589
void GetUpperCellString(SCCOL nCol, SCROW nRow, OUString &rStr)
Definition: table2.cxx:4048
const OUString & GetUpperName() const
Definition: table1.cxx:359
std::unique_ptr< ScSheetEvents > pSheetEvents
Definition: table.hxx:198
void ExtendPrintArea(OutputDevice *pDev, SCCOL nStartCol, SCROW nStartRow, SCCOL &rEndCol, SCROW nEndRow)
Definition: table1.cxx:1994
double GetValue(SCCOL nCol, SCROW nRow) const
Definition: table2.cxx:1767
void StartOutlineTable()
Definition: table2.cxx:115
ScAttrArray aDefaultColAttrArray
Definition: table.hxx:251
void SetError(SCCOL nCol, SCROW nRow, FormulaError nError)
Definition: table4.cxx:2792
Size aPageSizeTwips
Definition: table.hxx:173
bool ValidTab(SCTAB nTab)
Definition: address.hxx:104
sal_uLong nLinkRefreshDelay
Definition: table.hxx:168
bool IsMerged(SCCOL nCol, SCROW nRow) const
Definition: table7.cxx:27
SCROW GetLastFlaggedRow() const
Definition: table2.cxx:3723
SCROW GetHiddenRowCount(SCROW nRow) const
Definition: table2.cxx:3509
void CopyColFiltered(const ScTable &rTable, SCCOL nStartCol, SCCOL nEndCol)
Definition: table5.cxx:882
void InsertCol(const sc::ColumnSet &rRegroupCols, SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE nSize)
Definition: table2.cxx:271
bool IsSortCollatorGlobal() const
Definition: table3.cxx:627
Use this to iterate through non-empty visible cells in a single column.
Definition: table.hxx:1314
void MixMarked(sc::MixDocContext &rCxt, const ScMarkData &rMark, ScPasteFunc nFunction, bool bSkipEmpty, const ScTable *pSrcTab)
Definition: table2.cxx:786
bool bScenario
Definition: table.hxx:233
void SplitFormulaGroups(SCCOL nCol, std::vector< SCROW > &rRows)
Definition: table7.cxx:270
void ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
Definition: table2.cxx:3071
bool UpdateOutlineRow(SCROW nStartRow, SCROW nEndRow, bool bShow)
Definition: table2.cxx:3795
bool SearchRangeForEmptyCell(const ScRange &rRange, const SvxSearchItem &rSearchItem, SCCOL &rCol, SCROW &rRow, OUString &rUndoStr)
Definition: table6.cxx:958
sal_Int16 SCTAB
Definition: types.hxx:22
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
Definition: table2.cxx:3078
css::uno::Sequence< css::sheet::TablePageBreakData > GetRowBreakData() const
Definition: table5.cxx:468
SCROW FirstVisibleRow(SCROW nStartRow, SCROW nEndRow) const
Definition: table5.cxx:717
OString dumpSheetGeomData(bool bColumns, SheetGeomType eGeomType)
Serializes the sheet's geometry data.
Definition: table7.cxx:485
bool GetDataStart(SCCOL &rStartCol, SCROW &rStartRow) const
Definition: table1.cxx:751
bool bCalcNotification
Definition: table.hxx:241
OString dumpColumnRowSizes(bool bColumns)
Returns list-of-spans representation of the column-widths/row-heights in twips encoded as an OString...
Definition: table7.cxx:518
void RemoveCondFormatData(const ScRangeList &rRange, sal_uInt32 nIndex)
Definition: table2.cxx:2833
void ShowRow(SCROW nRow, bool bShow)
Definition: table2.cxx:3543
ScConditionalFormatList * GetCondFormList()
Definition: table1.cxx:2601
void SetRowFiltered(SCROW nStartRow, SCROW nEndRow, bool bFiltered)
Definition: table5.cxx:911