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 "columnspanset.hxx"
26#include "rangelst.hxx"
27#include "types.hxx"
28#include "mtvelements.hxx"
29#include <formula/types.hxx>
30#include <svl/zforlist.hxx>
31#include <svx/svdobj.hxx>
32#include "attarray.hxx"
33
34#include <optional>
35#include <set>
36#include <vector>
37
38#include <mdds/flat_segment_tree.hpp>
39
40namespace editeng { class SvxBorderLine; }
41namespace formula { struct VectorRefArray; }
42
43namespace sc {
44
45struct BroadcasterState;
46struct FormulaGroupEntry;
47class StartListeningContext;
48class EndListeningContext;
49class CopyFromClipContext;
50class CopyToClipContext;
51class CopyToDocContext;
52class MixDocContext;
53struct RefUpdateContext;
54struct RefUpdateInsertTabContext;
55struct RefUpdateDeleteTabContext;
56struct RefUpdateMoveTabContext;
57class EditTextIterator;
58struct NoteEntry;
59class DocumentStreamAccess;
60class CellValues;
61class TableValues;
62struct RowSpan;
63class RowHeightContext;
64class CompileFormulaContext;
65struct SetFormulaDirtyContext;
66enum class MatrixEdge;
67class ColumnIterator;
68class Sparkline;
69
70}
71
72class Fraction;
73class OutputDevice;
75class SvtListener;
76class SfxPoolItem;
78class SvxBoxInfoItem;
79class SvxBoxItem;
80
81class ScDocument;
82class ScEditDataArray;
83class ScFormulaCell;
84class ScMarkData;
85class ScPatternAttr;
86class ScStyleSheet;
87class SvtBroadcaster;
88class ScTypedStrData;
89class ScProgress;
90class ScFunctionData;
92struct ScSetStringParam;
93struct ScColWidthParam;
94struct ScRefCellValue;
95struct ScCellValue;
96class ScHint;
97enum class ScMF;
98struct ScFilterEntries;
100
102{
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{
117protected:
118 std::unique_ptr<ScAttrArray> pAttrArray;
119
120 ScColumnData(const ScColumnData&) = delete;
122
123public:
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 bool TestInsertRow( SCSIZE nSize ) const;
174 void InsertRow( SCROW nStartRow, SCSIZE nSize );
175 void DeleteRow( SCROW nStartRow, SCSIZE nSize );
176};
177
178// Use protected inheritance to prevent publishing some internal ScColumnData
179// functions as part of ScColumn. If they should be public in ScColumn,
180// use 'using' to make them public.
181class ScColumn : protected ScColumnData
182{
183 // Empty values correspond with empty cells. All non-empty cell positions
184 // must have non-empty elements. For text width, the value should be
185 // either the real text width, or TEXTWIDTH_DIRTY in case it hasn't been
186 // calculated yet. For script type, it should be either the real script
187 // type value or SvtScriptType::UNKNOWN.
189
190 // Cell notes
192
193 // Broadcasters for formula cells.
195
196 // Cell values.
198
199 // Sparklines
201
203
206
207 bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during EnableDelayDeletingBroadcasters()
208
209friend class ScDocument; // for FillInfo
210friend class ScTable;
211friend class ScValueIterator;
214template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType >
216template< ScQueryCellIteratorAccess accessType >
219friend class ScCellIterator;
222friend class ScDocumentImport;
225friend class sc::ColumnSpanSet;
227friend class sc::CellValues;
228friend class sc::TableValues;
230
231 bool ParseString(
232 ScCellValue& rCell,
233 SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
234 const ScSetStringParam* pParam );
235
237 size_t nColOffset, size_t nDestSize, ScAddress aDestPosition);
238
239public:
240
243 {
247 };
248
249 ScColumn(ScSheetLimits const &);
250 ~ScColumn() COVERITY_NOEXCEPT_FALSE;
251
252 void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument& rDoc, bool bEmptyAttrArray);
253
254 using ScColumnData::GetDoc;
255 SCTAB GetTab() const { return nTab; }
256 SCCOL GetCol() const { return nCol; }
258 const sc::CellStoreType& GetCellStore() const { return maCells; }
265
266 ScRefCellValue GetCellValue( SCROW nRow ) const;
269 static ScRefCellValue GetCellValue( const sc::CellStoreType::const_iterator& itPos, size_t nOffset );
270
271 const sc::CellTextAttr* GetCellTextAttr( SCROW nRow ) const;
273
274 void Delete( SCROW nRow );
275 void DeleteContent( SCROW nRow, bool bBroadcast = true );
276 void FreeAll();
277 void FreeNotes();
278 void Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern );
279
280 bool HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const;
281 bool IsMerged( SCROW nRow ) const;
282 bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
283 SCCOL& rPaintCol, SCROW& rPaintRow,
284 bool bRefresh );
285
286 bool IsEmptyData() const;
287 bool IsEmptyAttr() const;
288
289 // data only:
290 bool IsEmptyData(SCROW nStartRow, SCROW nEndRow) const;
291 SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
292 bool HasDataAt( SCROW nRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
293 bool HasDataAt( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
294 ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
295 bool HasDataAt( sc::ColumnBlockPosition& rBlockPos, SCROW nRow,
296 ScDataAreaExtras* pDataAreaExtras = nullptr );
297 void GetDataExtrasAt( SCROW nRow, ScDataAreaExtras& rDataAreaExtras ) const;
298 bool HasVisibleDataAt(SCROW nRow) const;
299 SCROW GetFirstDataPos() const;
300 SCROW GetLastDataPos() const;
301 SCROW GetLastDataPos( SCROW nLastRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
302 bool GetPrevDataPos(SCROW& rRow) const;
303 bool GetNextDataPos(SCROW& rRow) const;
304 bool TrimEmptyBlocks(SCROW& rRowStart, SCROW& rRowEnd) const;
305 void FindDataAreaPos(SCROW& rRow, bool bDown) const; // (without Broadcaster)
306 void FindUsed( SCROW nStartRow, SCROW nEndRow, mdds::flat_segment_tree<SCROW, bool>& rUsed ) const;
307
308 SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const;
309 sc::MatrixEdge GetBlockMatrixEdges(SCROW nRow1, SCROW nRow2, sc::MatrixEdge nMask, bool bNoMatrixAtAll ) const;
310 // Repeated calls to HasSelectionMatrixFragment() repeatedly call rMark.GetMarkedRanges(),
311 // which may be quite slow. For that reason first save the result of rMark.GetMarkedRanges()
312 // pass that to HasSelectionMatrixFragment() calls.
313 bool HasSelectionMatrixFragment(const ScMarkData& rMark, const ScRangeList& rRangeList) const;
314
315 bool GetFirstVisibleAttr( SCROW& rFirstRow ) const;
316 bool GetLastVisibleAttr( SCROW& rLastRow, bool bSkipEmpty ) const;
317 bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
318 bool IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const;
319
320 bool TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
321 bool TestInsertRow( SCROW nStartRow, SCSIZE nSize ) const;
322 void InsertRow( SCROW nStartRow, SCSIZE nSize );
323 void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList& rRangeList ) const;
324
331 void DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>* pGroupPos );
332
333 void DeleteArea(
334 SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
335 bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
336
337 void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag );
338
339 void CopyToClip(
340 sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const;
341
343 SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap& rMap, ScColumn& rDestCol );
344
345 void CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDestCol );
347 void InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const;
348
350 sc::CopyFromClipContext& rCxt, const ScColumn& rClipCol, sc::ColumnSpanSet& rBroadcastSpans );
351
352 void CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset );
353
354 void CopyFromClip(
355 sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn& rColumn );
356
357 void RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow );
358
359 // Selection (?) of this document
360 void MixMarked(
361 sc::MixDocContext& rCxt, const ScMarkData& rMark, ScPasteFunc nFunction,
362 bool bSkipEmpty, const ScColumn& rSrcCol );
363 void MixData(
364 sc::MixDocContext& rCxt, SCROW nRow1, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty,
365 const ScColumn& rSrcCol );
366
368 const ScRangeList& rRanges, ScFunctionData& rData, const ScFlatBoolRowSegments& rHiddenRows );
369
370 void CopyToColumn(
371 sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
372 ScColumn& rColumn, const ScMarkData* pMarkData = nullptr, bool bAsLink = false,
373 bool bGlobalNamesToLocal = false ) const;
374
375 void UndoToColumn(
376 sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
377 ScColumn& rColumn) const;
378
379 void CopyScenarioFrom( const ScColumn& rSrcCol );
380 void CopyScenarioTo( ScColumn& rDestCol ) const;
381 bool TestCopyScenarioTo( const ScColumn& rDestCol ) const;
382 void MarkScenarioIn( ScMarkData& rDestMark ) const;
383
384 void CopyUpdated( const ScColumn* pPosCol, ScColumn& rDestCol ) const;
385
386 void SwapCol(ScColumn& rCol);
387 void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol);
388
389 bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst);
390
391 bool SetString(
392 SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
393 const ScSetStringParam* pParam = nullptr );
394
395 void SetEditText( SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
396 void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
397 void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const EditTextObject& rEditText );
398 void SetEditText( SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
399 void SetFormula( SCROW nRow, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram );
400 void SetFormula( SCROW nRow, const OUString& rFormula, formula::FormulaGrammar::Grammar eGram );
401
409 SCROW nRow, ScFormulaCell* pCell,
411 bool bInheritNumFormatIfNeeded = true);
412 void SetFormulaCell(
413 sc::ColumnBlockPosition& rBlockPos, SCROW nRow, ScFormulaCell* pCell,
415 bool bInheritNumFormatIfNeeded = true);
416
417 bool SetFormulaCells( SCROW nRow, std::vector<ScFormulaCell*>& rCells );
418
419 bool HasFormulaCell() const;
420 bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
421
422 void CloneFormulaCell(
423 sc::ColumnBlockPosition& rBlockPos,
424 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
425 const std::vector<sc::RowSpan>& rRanges );
426
427 void CloneFormulaCell(
428 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
429 const std::vector<sc::RowSpan>& rRanges );
430
432
433 void SetRawString( SCROW nRow, const OUString& rStr );
434 void SetRawString( SCROW nRow, const svl::SharedString& rStr );
435 void SetRawString( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true );
436 void SetValue( SCROW nRow, double fVal );
437 void SetValues( const SCROW nRow, const std::vector<double>& rVals );
438 void SetValue( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, double fVal, bool bBroadcast = true );
439 void SetError( SCROW nRow, const FormulaError nError);
440
441 OUString GetString( SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const
442 { return GetString( GetCellValue( nRow ), nRow, pContext ); }
443 OUString GetString( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
444 const ScInterpreterContext* pContext = nullptr ) const
445 { return GetString( GetCellValue( rBlockPos, nRow ), nRow, pContext ); }
446 double* GetValueCell( SCROW nRow );
447 // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
448 OUString GetInputString( SCROW nRow, bool bForceSystemLocale = false ) const
449 { return GetInputString( GetCellValue( nRow ), nRow, bForceSystemLocale ); }
451 bool bForceSystemLocale = false ) const
452 { return GetInputString( GetCellValue( rBlockPos, nRow ), nRow, bForceSystemLocale ); }
453 double GetValue( SCROW nRow ) const;
454 const EditTextObject* GetEditText( SCROW nRow ) const;
455 void RemoveEditTextCharAttribs( SCROW nRow, const ScPatternAttr& rAttr );
456 OUString GetFormula( SCROW nRow ) const;
457 const ScFormulaCell* GetFormulaCell( SCROW nRow ) const;
459 ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow, size_t& rBlockSize ) const;
460 CellType GetCellType( SCROW nRow ) const;
461 SCSIZE GetCellCount() const;
462 sal_uInt64 GetWeightedCount() const;
463 sal_uInt64 GetWeightedCount(SCROW nStartRow, SCROW nEndRow) const;
464 sal_uInt64 GetCodeCount() const; // RPN-Code in formulas
465 FormulaError GetErrCode( SCROW nRow ) const;
466
467 bool HasStringData( SCROW nRow ) const;
468 bool HasValueData( SCROW nRow ) const;
469 bool HasStringCells( SCROW nStartRow, SCROW nEndRow ) const;
470
472 SCROW nRow1, SCROW nRow2, SCROW* pRow1 ) const;
473
474 bool IsFormulaDirty( SCROW nRow ) const;
475
478 void SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
479 void SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode );
480 void SetDirtyVar();
481 void SetDirtyAfterLoad();
482 void SetTableOpDirty( const ScRange& );
483 void CalcAll();
484 void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
486 void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
487
493 bool BroadcastBroadcasters( SCROW nRow1, SCROW nRow2, SfxHintId nHint );
494
496
497 void ResetChanged( SCROW nStartRow, SCROW nEndRow );
498
499 bool UpdateReferenceOnCopy( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr );
500
508 bool UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc );
509
513 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo );
514 void UpdateCompile( bool bForceIfNameInUse = false );
515 void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
516 ScDocument* pUndoDoc );
517 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
518
519 void SetTabNo(SCTAB nNewTab);
520 void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames& rIndexes) const;
521
523 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
524
526 sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
527
529 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
530
534
535 void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, bool bDeep ) const;
536 void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
537 ScLineFlags& rFlags,
538 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
539 void ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
540 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight);
541
542 void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
543 void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
544 const ScPatternAttr* SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> );
545 void SetPattern( SCROW nRow, const ScPatternAttr& );
546 void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& );
548 const ScPatternAttr& rPattern, SvNumFormatType nNewType );
549
550 void ApplyStyle( SCROW nRow, const ScStyleSheet* rStyle );
551 void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
552 void ApplySelectionLineStyle( const ScMarkData& rMark,
553 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
554 void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
555 void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
556
557 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const;
558 const ScStyleSheet* GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRow2 ) const;
559
560 void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset );
561 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
562
565 SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection,
566 const ScMarkData& rMark) const;
567
568 bool SearchStyleRange(
569 SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
570 bool bInSelection, const ScMarkData& rMark) const;
571
572 bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
573 bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
574 void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich );
575
576 void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
577
578 SCROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray, bool* const pIsChanged );
579 void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast );
580
581 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
582 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
583
585 SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY,
586 const Fraction& rZoomX, const Fraction& rZoomY,
587 bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** pPatternChange,
588 bool bInPrintTwips = false ) const;
589
590 sal_uInt16 GetOptimalColWidth(
591 OutputDevice* pDev, double nPPTX, double nPPTY,
592 const Fraction& rZoomX, const Fraction& rZoomY,
593 bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const;
594
595 void GetOptimalHeight(
596 sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart );
597
598 void GetFilterEntries(
599 sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
600 ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow );
601
602 bool GetDataEntries( SCROW nRow, std::set<ScTypedStrData>& rStrings) const;
603
604 void UpdateInsertTabAbs(SCTAB nNewPos);
605 bool TestTabRefAbs(SCTAB nTable) const;
606 bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const;
607
609 sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2 );
610
612 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2,
613 SCROW* pStartRow, SCROW* pEndRow );
614
615 void StartListening( SvtListener& rLst, SCROW nRow );
616 void EndListening( SvtListener& rLst, SCROW nRow );
617 void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
618 void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
619 void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
620 void SetDirtyIfPostponed();
622 void CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 );
623 void CollectFormulaCells( std::vector<ScFormulaCell*>& rCells, SCROW nRow1, SCROW nRow2 );
624
627
628 sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const;
629 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
630 SCROW nRowStart, SCROW nRowEnd ) const;
631
632 sal_uInt16 GetTextWidth(SCROW nRow) const;
633 void SetTextWidth(SCROW nRow, sal_uInt16 nWidth);
634
635 SvtScriptType GetScriptType( SCROW nRow ) const;
636
641 SvtScriptType GetRangeScriptType( sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2,
642 const sc::CellStoreType::iterator& itr);
643
645 void UpdateScriptTypes( SCROW nRow1, SCROW nRow2 );
646
648 bool ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow1, SCROW nRow2 );
649 void FillMatrix( ScMatrix& rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool* pPool ) const;
651 bool HandleRefArrayForParallelism( SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup );
652#ifdef DBG_UTIL
653 void AssertNoInterpretNeeded( SCROW nRow1, SCROW nRow2 );
654#endif
655 void SetFormulaResults( SCROW nRow, const double* pResults, size_t nLen );
656
657 void CalculateInThread( ScInterpreterContext& rContext, SCROW nRow, size_t nLen, size_t nOffset,
658 unsigned nThisThread, unsigned nThreadsTotal );
659 void HandleStuffAfterParallelCalculation( SCROW nRow, size_t nLen, ScInterpreter* pInterpreter );
660
661 void SetNumberFormat( SCROW nRow, sal_uInt32 nNumberFormat );
662
664 const SvtBroadcaster* GetBroadcaster( SCROW nRow ) const;
665
666 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 );
669
670 void Broadcast( SCROW nRow );
671 void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint );
672 void BroadcastRows( SCROW nStartRow, SCROW nEndRow, SfxHintId nHint );
673
674 // Spaklines
676 void CreateSparklineCell(SCROW nRow, std::shared_ptr<sc::Sparkline> const& pSparkline);
677 void DeleteSparklineCells(sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2);
678 bool DeleteSparkline(SCROW nRow);
679 bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
680 void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, SCROW nRowOffsetDest = 0) const;
681 void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
682 sc::ColumnBlockPosition& rDestBlockPos, SCROW nRowOffsetDest = 0) const;
683 bool HasSparklines() const;
686
687 // cell notes
688 ScPostIt* GetCellNote( SCROW nRow );
689 const ScPostIt* GetCellNote( SCROW nRow ) const;
691 const ScPostIt* GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
692 void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
693 bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const;
694 bool HasCellNotes() const;
695 void SetCellNote( SCROW nRow, std::unique_ptr<ScPostIt> pNote);
696 bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
697
698 std::unique_ptr<ScPostIt> ReleaseNote( SCROW nRow );
699 size_t GetNoteCount() const;
701 void ForgetNoteCaptions( SCROW nRow1, SCROW nRow2, bool bPreserveData );
702 SCROW GetNotePosition( size_t nIndex ) const;
703 void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
704 void GetNotesInRange( SCROW nStartRow, SCROW nEndRow, std::vector<sc::NoteEntry>& rNotes ) const;
705
708
710 SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, bool bCloneCaption = true,
711 SCROW nRowOffsetDest = 0) const;
712
713 void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
714 sc::ColumnBlockPosition& rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest = 0) const;
715
716 void UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 );
717
718 void UpdateDrawObjects( std::vector<std::vector<SdrObject*>>& pObjects, SCROW nRowStart, SCROW nRowEnd );
719 void UpdateDrawObjectsForRow( std::vector<SdrObject*>& pObjects, SCCOL nTargetCol, SCROW nTargetRow );
720 bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
721
722 void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
723 bool InterpretCellsIfNeeded( SCROW nRow1, SCROW nRow2 );
724
725 static void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell );
726
735 void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
736 std::vector<SCROW>& rNewSharedRows );
737
739 void StartListeningUnshared( const std::vector<SCROW>& rNewSharedRows );
740
741 void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength,
742 std::vector<SCROW>* pNewSharedRows );
743
744 void AttachFormulaCells( sc::StartListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
745 void DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
746
750 void RegroupFormulaCells( std::vector<ScAddress>* pGroupPos = nullptr );
751
767 void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs );
768
769 void SplitFormulaGroupByRelativeRef( const ScRange& rBoundRange );
770
771 void TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest );
772 void CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc );
774 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, sc::TableValues* pUndo );
775
776 void SwapNonEmpty(
778
779 std::optional<sc::ColumnIterator> GetColumnIterator( SCROW nRow1, SCROW nRow2 ) const;
780
781 bool EnsureFormulaCellResults( SCROW nRow1, SCROW nRow2, bool bSkipRunning = false );
782
783 void StoreToCache(SvStream& rStrm) const;
784 void RestoreFromCache(SvStream& rStrm);
785
786#if DUMP_COLUMN_STORAGE
787 void DumpColumnStorage() const;
788#endif
789
790 SCSIZE GetPatternCount() const;
791 SCSIZE GetPatternCount( SCROW nRow1, SCROW nRow2 ) const;
792 bool ReservePatternCount( SCSIZE nReserve );
793
794 void CheckIntegrity() const;
795
796private:
797
798 sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, std::vector<SCROW>& rNewSharedRows,
799 bool bInsertFormula );
800 sc::CellStoreType::iterator GetPositionToInsert( const sc::CellStoreType::iterator& it, SCROW nRow,
801 std::vector<SCROW>& rNewSharedRows, bool bInsertFormula );
802
804 const sc::CellStoreType::iterator& itPos, SCROW nRow, ScFormulaCell& rCell,
805 const std::vector<SCROW>& rNewSharedRows,
806 bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
807
809 const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
810 const std::vector<SCROW>& rNewSharedRows,
811 bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
812
813public:
814 void AttachNewFormulaCells(const sc::CellStoreType::position_type& aPos, size_t nLength,
815 std::vector<SCROW>& rNewSharedRows);
816
817private:
818 void BroadcastNewCell( SCROW nRow );
819 bool UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr );
820
821 const ScFormulaCell* FetchFormulaCell( SCROW nRow ) const;
822
824 sc::CellStoreType::const_iterator& itPos, SCROW nRow, bool bForward) const;
825 SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const;
826
827 OUString GetString( const ScRefCellValue& cell, SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const;
828 OUString GetInputString( const ScRefCellValue& cell, SCROW nRow, bool bForceSystemLocale = false ) const;
829
836 void CellStorageModified();
837 void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
838
839 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const;
840
842 {
846 std::vector<std::pair<SCROW, SCROW>> aFormulaRanges;
847
848 DeleteCellsResult( const ScDocument& rDoc );
850 };
851
852 std::unique_ptr<DeleteCellsResult> DeleteCells(
853 sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag );
854
859 std::vector<sc::FormulaGroupEntry> GetFormulaGroupEntries();
860
862 sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos );
863
865 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos );
866
868 void SetNeedsListeningGroup( SCROW nRow );
869
871};
872
873inline bool ScColumn::IsEmptyAttr() const
874{
875 return pAttrArray->IsEmpty();
876}
877
878inline bool ScColumnData::IsAllAttrEqual( const ScColumnData& rCol, SCROW nStartRow, SCROW nEndRow ) const
879{
880 return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow );
881}
882
883inline bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
884{
885 return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow );
886}
887
888inline bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
889{
890 return pAttrArray->GetFirstVisibleAttr( rFirstRow );
891}
892
893inline bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow, bool bSkipEmpty ) const
894{
895 // row of last cell is needed
896 SCROW nLastData = GetLastDataPos(); // always including notes, 0 if none
897 return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData, bSkipEmpty );
898}
899
900inline bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
901{
902 return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow );
903}
904
906{
907 return pAttrArray->Count();
908}
909
910inline SCSIZE ScColumn::GetPatternCount( SCROW nRow1, SCROW nRow2 ) const
911{
912 return pAttrArray->Count( nRow1, nRow2 );
913}
914
916{
917 return pAttrArray && pAttrArray->Reserve( nReserve );
918}
919
920inline bool ScColumn::IsMerged( SCROW nRow ) const
921{
922 return pAttrArray->IsMerged(nRow);
923}
924
925inline SCROW ScColumnData::GetNextUnprotected( SCROW nRow, bool bUp ) const
926{
927 return pAttrArray->GetNextUnprotected(nRow, bUp);
928}
929
930inline bool ScColumnData::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) const
931{
932 return pAttrArray->HasAttrib( nRow1, nRow2, nMask );
933}
934
935inline bool ScColumnData::HasAttrib( SCROW nRow, HasAttrFlags nMask, SCROW* nStartRow, SCROW* nEndRow ) const
936{
937 return pAttrArray->HasAttrib( nRow, nMask, nStartRow, nEndRow );
938}
939
940inline bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
941 SCCOL& rPaintCol, SCROW& rPaintRow,
942 bool bRefresh )
943{
944 return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh );
945}
946
947inline void ScColumnData::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, bool bDeep ) const
948{
949 pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep );
950}
951
952inline void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
953 ScLineFlags& rFlags,
954 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const
955{
956 pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
957}
958
959inline void ScColumn::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
960 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
961{
962 pAttrArray->ApplyBlockFrame(rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight);
963}
964
966{
967 return pAttrArray->GetPattern( nRow );
968}
969
970inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
971{
972 return pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich);
973}
974
975inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
976{
977 return pAttrArray->GetPatternRange( nStartRow, nEndRow, nRow )->GetItemSet().Get(nWhich);
978}
979
980inline sal_uInt32 ScColumnData::GetNumberFormat( const ScInterpreterContext& rContext, SCROW nRow ) const
981{
982 return pAttrArray->GetPattern( nRow )->GetNumberFormat( rContext.GetFormatTable() );
983}
984
985inline void ScColumn::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
986{
987 pAttrArray->AddCondFormat( nStartRow, nEndRow, nIndex );
988}
989
990inline void ScColumn::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
991{
992 pAttrArray->RemoveCondFormat( nStartRow, nEndRow, nIndex );
993}
994
995inline void ScColumnData::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle )
996{
997 pAttrArray->ApplyStyleArea(nStartRow, nEndRow, rStyle);
998}
999
1000inline const ScStyleSheet* ScColumnData::GetStyle( SCROW nRow ) const
1001{
1002 return pAttrArray->GetPattern( nRow )->GetStyleSheet();
1003}
1004
1005inline void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset )
1006{
1007 pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset );
1008}
1009
1010inline bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
1011{
1012 return pAttrArray->IsStyleSheetUsed( rStyle );
1013}
1014
1015inline bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1016{
1017 return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
1018}
1019
1020inline bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1021{
1022 return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
1023}
1024
1025inline void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
1026{
1027 pAttrArray->ClearItems( nStartRow, nEndRow, pWhich );
1028}
1029
1030inline const ScPatternAttr* ScColumn::SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> pPatAttr )
1031{
1032 return pAttrArray->SetPattern( nRow, std::move(pPatAttr), true/*bPutToPool*/ );
1033}
1034
1035inline void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
1036{
1037 pAttrArray->SetPattern( nRow, &rPatAttr, true/*bPutToPool*/ );
1038}
1039
1040inline void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
1041 const ScPatternAttr& rPatAttr )
1042{
1043 pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ );
1044}
1045
1046inline void ScColumnData::SetAttrEntries(std::vector<ScAttrEntry> && vNewData)
1047{
1048 pAttrArray->SetAttrEntries( std::move( vNewData ));
1049}
1050
1051inline bool ScColumnData::TestInsertRow( SCSIZE nSize ) const
1052{
1053 return pAttrArray->TestInsertRow( nSize );
1054}
1055
1056inline void ScColumnData::InsertRow( SCROW nStartRow, SCSIZE nSize )
1057{
1058 pAttrArray->InsertRow( nStartRow, nSize );
1059}
1060
1061inline void ScColumnData::DeleteRow(SCROW nStartRow, SCSIZE nSize)
1062{
1063 pAttrArray->DeleteRow( nStartRow, nSize );
1064}
1065
1066/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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
ScMF
Definition: attrib.hxx:34
Walk through all cells in an area.
Definition: dociter.hxx:206
std::unique_ptr< ScAttrArray > pAttrArray
Definition: column.hxx:118
void ApplyStyleArea(SCROW nStartRow, SCROW nEndRow, const ScStyleSheet &rStyle)
Definition: column.hxx:995
const ScPatternAttr * GetPattern(SCROW nRow) const
Definition: column.hxx:965
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
Definition: column.hxx:970
SCROW ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray, bool *const pIsChanged, SCCOL nCol)
Definition: column.cxx:383
const T & GetAttr(SCROW nRow, TypedWhichId< T > nWhich) const
Definition: column.hxx:133
ScAttrArray & AttrArray()
Definition: column.hxx:129
void DeleteRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.hxx:1061
ScColumnData()=default
void SetAttrEntries(std::vector< ScAttrEntry > &&vNewData)
Definition: column.hxx:1046
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
Definition: column.hxx:930
const ScAttrArray & AttrArray() const
Definition: column.hxx:130
bool IsAllAttrEqual(const ScColumnData &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:878
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark, SCCOL nCol)
Definition: column.cxx:426
ScColumnData(const ScColumnData &)=delete
bool TestInsertRow(SCSIZE nSize) const
Definition: column.hxx:1051
void InitAttrArray(ScAttrArray *attrArray)
Definition: column.hxx:125
void MergePatternArea(ScMergePatternState &rState, SCROW nRow1, SCROW nRow2, bool bDeep) const
Definition: column.hxx:947
void InsertRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.hxx:1056
ScColumnData & operator=(const ScColumnData &)=delete
const T & GetAttr(SCROW nRow, TypedWhichId< T > nWhich, SCROW &nStartRow, SCROW &nEndRow) const
Definition: column.hxx:138
SCROW GetNextUnprotected(SCROW nRow, bool bUp) const
Including current, may return -1.
Definition: column.hxx:925
void ApplyPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &rPatAttr, ScEditDataArray *pDataArray=nullptr, bool *const pIsChanged=nullptr)
Definition: column.cxx:482
const ScStyleSheet * GetStyle(SCROW nRow) const
Definition: column.hxx:1000
const ScPatternAttr * GetMostUsedPattern(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:337
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark, SCCOL nCol)
Definition: column.cxx:408
ScDocument & GetDoc() const
Definition: column.hxx:127
sal_uInt32 GetNumberFormat(const ScInterpreterContext &rContext, SCROW nRow) const
Definition: column.hxx:980
std::unique_ptr< ScAttrIterator > CreateAttrIterator(SCROW nStartRow, SCROW nEndRow) const
Definition: column3.cxx:2047
void SetDirtyVar()
Definition: column.cxx:3119
void DeleteCellNotes(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
Definition: column2.cxx:2260
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:1989
void UpdateNoteCaptions(SCROW nRow1, SCROW nRow2)
Definition: column.cxx:1824
void CreateSparklineCell(SCROW nRow, std::shared_ptr< sc::Sparkline > const &pSparkline)
Definition: column2.cxx:2061
SCROW GetFirstDataPos() const
Definition: column2.cxx:1405
void CollectFormulaCells(std::vector< ScFormulaCell * > &rCells, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1390
SCTAB GetTab() const
Definition: column.hxx:255
svl::SharedString GetSharedString(SCROW nRow) const
Definition: column3.cxx:2536
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1015
void CellStorageModified()
Called whenever the state of cell array gets modified i.e.
Definition: column2.cxx:1680
bool HasStringData(SCROW nRow) const
Definition: column3.cxx:3223
void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol) const
Definition: column2.cxx:1853
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScColumn &rClipCol, sc::ColumnSpanSet &rBroadcastSpans)
Definition: column4.cxx:95
~ScColumn() COVERITY_NOEXCEPT_FALSE
Definition: column.cxx:96
bool IsVisibleAttrEqual(const ScColumn &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:883
void FindStyleSheet(const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
Definition: column.hxx:1005
SCROW GetNotePosition(size_t nIndex) const
Definition: column4.cxx:792
void ApplyPattern(SCROW nRow, const ScPatternAttr &rPatAttr)
Definition: column.cxx:467
void ClearItems(SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
Definition: column.hxx:1025
void UpdateSelectionFunction(const ScRangeList &rRanges, ScFunctionData &rData, const ScFlatBoolRowSegments &rHiddenRows)
Definition: column2.cxx:3655
FormulaError GetErrCode(SCROW nRow) const
Definition: column3.cxx:3209
SCCOL nCol
Definition: column.hxx:204
bool IsEmptyAttr() const
Definition: column.hxx:873
bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const
Definition: column4.cxx:878
void PreprocessDBDataUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1093
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1346
void SetValue(SCROW nRow, double fVal)
Definition: column3.cxx:3026
sc::CellTextAttrStoreType maCellTextAttrs
Definition: column.hxx:188
void SetFormula(SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
Definition: column3.cxx:2421
bool HasValueData(SCROW nRow) const
Definition: column3.cxx:3243
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:857
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:713
bool HasFormulaCell() const
Definition: column4.cxx:1399
void EndListeningGroup(sc::EndListeningContext &rCxt, SCROW nRow)
Definition: column4.cxx:1713
bool TestInsertRow(SCROW nStartRow, SCSIZE nSize) const
Definition: column.cxx:735
void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn &rDestCol, sc::ColumnBlockPosition &rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:1972
SCTAB nTab
Definition: column.hxx:205
void SplitFormulaGroupByRelativeRef(const ScRange &rBoundRange)
Definition: column4.cxx:1330
void SetDirty(SCROW nRow1, SCROW nRow2, BroadcastMode)
Definition: column.cxx:3199
void PreprocessRangeNameUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1079
bool HasVisibleDataAt(SCROW nRow) const
Definition: column2.cxx:1318
void CheckVectorizationState()
Definition: column.cxx:3140
bool mbEmptyBroadcastersPending
Definition: column.hxx:207
OUString GetString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:443
void TransferCellValuesTo(SCROW nRow, size_t nLen, sc::CellValues &rDest)
Definition: column4.cxx:429
void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList &rRangeList) const
Definition: column4.cxx:910
void RegroupFormulaCells(std::vector< ScAddress > *pGroupPos=nullptr)
Regroup formula cells for the entire column.
Definition: column3.cxx:3658
void SetError(SCROW nRow, const FormulaError nError)
Definition: column3.cxx:2959
SCROW FindNextVisibleRowWithContent(sc::CellStoreType::const_iterator &itPos, SCROW nRow, bool bForward) const
Definition: column2.cxx:1616
ScFormulaCell * SetFormulaCell(SCROW nRow, ScFormulaCell *pCell, sc::StartListeningType eListenType=sc::SingleCellListening, bool bInheritNumFormatIfNeeded=true)
Takes ownership of pCell.
Definition: column3.cxx:2457
void CloneFormulaCell(sc::ColumnBlockPosition &rBlockPos, const ScFormulaCell &rSrc, const sc::CellTextAttr &rAttr, const std::vector< sc::RowSpan > &rRanges)
Definition: column4.cxx:636
void UpdateDrawObjectsForRow(std::vector< SdrObject * > &pObjects, SCCOL nTargetCol, SCROW nTargetRow)
Definition: column.cxx:1844
void UpdateInsertTabOnlyCells(sc::RefUpdateInsertTabContext &rCxt)
Definition: column.cxx:3057
void DeleteSelection(InsertDeleteFlags nDelFlag, const ScMarkData &rMark, bool bBroadcast)
Definition: column.cxx:454
bool TestCopyScenarioTo(const ScColumn &rDestCol) const
Definition: column.cxx:1753
void SetAllFormulasDirty(const sc::SetFormulaDirtyContext &rCxt)
Definition: column.cxx:3147
void CollectListeners(std::vector< SvtListener * > &rListeners, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1381
ScPostIt * GetCellNote(SCROW nRow)
Definition: column2.cxx:2194
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
Definition: column.hxx:959
void BroadcastCells(const std::vector< SCROW > &rRows, SfxHintId nHint)
Definition: column3.cxx:81
void CheckIntegrity() const
Definition: column4.cxx:2207
bool TestTabRefAbs(SCTAB nTable) const
Definition: column2.cxx:1277
void DeleteRanges(const std::vector< sc::RowSpan > &rRanges, InsertDeleteFlags nDelFlag)
Definition: column4.cxx:630
void RestoreFromCache(SvStream &rStrm)
Definition: column4.cxx:2119
OUString GetInputString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, bool bForceSystemLocale=false) const
Definition: column.hxx:450
void UpdateDrawObjects(std::vector< std::vector< SdrObject * > > &pObjects, SCROW nRowStart, SCROW nRowEnd)
Definition: column.cxx:1830
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:1592
void CompileColRowNameFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3581
void BroadcastRecalcOnRefMove()
Definition: column.cxx:3285
bool ExtendMerge(SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
Definition: column.hxx:940
SCROW GetSparklinesMinRow() const
Definition: column2.cxx:2179
bool SetFormulaCells(SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Definition: column3.cxx:2495
void InterpretDirtyCells(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:186
void InitBlockPosition(sc::ColumnBlockPosition &rBlockPos)
Definition: column3.cxx:1159
void StartListeners(sc::StartListeningContext &rCxt, bool bAll)
Definition: column3.cxx:2090
SCSIZE VisibleCount(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1311
void UpdateDeleteTab(sc::RefUpdateDeleteTabContext &rCxt)
Definition: column.cxx:3065
std::vector< sc::FormulaGroupEntry > GetFormulaGroupEntries()
Get all non-grouped formula cells and formula cell groups in the whole column.
Definition: column.cxx:2448
void ConvertFormulaToValue(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, sc::TableValues *pUndo)
Definition: column4.cxx:530
void DumpColumnStorage() const
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
Definition: column.hxx:952
void UpdateInsertTabAbs(SCTAB nNewPos)
Definition: column.cxx:3079
SCROW ApplySelectionCache(SfxItemPoolCache *pCache, const ScMarkData &rMark, ScEditDataArray *pDataArray, bool *const pIsChanged)
Definition: column.cxx:377
void SetPatternArea(SCROW nStartRow, SCROW nEndRow, const ScPatternAttr &)
Definition: column.hxx:1040
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCROW nRowStart, SCROW nRowEnd) const
Definition: column3.cxx:3520
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:382
void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument &rDoc, bool bEmptyAttrArray)
Definition: column.cxx:101
void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:2144
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:2321
OUString GetFormula(SCROW nRow) const
Definition: column3.cxx:3142
void RemoveProtected(SCROW nStartRow, SCROW nEndRow)
Definition: column3.cxx:2933
void FreeNotes()
Definition: column3.cxx:255
BroadcastMode
Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode).
Definition: column.hxx:243
@ BROADCAST_DATA_POSITIONS
broadcast existing cells with position => does AreaBroadcast
Definition: column.hxx:245
@ BROADCAST_BROADCASTERS
broadcast only existing cell broadcasters => no AreaBroadcast of range!
Definition: column.hxx:246
@ BROADCAST_NONE
no broadcasting
Definition: column.hxx:244
bool ParseString(ScCellValue &rCell, SCROW nRow, SCTAB nTab, const OUString &rString, formula::FormulaGrammar::AddressConvention eConv, const ScSetStringParam *pParam)
Definition: column3.cxx:2108
void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn &rDestCol, sc::ColumnBlockPosition &rDestBlockPos, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:2154
std::unique_ptr< DeleteCellsResult > DeleteCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag)
Definition: column3.cxx:1075
void GetFilterEntries(sc::ColumnBlockConstPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow, ScFilterEntries &rFilterEntries, bool bFiltering, bool bFilteredRow)
Definition: column3.cxx:2695
void RemoveEditAttribs(sc::ColumnBlockPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow)
Definition: column2.cxx:1267
bool HasStringCells(SCROW nStartRow, SCROW nEndRow) const
Return true if there is a string or editcell in the range.
Definition: column3.cxx:3265
sc::CellNoteStoreType maCellNotes
Definition: column.hxx:191
const ScStyleSheet * GetSelectionStyle(const ScMarkData &rMark, bool &rFound) const
Definition: column.cxx:554
std::optional< sc::ColumnIterator > GetColumnIterator(SCROW nRow1, SCROW nRow2) const
Definition: column4.cxx:1773
void EndListeningFormulaCells(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, SCROW *pStartRow, SCROW *pEndRow)
Definition: column4.cxx:1617
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:683
SvtScriptType GetScriptType(SCROW nRow) const
Definition: column2.cxx:2313
void EndListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3492
const ScFormulaCell * GetFormulaCell(SCROW nRow) const
Definition: column3.cxx:3150
void FindDataAreaPos(SCROW &rRow, bool bDown) const
Definition: column2.cxx:3328
sc::MultiDataCellState::StateType HasDataCellsInRange(SCROW nRow1, SCROW nRow2, SCROW *pRow1) const
Definition: column4.cxx:47
bool UpdateReferenceOnCopy(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc=nullptr)
Definition: column.cxx:2359
bool CompileErrorCells(sc::CompileFormulaContext &rCxt, FormulaError nErrCode)
Definition: column.cxx:3312
void SwapNonEmpty(sc::TableValues &rValues, sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt)
Definition: column4.cxx:592
void DeleteRow(SCROW nStartRow, SCSIZE nSize, std::vector< ScAddress > *pGroupPos)
Definition: column3.cxx:275
void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:990
void CompileXML(sc::CompileFormulaContext &rCxt, ScProgress &rProgress)
Definition: column.cxx:3305
void ResetFormulaCellPositions(SCROW nRow1, SCROW nRow2, bool bUpdateRefs)
Reset column position of formula cells within specified row range.
Definition: column4.cxx:1296
const EditTextObject * GetEditText(SCROW nRow) const
Definition: column3.cxx:3115
void MixMarked(sc::MixDocContext &rCxt, const ScMarkData &rMark, ScPasteFunc nFunction, bool bSkipEmpty, const ScColumn &rSrcCol)
Definition: column3.cxx:1607
bool TrimEmptyBlocks(SCROW &rRowStart, SCROW &rRowEnd) const
Definition: column2.cxx:1546
void StoreToCache(SvStream &rStrm) const
Definition: column4.cxx:2109
bool GetLastVisibleAttr(SCROW &rLastRow, bool bSkipEmpty) const
Definition: column.hxx:893
void FreeAll()
Definition: column3.cxx:238
sc::MatrixEdge GetBlockMatrixEdges(SCROW nRow1, SCROW nRow2, sc::MatrixEdge nMask, bool bNoMatrixAtAll) const
Definition: column.cxx:111
void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
Definition: column2.cxx:2253
SCCOL GetCol() const
Definition: column.hxx:256
bool InterpretCellsIfNeeded(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:195
void CalcAfterLoad(sc::CompileFormulaContext &rCxt, bool bStartListening)
Definition: column.cxx:3319
void SetNumberFormat(SCROW nRow, sal_uInt32 nNumberFormat)
Definition: column2.cxx:3289
void CopyFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn &rColumn)
Definition: column3.cxx:1530
void AssertNoInterpretNeeded(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:3178
void SetTableOpDirty(const ScRange &)
Definition: column.cxx:3240
void CopyScenarioTo(ScColumn &rDestCol) const
Definition: column.cxx:1727
sal_Int32 GetMaxStringLen(SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet) const
Definition: column3.cxx:3359
void ApplyAttr(SCROW nRow, const SfxPoolItem &rAttr)
Definition: column.cxx:620
void GetOptimalHeight(sc::RowHeightContext &rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart)
Definition: column2.cxx:891
void ResetChanged(SCROW nStartRow, SCROW nEndRow)
Definition: column.cxx:3325
bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW &rFirst)
Definition: column.cxx:3331
sal_uInt64 GetWeightedCount() const
Definition: column2.cxx:3784
void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn &rCol)
Definition: column.cxx:1897
sc::SparklineStoreType & GetSparklineStore()
Definition: column.hxx:263
void SetFormulaResults(SCROW nRow, const double *pResults, size_t nLen)
Definition: column2.cxx:3185
void GetDataExtrasAt(SCROW nRow, ScDataAreaExtras &rDataAreaExtras) const
Definition: column2.cxx:3410
void CompileDBFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3574
std::unique_ptr< ScPostIt > ReleaseNote(SCROW nRow)
Definition: column4.cxx:724
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, SCROW nRow, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1634
bool HasSelectionMatrixFragment(const ScMarkData &rMark, const ScRangeList &rRangeList) const
Definition: column.cxx:192
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:85
void ApplySelectionLineStyle(const ScMarkData &rMark, const ::editeng::SvxBorderLine *pLine, bool bColorOnly)
Definition: column.cxx:537
void Delete(SCROW nRow)
Definition: column3.cxx:227
void MixData(sc::MixDocContext &rCxt, SCROW nRow1, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty, const ScColumn &rSrcCol)
Definition: column3.cxx:2030
bool HasCellNotes() const
Definition: column2.cxx:2268
bool IsEmptyData() const
Definition: column2.cxx:1284
void CompileAll(sc::CompileFormulaContext &rCxt)
Definition: column.cxx:3299
size_t mnBlkCountFormula
Definition: column.hxx:202
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1668
void Swap(ScColumn &rOther, SCROW nRow1, SCROW nRow2, bool bPattern)
Definition: column4.cxx:1217
const sc::CellTextAttrStoreType & GetCellAttrStore() const
Definition: column.hxx:260
SCROW SearchStyle(SCROW nRow, const ScStyleSheet *pSearchStyle, bool bUp, bool bInSelection, const ScMarkData &rMark) const
May return -1 if not found.
Definition: column.cxx:3346
void BroadcastNewCell(SCROW nRow)
Definition: column3.cxx:827
void UpdateScriptTypes(SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1206
void SetNeedsListeningGroup(SCROW nRow)
Definition: column4.cxx:1743
SCROW GetCellNotesMaxRow() const
Definition: column2.cxx:2275
OUString GetInputString(SCROW nRow, bool bForceSystemLocale=false) const
Definition: column.hxx:448
void SetTabNo(SCTAB nNewTab)
Definition: column.cxx:3104
bool HasSparklines() const
Definition: column2.cxx:2161
void CompileHybridFormula(sc::StartListeningContext &rStartListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1108
bool GetDataEntries(SCROW nRow, std::set< ScTypedStrData > &rStrings) const
Definition: column3.cxx:2830
void CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset)
Definition: column4.cxx:247
void MergeSelectionPattern(ScMergePatternState &rState, const ScMarkData &rMark, bool bDeep) const
Definition: column.cxx:320
SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const
Definition: column2.cxx:1592
void CalculateInThread(ScInterpreterContext &rContext, SCROW nRow, size_t nLen, size_t nOffset, unsigned nThisThread, unsigned nThreadsTotal)
Definition: column2.cxx:3221
void UndoToColumn(sc::CopyToDocContext &rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked, ScColumn &rColumn) const
Definition: column.cxx:1662
const sc::CellStoreType & GetCellStore() const
Definition: column.hxx:258
const ScPatternAttr * SetPattern(SCROW nRow, std::unique_ptr< ScPatternAttr >)
Definition: column.hxx:1030
void ApplyStyle(SCROW nRow, const ScStyleSheet *rStyle)
Definition: column.cxx:516
bool GetNextDataPos(SCROW &rRow) const
Definition: column2.cxx:1500
void UpdateCompile(bool bForceIfNameInUse=false)
Definition: column.cxx:3098
bool HasAttribSelection(const ScMarkData &rMark, HasAttrFlags nMask) const
Definition: column.cxx:300
sc::CellStoreType maCells
Definition: column.hxx:197
ScRefCellValue GetCellValue(SCROW nRow) const
Definition: column.cxx:638
void DetachFormulaCells(const sc::CellStoreType::position_type &aPos, size_t nLength, std::vector< SCROW > *pNewSharedRows)
Definition: column3.cxx:493
formula::VectorRefArray FetchVectorRefArray(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2962
void CopyUpdated(const ScColumn *pPosCol, ScColumn &rDestCol) const
Definition: column.cxx:1675
void SetValues(const SCROW nRow, const std::vector< double > &rVals)
Definition: column4.cxx:399
bool UpdateScriptType(sc::CellTextAttr &rAttr, SCROW nRow, sc::CellStoreType::iterator &itr)
Definition: column3.cxx:840
void MarkScenarioIn(ScMarkData &rDestMark) const
Definition: column.cxx:1770
const sc::CellNoteStoreType & GetCellNoteStore() const
Definition: column.hxx:262
void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:985
bool GetFirstVisibleAttr(SCROW &rFirstRow) const
Definition: column.hxx:888
void CollectBroadcasterState(sc::BroadcasterState &rState) const
Definition: column4.cxx:2232
bool DeleteSparkline(SCROW nRow)
Definition: column2.cxx:2076
void InsertRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.cxx:765
void CopyStaticToDocument(SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap &rMap, ScColumn &rDestCol)
Definition: column.cxx:964
void CopyScenarioFrom(const ScColumn &rSrcCol)
Definition: column.cxx:1698
SCSIZE GetCellCount() const
Definition: column3.cxx:3202
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:729
void CopyToClip(sc::CopyToClipContext &rCxt, SCROW nRow1, SCROW nRow2, ScColumn &rColumn) const
Definition: column.cxx:945
void CopyCellNotesToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol, bool bCloneCaption=true, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:1950
void FillMatrix(ScMatrix &rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool *pPool) const
Definition: column2.cxx:2691
void StartListeningUnshared(const std::vector< SCROW > &rNewSharedRows)
Re-establish listeners on unshared formula groups.
Definition: column3.cxx:435
bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:1857
void SetCellNote(SCROW nRow, std::unique_ptr< ScPostIt > pNote)
Definition: column2.cxx:2220
const sc::SparklineStoreType & GetSparklineStore() const
Definition: column.hxx:264
bool GetNextSpellingCell(SCROW &nRow, bool bInSel, const ScMarkData &rData) const
Definition: column2.cxx:1104
void UpdateTranspose(const ScRange &rSource, const ScAddress &rDest, ScDocument *pUndoDoc)
Definition: column.cxx:3033
void ForgetNoteCaptions(SCROW nRow1, SCROW nRow2, bool bPreserveData)
Definition: column4.cxx:779
sal_uInt64 GetCodeCount() const
Definition: column2.cxx:3816
bool IsMerged(SCROW nRow) const
Definition: column.hxx:920
void CreateAllNoteCaptions()
Definition: column4.cxx:773
void CalcAll()
Definition: column.cxx:3293
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1606
void PrepareBroadcastersForDestruction()
Definition: column2.cxx:1995
void BroadcastRows(SCROW nStartRow, SCROW nEndRow, SfxHintId nHint)
Definition: column3.cxx:96
void CopyCellValuesFrom(SCROW nRow, const sc::CellValues &rSrc)
Definition: column4.cxx:454
void Broadcast(SCROW nRow)
Definition: column3.cxx:75
sc::CellTextAttrStoreType & GetCellAttrStore()
Definition: column.hxx:259
sc::CellNoteStoreType & GetCellNoteStore()
Definition: column.hxx:261
SCROW GetCellNotesMinRow() const
Definition: column2.cxx:2286
double * GetValueCell(SCROW nRow)
Definition: column3.cxx:3075
void DeleteEmptyBroadcasters()
Definition: column2.cxx:2021
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: column.hxx:1010
void UpdateGrow(const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY)
Definition: column.cxx:3040
const ScStyleSheet * GetAreaStyle(bool &rFound, SCROW nRow1, SCROW nRow2) const
Definition: column.cxx:593
void UpdateInsertTab(sc::RefUpdateInsertTabContext &rCxt)
Definition: column.cxx:3046
void FindUsed(SCROW nStartRow, SCROW nEndRow, mdds::flat_segment_tree< SCROW, bool > &rUsed) const
Definition: column2.cxx:3450
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
Definition: column.cxx:421
void DeleteSparklineCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2068
void SwapCol(ScColumn &rCol)
Definition: column.cxx:1867
void SetEditText(SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
Definition: column3.cxx:2359
void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: column.cxx:490
bool GetPrevDataPos(SCROW &rRow) const
Definition: column2.cxx:1454
void DeleteContent(SCROW nRow, bool bBroadcast=true)
Definition: column3.cxx:205
sc::CellStoreType & GetCellStore()
Definition: column.hxx:257
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:2339
bool HasVisibleAttrIn(SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:900
void GetNotesInRange(SCROW nStartRow, SCROW nEndRow, std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:862
bool UpdateReference(sc::RefUpdateContext &rCxt, ScDocument *pUndoDoc)
Update reference addresses in formula cell in response to mass cell movement.
Definition: column.cxx:2384
bool RemoveFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1020
void DeleteArea(SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: column3.cxx:1101
sc::SparklineCell * GetSparklineCell(SCROW nRow)
Definition: column2.cxx:2056
void ApplySelectionStyle(const ScStyleSheet &rStyle, const ScMarkData &rMark)
Definition: column.cxx:524
bool IsFormulaDirty(SCROW nRow) const
Definition: column.cxx:3125
void SetDirtyFromClip(SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet &rBroadcastSpans)
Definition: column.cxx:3155
void CopyCellToDocument(SCROW nSrcRow, SCROW nDestRow, ScColumn &rDestCol)
Definition: column.cxx:1089
double GetValue(SCROW nRow) const
Definition: column3.cxx:3094
size_t GetNoteCount() const
Definition: column4.cxx:734
bool HandleRefArrayForParallelism(SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef &mxGroup)
Definition: column4.cxx:2006
formula::FormulaTokenRef ResolveStaticReference(SCROW nRow)
Definition: column2.cxx:2406
static void JoinNewFormulaCell(const sc::CellStoreType::position_type &aPos, ScFormulaCell &rCell)
Definition: column3.cxx:362
void duplicateSparkline(sc::CopyFromClipContext &rContext, sc::ColumnBlockPosition *pBlockPos, size_t nColOffset, size_t nDestSize, ScAddress aDestPosition)
Definition: column4.cxx:370
void ClearSelectionItems(const sal_uInt16 *pWhich, const ScMarkData &rMark)
Definition: column.cxx:449
bool BroadcastBroadcasters(SCROW nRow1, SCROW nRow2, SfxHintId nHint)
Broadcast single broadcasters in range, without explicitly setting anything dirty,...
Definition: column.cxx:3192
void SetDirtyIfPostponed()
Definition: column.cxx:3277
sc::BroadcasterStoreType maBroadcasters
Definition: column.hxx:194
OUString GetString(SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:441
void UpdateMoveTab(sc::RefUpdateMoveTabContext &rCxt, SCTAB nTabNo)
Definition: column.cxx:3087
const sc::CellTextAttr * GetCellTextAttr(SCROW nRow) const
Definition: column.cxx:692
void SetRawString(SCROW nRow, const OUString &rStr)
Definition: column3.cxx:2977
bool ReservePatternCount(SCSIZE nReserve)
Definition: column.hxx:915
void RemoveEditTextCharAttribs(SCROW nRow, const ScPatternAttr &rAttr)
Definition: column3.cxx:3128
SCROW GetLastDataPos() const
Definition: column2.cxx:1417
CellType GetCellType(SCROW nRow) const
Definition: column3.cxx:3160
void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames &rIndexes) const
Definition: column.cxx:3113
const ScFormulaCell * FetchFormulaCell(SCROW nRow) const
Definition: column2.cxx:3321
ScColumn(ScSheetLimits const &)
Definition: column.cxx:82
void SetScriptType(SCROW nRow, SvtScriptType nType)
Definition: column2.cxx:2392
SCROW GetSparklinesMaxRow() const
Definition: column2.cxx:2168
ScDocument & GetDoc() const
Definition: column.hxx:127
void HandleStuffAfterParallelCalculation(SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
Definition: column2.cxx:3260
ScFormulaCell *const * GetFormulaCellBlockAddress(SCROW nRow, size_t &rBlockSize) const
Definition: column2.cxx:3294
SvtBroadcaster * GetBroadcaster(SCROW nRow)
Definition: column2.cxx:1979
sc::SparklineStoreType maSparklines
Definition: column.hxx:200
void AttachFormulaCells(sc::StartListeningContext &rCxt, SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:558
bool HasDataAt(SCROW nRow, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Definition: column2.cxx:3376
bool EnsureFormulaCellResults(SCROW nRow1, SCROW nRow2, bool bSkipRunning=false)
Definition: column4.cxx:1993
void SetDirtyAfterLoad()
Definition: column.cxx:3250
sc::CellStoreType::iterator GetPositionToInsert(SCROW nRow, std::vector< SCROW > &rNewSharedRows, bool bInsertFormula)
Definition: column3.cxx:356
SCSIZE GetPatternCount() const
Definition: column.hxx:905
void SetTextWidth(SCROW nRow, sal_uInt16 nWidth)
Definition: column2.cxx:2302
bool SearchStyleRange(SCROW &rRow, SCROW &rEndRow, const ScStyleSheet *pSearchStyle, bool bUp, bool bInSelection, const ScMarkData &rMark) const
Definition: column.cxx:3364
void AttachNewFormulaCells(const sc::CellStoreType::position_type &aPos, size_t nLength, std::vector< SCROW > &rNewSharedRows)
Definition: column3.cxx:758
bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:2088
void StartListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3486
sal_uInt16 GetTextWidth(SCROW nRow) const
Definition: column2.cxx:2297
SCSIZE GetEmptyLinesInBlock(SCROW nStartRow, SCROW nEndRow, ScDirection eDir) const
Definition: column2.cxx:1363
Accessor class to ScDocument.
To calculate a single subtotal function.
Definition: subtotal.hxx:61
Row-wise value iterator.
Definition: dociter.hxx:334
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
Definition: markdata.hxx:43
Matrix data type that can store values of mixed types.
Definition: scmatrix.hxx:101
Additional class containing cell annotation data.
Definition: postit.hxx:58
Think of this as a mini-ScColumn like storage that only stores cell values in a column.
Definition: cellvalues.hxx:42
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
Provides methods to allow direct shifting of document content without broadcasting or shifting of bro...
Iterate through all edit text cells in a given sheet.
Keep track of spans in a single column only.
Holder of a sparkline, that is connected to a cell specific.
Stores cell values for multiple tables.
Definition: cellvalues.hxx:89
Keep track of all named expressions that have been updated during reference update.
constexpr double nPPTX
constexpr double nPPTY
FormulaError
CellType
Definition: global.hxx:272
ScPasteFunc
Definition: global.hxx:181
InsertDeleteFlags
Definition: global.hxx:149
HasAttrFlags
Definition: global.hxx:185
ScDirection
Definition: global.hxx:343
SfxHintId
sal_Int32 nIndex
SvtScriptType
::boost::intrusive_ptr< FormulaToken > FormulaTokenRef
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
mdds::mtv::soa::multi_type_vector< CellNodeTraits > CellNoteStoreType
Cell note container.
mdds::mtv::soa::multi_type_vector< SparklineTraits > SparklineStoreType
Sparkline container.
MatrixEdge
Definition: types.hxx:65
mdds::mtv::soa::multi_type_vector< CellStoreTraits > CellStoreType
Cell container.
StartListeningType
Definition: types.hxx:124
@ SingleCellListening
Definition: types.hxx:126
mdds::mtv::soa::multi_type_vector< CellTextAttrTraits > CellTextAttrStoreType
Cell text attribute container.
mdds::mtv::soa::multi_type_vector< BroadcasterTraits > BroadcasterStoreType
Broadcaster storage container.
long Long
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:32
std::vector< std::pair< SCROW, SCROW > > aFormulaRanges
formula cell range that has stopped listening.
Definition: column.hxx:846
DeleteCellsResult(const ScDocument &rDoc)
Definition: column3.cxx:1070
sc::SingleColumnSpanSet aDeletedRows
cell ranges that have been deleted.
Definition: column.hxx:844
DeleteCellsResult(const DeleteCellsResult &)=delete
Struct to hold non-data extended area, used with ScDocument::ShrinkToUsedDataArea().
Definition: sortparam.hxx:53
SvNumberFormatter * GetFormatTable() const
const ScPatternAttr * pPattern
Definition: column.hxx:103
This is very similar to ScCellValue, except that it references the original value instead of copying ...
Definition: cellvalue.hxx:108
Store parameters used in the ScDocument::SetString() method.
Definition: stringutil.hxx:35
Store position data for column array storage.
Context for reference update during shifting, moving or copying of cell ranges.
sal_Int16 SCTAB
Definition: types.hxx:22
::boost::intrusive_ptr< ScFormulaCellGroup > ScFormulaCellGroupRef
Definition: types.hxx:43
sal_Int16 SCCOL
Definition: types.hxx:21
sal_Int32 SCROW
Definition: types.hxx:17
SvNumFormatType
std::unordered_map< sal_uInt32, sal_uInt32 > SvNumberFormatterMergeMap