LibreOffice Module sc (master)  1
column.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 "global.hxx"
23 #include "address.hxx"
24 #include "cellvalue.hxx"
25 #include "rangelst.hxx"
26 #include "types.hxx"
27 #include "mtvelements.hxx"
28 #include <formula/types.hxx>
29 #include <svl/zforlist.hxx>
30 #include <svx/svdobj.hxx>
31 #include "attarray.hxx"
32 
33 #include <optional>
34 #include <set>
35 #include <vector>
36 
37 #include <mdds/flat_segment_tree.hpp>
38 
39 namespace editeng { class SvxBorderLine; }
40 namespace formula { struct VectorRefArray; }
41 
42 namespace sc {
43 
44 struct FormulaGroupEntry;
45 class StartListeningContext;
46 class EndListeningContext;
47 class CopyFromClipContext;
48 class CopyToClipContext;
49 class CopyToDocContext;
50 class MixDocContext;
51 class ColumnSpanSet;
52 class SingleColumnSpanSet;
53 struct RefUpdateContext;
54 struct RefUpdateInsertTabContext;
55 struct RefUpdateDeleteTabContext;
56 struct RefUpdateMoveTabContext;
57 class EditTextIterator;
58 struct NoteEntry;
59 class DocumentStreamAccess;
60 class CellValues;
61 class TableValues;
62 struct RowSpan;
63 class RowHeightContext;
64 class CompileFormulaContext;
65 struct SetFormulaDirtyContext;
66 enum class MatrixEdge;
67 class ColumnIterator;
68 class Sparkline;
69 
70 }
71 
72 class Fraction;
73 class OutputDevice;
74 class SfxItemPoolCache;
75 class SvtListener;
76 class SfxPoolItem;
77 class SfxStyleSheetBase;
78 class SvxBoxInfoItem;
79 class SvxBoxItem;
80 
81 class ScDocument;
82 class ScEditDataArray;
83 class ScFormulaCell;
84 class ScMarkData;
85 class ScPatternAttr;
86 class ScStyleSheet;
87 class SvtBroadcaster;
88 class ScTypedStrData;
89 class ScProgress;
90 class ScFunctionData;
92 struct ScSetStringParam;
93 struct ScColWidthParam;
94 struct ScRefCellValue;
95 struct ScCellValue;
96 class ScHint;
97 enum class ScMF;
98 struct ScFilterEntries;
100 
102 {
104  bool bFormula;
106  bool bGetFont;
108 
110 };
111 
112 // A shared implementation of some column code and data.
113 // This is used by ScColumn, but also by ScTable for the unallocated
114 // columns (one instance that is the default for all not-yet allocated columns).
116 {
117 protected:
118  std::unique_ptr<ScAttrArray> pAttrArray;
119 
120  ScColumnData(const ScColumnData&) = delete;
121  ScColumnData& operator= (const ScColumnData&) = delete;
122 
123 public:
124  ScColumnData() = default;
125  void InitAttrArray(ScAttrArray* attrArray) { pAttrArray.reset(attrArray); }
126 
127  ScDocument& GetDoc() const { return pAttrArray->GetDoc(); }
128 
130  const ScAttrArray& AttrArray() const { return *pAttrArray; }
131 
132  const SfxPoolItem& GetAttr( SCROW nRow, sal_uInt16 nWhich ) const;
133  template<class T> const T& GetAttr( SCROW nRow, TypedWhichId<T> nWhich ) const
134  {
135  return static_cast<const T&>(GetAttr(nRow, sal_uInt16(nWhich)));
136  }
137  const SfxPoolItem& GetAttr( SCROW nRow, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const;
138  template<class T> const T& GetAttr( SCROW nRow, TypedWhichId<T> nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
139  {
140  return static_cast<const T&>(GetAttr(nRow, sal_uInt16(nWhich), nStartRow, nEndRow));
141  }
142 
143  void SetAttrEntries(std::vector<ScAttrEntry> && vNewData);
144 
145  const ScPatternAttr* GetPattern( SCROW nRow ) const;
146  const ScPatternAttr* GetMostUsedPattern( SCROW nStartRow, SCROW nEndRow ) const;
147  SCROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray, bool* const pIsChanged,
148  SCCOL nCol );
149  void ApplyPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& rPatAttr,
150  ScEditDataArray* pDataArray = nullptr,
151  bool* const pIsChanged = nullptr);
152  void MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, bool bDeep ) const;
153 
154  sal_uInt32 GetNumberFormat( const ScInterpreterContext& rContext, SCROW nRow ) const;
155  sal_uInt32 GetNumberFormat( SCROW nStartRow, SCROW nEndRow ) const;
156 
158  SCROW GetNextUnprotected( SCROW nRow, bool bUp ) const;
159 
160  const ScStyleSheet* GetStyle( SCROW nRow ) const;
161  void ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle );
162 
163  bool HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) const;
164  bool HasAttrib( SCROW nRow, HasAttrFlags nMask, SCROW* nStartRow = nullptr, SCROW* nEndRow = nullptr ) const;
165 
166  std::unique_ptr<ScAttrIterator> CreateAttrIterator( SCROW nStartRow, SCROW nEndRow ) const;
167 
168  bool IsAllAttrEqual( const ScColumnData& rCol, SCROW nStartRow, SCROW nEndRow ) const;
169 
170  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark, SCCOL nCol );
171  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark, SCCOL nCol );
172 };
173 
174 // Use protected inheritance to prevent publishing some internal ScColumnData
175 // functions as part of ScColumn. If they should be public in ScColumn,
176 // use 'using' to make them public.
177 class ScColumn : protected ScColumnData
178 {
179  // Empty values correspond with empty cells. All non-empty cell positions
180  // must have non-empty elements. For text width, the value should be
181  // either the real text width, or TEXTWIDTH_DIRTY in case it hasn't been
182  // calculated yet. For script type, it should be either the real script
183  // type value or SvtScriptType::UNKNOWN.
185 
186  // Cell notes
188 
189  // Broadcasters for formula cells.
191 
192  // Cell values.
194 
195  // Sparklines
197 
199 
202 
203  bool mbFiltering : 1; // it is true if there is a filtering in the column
204  bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during EnableDelayDeletingBroadcasters()
205 
206 friend class ScDocument; // for FillInfo
207 friend class ScTable;
208 friend class ScValueIterator;
211 template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType >
213 template< ScQueryCellIteratorAccess accessType >
216 friend class ScCellIterator;
219 friend class ScDocumentImport;
222 friend class sc::ColumnSpanSet;
223 friend class sc::EditTextIterator;
224 friend class sc::CellValues;
225 friend class sc::TableValues;
226 friend class sc::CellStoreEvent;
227 
228  bool ParseString(
229  ScCellValue& rCell,
230  SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
231  const ScSetStringParam* pParam );
232 
234  size_t nColOffset, size_t nDestSize, ScAddress aDestPosition);
235 
236 public:
237 
240  {
244  };
245 
246  ScColumn(ScSheetLimits const &);
247  ~ScColumn() COVERITY_NOEXCEPT_FALSE;
248 
249  void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument& rDoc, bool bEmptyAttrArray);
250 
251  using ScColumnData::GetDoc;
252  SCTAB GetTab() const { return nTab; }
253  SCCOL GetCol() const { return nCol; }
254  bool HasFiltering() const { return mbFiltering; }
256  const sc::CellStoreType& GetCellStore() const { return maCells; }
263 
264  ScRefCellValue GetCellValue( SCROW nRow ) const;
267  static ScRefCellValue GetCellValue( const sc::CellStoreType::const_iterator& itPos, size_t nOffset );
268 
269  const sc::CellTextAttr* GetCellTextAttr( SCROW nRow ) const;
270  const sc::CellTextAttr* GetCellTextAttr( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
271 
272  void Delete( SCROW nRow );
273  void DeleteContent( SCROW nRow, bool bBroadcast = true );
274  void FreeAll();
275  void FreeNotes();
276  void Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern );
277 
278  bool HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const;
279  bool IsMerged( SCROW nRow ) const;
280  bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
281  SCCOL& rPaintCol, SCROW& rPaintRow,
282  bool bRefresh );
283 
284  bool IsEmptyData() const;
285  bool IsEmptyAttr() const;
286 
287  // data only:
288  bool IsEmptyData(SCROW nStartRow, SCROW nEndRow) const;
289  SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
290  bool HasDataAt( SCROW nRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
291  bool HasDataAt( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
292  ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
293  bool HasDataAt( sc::ColumnBlockPosition& rBlockPos, SCROW nRow,
294  ScDataAreaExtras* pDataAreaExtras = nullptr );
295  void GetDataExtrasAt( SCROW nRow, ScDataAreaExtras& rDataAreaExtras ) const;
296  bool HasVisibleDataAt(SCROW nRow) const;
297  SCROW GetFirstDataPos() const;
298  SCROW GetLastDataPos() const;
299  SCROW GetLastDataPos( SCROW nLastRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
300  bool GetPrevDataPos(SCROW& rRow) const;
301  bool GetNextDataPos(SCROW& rRow) const;
302  bool TrimEmptyBlocks(SCROW& rRowStart, SCROW& rRowEnd) const;
303  void FindDataAreaPos(SCROW& rRow, bool bDown) const; // (without Broadcaster)
304  void FindUsed( SCROW nStartRow, SCROW nEndRow, mdds::flat_segment_tree<SCROW, bool>& rUsed ) const;
305 
306  SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const;
307  sc::MatrixEdge GetBlockMatrixEdges(SCROW nRow1, SCROW nRow2, sc::MatrixEdge nMask, bool bNoMatrixAtAll ) const;
308  // Repeated calls to HasSelectionMatrixFragment() repeatedly call rMark.GetMarkedRanges(),
309  // which may be quite slow. For that reason first save the result of rMark.GetMarkedRanges()
310  // pass that to HasSelectionMatrixFragment() calls.
311  bool HasSelectionMatrixFragment(const ScMarkData& rMark, const ScRangeList& rRangeList) const;
312 
313  bool GetFirstVisibleAttr( SCROW& rFirstRow ) const;
314  bool GetLastVisibleAttr( SCROW& rLastRow ) const;
315  bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
316  bool IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const;
317 
318  bool TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
319  bool TestInsertRow( SCROW nStartRow, SCSIZE nSize ) const;
320  void InsertRow( SCROW nStartRow, SCSIZE nSize );
321  void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList& rRangeList ) const;
322 
329  void DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>* pGroupPos );
330 
331  void DeleteArea(
332  SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
333  bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
334 
335  void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag );
336 
337  void CopyToClip(
338  sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const;
339 
341  SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap& rMap, ScColumn& rDestCol );
342 
343  void CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDestCol );
344  void InitBlockPosition( sc::ColumnBlockPosition& rBlockPos );
345  void InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const;
346 
348  sc::CopyFromClipContext& rCxt, const ScColumn& rClipCol, sc::ColumnSpanSet& rBroadcastSpans );
349 
350  void CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset );
351 
352  void CopyFromClip(
353  sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn& rColumn );
354 
355  void RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow );
356 
357  // Selection (?) of this document
358  void MixMarked(
359  sc::MixDocContext& rCxt, const ScMarkData& rMark, ScPasteFunc nFunction,
360  bool bSkipEmpty, const ScColumn& rSrcCol );
361  void MixData(
362  sc::MixDocContext& rCxt, SCROW nRow1, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty,
363  const ScColumn& rSrcCol );
364 
366  const ScRangeList& rRanges, ScFunctionData& rData, const ScFlatBoolRowSegments& rHiddenRows );
367 
368  void CopyToColumn(
369  sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
370  ScColumn& rColumn, const ScMarkData* pMarkData = nullptr, bool bAsLink = false,
371  bool bGlobalNamesToLocal = false ) const;
372 
373  void UndoToColumn(
374  sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
375  ScColumn& rColumn) const;
376 
377  void CopyScenarioFrom( const ScColumn& rSrcCol );
378  void CopyScenarioTo( ScColumn& rDestCol ) const;
379  bool TestCopyScenarioTo( const ScColumn& rDestCol ) const;
380  void MarkScenarioIn( ScMarkData& rDestMark ) const;
381 
382  void CopyUpdated( const ScColumn& rPosCol, ScColumn& rDestCol ) const;
383 
384  void SwapCol(ScColumn& rCol);
385  void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol);
386 
387  bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst);
388 
389  bool SetString(
390  SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
391  const ScSetStringParam* pParam = nullptr );
392 
393  void SetEditText( SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
394  void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
395  void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const EditTextObject& rEditText );
396  void SetEditText( SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
397  void SetFormula( SCROW nRow, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram );
398  void SetFormula( SCROW nRow, const OUString& rFormula, formula::FormulaGrammar::Grammar eGram );
399 
407  SCROW nRow, ScFormulaCell* pCell,
409  bool bInheritNumFormatIfNeeded = true);
410  void SetFormulaCell(
411  sc::ColumnBlockPosition& rBlockPos, SCROW nRow, ScFormulaCell* pCell,
413  bool bInheritNumFormatIfNeeded = true);
414 
415  bool SetFormulaCells( SCROW nRow, std::vector<ScFormulaCell*>& rCells );
416 
417  bool HasFormulaCell() const;
418  bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
419 
420  void CloneFormulaCell(
421  sc::ColumnBlockPosition& rBlockPos,
422  const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
423  const std::vector<sc::RowSpan>& rRanges );
424 
425  void CloneFormulaCell(
426  const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
427  const std::vector<sc::RowSpan>& rRanges );
428 
430 
431  void SetRawString( SCROW nRow, const OUString& rStr );
432  void SetRawString( SCROW nRow, const svl::SharedString& rStr );
433  void SetRawString( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true );
434  void SetValue( SCROW nRow, double fVal );
435  void SetValues( const SCROW nRow, const std::vector<double>& rVals );
436  void SetValue( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, double fVal, bool bBroadcast = true );
437  void SetError( SCROW nRow, const FormulaError nError);
438 
439  OUString GetString( SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const
440  { return GetString( GetCellValue( nRow ), nRow, pContext ); }
441  OUString GetString( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
442  const ScInterpreterContext* pContext = nullptr ) const
443  { return GetString( GetCellValue( rBlockPos, nRow ), nRow, pContext ); }
444  double* GetValueCell( SCROW nRow );
445  // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
446  OUString GetInputString( SCROW nRow, const svl::SharedString** pShared = nullptr, bool bForceSystemLocale = false ) const
447  { return GetInputString( GetCellValue( nRow ), nRow, pShared, bForceSystemLocale ); }
449  const svl::SharedString** pShared = nullptr, bool bForceSystemLocale = false ) const
450  { return GetInputString( GetCellValue( rBlockPos, nRow ), nRow, pShared, bForceSystemLocale ); }
451  double GetValue( SCROW nRow ) const;
452  const EditTextObject* GetEditText( SCROW nRow ) const;
453  void RemoveEditTextCharAttribs( SCROW nRow, const ScPatternAttr& rAttr );
454  OUString GetFormula( SCROW nRow ) const;
455  const ScFormulaCell* GetFormulaCell( SCROW nRow ) const;
457  ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow, size_t& rBlockSize ) const;
458  CellType GetCellType( SCROW nRow ) const;
459  SCSIZE GetCellCount() const;
460  sal_uInt64 GetWeightedCount() const;
461  sal_uInt64 GetWeightedCount(SCROW nStartRow, SCROW nEndRow) const;
462  sal_uInt64 GetCodeCount() const; // RPN-Code in formulas
463  FormulaError GetErrCode( SCROW nRow ) const;
464 
465  bool HasStringData( SCROW nRow ) const;
466  bool HasValueData( SCROW nRow ) const;
467  bool HasStringCells( SCROW nStartRow, SCROW nEndRow ) const;
468 
470  SCROW nRow1, SCROW nRow2, SCROW* pRow1 ) const;
471 
472  bool IsFormulaDirty( SCROW nRow ) const;
473 
476  void SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
477  void SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode );
478  void SetDirtyVar();
479  void SetDirtyAfterLoad();
480  void SetTableOpDirty( const ScRange& );
481  void CalcAll();
482  void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
484  void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
485 
491  bool BroadcastBroadcasters( SCROW nRow1, SCROW nRow2, SfxHintId nHint );
492 
494 
495  void ResetChanged( SCROW nStartRow, SCROW nEndRow );
496 
497  bool UpdateReferenceOnCopy( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr );
498 
506  bool UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc );
507 
511  void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo );
512  void UpdateCompile( bool bForceIfNameInUse = false );
513  void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
514  ScDocument* pUndoDoc );
515  void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
516 
517  void SetTabNo(SCTAB nNewTab);
518  void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames& rIndexes) const;
519 
521  sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
522 
524  sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
525 
527  sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
528 
529  using ScColumnData::GetAttr;
532 
533  void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, bool bDeep ) const;
534  void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
535  ScLineFlags& rFlags,
536  SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
537  void ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
538  SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight);
539 
540  void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
541  void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
542  const ScPatternAttr* SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> );
543  void SetPattern( SCROW nRow, const ScPatternAttr& );
544  void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& );
546  const ScPatternAttr& rPattern, SvNumFormatType nNewType );
547 
548  void ApplyStyle( SCROW nRow, const ScStyleSheet* rStyle );
549  void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
550  void ApplySelectionLineStyle( const ScMarkData& rMark,
551  const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
552  void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
553  void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
554 
555  const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const;
556  const ScStyleSheet* GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRow2 ) const;
557 
558  void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset );
559  bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
560 
563  SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection,
564  const ScMarkData& rMark) const;
565 
566  bool SearchStyleRange(
567  SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
568  bool bInSelection, const ScMarkData& rMark) const;
569 
570  bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
571  bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
572  void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich );
573 
574  void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
575 
576  SCROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray, bool* const pIsChanged );
577  void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast );
578 
579  void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
580  void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
581 
583  SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY,
584  const Fraction& rZoomX, const Fraction& rZoomY,
585  bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** pPatternChange,
586  bool bInPrintTwips = false ) const;
587 
588  sal_uInt16 GetOptimalColWidth(
589  OutputDevice* pDev, double nPPTX, double nPPTY,
590  const Fraction& rZoomX, const Fraction& rZoomY,
591  bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const;
592 
593  void GetOptimalHeight(
594  sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart );
595 
596  void GetFilterEntries(
597  sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
598  ScFilterEntries& rFilterEntries, bool bFiltering );
599 
600  bool GetDataEntries( SCROW nRow, std::set<ScTypedStrData>& rStrings) const;
601 
602  void UpdateInsertTabAbs(SCTAB nNewPos);
603  bool TestTabRefAbs(SCTAB nTable) const;
604  bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const;
605 
607  sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2 );
608 
610  sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2,
611  SCROW* pStartRow, SCROW* pEndRow );
612 
613  void StartListening( SvtListener& rLst, SCROW nRow );
614  void EndListening( SvtListener& rLst, SCROW nRow );
615  void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
616  void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
617  void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
618  void SetDirtyIfPostponed();
620  void CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 );
621  void CollectFormulaCells( std::vector<ScFormulaCell*>& rCells, SCROW nRow1, SCROW nRow2 );
622 
625 
626  sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const;
627  sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
628  SCROW nRowStart, SCROW nRowEnd ) const;
629 
630  sal_uInt16 GetTextWidth(SCROW nRow) const;
631  void SetTextWidth(SCROW nRow, sal_uInt16 nWidth);
632 
633  SvtScriptType GetScriptType( SCROW nRow ) const;
634 
639  SvtScriptType GetRangeScriptType( sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2,
640  const sc::CellStoreType::iterator& itr);
641 
642  void SetScriptType( SCROW nRow, SvtScriptType nType );
643  void UpdateScriptTypes( SCROW nRow1, SCROW nRow2 );
644 
646  bool ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow1, SCROW nRow2 );
647  void FillMatrix( ScMatrix& rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool* pPool ) const;
649  bool HandleRefArrayForParallelism( SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup );
650 #ifdef DBG_UTIL
651  void AssertNoInterpretNeeded( SCROW nRow1, SCROW nRow2 );
652 #endif
653  void SetFormulaResults( SCROW nRow, const double* pResults, size_t nLen );
654 
655  void CalculateInThread( ScInterpreterContext& rContext, SCROW nRow, size_t nLen, size_t nOffset,
656  unsigned nThisThread, unsigned nThreadsTotal );
657  void HandleStuffAfterParallelCalculation( SCROW nRow, size_t nLen, ScInterpreter* pInterpreter );
658 
659  void SetNumberFormat( SCROW nRow, sal_uInt32 nNumberFormat );
660 
662  const SvtBroadcaster* GetBroadcaster( SCROW nRow ) const;
663 
664  void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 );
667 
668  void Broadcast( SCROW nRow );
669  void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint );
670  void BroadcastRows( SCROW nStartRow, SCROW nEndRow, SfxHintId nHint );
671 
672  // Spaklines
674  void CreateSparklineCell(SCROW nRow, std::shared_ptr<sc::Sparkline> const& pSparkline);
675  void DeleteSparklineCells(sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2);
676  bool DeleteSparkline(SCROW nRow);
677  bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
678  void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, SCROW nRowOffsetDest = 0) const;
679  void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
680  sc::ColumnBlockPosition& rDestBlockPos, SCROW nRowOffsetDest = 0) const;
681  bool HasSparklines() const;
682  SCROW GetSparklinesMaxRow() const;
683  SCROW GetSparklinesMinRow() const;
684 
685  // cell notes
686  ScPostIt* GetCellNote( SCROW nRow );
687  const ScPostIt* GetCellNote( SCROW nRow ) const;
689  const ScPostIt* GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
690  void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
691  bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const;
692  bool HasCellNotes() const;
693  void SetCellNote( SCROW nRow, std::unique_ptr<ScPostIt> pNote);
694  bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
695 
696  std::unique_ptr<ScPostIt> ReleaseNote( SCROW nRow );
697  size_t GetNoteCount() const;
698  void CreateAllNoteCaptions();
699  void ForgetNoteCaptions( SCROW nRow1, SCROW nRow2, bool bPreserveData );
700  SCROW GetNotePosition( size_t nIndex ) const;
701  void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
702  void GetNotesInRange( SCROW nStartRow, SCROW nEndRow, std::vector<sc::NoteEntry>& rNotes ) const;
703 
704  SCROW GetCellNotesMaxRow() const;
705  SCROW GetCellNotesMinRow() const;
706 
708  SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, bool bCloneCaption = true,
709  SCROW nRowOffsetDest = 0) const;
710 
711  void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
712  sc::ColumnBlockPosition& rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest = 0) const;
713 
714  void UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 );
715 
716  void UpdateDrawObjects( std::vector<std::vector<SdrObject*>>& pObjects, SCROW nRowStart, SCROW nRowEnd );
717  void UpdateDrawObjectsForRow( std::vector<SdrObject*>& pObjects, SCCOL nTargetCol, SCROW nTargetRow );
718  bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
719 
720  void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
721  void InterpretCellsIfNeeded( SCROW nRow1, SCROW nRow2 );
722 
723  static void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell );
724 
733  void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
734  std::vector<SCROW>& rNewSharedRows );
735 
737  void StartListeningUnshared( const std::vector<SCROW>& rNewSharedRows );
738 
739  void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength,
740  std::vector<SCROW>* pNewSharedRows );
741 
742  void AttachFormulaCells( sc::StartListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
743  void DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
744 
748  void RegroupFormulaCells( std::vector<ScAddress>* pGroupPos = nullptr );
749 
765  void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs );
766 
767  void SplitFormulaGroupByRelativeRef( const ScRange& rBoundRange );
768 
769  void TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest );
770  void CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc );
772  sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, sc::TableValues* pUndo );
773 
774  void SwapNonEmpty(
775  sc::TableValues& rValues, sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt );
776 
777  std::optional<sc::ColumnIterator> GetColumnIterator( SCROW nRow1, SCROW nRow2 ) const;
778 
779  bool EnsureFormulaCellResults( SCROW nRow1, SCROW nRow2, bool bSkipRunning = false );
780 
781  void StoreToCache(SvStream& rStrm) const;
782  void RestoreFromCache(SvStream& rStrm);
783 
784 #if DUMP_COLUMN_STORAGE
785  void DumpColumnStorage() const;
786 #endif
787 
788  SCSIZE GetPatternCount() const;
789  SCSIZE GetPatternCount( SCROW nRow1, SCROW nRow2 ) const;
790  bool ReservePatternCount( SCSIZE nReserve );
791 
792  void CheckIntegrity() const;
793 
794 private:
795 
796  sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, std::vector<SCROW>& rNewSharedRows,
797  bool bInsertFormula );
798  sc::CellStoreType::iterator GetPositionToInsert( const sc::CellStoreType::iterator& it, SCROW nRow,
799  std::vector<SCROW>& rNewSharedRows, bool bInsertFormula );
800 
802  const sc::CellStoreType::iterator& itPos, SCROW nRow, ScFormulaCell& rCell,
803  const std::vector<SCROW>& rNewSharedRows,
804  bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
805 
807  const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
808  const std::vector<SCROW>& rNewSharedRows,
809  bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
810 
811 public:
812  void AttachNewFormulaCells(const sc::CellStoreType::position_type& aPos, size_t nLength,
813  std::vector<SCROW>& rNewSharedRows);
814 
815 private:
816  void BroadcastNewCell( SCROW nRow );
817  bool UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr );
818 
819  const ScFormulaCell* FetchFormulaCell( SCROW nRow ) const;
820 
822  sc::CellStoreType::const_iterator& itPos, SCROW nRow, bool bForward) const;
823  SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const;
824 
825  OUString GetString( const ScRefCellValue& cell, SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const;
826  OUString GetInputString( const ScRefCellValue& cell, SCROW nRow, const svl::SharedString** pShared = nullptr, bool bForceSystemLocale = false ) const;
827 
834  void CellStorageModified();
835  void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
836 
837  void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const;
838 
839  void DeleteCells(
840  sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag,
841  sc::SingleColumnSpanSet& rDeleted );
842 
847  std::vector<sc::FormulaGroupEntry> GetFormulaGroupEntries();
848 
850  sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos );
851 
853  sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos );
854 
855  void EndListeningGroup( sc::EndListeningContext& rCxt, SCROW nRow );
856  void SetNeedsListeningGroup( SCROW nRow );
857 };
858 
859 inline bool ScColumn::IsEmptyAttr() const
860 {
861  return pAttrArray->IsEmpty();
862 }
863 
864 inline bool ScColumnData::IsAllAttrEqual( const ScColumnData& rCol, SCROW nStartRow, SCROW nEndRow ) const
865 {
866  return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow );
867 }
868 
869 inline bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
870 {
871  return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow );
872 }
873 
874 inline bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
875 {
876  return pAttrArray->GetFirstVisibleAttr( rFirstRow );
877 }
878 
879 inline bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const
880 {
881  // row of last cell is needed
882  SCROW nLastData = GetLastDataPos(); // always including notes, 0 if none
883  return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData );
884 }
885 
886 inline bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
887 {
888  return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow );
889 }
890 
892 {
893  return pAttrArray->Count();
894 }
895 
896 inline SCSIZE ScColumn::GetPatternCount( SCROW nRow1, SCROW nRow2 ) const
897 {
898  return pAttrArray->Count( nRow1, nRow2 );
899 }
900 
901 inline bool ScColumn::ReservePatternCount( SCSIZE nReserve )
902 {
903  return pAttrArray && pAttrArray->Reserve( nReserve );
904 }
905 
906 inline bool ScColumn::IsMerged( SCROW nRow ) const
907 {
908  return pAttrArray->IsMerged(nRow);
909 }
910 
911 inline SCROW ScColumnData::GetNextUnprotected( SCROW nRow, bool bUp ) const
912 {
913  return pAttrArray->GetNextUnprotected(nRow, bUp);
914 }
915 
916 inline bool ScColumnData::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) const
917 {
918  return pAttrArray->HasAttrib( nRow1, nRow2, nMask );
919 }
920 
921 inline bool ScColumnData::HasAttrib( SCROW nRow, HasAttrFlags nMask, SCROW* nStartRow, SCROW* nEndRow ) const
922 {
923  return pAttrArray->HasAttrib( nRow, nMask, nStartRow, nEndRow );
924 }
925 
926 inline bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
927  SCCOL& rPaintCol, SCROW& rPaintRow,
928  bool bRefresh )
929 {
930  return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh );
931 }
932 
933 inline void ScColumnData::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, bool bDeep ) const
934 {
935  pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep );
936 }
937 
938 inline void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
939  ScLineFlags& rFlags,
940  SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const
941 {
942  pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
943 }
944 
945 inline void ScColumn::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
946  SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
947 {
948  pAttrArray->ApplyBlockFrame(rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight);
949 }
950 
951 inline const ScPatternAttr* ScColumnData::GetPattern( SCROW nRow ) const
952 {
953  return pAttrArray->GetPattern( nRow );
954 }
955 
956 inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
957 {
958  return pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich);
959 }
960 
961 inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
962 {
963  return pAttrArray->GetPatternRange( nStartRow, nEndRow, nRow )->GetItemSet().Get(nWhich);
964 }
965 
966 inline sal_uInt32 ScColumnData::GetNumberFormat( const ScInterpreterContext& rContext, SCROW nRow ) const
967 {
968  return pAttrArray->GetPattern( nRow )->GetNumberFormat( rContext.GetFormatTable() );
969 }
970 
971 inline void ScColumn::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
972 {
973  pAttrArray->AddCondFormat( nStartRow, nEndRow, nIndex );
974 }
975 
976 inline void ScColumn::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
977 {
978  pAttrArray->RemoveCondFormat( nStartRow, nEndRow, nIndex );
979 }
980 
981 inline void ScColumnData::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle )
982 {
983  pAttrArray->ApplyStyleArea(nStartRow, nEndRow, rStyle);
984 }
985 
986 inline const ScStyleSheet* ScColumnData::GetStyle( SCROW nRow ) const
987 {
988  return pAttrArray->GetPattern( nRow )->GetStyleSheet();
989 }
990 
991 inline void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset )
992 {
993  pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset );
994 }
995 
996 inline bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
997 {
998  return pAttrArray->IsStyleSheetUsed( rStyle );
999 }
1000 
1001 inline bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1002 {
1003  return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
1004 }
1005 
1006 inline bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1007 {
1008  return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
1009 }
1010 
1011 inline void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
1012 {
1013  pAttrArray->ClearItems( nStartRow, nEndRow, pWhich );
1014 }
1015 
1016 inline const ScPatternAttr* ScColumn::SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> pPatAttr )
1017 {
1018  return pAttrArray->SetPattern( nRow, std::move(pPatAttr), true/*bPutToPool*/ );
1019 }
1020 
1021 inline void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
1022 {
1023  pAttrArray->SetPattern( nRow, &rPatAttr, true/*bPutToPool*/ );
1024 }
1025 
1026 inline void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
1027  const ScPatternAttr& rPatAttr )
1028 {
1029  pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ );
1030 }
1031 
1032 inline void ScColumnData::SetAttrEntries(std::vector<ScAttrEntry> && vNewData)
1033 {
1034  pAttrArray->SetAttrEntries( std::move( vNewData ));
1035 }
1036 
1037 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:112
sc::MatrixEdge GetBlockMatrixEdges(SCROW nRow1, SCROW nRow2, sc::MatrixEdge nMask, bool bNoMatrixAtAll) const
Definition: column.cxx:112
bool CompileErrorCells(sc::CompileFormulaContext &rCxt, FormulaError nErrCode)
Definition: column.cxx:3319
SCROW GetCellNotesMinRow() const
Definition: column2.cxx:2253
SCROW GetCellNotesMaxRow() const
Definition: column2.cxx:2242
void CellStorageModified()
Called whenever the state of cell array gets modified i.e.
Definition: column2.cxx:1647
bool IsAllAttrEqual(const ScColumnData &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:864
void ApplyStyle(SCROW nRow, const ScStyleSheet *rStyle)
Definition: column.cxx:517
void FreeAll()
Definition: column3.cxx:219
void InterpretDirtyCells(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:168
constexpr double nPPTY
SCROW GetNotePosition(size_t nIndex) const
Definition: column4.cxx:779
void UpdateNoteCaptions(SCROW nRow1, SCROW nRow2)
Definition: column.cxx:1831
SCSIZE GetEmptyLinesInBlock(SCROW nStartRow, SCROW nEndRow, ScDirection eDir) const
Definition: column2.cxx:1330
void MixMarked(sc::MixDocContext &rCxt, const ScMarkData &rMark, ScPasteFunc nFunction, bool bSkipEmpty, const ScColumn &rSrcCol)
Definition: column3.cxx:1518
SfxHintId
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
void SplitFormulaGroupByRelativeRef(const ScRange &rBoundRange)
Definition: column4.cxx:1317
void DeleteRow(SCROW nStartRow, SCSIZE nSize, std::vector< ScAddress > *pGroupPos)
Definition: column3.cxx:256
mdds::mtv::soa::multi_type_vector< CNoteFunc > CellNoteStoreType
void SetDirty(SCROW nRow1, SCROW nRow2, BroadcastMode)
Definition: column.cxx:3206
void CopyFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn &rColumn)
Definition: column3.cxx:1441
void SetTextWidth(SCROW nRow, sal_uInt16 nWidth)
Definition: column2.cxx:2269
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:42
void DeleteArea(SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: column3.cxx:1010
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:844
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:34
void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
Definition: column2.cxx:2220
SCSIZE VisibleCount(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1278
void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn &rDestCol, sc::ColumnBlockPosition &rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:1939
void MergeSelectionPattern(ScMergePatternState &rState, const ScMarkData &rMark, bool bDeep) const
Definition: column.cxx:321
void CheckIntegrity() const
Definition: column4.cxx:2194
void SetError(SCROW nRow, const FormulaError nError)
Definition: column3.cxx:2923
void StoreToCache(SvStream &rStrm) const
Definition: column4.cxx:2096
HasAttrFlags
Definition: global.hxx:183
void PrepareBroadcastersForDestruction()
Definition: column2.cxx:1962
void RestoreFromCache(SvStream &rStrm)
Definition: column4.cxx:2106
const sc::CellTextAttrStoreType & GetCellAttrStore() const
Definition: column.hxx:258
void SwapNonEmpty(sc::TableValues &rValues, sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt)
Definition: column4.cxx:579
void CalculateInThread(ScInterpreterContext &rContext, SCROW nRow, size_t nLen, size_t nOffset, unsigned nThisThread, unsigned nThreadsTotal)
Definition: column2.cxx:3185
void MarkScenarioIn(ScMarkData &rDestMark) const
Definition: column.cxx:1777
void ApplyPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &rPatAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
Definition: column.cxx:483
~ScColumn() COVERITY_NOEXCEPT_FALSE
Definition: column.cxx:97
std::unique_ptr< ScAttrIterator > CreateAttrIterator(SCROW nStartRow, SCROW nEndRow) const
Definition: column3.cxx:1958
bool HasVisibleAttrIn(SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:886
Provides methods to allow direct shifting of document content without broadcasting or shifting of bro...
void GetFilterEntries(sc::ColumnBlockConstPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow, ScFilterEntries &rFilterEntries, bool bFiltering)
Definition: column3.cxx:2658
void CompileDBFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3532
void InterpretCellsIfNeeded(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:177
bool mbFiltering
Definition: column.hxx:203
const ScPatternAttr * GetPattern(SCROW nRow) const
Definition: column.hxx:951
broadcast only existing cell broadcasters => no AreaBroadcast of range!
Definition: column.hxx:243
FormulaError GetErrCode(SCROW nRow) const
Definition: column3.cxx:3173
void SetDirtyIfPostponed()
Definition: column.cxx:3284
bool IsVisibleAttrEqual(const ScColumn &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:869
void CopyUpdated(const ScColumn &rPosCol, ScColumn &rDestCol) const
Definition: column.cxx:1683
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:40
bool GetNextDataPos(SCROW &rRow) const
Definition: column2.cxx:1467
SCTAB nTab
Definition: column.hxx:201
long Long
void SetCellNote(SCROW nRow, std::unique_ptr< ScPostIt > pNote)
Definition: column2.cxx:2187
Context for reference update during shifting, moving or copying of cell ranges.
void CalcAfterLoad(sc::CompileFormulaContext &rCxt, bool bStartListening)
Definition: column.cxx:3326
std::unique_ptr< ScPostIt > ReleaseNote(SCROW nRow)
Definition: column4.cxx:711
void SetEditText(SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
Definition: column3.cxx:2271
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
Definition: column.hxx:938
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
Definition: column.hxx:956
sal_uInt64 GetWeightedCount() const
Definition: column2.cxx:3742
void BroadcastNewCell(SCROW nRow)
Definition: column3.cxx:774
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap
void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &rCxt)
Definition: column.cxx:3072
void Broadcast(SCROW nRow)
Definition: column3.cxx:72
void ResetChanged(SCROW nStartRow, SCROW nEndRow)
Definition: column.cxx:3332
Store position data for column array storage.
void TransferCellValuesTo(SCROW nRow, size_t nLen, sc::CellValues &rDest)
Definition: column4.cxx:426
bool IsEmptyData() const
Definition: column2.cxx:1251
void CopyStaticToDocument(SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScColumn &rDestCol)
Definition: column.cxx:972
Stores cell values for multiple tables.
Definition: cellvalues.hxx:85
CellType GetCellType(SCROW nRow) const
Definition: column3.cxx:3124
bool RemoveFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1006
void BroadcastRows(SCROW nStartRow, SCROW nEndRow, SfxHintId nHint)
Definition: column3.cxx:93
bool HasVisibleDataAt(SCROW nRow) const
Definition: column2.cxx:1285
void CompileHybridFormula(sc::StartListeningContext &rStartListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1095
void HandleStuffAfterParallelCalculation(SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
Definition: column2.cxx:3221
bool ExtendMerge(SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
Definition: column.hxx:926
void SetAttrEntries(std::vector< ScAttrEntry > &&vNewData)
Definition: column.hxx:1032
void Swap(ScColumn &rOther, SCROW nRow1, SCROW nRow2, bool bPattern)
Definition: column4.cxx:1204
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:103
formula::FormulaTokenRef ResolveStaticReference(SCROW nRow)
Definition: column2.cxx:2373
mdds::mtv::soa::multi_type_vector< BCBlkFunc > BroadcasterStoreType
bool HasAttribSelection(const ScMarkData &rMark, HasAttrFlags nMask) const
Definition: column.cxx:301
Accessor class to ScDocument.
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
Definition: column.cxx:422
OUString GetInputString(SCROW nRow, const svl::SharedString **pShared=nullptr, bool bForceSystemLocale=false) const
Definition: column.hxx:446
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark, SCCOL nCol)
Definition: column.cxx:409
void RemoveEditTextCharAttribs(SCROW nRow, const ScPatternAttr &rAttr)
Definition: column3.cxx:3092
void CompileAll(sc::CompileFormulaContext &rCxt)
Definition: column.cxx:3306
void DeleteRanges(const std::vector< sc::RowSpan > &rRanges, InsertDeleteFlags nDelFlag)
Definition: column4.cxx:617
bool IsEmptyAttr() const
Definition: column.hxx:859
void CompileColRowNameFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3539
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
Definition: column.hxx:945
bool ReservePatternCount(SCSIZE nReserve)
Definition: column.hxx:901
sal_uInt64 GetCodeCount() const
Definition: column2.cxx:3774
void StartListeners(sc::StartListeningContext &rCxt, bool bAll)
Definition: column3.cxx:2001
void UpdateDrawObjectsForRow(std::vector< SdrObject * > &pObjects, SCCOL nTargetCol, SCROW nTargetRow)
Definition: column.cxx:1851
void GetDataExtrasAt(SCROW nRow, ScDataAreaExtras &rDataAreaExtras) const
Definition: column2.cxx:3368
Row-wise value iterator.
Definition: dociter.hxx:335
void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: column.cxx:525
mdds::mtv::soa::multi_type_vector< CSparklineFunction > SparklineStoreType
SvtScriptType
const sc::CellNoteStoreType & GetCellNoteStore() const
Definition: column.hxx:260
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:35
sal_Int32 GetMaxStringLen(SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Definition: column3.cxx:3323
void PreprocessRangeNameUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1066
void CopyToColumn(sc::CopyToDocContext &rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScColumn &rColumn, const ScMarkData *pMarkData=nullptr, bool bAsLink=false, bool bGlobalNamesToLocal=false) const
Definition: column.cxx:1600
ScFormulaCell * SetFormulaCell(SCROW nRow, ScFormulaCell *pCell, sc::StartListeningType eListenType=sc::SingleCellListening, bool bInheritNumFormatIfNeeded=true)
Takes ownership of pCell.
Definition: column3.cxx:2369
void PreprocessDBDataUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1080
void UpdateTranspose(const ScRange &rSource, const ScAddress &rDest, ScDocument *pUndoDoc)
Definition: column.cxx:3040
OUString GetString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:441
void SetDirtyVar()
Definition: column.cxx:3126
void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:2111
bool HasFormulaCell() const
Definition: column4.cxx:1386
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: column.cxx:3154
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: column.cxx:538
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1593
void CopyToClip(sc::CopyToClipContext &rCxt, SCROW nRow1, SCROW nRow2, ScColumn &rColumn) const
Definition: column.cxx:953
sc::CellStoreType::iterator GetPositionToInsert(SCROW nRow, std::vector< SCROW > &rNewSharedRows, bool bInsertFormula)
Definition: column3.cxx:337
Keep track of spans in a single column only.
const ScPatternAttr * pPattern
Definition: column.hxx:103
ScRefCellValue GetCellValue(SCROW nRow) const
Definition: column.cxx:639
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 ForgetNoteCaptions(SCROW nRow1, SCROW nRow2, bool bPreserveData)
Definition: column4.cxx:766
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
Definition: column.cxx:3047
Additional class containing cell annotation data.
Definition: postit.hxx:160
OUString GetFormula(SCROW nRow) const
Definition: column3.cxx:3106
void CreateAllNoteCaptions()
Definition: column4.cxx:760
void EndListeningFormulaCells(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, SCROW *pStartRow, SCROW *pEndRow)
Definition: column4.cxx:1604
void SetNumberFormat(SCROW nRow, sal_uInt32 nNumberFormat)
Definition: column2.cxx:3247
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark, bool &rFound) const
Definition: column.cxx:555
void MergePatternArea(ScMergePatternState &rState, SCROW nRow1, SCROW nRow2, bool bDeep) const
Definition: column.hxx:933
void Delete(SCROW nRow)
Definition: column3.cxx:208
sc::CellStoreType maCells
Definition: column.hxx:193
void UpdateCompile(bool bForceIfNameInUse=false)
Definition: column.cxx:3105
bool SearchStyleRange(SCROW &rRow, SCROW &rEndRow, const ScStyleSheet *pSearchStyle, bool bUp, bool bInSelection, const ScMarkData &rMark) const
Definition: column.cxx:3371
void ResetFormulaCellPositions(SCROW nRow1, SCROW nRow2, bool bUpdateRefs)
Reset column position of formula cells within specified row range.
Definition: column4.cxx:1283
Walk through all cells in an area.
Definition: dociter.hxx:207
SCROW GetLastDataPos() const
Definition: column2.cxx:1384
void RemoveEditAttribs(sc::ColumnBlockPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow)
Definition: column2.cxx:1234
bool SetFormulaCells(SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Definition: column3.cxx:2407
void DeleteContent(SCROW nRow, bool bBroadcast=true)
Definition: column3.cxx:186
void CloneFormulaCell(sc::ColumnBlockPosition &rBlockPos, const ScFormulaCell &rSrc, const sc::CellTextAttr &rAttr, const std::vector< sc::RowSpan > &rRanges)
Definition: column4.cxx:623
bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:2055
size_t mnBlkCountFormula
Definition: column.hxx:198
void AttachNewFormulaCells(const sc::CellStoreType::position_type &aPos, size_t nLength, std::vector< SCROW > &rNewSharedRows)
Definition: column3.cxx:705
bool HasSparklines() const
Definition: column2.cxx:2128
void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn &rDestCol, sc::ColumnBlockPosition &rDestBlockPos, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:2121
void SetTabNo(SCTAB nNewTab)
Definition: column.cxx:3111
SvtBroadcaster * GetBroadcaster(SCROW nRow)
Definition: column2.cxx:1946
bool SetString(SCROW nRow, SCTAB nTab, const OUString &rString, formula::FormulaGrammar::AddressConvention eConv, const ScSetStringParam *pParam=nullptr)
Returns true if the cell format was set as well.
Definition: column3.cxx:2251
void SetDirtyFromClip(SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet &rBroadcastSpans)
Definition: column.cxx:3162
double GetValue(SCROW nRow) const
Definition: column3.cxx:3058
constexpr double nPPTX
bool UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc)
Update reference addresses in formula cell in response to mass cell movement.
Definition: column.cxx:2391
svl::SharedString GetSharedString(SCROW nRow) const
Definition: column3.cxx:2448
ScPasteFunc
Definition: global.hxx:179
void DeleteSparklineCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2035
void InsertRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.cxx:773
SCCOL nCol
Definition: column.hxx:200
void ApplyStyleArea(SCROW nStartRow, SCROW nEndRow, const ScStyleSheet &rStyle)
Definition: column.hxx:981
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: column.hxx:996
void InitBlockPosition(sc::ColumnBlockPosition &rBlockPos)
Definition: column3.cxx:1070
void AttachNewFormulaCell(const sc::CellStoreType::iterator &itPos, SCROW nRow, ScFormulaCell &rCell, const std::vector< SCROW > &rNewSharedRows, bool bJoin=true, sc::StartListeningType eListenType=sc::SingleCellListening)
Definition: column3.cxx:630
Keep track of all named expressions that have been updated during reference update.
void FillMatrix(ScMatrix &rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool *pPool) const
Definition: column2.cxx:2658
void EndListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3450
ScColumnData & operator=(const ScColumnData &)=delete
void FindDataAreaPos(SCROW &rRow, bool bDown) const
Definition: column2.cxx:3286
void SetRawString(SCROW nRow, const OUString &rStr)
Definition: column3.cxx:2941
void UndoToColumn(sc::CopyToDocContext &rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScColumn &rColumn) const
Definition: column.cxx:1670
void StartListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3444
void SetValues(const SCROW nRow, const std::vector< double > &rVals)
Definition: column4.cxx:396
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:1956
bool TrimEmptyBlocks(SCROW &rRowStart, SCROW &rRowEnd) const
Definition: column2.cxx:1513
sal_Int16 SCCOL
Definition: types.hxx:21
InsertDeleteFlags
Definition: global.hxx:147
void RegroupFormulaCells(std::vector< ScAddress > *pGroupPos=nullptr)
Regroup formula cells for the entire column.
Definition: column3.cxx:3622
sc::MultiDataCellState::StateType HasDataCellsInRange(SCROW nRow1, SCROW nRow2, SCROW *pRow1) const
Definition: column4.cxx:45
Struct to hold non-data extended area, used with ScDocument::ShrinkToUsedDataArea().
Definition: sortparam.hxx:43
bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const
Definition: column4.cxx:865
sc::CellTextAttrStoreType maCellTextAttrs
Definition: column.hxx:184
ScFormulaCell *const * GetFormulaCellBlockAddress(SCROW nRow, size_t &rBlockSize) const
Definition: column2.cxx:3252
CAUTION! The following defines must be in the same namespace as the respective type.
bool TestCopyScenarioTo(const ScColumn &rDestCol) const
Definition: column.cxx:1760
void CheckVectorizationState()
Definition: column.cxx:3147
SvNumberFormatter * GetFormatTable() const
void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument &rDoc, bool bEmptyAttrArray)
Definition: column.cxx:102
void InitAttrArray(ScAttrArray *attrArray)
Definition: column.hxx:125
const ScPatternAttr * SetPattern(SCROW nRow, std::unique_ptr< ScPatternAttr >)
Definition: column.hxx:1016
StartListeningType
Definition: types.hxx:123
const ScStyleSheet * GetStyle(SCROW nRow) const
Definition: column.hxx:986
void UpdateInsertTab(sc::RefUpdateInsertTabContext &rCxt)
Definition: column.cxx:3053
static void JoinNewFormulaCell(const sc::CellStoreType::position_type &aPos, ScFormulaCell &rCell)
Definition: column3.cxx:343
bool TestInsertRow(SCROW nStartRow, SCSIZE nSize) const
Definition: column.cxx:743
void UpdateDrawObjects(std::vector< std::vector< SdrObject * >> &pObjects, SCROW nRowStart, SCROW nRowEnd)
Definition: column.cxx:1837
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
void EndListeningGroup(sc::EndListeningContext &rCxt, SCROW nRow)
Definition: column4.cxx:1700
ScDocument & GetDoc() const
Definition: column.hxx:127
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
bool HasValueData(SCROW nRow) const
Definition: column3.cxx:3207
ScAttrArray & AttrArray()
Definition: column.hxx:129
void UpdateSelectionFunction(const ScRangeList &rRanges, ScFunctionData &rData, const ScFlatBoolRowSegments &rHiddenRows)
Definition: column2.cxx:3613
void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList &rRangeList) const
Definition: column4.cxx:897
SvNumFormatType
void FindUsed(SCROW nStartRow, SCROW nEndRow, mdds::flat_segment_tree< SCROW, bool > &rUsed) const
Definition: column2.cxx:3408
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1655
void DeleteEmptyBroadcasters()
Definition: column2.cxx:1988
bool HasStringData(SCROW nRow) const
Definition: column3.cxx:3187
bool EnsureFormulaCellResults(SCROW nRow1, SCROW nRow2, bool bSkipRunning=false)
Definition: column4.cxx:1980
double * GetValueCell(SCROW nRow)
Definition: column3.cxx:3039
void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames &rIndexes) const
Definition: column.cxx:3120
tools::Long GetNeededSize(SCROW nRow, OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bWidth, const ScNeededSizeOptions &rOptions, const ScPatternAttr **pPatternChange, bool bInPrintTwips=false) const
Definition: column2.cxx:84
void UpdateScriptTypes(SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1193
const T & GetAttr(SCROW nRow, TypedWhichId< T > nWhich) const
Definition: column.hxx:133
bool DeleteSparkline(SCROW nRow)
Definition: column2.cxx:2043
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:721
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1313
void DetachFormulaCells(const sc::CellStoreType::position_type &aPos, size_t nLength, std::vector< SCROW > *pNewSharedRows)
Definition: column3.cxx:474
sc::CellNoteStoreType & GetCellNoteStore()
Definition: column.hxx:259
sal_uInt32 GetNumberFormat(const ScInterpreterContext &rContext, SCROW nRow) const
Definition: column.hxx:966
void CollectFormulaCells(std::vector< ScFormulaCell * > &rCells, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1377
bool UpdateReferenceOnCopy(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr)
Definition: column.cxx:2366
bool mbEmptyBroadcastersPending
Definition: column.hxx:204
void FreeNotes()
Definition: column3.cxx:236
void ApplyAttr(SCROW nRow, const SfxPoolItem &rAttr)
Definition: column.cxx:621
BroadcastMode
Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode).
Definition: column.hxx:239
bool BroadcastBroadcasters(SCROW nRow1, SCROW nRow2, SfxHintId nHint)
Broadcast single broadcasters in range, without explicitly setting anything dirty, not doing area broadcasts.
Definition: column.cxx:3199
FormulaError
void CopyScenarioTo(ScColumn &rDestCol) const
Definition: column.cxx:1734
Iterate through all edit text cells in a given sheet.
void ClearItems(SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
Definition: column.hxx:1011
bool GetFirstVisibleAttr(SCROW &rFirstRow) const
Definition: column.hxx:874
SCROW GetSparklinesMaxRow() const
Definition: column2.cxx:2135
void SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &)
Definition: column.hxx:1026
mdds::mtv::soa::multi_type_vector< CTAttrFunc > CellTextAttrStoreType
void CopyCellNotesToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol, bool bCloneCaption=true, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:1917
bool GetLastVisibleAttr(SCROW &rLastRow) const
Definition: column.hxx:879
bool GetDataEntries(SCROW nRow, std::set< ScTypedStrData > &rStrings) const
Definition: column3.cxx:2794
void MixData(sc::MixDocContext &rCxt, SCROW nRow1, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty, const ScColumn &rSrcCol)
Definition: column3.cxx:1941
bool TestTabRefAbs(SCTAB nTable) const
Definition: column2.cxx:1244
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1001
void GetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart)
Definition: column2.cxx:867
void DeleteCellNotes(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
Definition: column2.cxx:2227
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
Definition: column.hxx:916
sal_Int32 SCROW
Definition: types.hxx:17
void UpdateInsertTabOnlyCells(sc::RefUpdateInsertTabContext &rCxt)
Definition: column.cxx:3064
To calculate a single subtotal function.
Definition: subtotal.hxx:60
mdds::mtv::soa::multi_type_vector< CellFunc, CellStoreTrait > CellStoreType
ScPostIt * GetCellNote(SCROW nRow)
Definition: column2.cxx:2161
void SetDirtyAfterLoad()
Definition: column.cxx:3257
const sc::SparklineStoreType & GetSparklineStore() const
Definition: column.hxx:262
bool ParseString(ScCellValue &rCell, SCROW nRow, SCTAB nTab, const OUString &rString, formula::FormulaGrammar::AddressConvention eConv, const ScSetStringParam *pParam)
Definition: column3.cxx:2019
ScColumn(ScSheetLimits const &)
Definition: column.cxx:82
bool HasFiltering() const
Definition: column.hxx:254
sc::BroadcasterStoreType maBroadcasters
Definition: column.hxx:190
const EditTextObject * GetEditText(SCROW nRow) const
Definition: column3.cxx:3079
void duplicateSparkline(sc::CopyFromClipContext &rContext, sc::ColumnBlockPosition *pBlockPos, size_t nColOffset, size_t nDestSize, ScAddress aDestPosition)
Definition: column4.cxx:367
void CollectListeners(std::vector< SvtListener * > &rListeners, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1368
void SetFormula(SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
Definition: column3.cxx:2333
sc::SparklineStoreType maSparklines
Definition: column.hxx:196
ScMF
Definition: attrib.hxx:34
void AssertNoInterpretNeeded(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:3145
void RemoveProtected(SCROW nStartRow, SCROW nEndRow)
Definition: column3.cxx:2897
bool IsMerged(SCROW nRow) const
Definition: column.hxx:906
void SetFormulaResults(SCROW nRow, const double *pResults, size_t nLen)
Definition: column2.cxx:3152
broadcast existing cells with position => does AreaBroadcast
Definition: column.hxx:242
sc::CellNoteStoreType maCellNotes
Definition: column.hxx:187
sal_uInt16 GetOptimalColWidth(OutputDevice *pDev, double nPPTX, double nPPTY, const Fraction &rZoomX, const Fraction &rZoomY, bool bFormula, sal_uInt16 nOldWidth, const ScMarkData *pMarkData, const ScColWidthParam *pParam) const
Definition: column2.cxx:717
void CopyCellValuesFrom(SCROW nRow, const sc::CellValues &rSrc)
Definition: column4.cxx:451
void AttachFormulaCells(sc::StartListeningContext &rCxt, SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:539
SCROW GetFirstDataPos() const
Definition: column2.cxx:1372
void DumpColumnStorage() const
SCCOL GetCol() const
Definition: column.hxx:253
void SetTableOpDirty(const ScRange &)
Definition: column.cxx:3247
SCROW FindNextVisibleRowWithContent(sc::CellStoreType::const_iterator &itPos, SCROW nRow, bool bForward) const
Definition: column2.cxx:1583
bool HasCellNotes() const
Definition: column2.cxx:2235
SvtScriptType GetRangeScriptType(sc::CellTextAttrStoreType::iterator &itPos, SCROW nRow1, SCROW nRow2, const sc::CellStoreType::iterator &itr)
Get combined script types of the specified range.
Definition: column2.cxx:2288
CellType
Definition: global.hxx:269
formula::VectorRefArray FetchVectorRefArray(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2929
sc::CellTextAttrStoreType & GetCellAttrStore()
Definition: column.hxx:257
const T & GetAttr(SCROW nRow, TypedWhichId< T > nWhich, SCROW &nStartRow, SCROW &nEndRow) const
Definition: column.hxx:138
void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol) const
Definition: column2.cxx:1820
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast)
Definition: column.cxx:455
void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn &rCol)
Definition: column.cxx:1904
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: column.cxx:450
SvtScriptType GetScriptType(SCROW nRow) const
Definition: column2.cxx:2280
const sc::CellStoreType & GetCellStore() const
Definition: column.hxx:256
sc::SparklineCell * GetSparklineCell(SCROW nRow)
Definition: column2.cxx:2023
void ApplyPattern(SCROW nRow, const ScPatternAttr &rPatAttr)
Definition: column.cxx:468
const ScFormulaCell * FetchFormulaCell(SCROW nRow) const
Definition: column2.cxx:3279
void CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset)
Definition: column4.cxx:239
const ScFormulaCell * GetFormulaCell(SCROW nRow) const
Definition: column3.cxx:3114
OUString GetString(SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:439
OUString GetInputString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, const svl::SharedString **pShared=nullptr, bool bForceSystemLocale=false) const
Definition: column.hxx:448
bool HasSelectionMatrixFragment(const ScMarkData &rMark, const ScRangeList &rRangeList) const
Definition: column.cxx:193
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
void CopyScenarioFrom(const ScColumn &rSrcCol)
Definition: column.cxx:1705
std::vector< sc::FormulaGroupEntry > GetFormulaGroupEntries()
Get all non-grouped formula cells and formula cell groups in the whole column.
Definition: column.cxx:2455
void CreateSparklineCell(SCROW nRow, std::shared_ptr< sc::Sparkline > const &pSparkline)
Definition: column2.cxx:2028
bool GetNextSpellingCell(SCROW &nRow, bool bInSel, const ScMarkData &rData) const
Definition: column2.cxx:1071
SCROW SearchStyle(SCROW nRow, const ScStyleSheet *pSearchStyle, bool bUp, bool bInSelection, const ScMarkData &rMark) const
May return -1 if not found.
Definition: column.cxx:3353
void UpdateMoveTab(sc::RefUpdateMoveTabContext &rCxt, SCTAB nTabNo)
Definition: column.cxx:3094
size_t GetNoteCount() const
Definition: column4.cxx:721
void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:971
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCROW nRowStart, SCROW nRowEnd) const
Definition: column3.cxx:3484
SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const
Definition: column2.cxx:1559
bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:1864
SCSIZE GetCellCount() const
Definition: column3.cxx:3166
void ConvertFormulaToValue(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, sc::TableValues *pUndo)
Definition: column4.cxx:517
sc::SparklineStoreType & GetSparklineStore()
Definition: column.hxx:261
std::optional< sc::ColumnIterator > GetColumnIterator(SCROW nRow1, SCROW nRow2) const
Definition: column4.cxx:1760
void SwapCol(ScColumn &rCol)
Definition: column.cxx:1874
void BroadcastCells(const std::vector< SCROW > &rRows, SfxHintId nHint)
Definition: column3.cxx:78
void SetScriptType(SCROW nRow, SvtScriptType nType)
Definition: column2.cxx:2359
void FindStyleSheet(const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
Definition: column.hxx:991
SCROW ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray, bool *const pIsChanged)
Definition: column.cxx:378
bool HasDataAt(SCROW nRow, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Definition: column2.cxx:3334
bool HandleRefArrayForParallelism(SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef &mxGroup)
Definition: column4.cxx:1993
SCTAB GetTab() const
Definition: column.hxx:252
ScDirection
Definition: global.hxx:340
void SetValue(SCROW nRow, double fVal)
Definition: column3.cxx:2990
void CalcAll()
Definition: column.cxx:3300
void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: column.cxx:491
bool IsFormulaDirty(SCROW nRow) const
Definition: column.cxx:3132
SCROW GetSparklinesMinRow() const
Definition: column2.cxx:2146
void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:976
SCROW ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray, bool *const pIsChanged, SCCOL nCol)
Definition: column.cxx:384
void BroadcastRecalcOnRefMove()
Definition: column.cxx:3292
bool GetPrevDataPos(SCROW &rRow) const
Definition: column2.cxx:1421
const sc::CellTextAttr * GetCellTextAttr(SCROW nRow) const
Definition: column.cxx:700
void DeleteCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag, sc::SingleColumnSpanSet &rDeleted)
Definition: column3.cxx:988
const ScStyleSheet * GetAreaStyle(bool &rFound, SCROW nRow1, SCROW nRow2) const
Definition: column.cxx:594
const ScAttrArray & AttrArray() const
Definition: column.hxx:130
ScColumnData()=default
bool HasStringCells(SCROW nStartRow, SCROW nEndRow) const
Return true if there is a string or editcell in the range.
Definition: column3.cxx:3229
MatrixEdge
Definition: types.hxx:65
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScColumn &rClipCol, sc::ColumnSpanSet &rBroadcastSpans)
Definition: column4.cxx:93
sal_uInt16 GetTextWidth(SCROW nRow) const
Definition: column2.cxx:2264
void CopyCellToDocument(SCROW nSrcRow, SCROW nDestRow, ScColumn &rDestCol)
Definition: column.cxx:1097
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, SCROW nRow, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1621
std::unique_ptr< ScAttrArray > pAttrArray
Definition: column.hxx:118
void SetNeedsListeningGroup(SCROW nRow)
Definition: column4.cxx:1730
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark, SCCOL nCol)
Definition: column.cxx:427
sc::CellStoreType & GetCellStore()
Definition: column.hxx:255
SCROW GetNextUnprotected(SCROW nRow, bool bUp) const
Including current, may return -1.
Definition: column.hxx:911
const ScPatternAttr * GetMostUsedPattern(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:338
void GetNotesInRange(SCROW nStartRow, SCROW nEndRow, std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:849
void UpdateInsertTabAbs(SCTAB nNewPos)
Definition: column.cxx:3086
bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW &rFirst)
Definition: column.cxx:3338
void StartListeningUnshared(const std::vector< SCROW > &rNewSharedRows)
Re-establish listeners on unshared formula groups.
Definition: column3.cxx:416
sal_Int16 SCTAB
Definition: types.hxx:22
void DetachFormulaCell(const sc::CellStoreType::position_type &aPos, ScFormulaCell &rCell, std::vector< SCROW > &rNewSharedRows)
Detach a formula cell that's about to be deleted, or removed from document storage (if that ever happ...
Definition: column3.cxx:363
bool UpdateScriptType(sc::CellTextAttr &rAttr, SCROW nRow, sc::CellStoreType::iterator &itr)
Definition: column3.cxx:787
SCSIZE GetPatternCount() const
Definition: column.hxx:891
void CompileXML(sc::CompileFormulaContext &rCxt, ScProgress &rProgress)
Definition: column.cxx:3312
no broadcasting
Definition: column.hxx:241