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};
176
177// Use protected inheritance to prevent publishing some internal ScColumnData
178// functions as part of ScColumn. If they should be public in ScColumn,
179// use 'using' to make them public.
180class ScColumn : protected ScColumnData
181{
182 // Empty values correspond with empty cells. All non-empty cell positions
183 // must have non-empty elements. For text width, the value should be
184 // either the real text width, or TEXTWIDTH_DIRTY in case it hasn't been
185 // calculated yet. For script type, it should be either the real script
186 // type value or SvtScriptType::UNKNOWN.
188
189 // Cell notes
191
192 // Broadcasters for formula cells.
194
195 // Cell values.
197
198 // Sparklines
200
202
205
206 bool mbEmptyBroadcastersPending : 1; // a broadcaster not removed during EnableDelayDeletingBroadcasters()
207
208friend class ScDocument; // for FillInfo
209friend class ScTable;
210friend class ScValueIterator;
213template< ScQueryCellIteratorAccess accessType, ScQueryCellIteratorType queryType >
215template< ScQueryCellIteratorAccess accessType >
218friend class ScCellIterator;
221friend class ScDocumentImport;
224friend class sc::ColumnSpanSet;
226friend class sc::CellValues;
227friend class sc::TableValues;
229
230 bool ParseString(
231 ScCellValue& rCell,
232 SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
233 const ScSetStringParam* pParam );
234
236 size_t nColOffset, size_t nDestSize, ScAddress aDestPosition);
237
238public:
239
242 {
246 };
247
248 ScColumn(ScSheetLimits const &);
249 ~ScColumn() COVERITY_NOEXCEPT_FALSE;
250
251 void Init(SCCOL nNewCol, SCTAB nNewTab, ScDocument& rDoc, bool bEmptyAttrArray);
252
253 using ScColumnData::GetDoc;
254 SCTAB GetTab() const { return nTab; }
255 SCCOL GetCol() const { return nCol; }
257 const sc::CellStoreType& GetCellStore() const { return maCells; }
264
265 ScRefCellValue GetCellValue( SCROW nRow ) const;
268 static ScRefCellValue GetCellValue( const sc::CellStoreType::const_iterator& itPos, size_t nOffset );
269
270 const sc::CellTextAttr* GetCellTextAttr( SCROW nRow ) const;
272
273 void Delete( SCROW nRow );
274 void DeleteContent( SCROW nRow, bool bBroadcast = true );
275 void FreeAll();
276 void FreeNotes();
277 void Swap( ScColumn& rOther, SCROW nRow1, SCROW nRow2, bool bPattern );
278
279 bool HasAttribSelection( const ScMarkData& rMark, HasAttrFlags nMask ) const;
280 bool IsMerged( SCROW nRow ) const;
281 bool ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
282 SCCOL& rPaintCol, SCROW& rPaintRow,
283 bool bRefresh );
284
285 bool IsEmptyData() const;
286 bool IsEmptyAttr() const;
287
288 // data only:
289 bool IsEmptyData(SCROW nStartRow, SCROW nEndRow) const;
290 SCSIZE GetEmptyLinesInBlock( SCROW nStartRow, SCROW nEndRow, ScDirection eDir ) const;
291 bool HasDataAt( SCROW nRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
292 bool HasDataAt( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
293 ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
294 bool HasDataAt( sc::ColumnBlockPosition& rBlockPos, SCROW nRow,
295 ScDataAreaExtras* pDataAreaExtras = nullptr );
296 void GetDataExtrasAt( SCROW nRow, ScDataAreaExtras& rDataAreaExtras ) const;
297 bool HasVisibleDataAt(SCROW nRow) const;
298 SCROW GetFirstDataPos() const;
299 SCROW GetLastDataPos() const;
300 SCROW GetLastDataPos( SCROW nLastRow, ScDataAreaExtras* pDataAreaExtras = nullptr ) const;
301 bool GetPrevDataPos(SCROW& rRow) const;
302 bool GetNextDataPos(SCROW& rRow) const;
303 bool TrimEmptyBlocks(SCROW& rRowStart, SCROW& rRowEnd) const;
304 void FindDataAreaPos(SCROW& rRow, bool bDown) const; // (without Broadcaster)
305 void FindUsed( SCROW nStartRow, SCROW nEndRow, mdds::flat_segment_tree<SCROW, bool>& rUsed ) const;
306
307 SCSIZE VisibleCount( SCROW nStartRow, SCROW nEndRow ) const;
308 sc::MatrixEdge GetBlockMatrixEdges(SCROW nRow1, SCROW nRow2, sc::MatrixEdge nMask, bool bNoMatrixAtAll ) const;
309 // Repeated calls to HasSelectionMatrixFragment() repeatedly call rMark.GetMarkedRanges(),
310 // which may be quite slow. For that reason first save the result of rMark.GetMarkedRanges()
311 // pass that to HasSelectionMatrixFragment() calls.
312 bool HasSelectionMatrixFragment(const ScMarkData& rMark, const ScRangeList& rRangeList) const;
313
314 bool GetFirstVisibleAttr( SCROW& rFirstRow ) const;
315 bool GetLastVisibleAttr( SCROW& rLastRow ) const;
316 bool HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const;
317 bool IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const;
318
319 bool TestInsertCol( SCROW nStartRow, SCROW nEndRow) const;
320 bool TestInsertRow( SCROW nStartRow, SCSIZE nSize ) const;
321 void InsertRow( SCROW nStartRow, SCSIZE nSize );
322 void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList& rRangeList ) const;
323
330 void DeleteRow( SCROW nStartRow, SCSIZE nSize, std::vector<ScAddress>* pGroupPos );
331
332 void DeleteArea(
333 SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag,
334 bool bBroadcast = true, sc::ColumnSpanSet* pBroadcastSpans = nullptr );
335
336 void DeleteRanges( const std::vector<sc::RowSpan>& rRanges, InsertDeleteFlags nDelFlag );
337
338 void CopyToClip(
339 sc::CopyToClipContext& rCxt, SCROW nRow1, SCROW nRow2, ScColumn& rColumn ) const;
340
342 SCROW nRow1, SCROW nRow2, const SvNumberFormatterMergeMap& rMap, ScColumn& rDestCol );
343
344 void CopyCellToDocument( SCROW nSrcRow, SCROW nDestRow, ScColumn& rDestCol );
346 void InitBlockPosition( sc::ColumnBlockConstPosition& rBlockPos ) const;
347
349 sc::CopyFromClipContext& rCxt, const ScColumn& rClipCol, sc::ColumnSpanSet& rBroadcastSpans );
350
351 void CopyOneCellFromClip( sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset );
352
353 void CopyFromClip(
354 sc::CopyFromClipContext& rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn& rColumn );
355
356 void RemoveEditAttribs( sc::ColumnBlockPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow );
357
358 // Selection (?) of this document
359 void MixMarked(
360 sc::MixDocContext& rCxt, const ScMarkData& rMark, ScPasteFunc nFunction,
361 bool bSkipEmpty, const ScColumn& rSrcCol );
362 void MixData(
363 sc::MixDocContext& rCxt, SCROW nRow1, SCROW nRow2, ScPasteFunc nFunction, bool bSkipEmpty,
364 const ScColumn& rSrcCol );
365
367 const ScRangeList& rRanges, ScFunctionData& rData, const ScFlatBoolRowSegments& rHiddenRows );
368
369 void CopyToColumn(
370 sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
371 ScColumn& rColumn, const ScMarkData* pMarkData = nullptr, bool bAsLink = false,
372 bool bGlobalNamesToLocal = false ) const;
373
374 void UndoToColumn(
375 sc::CopyToDocContext& rCxt, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nFlags, bool bMarked,
376 ScColumn& rColumn) const;
377
378 void CopyScenarioFrom( const ScColumn& rSrcCol );
379 void CopyScenarioTo( ScColumn& rDestCol ) const;
380 bool TestCopyScenarioTo( const ScColumn& rDestCol ) const;
381 void MarkScenarioIn( ScMarkData& rDestMark ) const;
382
383 void CopyUpdated( const ScColumn* pPosCol, ScColumn& rDestCol ) const;
384
385 void SwapCol(ScColumn& rCol);
386 void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn& rCol);
387
388 bool HasEditCells(SCROW nStartRow, SCROW nEndRow, SCROW& rFirst);
389
390 bool SetString(
391 SCROW nRow, SCTAB nTab, const OUString& rString, formula::FormulaGrammar::AddressConvention eConv,
392 const ScSetStringParam* pParam = nullptr );
393
394 void SetEditText( SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
395 void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, std::unique_ptr<EditTextObject> pEditText );
396 void SetEditText( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const EditTextObject& rEditText );
397 void SetEditText( SCROW nRow, const EditTextObject& rEditText, const SfxItemPool* pEditPool );
398 void SetFormula( SCROW nRow, const ScTokenArray& rArray, formula::FormulaGrammar::Grammar eGram );
399 void SetFormula( SCROW nRow, const OUString& rFormula, formula::FormulaGrammar::Grammar eGram );
400
408 SCROW nRow, ScFormulaCell* pCell,
410 bool bInheritNumFormatIfNeeded = true);
411 void SetFormulaCell(
412 sc::ColumnBlockPosition& rBlockPos, SCROW nRow, ScFormulaCell* pCell,
414 bool bInheritNumFormatIfNeeded = true);
415
416 bool SetFormulaCells( SCROW nRow, std::vector<ScFormulaCell*>& rCells );
417
418 bool HasFormulaCell() const;
419 bool HasFormulaCell( SCROW nRow1, SCROW nRow2 ) const;
420
421 void CloneFormulaCell(
422 sc::ColumnBlockPosition& rBlockPos,
423 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
424 const std::vector<sc::RowSpan>& rRanges );
425
426 void CloneFormulaCell(
427 const ScFormulaCell& rSrc, const sc::CellTextAttr& rAttr,
428 const std::vector<sc::RowSpan>& rRanges );
429
431
432 void SetRawString( SCROW nRow, const OUString& rStr );
433 void SetRawString( SCROW nRow, const svl::SharedString& rStr );
434 void SetRawString( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, const svl::SharedString& rStr, bool bBroadcast = true );
435 void SetValue( SCROW nRow, double fVal );
436 void SetValues( const SCROW nRow, const std::vector<double>& rVals );
437 void SetValue( sc::ColumnBlockPosition& rBlockPos, SCROW nRow, double fVal, bool bBroadcast = true );
438 void SetError( SCROW nRow, const FormulaError nError);
439
440 OUString GetString( SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const
441 { return GetString( GetCellValue( nRow ), nRow, pContext ); }
442 OUString GetString( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow,
443 const ScInterpreterContext* pContext = nullptr ) const
444 { return GetString( GetCellValue( rBlockPos, nRow ), nRow, pContext ); }
445 double* GetValueCell( SCROW nRow );
446 // Note that if pShared is set and a value is returned that way, the returned OUString is empty.
447 OUString GetInputString( SCROW nRow, bool bForceSystemLocale = false ) const
448 { return GetInputString( GetCellValue( nRow ), nRow, bForceSystemLocale ); }
450 bool bForceSystemLocale = false ) const
451 { return GetInputString( GetCellValue( rBlockPos, nRow ), nRow, bForceSystemLocale ); }
452 double GetValue( SCROW nRow ) const;
453 const EditTextObject* GetEditText( SCROW nRow ) const;
454 void RemoveEditTextCharAttribs( SCROW nRow, const ScPatternAttr& rAttr );
455 OUString GetFormula( SCROW nRow ) const;
456 const ScFormulaCell* GetFormulaCell( SCROW nRow ) const;
458 ScFormulaCell * const * GetFormulaCellBlockAddress( SCROW nRow, size_t& rBlockSize ) const;
459 CellType GetCellType( SCROW nRow ) const;
460 SCSIZE GetCellCount() const;
461 sal_uInt64 GetWeightedCount() const;
462 sal_uInt64 GetWeightedCount(SCROW nStartRow, SCROW nEndRow) const;
463 sal_uInt64 GetCodeCount() const; // RPN-Code in formulas
464 FormulaError GetErrCode( SCROW nRow ) const;
465
466 bool HasStringData( SCROW nRow ) const;
467 bool HasValueData( SCROW nRow ) const;
468 bool HasStringCells( SCROW nStartRow, SCROW nEndRow ) const;
469
471 SCROW nRow1, SCROW nRow2, SCROW* pRow1 ) const;
472
473 bool IsFormulaDirty( SCROW nRow ) const;
474
477 void SetDirtyFromClip( SCROW nRow1, SCROW nRow2, sc::ColumnSpanSet& rBroadcastSpans );
478 void SetDirty( SCROW nRow1, SCROW nRow2, BroadcastMode );
479 void SetDirtyVar();
480 void SetDirtyAfterLoad();
481 void SetTableOpDirty( const ScRange& );
482 void CalcAll();
483 void CalcAfterLoad( sc::CompileFormulaContext& rCxt, bool bStartListening );
485 void CompileXML( sc::CompileFormulaContext& rCxt, ScProgress& rProgress );
486
492 bool BroadcastBroadcasters( SCROW nRow1, SCROW nRow2, SfxHintId nHint );
493
495
496 void ResetChanged( SCROW nStartRow, SCROW nEndRow );
497
498 bool UpdateReferenceOnCopy( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc = nullptr );
499
507 bool UpdateReference( sc::RefUpdateContext& rCxt, ScDocument* pUndoDoc );
508
512 void UpdateMoveTab( sc::RefUpdateMoveTabContext& rCxt, SCTAB nTabNo );
513 void UpdateCompile( bool bForceIfNameInUse = false );
514 void UpdateTranspose( const ScRange& rSource, const ScAddress& rDest,
515 ScDocument* pUndoDoc );
516 void UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY );
517
518 void SetTabNo(SCTAB nNewTab);
519 void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames& rIndexes) const;
520
522 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
523
525 sc::StartListeningContext& rStartListenCxt, sc::CompileFormulaContext& rCompileCxt );
526
528 sc::EndListeningContext& rEndListenCxt, sc::CompileFormulaContext& rCompileCxt );
529
533
534 void MergeSelectionPattern( ScMergePatternState& rState, const ScMarkData& rMark, bool bDeep ) const;
535 void MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
536 ScLineFlags& rFlags,
537 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const;
538 void ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
539 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight);
540
541 void ApplyAttr( SCROW nRow, const SfxPoolItem& rAttr );
542 void ApplyPattern( SCROW nRow, const ScPatternAttr& rPatAttr );
543 const ScPatternAttr* SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> );
544 void SetPattern( SCROW nRow, const ScPatternAttr& );
545 void SetPatternArea( SCROW nStartRow, SCROW nEndRow, const ScPatternAttr& );
547 const ScPatternAttr& rPattern, SvNumFormatType nNewType );
548
549 void ApplyStyle( SCROW nRow, const ScStyleSheet* rStyle );
550 void ApplySelectionStyle(const ScStyleSheet& rStyle, const ScMarkData& rMark);
551 void ApplySelectionLineStyle( const ScMarkData& rMark,
552 const ::editeng::SvxBorderLine* pLine, bool bColorOnly );
553 void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
554 void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex );
555
556 const ScStyleSheet* GetSelectionStyle( const ScMarkData& rMark, bool& rFound ) const;
557 const ScStyleSheet* GetAreaStyle( bool& rFound, SCROW nRow1, SCROW nRow2 ) const;
558
559 void FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset );
560 bool IsStyleSheetUsed( const ScStyleSheet& rStyle ) const;
561
564 SCROW nRow, const ScStyleSheet* pSearchStyle, bool bUp, bool bInSelection,
565 const ScMarkData& rMark) const;
566
567 bool SearchStyleRange(
568 SCROW& rRow, SCROW& rEndRow, const ScStyleSheet* pSearchStyle, bool bUp,
569 bool bInSelection, const ScMarkData& rMark) const;
570
571 bool ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
572 bool RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags );
573 void ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich );
574
575 void RemoveProtected( SCROW nStartRow, SCROW nEndRow );
576
577 SCROW ApplySelectionCache( SfxItemPoolCache* pCache, const ScMarkData& rMark, ScEditDataArray* pDataArray, bool* const pIsChanged );
578 void DeleteSelection( InsertDeleteFlags nDelFlag, const ScMarkData& rMark, bool bBroadcast );
579
580 void ClearSelectionItems( const sal_uInt16* pWhich, const ScMarkData& rMark );
581 void ChangeSelectionIndent( bool bIncrement, const ScMarkData& rMark );
582
584 SCROW nRow, OutputDevice* pDev, double nPPTX, double nPPTY,
585 const Fraction& rZoomX, const Fraction& rZoomY,
586 bool bWidth, const ScNeededSizeOptions& rOptions, const ScPatternAttr** pPatternChange,
587 bool bInPrintTwips = false ) const;
588
589 sal_uInt16 GetOptimalColWidth(
590 OutputDevice* pDev, double nPPTX, double nPPTY,
591 const Fraction& rZoomX, const Fraction& rZoomY,
592 bool bFormula, sal_uInt16 nOldWidth, const ScMarkData* pMarkData, const ScColWidthParam* pParam) const;
593
594 void GetOptimalHeight(
595 sc::RowHeightContext& rCxt, SCROW nStartRow, SCROW nEndRow, sal_uInt16 nMinHeight, SCROW nMinStart );
596
597 void GetFilterEntries(
598 sc::ColumnBlockConstPosition& rBlockPos, SCROW nStartRow, SCROW nEndRow,
599 ScFilterEntries& rFilterEntries, bool bFiltering, bool bFilteredRow );
600
601 bool GetDataEntries( SCROW nRow, std::set<ScTypedStrData>& rStrings) const;
602
603 void UpdateInsertTabAbs(SCTAB nNewPos);
604 bool TestTabRefAbs(SCTAB nTable) const;
605 bool GetNextSpellingCell(SCROW& nRow, bool bInSel, const ScMarkData& rData) const;
606
608 sc::StartListeningContext& rStartCxt, sc::EndListeningContext& rEndCxt, SCROW nRow1, SCROW nRow2 );
609
611 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2,
612 SCROW* pStartRow, SCROW* pEndRow );
613
614 void StartListening( SvtListener& rLst, SCROW nRow );
615 void EndListening( SvtListener& rLst, SCROW nRow );
616 void StartListening( sc::StartListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
617 void EndListening( sc::EndListeningContext& rCxt, const ScAddress& rAddress, SvtListener& rListener );
618 void StartListeners( sc::StartListeningContext& rCxt, bool bAll );
619 void SetDirtyIfPostponed();
621 void CollectListeners( std::vector<SvtListener*>& rListeners, SCROW nRow1, SCROW nRow2 );
622 void CollectFormulaCells( std::vector<ScFormulaCell*>& rCells, SCROW nRow1, SCROW nRow2 );
623
626
627 sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const;
628 sal_Int32 GetMaxNumberStringLen( sal_uInt16& nPrecision,
629 SCROW nRowStart, SCROW nRowEnd ) const;
630
631 sal_uInt16 GetTextWidth(SCROW nRow) const;
632 void SetTextWidth(SCROW nRow, sal_uInt16 nWidth);
633
634 SvtScriptType GetScriptType( SCROW nRow ) const;
635
640 SvtScriptType GetRangeScriptType( sc::CellTextAttrStoreType::iterator& itPos, SCROW nRow1, SCROW nRow2,
641 const sc::CellStoreType::iterator& itr);
642
644 void UpdateScriptTypes( SCROW nRow1, SCROW nRow2 );
645
647 bool ResolveStaticReference( ScMatrix& rMat, SCCOL nMatCol, SCROW nRow1, SCROW nRow2 );
648 void FillMatrix( ScMatrix& rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool* pPool ) const;
650 bool HandleRefArrayForParallelism( SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef& mxGroup );
651#ifdef DBG_UTIL
652 void AssertNoInterpretNeeded( SCROW nRow1, SCROW nRow2 );
653#endif
654 void SetFormulaResults( SCROW nRow, const double* pResults, size_t nLen );
655
656 void CalculateInThread( ScInterpreterContext& rContext, SCROW nRow, size_t nLen, size_t nOffset,
657 unsigned nThisThread, unsigned nThreadsTotal );
658 void HandleStuffAfterParallelCalculation( SCROW nRow, size_t nLen, ScInterpreter* pInterpreter );
659
660 void SetNumberFormat( SCROW nRow, sal_uInt32 nNumberFormat );
661
663 const SvtBroadcaster* GetBroadcaster( SCROW nRow ) const;
664
665 void DeleteBroadcasters( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2 );
668
669 void Broadcast( SCROW nRow );
670 void BroadcastCells( const std::vector<SCROW>& rRows, SfxHintId nHint );
671 void BroadcastRows( SCROW nStartRow, SCROW nEndRow, SfxHintId nHint );
672
673 // Spaklines
675 void CreateSparklineCell(SCROW nRow, std::shared_ptr<sc::Sparkline> const& pSparkline);
676 void DeleteSparklineCells(sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2);
677 bool DeleteSparkline(SCROW nRow);
678 bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
679 void CopyCellSparklinesToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, SCROW nRowOffsetDest = 0) const;
680 void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
681 sc::ColumnBlockPosition& rDestBlockPos, SCROW nRowOffsetDest = 0) const;
682 bool HasSparklines() const;
685
686 // cell notes
687 ScPostIt* GetCellNote( SCROW nRow );
688 const ScPostIt* GetCellNote( SCROW nRow ) const;
690 const ScPostIt* GetCellNote( sc::ColumnBlockConstPosition& rBlockPos, SCROW nRow ) const;
691 void DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
692 bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const;
693 bool HasCellNotes() const;
694 void SetCellNote( SCROW nRow, std::unique_ptr<ScPostIt> pNote);
695 bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
696
697 std::unique_ptr<ScPostIt> ReleaseNote( SCROW nRow );
698 size_t GetNoteCount() const;
700 void ForgetNoteCaptions( SCROW nRow1, SCROW nRow2, bool bPreserveData );
701 SCROW GetNotePosition( size_t nIndex ) const;
702 void GetAllNoteEntries( std::vector<sc::NoteEntry>& rNotes ) const;
703 void GetNotesInRange( SCROW nStartRow, SCROW nEndRow, std::vector<sc::NoteEntry>& rNotes ) const;
704
707
709 SCROW nRow1, SCROW nRow2, ScColumn& rDestCol, bool bCloneCaption = true,
710 SCROW nRowOffsetDest = 0) const;
711
712 void DuplicateNotes(SCROW nStartRow, size_t nDataSize, ScColumn& rDestCol,
713 sc::ColumnBlockPosition& rDestBlockPos, bool bCloneCaption, SCROW nRowOffsetDest = 0) const;
714
715 void UpdateNoteCaptions( SCROW nRow1, SCROW nRow2 );
716
717 void UpdateDrawObjects( std::vector<std::vector<SdrObject*>>& pObjects, SCROW nRowStart, SCROW nRowEnd );
718 void UpdateDrawObjectsForRow( std::vector<SdrObject*>& pObjects, SCCOL nTargetCol, SCROW nTargetRow );
719 bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const;
720
721 void InterpretDirtyCells( SCROW nRow1, SCROW nRow2 );
722 bool InterpretCellsIfNeeded( SCROW nRow1, SCROW nRow2 );
723
724 static void JoinNewFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell );
725
734 void DetachFormulaCell( const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
735 std::vector<SCROW>& rNewSharedRows );
736
738 void StartListeningUnshared( const std::vector<SCROW>& rNewSharedRows );
739
740 void DetachFormulaCells( const sc::CellStoreType::position_type& aPos, size_t nLength,
741 std::vector<SCROW>* pNewSharedRows );
742
743 void AttachFormulaCells( sc::StartListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
744 void DetachFormulaCells( sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2 );
745
749 void RegroupFormulaCells( std::vector<ScAddress>* pGroupPos = nullptr );
750
766 void ResetFormulaCellPositions( SCROW nRow1, SCROW nRow2, bool bUpdateRefs );
767
768 void SplitFormulaGroupByRelativeRef( const ScRange& rBoundRange );
769
770 void TransferCellValuesTo( SCROW nRow, size_t nLen, sc::CellValues& rDest );
771 void CopyCellValuesFrom( SCROW nRow, const sc::CellValues& rSrc );
773 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, sc::TableValues* pUndo );
774
775 void SwapNonEmpty(
777
778 std::optional<sc::ColumnIterator> GetColumnIterator( SCROW nRow1, SCROW nRow2 ) const;
779
780 bool EnsureFormulaCellResults( SCROW nRow1, SCROW nRow2, bool bSkipRunning = false );
781
782 void StoreToCache(SvStream& rStrm) const;
783 void RestoreFromCache(SvStream& rStrm);
784
785#if DUMP_COLUMN_STORAGE
786 void DumpColumnStorage() const;
787#endif
788
789 SCSIZE GetPatternCount() const;
790 SCSIZE GetPatternCount( SCROW nRow1, SCROW nRow2 ) const;
791 bool ReservePatternCount( SCSIZE nReserve );
792
793 void CheckIntegrity() const;
794
795private:
796
797 sc::CellStoreType::iterator GetPositionToInsert( SCROW nRow, std::vector<SCROW>& rNewSharedRows,
798 bool bInsertFormula );
799 sc::CellStoreType::iterator GetPositionToInsert( const sc::CellStoreType::iterator& it, SCROW nRow,
800 std::vector<SCROW>& rNewSharedRows, bool bInsertFormula );
801
803 const sc::CellStoreType::iterator& itPos, SCROW nRow, ScFormulaCell& rCell,
804 const std::vector<SCROW>& rNewSharedRows,
805 bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
806
808 const sc::CellStoreType::position_type& aPos, ScFormulaCell& rCell,
809 const std::vector<SCROW>& rNewSharedRows,
810 bool bJoin = true, sc::StartListeningType eListenType = sc::SingleCellListening );
811
812public:
813 void AttachNewFormulaCells(const sc::CellStoreType::position_type& aPos, size_t nLength,
814 std::vector<SCROW>& rNewSharedRows);
815
816private:
817 void BroadcastNewCell( SCROW nRow );
818 bool UpdateScriptType( sc::CellTextAttr& rAttr, SCROW nRow, sc::CellStoreType::iterator& itr );
819
820 const ScFormulaCell* FetchFormulaCell( SCROW nRow ) const;
821
823 sc::CellStoreType::const_iterator& itPos, SCROW nRow, bool bForward) const;
824 SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const;
825
826 OUString GetString( const ScRefCellValue& cell, SCROW nRow, const ScInterpreterContext* pContext = nullptr ) const;
827 OUString GetInputString( const ScRefCellValue& cell, SCROW nRow, bool bForceSystemLocale = false ) const;
828
835 void CellStorageModified();
836 void CellNotesDeleting(SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership );
837
838 void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn& rDestCol) const;
839
841 {
845 std::vector<std::pair<SCROW, SCROW>> aFormulaRanges;
846
847 DeleteCellsResult( const ScDocument& rDoc );
849 };
850
851 std::unique_ptr<DeleteCellsResult> DeleteCells(
852 sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag );
853
858 std::vector<sc::FormulaGroupEntry> GetFormulaGroupEntries();
859
861 sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos );
862
864 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos );
865
867 void SetNeedsListeningGroup( SCROW nRow );
868
870};
871
872inline bool ScColumn::IsEmptyAttr() const
873{
874 return pAttrArray->IsEmpty();
875}
876
877inline bool ScColumnData::IsAllAttrEqual( const ScColumnData& rCol, SCROW nStartRow, SCROW nEndRow ) const
878{
879 return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow );
880}
881
882inline bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
883{
884 return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow );
885}
886
887inline bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
888{
889 return pAttrArray->GetFirstVisibleAttr( rFirstRow );
890}
891
892inline bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const
893{
894 // row of last cell is needed
895 SCROW nLastData = GetLastDataPos(); // always including notes, 0 if none
896 return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData );
897}
898
899inline bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
900{
901 return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow );
902}
903
905{
906 return pAttrArray->Count();
907}
908
909inline SCSIZE ScColumn::GetPatternCount( SCROW nRow1, SCROW nRow2 ) const
910{
911 return pAttrArray->Count( nRow1, nRow2 );
912}
913
915{
916 return pAttrArray && pAttrArray->Reserve( nReserve );
917}
918
919inline bool ScColumn::IsMerged( SCROW nRow ) const
920{
921 return pAttrArray->IsMerged(nRow);
922}
923
924inline SCROW ScColumnData::GetNextUnprotected( SCROW nRow, bool bUp ) const
925{
926 return pAttrArray->GetNextUnprotected(nRow, bUp);
927}
928
929inline bool ScColumnData::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) const
930{
931 return pAttrArray->HasAttrib( nRow1, nRow2, nMask );
932}
933
934inline bool ScColumnData::HasAttrib( SCROW nRow, HasAttrFlags nMask, SCROW* nStartRow, SCROW* nEndRow ) const
935{
936 return pAttrArray->HasAttrib( nRow, nMask, nStartRow, nEndRow );
937}
938
939inline bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
940 SCCOL& rPaintCol, SCROW& rPaintRow,
941 bool bRefresh )
942{
943 return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh );
944}
945
946inline void ScColumnData::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, bool bDeep ) const
947{
948 pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep );
949}
950
951inline void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
952 ScLineFlags& rFlags,
953 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const
954{
955 pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
956}
957
958inline void ScColumn::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
959 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
960{
961 pAttrArray->ApplyBlockFrame(rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight);
962}
963
965{
966 return pAttrArray->GetPattern( nRow );
967}
968
969inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
970{
971 return pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich);
972}
973
974inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
975{
976 return pAttrArray->GetPatternRange( nStartRow, nEndRow, nRow )->GetItemSet().Get(nWhich);
977}
978
979inline sal_uInt32 ScColumnData::GetNumberFormat( const ScInterpreterContext& rContext, SCROW nRow ) const
980{
981 return pAttrArray->GetPattern( nRow )->GetNumberFormat( rContext.GetFormatTable() );
982}
983
984inline void ScColumn::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
985{
986 pAttrArray->AddCondFormat( nStartRow, nEndRow, nIndex );
987}
988
989inline void ScColumn::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
990{
991 pAttrArray->RemoveCondFormat( nStartRow, nEndRow, nIndex );
992}
993
994inline void ScColumnData::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle )
995{
996 pAttrArray->ApplyStyleArea(nStartRow, nEndRow, rStyle);
997}
998
999inline const ScStyleSheet* ScColumnData::GetStyle( SCROW nRow ) const
1000{
1001 return pAttrArray->GetPattern( nRow )->GetStyleSheet();
1002}
1003
1004inline void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset )
1005{
1006 pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset );
1007}
1008
1009inline bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
1010{
1011 return pAttrArray->IsStyleSheetUsed( rStyle );
1012}
1013
1014inline bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1015{
1016 return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
1017}
1018
1019inline bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1020{
1021 return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
1022}
1023
1024inline void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
1025{
1026 pAttrArray->ClearItems( nStartRow, nEndRow, pWhich );
1027}
1028
1029inline const ScPatternAttr* ScColumn::SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> pPatAttr )
1030{
1031 return pAttrArray->SetPattern( nRow, std::move(pPatAttr), true/*bPutToPool*/ );
1032}
1033
1034inline void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
1035{
1036 pAttrArray->SetPattern( nRow, &rPatAttr, true/*bPutToPool*/ );
1037}
1038
1039inline void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
1040 const ScPatternAttr& rPatAttr )
1041{
1042 pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ );
1043}
1044
1045inline void ScColumnData::SetAttrEntries(std::vector<ScAttrEntry> && vNewData)
1046{
1047 pAttrArray->SetAttrEntries( std::move( vNewData ));
1048}
1049
1050inline bool ScColumnData::TestInsertRow( SCSIZE nSize ) const
1051{
1052 return pAttrArray->TestInsertRow( nSize );
1053}
1054
1055inline void ScColumnData::InsertRow( SCROW nStartRow, SCSIZE nSize )
1056{
1057 pAttrArray->InsertRow( nStartRow, nSize );
1058}
1059
1060/* 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:994
const ScPatternAttr * GetPattern(SCROW nRow) const
Definition: column.hxx:964
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
Definition: column.hxx:969
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
ScColumnData()=default
void SetAttrEntries(std::vector< ScAttrEntry > &&vNewData)
Definition: column.hxx:1045
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
Definition: column.hxx:929
const ScAttrArray & AttrArray() const
Definition: column.hxx:130
bool IsAllAttrEqual(const ScColumnData &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:877
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:1050
void InitAttrArray(ScAttrArray *attrArray)
Definition: column.hxx:125
void MergePatternArea(ScMergePatternState &rState, SCROW nRow1, SCROW nRow2, bool bDeep) const
Definition: column.hxx:946
void InsertRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.hxx:1055
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:924
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:999
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:979
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:2250
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:1979
void UpdateNoteCaptions(SCROW nRow1, SCROW nRow2)
Definition: column.cxx:1824
void CreateSparklineCell(SCROW nRow, std::shared_ptr< sc::Sparkline > const &pSparkline)
Definition: column2.cxx:2051
SCROW GetFirstDataPos() const
Definition: column2.cxx:1395
void CollectFormulaCells(std::vector< ScFormulaCell * > &rCells, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1395
SCTAB GetTab() const
Definition: column.hxx:254
svl::SharedString GetSharedString(SCROW nRow) const
Definition: column3.cxx:2536
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1014
void CellStorageModified()
Called whenever the state of cell array gets modified i.e.
Definition: column2.cxx:1670
bool HasStringData(SCROW nRow) const
Definition: column3.cxx:3276
void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol) const
Definition: column2.cxx:1843
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:882
void FindStyleSheet(const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
Definition: column.hxx:1004
SCROW GetNotePosition(size_t nIndex) const
Definition: column4.cxx:797
void ApplyPattern(SCROW nRow, const ScPatternAttr &rPatAttr)
Definition: column.cxx:467
void ClearItems(SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
Definition: column.hxx:1024
void UpdateSelectionFunction(const ScRangeList &rRanges, ScFunctionData &rData, const ScFlatBoolRowSegments &rHiddenRows)
Definition: column2.cxx:3645
FormulaError GetErrCode(SCROW nRow) const
Definition: column3.cxx:3262
SCCOL nCol
Definition: column.hxx:203
bool IsEmptyAttr() const
Definition: column.hxx:872
bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const
Definition: column4.cxx:883
void PreprocessDBDataUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1098
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1336
void SetValue(SCROW nRow, double fVal)
Definition: column3.cxx:3079
sc::CellTextAttrStoreType maCellTextAttrs
Definition: column.hxx:187
void SetFormula(SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
Definition: column3.cxx:2421
bool HasValueData(SCROW nRow) const
Definition: column3.cxx:3296
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:862
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:713
bool HasFormulaCell() const
Definition: column4.cxx:1404
void EndListeningGroup(sc::EndListeningContext &rCxt, SCROW nRow)
Definition: column4.cxx:1718
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:1962
SCTAB nTab
Definition: column.hxx:204
void SplitFormulaGroupByRelativeRef(const ScRange &rBoundRange)
Definition: column4.cxx:1335
void SetDirty(SCROW nRow1, SCROW nRow2, BroadcastMode)
Definition: column.cxx:3199
void PreprocessRangeNameUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1084
bool HasVisibleDataAt(SCROW nRow) const
Definition: column2.cxx:1308
void CheckVectorizationState()
Definition: column.cxx:3140
bool mbEmptyBroadcastersPending
Definition: column.hxx:206
OUString GetString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:442
void TransferCellValuesTo(SCROW nRow, size_t nLen, sc::CellValues &rDest)
Definition: column4.cxx:434
void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList &rRangeList) const
Definition: column4.cxx:915
void RegroupFormulaCells(std::vector< ScAddress > *pGroupPos=nullptr)
Regroup formula cells for the entire column.
Definition: column3.cxx:3711
void SetError(SCROW nRow, const FormulaError nError)
Definition: column3.cxx:3012
SCROW FindNextVisibleRowWithContent(sc::CellStoreType::const_iterator &itPos, SCROW nRow, bool bForward) const
Definition: column2.cxx:1606
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:641
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:1386
ScPostIt * GetCellNote(SCROW nRow)
Definition: column2.cxx:2184
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
Definition: column.hxx:958
void BroadcastCells(const std::vector< SCROW > &rRows, SfxHintId nHint)
Definition: column3.cxx:80
void CheckIntegrity() const
Definition: column4.cxx:2212
bool TestTabRefAbs(SCTAB nTable) const
Definition: column2.cxx:1267
void DeleteRanges(const std::vector< sc::RowSpan > &rRanges, InsertDeleteFlags nDelFlag)
Definition: column4.cxx:635
void RestoreFromCache(SvStream &rStrm)
Definition: column4.cxx:2124
OUString GetInputString(sc::ColumnBlockConstPosition &rBlockPos, SCROW nRow, bool bForceSystemLocale=false) const
Definition: column.hxx:449
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:3571
void BroadcastRecalcOnRefMove()
Definition: column.cxx:3285
bool ExtendMerge(SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
Definition: column.hxx:939
SCROW GetSparklinesMinRow() const
Definition: column2.cxx:2169
bool SetFormulaCells(SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Definition: column3.cxx:2495
void InterpretDirtyCells(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:185
bool GetLastVisibleAttr(SCROW &rLastRow) const
Definition: column.hxx:892
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:1301
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:535
void DumpColumnStorage() const
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
Definition: column.hxx:951
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:1039
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCROW nRowStart, SCROW nRowEnd) const
Definition: column3.cxx:3573
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:381
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:2134
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:2311
OUString GetFormula(SCROW nRow) const
Definition: column3.cxx:3195
void RemoveProtected(SCROW nStartRow, SCROW nEndRow)
Definition: column3.cxx:2986
void FreeNotes()
Definition: column3.cxx:254
BroadcastMode
Broadcast mode for SetDirty(SCROW,SCROW,BroadcastMode).
Definition: column.hxx:242
@ BROADCAST_DATA_POSITIONS
broadcast existing cells with position => does AreaBroadcast
Definition: column.hxx:244
@ BROADCAST_BROADCASTERS
broadcast only existing cell broadcasters => no AreaBroadcast of range!
Definition: column.hxx:245
@ BROADCAST_NONE
no broadcasting
Definition: column.hxx:243
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:2144
std::unique_ptr< DeleteCellsResult > DeleteCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag)
Definition: column3.cxx:1074
void GetFilterEntries(sc::ColumnBlockConstPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow, ScFilterEntries &rFilterEntries, bool bFiltering, bool bFilteredRow)
Definition: column3.cxx:2748
void RemoveEditAttribs(sc::ColumnBlockPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow)
Definition: column2.cxx:1257
bool HasStringCells(SCROW nStartRow, SCROW nEndRow) const
Return true if there is a string or editcell in the range.
Definition: column3.cxx:3318
sc::CellNoteStoreType maCellNotes
Definition: column.hxx:190
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:1778
void EndListeningFormulaCells(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, SCROW *pStartRow, SCROW *pEndRow)
Definition: column4.cxx:1622
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:682
SvtScriptType GetScriptType(SCROW nRow) const
Definition: column2.cxx:2303
void EndListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3482
const ScFormulaCell * GetFormulaCell(SCROW nRow) const
Definition: column3.cxx:3203
void FindDataAreaPos(SCROW &rRow, bool bDown) const
Definition: column2.cxx:3318
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:597
void DeleteRow(SCROW nStartRow, SCSIZE nSize, std::vector< ScAddress > *pGroupPos)
Definition: column3.cxx:274
void RemoveCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:989
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:1301
const EditTextObject * GetEditText(SCROW nRow) const
Definition: column3.cxx:3168
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:1536
void StoreToCache(SvStream &rStrm) const
Definition: column4.cxx:2114
void FreeAll()
Definition: column3.cxx:237
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:2243
SCCOL GetCol() const
Definition: column.hxx:255
bool InterpretCellsIfNeeded(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:194
void CalcAfterLoad(sc::CompileFormulaContext &rCxt, bool bStartListening)
Definition: column.cxx:3319
void SetNumberFormat(SCROW nRow, sal_uInt32 nNumberFormat)
Definition: column2.cxx:3279
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:3168
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:3412
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:890
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:3774
void MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn &rCol)
Definition: column.cxx:1897
sc::SparklineStoreType & GetSparklineStore()
Definition: column.hxx:262
void SetFormulaResults(SCROW nRow, const double *pResults, size_t nLen)
Definition: column2.cxx:3175
void GetDataExtrasAt(SCROW nRow, ScDataAreaExtras &rDataAreaExtras) const
Definition: column2.cxx:3400
void CompileDBFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3564
std::unique_ptr< ScPostIt > ReleaseNote(SCROW nRow)
Definition: column4.cxx:729
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, SCROW nRow, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1639
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:226
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:2258
bool IsEmptyData() const
Definition: column2.cxx:1274
void CompileAll(sc::CompileFormulaContext &rCxt)
Definition: column.cxx:3299
size_t mnBlkCountFormula
Definition: column.hxx:201
void EndListeningIntersectedGroups(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1673
void Swap(ScColumn &rOther, SCROW nRow1, SCROW nRow2, bool bPattern)
Definition: column4.cxx:1222
const sc::CellTextAttrStoreType & GetCellAttrStore() const
Definition: column.hxx:259
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:826
void UpdateScriptTypes(SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1211
void SetNeedsListeningGroup(SCROW nRow)
Definition: column4.cxx:1748
SCROW GetCellNotesMaxRow() const
Definition: column2.cxx:2265
OUString GetInputString(SCROW nRow, bool bForceSystemLocale=false) const
Definition: column.hxx:447
void SetTabNo(SCTAB nNewTab)
Definition: column.cxx:3104
bool HasSparklines() const
Definition: column2.cxx:2151
void CompileHybridFormula(sc::StartListeningContext &rStartListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1113
bool GetDataEntries(SCROW nRow, std::set< ScTypedStrData > &rStrings) const
Definition: column3.cxx:2883
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:1582
void CalculateInThread(ScInterpreterContext &rContext, SCROW nRow, size_t nLen, size_t nOffset, unsigned nThisThread, unsigned nThreadsTotal)
Definition: column2.cxx:3211
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:257
const ScPatternAttr * SetPattern(SCROW nRow, std::unique_ptr< ScPatternAttr >)
Definition: column.hxx:1029
void ApplyStyle(SCROW nRow, const ScStyleSheet *rStyle)
Definition: column.cxx:516
bool GetNextDataPos(SCROW &rRow) const
Definition: column2.cxx:1490
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:196
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:492
formula::VectorRefArray FetchVectorRefArray(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2952
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:404
bool UpdateScriptType(sc::CellTextAttr &rAttr, SCROW nRow, sc::CellStoreType::iterator &itr)
Definition: column3.cxx:839
void MarkScenarioIn(ScMarkData &rDestMark) const
Definition: column.cxx:1770
const sc::CellNoteStoreType & GetCellNoteStore() const
Definition: column.hxx:261
void AddCondFormat(SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex)
Definition: column.hxx:984
bool GetFirstVisibleAttr(SCROW &rFirstRow) const
Definition: column.hxx:887
void CollectBroadcasterState(sc::BroadcasterState &rState) const
Definition: column4.cxx:2237
bool DeleteSparkline(SCROW nRow)
Definition: column2.cxx:2066
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:3255
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:1940
void FillMatrix(ScMatrix &rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool *pPool) const
Definition: column2.cxx:2681
void StartListeningUnshared(const std::vector< SCROW > &rNewSharedRows)
Re-establish listeners on unshared formula groups.
Definition: column3.cxx:434
bool IsDrawObjectsEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:1857
void SetCellNote(SCROW nRow, std::unique_ptr< ScPostIt > pNote)
Definition: column2.cxx:2210
const sc::SparklineStoreType & GetSparklineStore() const
Definition: column.hxx:263
bool GetNextSpellingCell(SCROW &nRow, bool bInSel, const ScMarkData &rData) const
Definition: column2.cxx:1094
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:784
sal_uInt64 GetCodeCount() const
Definition: column2.cxx:3806
bool IsMerged(SCROW nRow) const
Definition: column.hxx:919
void CreateAllNoteCaptions()
Definition: column4.cxx:778
void CalcAll()
Definition: column.cxx:3293
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1611
void PrepareBroadcastersForDestruction()
Definition: column2.cxx:1985
void BroadcastRows(SCROW nStartRow, SCROW nEndRow, SfxHintId nHint)
Definition: column3.cxx:95
void CopyCellValuesFrom(SCROW nRow, const sc::CellValues &rSrc)
Definition: column4.cxx:459
void Broadcast(SCROW nRow)
Definition: column3.cxx:74
sc::CellTextAttrStoreType & GetCellAttrStore()
Definition: column.hxx:258
sc::CellNoteStoreType & GetCellNoteStore()
Definition: column.hxx:260
SCROW GetCellNotesMinRow() const
Definition: column2.cxx:2276
double * GetValueCell(SCROW nRow)
Definition: column3.cxx:3128
void DeleteEmptyBroadcasters()
Definition: column2.cxx:2011
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: column.hxx:1009
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:3440
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
Definition: column.cxx:421
void DeleteSparklineCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2058
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:1444
void DeleteContent(SCROW nRow, bool bBroadcast=true)
Definition: column3.cxx:204
sc::CellStoreType & GetCellStore()
Definition: column.hxx:256
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:899
void GetNotesInRange(SCROW nStartRow, SCROW nEndRow, std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:867
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:1019
void DeleteArea(SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: column3.cxx:1100
sc::SparklineCell * GetSparklineCell(SCROW nRow)
Definition: column2.cxx:2046
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:3147
size_t GetNoteCount() const
Definition: column4.cxx:739
bool HandleRefArrayForParallelism(SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef &mxGroup)
Definition: column4.cxx:2011
formula::FormulaTokenRef ResolveStaticReference(SCROW nRow)
Definition: column2.cxx:2396
static void JoinNewFormulaCell(const sc::CellStoreType::position_type &aPos, ScFormulaCell &rCell)
Definition: column3.cxx:361
void duplicateSparkline(sc::CopyFromClipContext &rContext, sc::ColumnBlockPosition *pBlockPos, size_t nColOffset, size_t nDestSize, ScAddress aDestPosition)
Definition: column4.cxx:375
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:193
OUString GetString(SCROW nRow, const ScInterpreterContext *pContext=nullptr) const
Definition: column.hxx:440
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:3030
bool ReservePatternCount(SCSIZE nReserve)
Definition: column.hxx:914
void RemoveEditTextCharAttribs(SCROW nRow, const ScPatternAttr &rAttr)
Definition: column3.cxx:3181
SCROW GetLastDataPos() const
Definition: column2.cxx:1407
CellType GetCellType(SCROW nRow) const
Definition: column3.cxx:3213
void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames &rIndexes) const
Definition: column.cxx:3113
const ScFormulaCell * FetchFormulaCell(SCROW nRow) const
Definition: column2.cxx:3311
ScColumn(ScSheetLimits const &)
Definition: column.cxx:82
void SetScriptType(SCROW nRow, SvtScriptType nType)
Definition: column2.cxx:2382
SCROW GetSparklinesMaxRow() const
Definition: column2.cxx:2158
ScDocument & GetDoc() const
Definition: column.hxx:127
void HandleStuffAfterParallelCalculation(SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
Definition: column2.cxx:3250
ScFormulaCell *const * GetFormulaCellBlockAddress(SCROW nRow, size_t &rBlockSize) const
Definition: column2.cxx:3284
SvtBroadcaster * GetBroadcaster(SCROW nRow)
Definition: column2.cxx:1969
sc::SparklineStoreType maSparklines
Definition: column.hxx:199
void AttachFormulaCells(sc::StartListeningContext &rCxt, SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:557
bool HasDataAt(SCROW nRow, ScDataAreaExtras *pDataAreaExtras=nullptr) const
Definition: column2.cxx:3366
bool EnsureFormulaCellResults(SCROW nRow1, SCROW nRow2, bool bSkipRunning=false)
Definition: column4.cxx:1998
void SetDirtyAfterLoad()
Definition: column.cxx:3250
sc::CellStoreType::iterator GetPositionToInsert(SCROW nRow, std::vector< SCROW > &rNewSharedRows, bool bInsertFormula)
Definition: column3.cxx:355
SCSIZE GetPatternCount() const
Definition: column.hxx:904
void SetTextWidth(SCROW nRow, sal_uInt16 nWidth)
Definition: column2.cxx:2292
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:757
bool IsSparklinesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:2078
void StartListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3476
sal_uInt16 GetTextWidth(SCROW nRow) const
Definition: column2.cxx:2287
SCSIZE GetEmptyLinesInBlock(SCROW nStartRow, SCROW nEndRow, ScDirection eDir) const
Definition: column2.cxx:1353
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:271
ScPasteFunc
Definition: global.hxx:180
InsertDeleteFlags
Definition: global.hxx:149
HasAttrFlags
Definition: global.hxx:184
ScDirection
Definition: global.hxx:342
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:845
DeleteCellsResult(const ScDocument &rDoc)
Definition: column3.cxx:1069
sc::SingleColumnSpanSet aDeletedRows
cell ranges that have been deleted.
Definition: column.hxx:843
DeleteCellsResult(const DeleteCellsResult &)=delete
Struct to hold non-data extended area, used with ScDocument::ShrinkToUsedDataArea().
Definition: sortparam.hxx:44
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