LibreOffice Module sc (master) 1
column.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include "global.hxx"
23#include "address.hxx"
24#include "cellvalue.hxx"
25#include "rangelst.hxx"
26#include "types.hxx"
27#include "mtvelements.hxx"
28#include <formula/types.hxx>
29#include <svl/zforlist.hxx>
30#include <svx/svdobj.hxx>
31#include "attarray.hxx"
32
33#include <optional>
34#include <set>
35#include <vector>
36
37#include <mdds/flat_segment_tree.hpp>
38
39namespace editeng { class SvxBorderLine; }
40namespace formula { struct VectorRefArray; }
41
42namespace sc {
43
44struct FormulaGroupEntry;
45class StartListeningContext;
46class EndListeningContext;
47class CopyFromClipContext;
48class CopyToClipContext;
49class CopyToDocContext;
50class MixDocContext;
51class ColumnSpanSet;
52class SingleColumnSpanSet;
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
840 void DeleteCells(
841 sc::ColumnBlockPosition& rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag,
842 sc::SingleColumnSpanSet& rDeleted );
843
848 std::vector<sc::FormulaGroupEntry> GetFormulaGroupEntries();
849
851 sc::EndListeningContext& rCxt, SCROW nRow, std::vector<ScAddress>* pGroupPos );
852
854 sc::EndListeningContext& rCxt, SCROW nRow1, SCROW nRow2, std::vector<ScAddress>* pGroupPos );
855
857 void SetNeedsListeningGroup( SCROW nRow );
858};
859
860inline bool ScColumn::IsEmptyAttr() const
861{
862 return pAttrArray->IsEmpty();
863}
864
865inline bool ScColumnData::IsAllAttrEqual( const ScColumnData& rCol, SCROW nStartRow, SCROW nEndRow ) const
866{
867 return pAttrArray->IsAllEqual( *rCol.pAttrArray, nStartRow, nEndRow );
868}
869
870inline bool ScColumn::IsVisibleAttrEqual( const ScColumn& rCol, SCROW nStartRow, SCROW nEndRow ) const
871{
872 return pAttrArray->IsVisibleEqual( *rCol.pAttrArray, nStartRow, nEndRow );
873}
874
875inline bool ScColumn::GetFirstVisibleAttr( SCROW& rFirstRow ) const
876{
877 return pAttrArray->GetFirstVisibleAttr( rFirstRow );
878}
879
880inline bool ScColumn::GetLastVisibleAttr( SCROW& rLastRow ) const
881{
882 // row of last cell is needed
883 SCROW nLastData = GetLastDataPos(); // always including notes, 0 if none
884 return pAttrArray->GetLastVisibleAttr( rLastRow, nLastData );
885}
886
887inline bool ScColumn::HasVisibleAttrIn( SCROW nStartRow, SCROW nEndRow ) const
888{
889 return pAttrArray->HasVisibleAttrIn( nStartRow, nEndRow );
890}
891
893{
894 return pAttrArray->Count();
895}
896
897inline SCSIZE ScColumn::GetPatternCount( SCROW nRow1, SCROW nRow2 ) const
898{
899 return pAttrArray->Count( nRow1, nRow2 );
900}
901
903{
904 return pAttrArray && pAttrArray->Reserve( nReserve );
905}
906
907inline bool ScColumn::IsMerged( SCROW nRow ) const
908{
909 return pAttrArray->IsMerged(nRow);
910}
911
912inline SCROW ScColumnData::GetNextUnprotected( SCROW nRow, bool bUp ) const
913{
914 return pAttrArray->GetNextUnprotected(nRow, bUp);
915}
916
917inline bool ScColumnData::HasAttrib( SCROW nRow1, SCROW nRow2, HasAttrFlags nMask ) const
918{
919 return pAttrArray->HasAttrib( nRow1, nRow2, nMask );
920}
921
922inline bool ScColumnData::HasAttrib( SCROW nRow, HasAttrFlags nMask, SCROW* nStartRow, SCROW* nEndRow ) const
923{
924 return pAttrArray->HasAttrib( nRow, nMask, nStartRow, nEndRow );
925}
926
927inline bool ScColumn::ExtendMerge( SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow,
928 SCCOL& rPaintCol, SCROW& rPaintRow,
929 bool bRefresh )
930{
931 return pAttrArray->ExtendMerge( nThisCol, nStartRow, nEndRow, rPaintCol, rPaintRow, bRefresh );
932}
933
934inline void ScColumnData::MergePatternArea( ScMergePatternState& rState, SCROW nRow1, SCROW nRow2, bool bDeep ) const
935{
936 pAttrArray->MergePatternArea( nRow1, nRow2, rState, bDeep );
937}
938
939inline void ScColumn::MergeBlockFrame( SvxBoxItem* pLineOuter, SvxBoxInfoItem* pLineInner,
940 ScLineFlags& rFlags,
941 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight ) const
942{
943 pAttrArray->MergeBlockFrame( pLineOuter, pLineInner, rFlags, nStartRow, nEndRow, bLeft, nDistRight );
944}
945
946inline void ScColumn::ApplyBlockFrame(const SvxBoxItem& rLineOuter, const SvxBoxInfoItem* pLineInner,
947 SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
948{
949 pAttrArray->ApplyBlockFrame(rLineOuter, pLineInner, nStartRow, nEndRow, bLeft, nDistRight);
950}
951
953{
954 return pAttrArray->GetPattern( nRow );
955}
956
957inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich ) const
958{
959 return pAttrArray->GetPattern( nRow )->GetItemSet().Get(nWhich);
960}
961
962inline const SfxPoolItem& ScColumnData::GetAttr( SCROW nRow, sal_uInt16 nWhich, SCROW& nStartRow, SCROW& nEndRow ) const
963{
964 return pAttrArray->GetPatternRange( nStartRow, nEndRow, nRow )->GetItemSet().Get(nWhich);
965}
966
967inline sal_uInt32 ScColumnData::GetNumberFormat( const ScInterpreterContext& rContext, SCROW nRow ) const
968{
969 return pAttrArray->GetPattern( nRow )->GetNumberFormat( rContext.GetFormatTable() );
970}
971
972inline void ScColumn::AddCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
973{
974 pAttrArray->AddCondFormat( nStartRow, nEndRow, nIndex );
975}
976
977inline void ScColumn::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 nIndex )
978{
979 pAttrArray->RemoveCondFormat( nStartRow, nEndRow, nIndex );
980}
981
982inline void ScColumnData::ApplyStyleArea( SCROW nStartRow, SCROW nEndRow, const ScStyleSheet& rStyle )
983{
984 pAttrArray->ApplyStyleArea(nStartRow, nEndRow, rStyle);
985}
986
987inline const ScStyleSheet* ScColumnData::GetStyle( SCROW nRow ) const
988{
989 return pAttrArray->GetPattern( nRow )->GetStyleSheet();
990}
991
992inline void ScColumn::FindStyleSheet( const SfxStyleSheetBase* pStyleSheet, ScFlatBoolRowSegments& rUsedRows, bool bReset )
993{
994 pAttrArray->FindStyleSheet( pStyleSheet, rUsedRows, bReset );
995}
996
997inline bool ScColumn::IsStyleSheetUsed( const ScStyleSheet& rStyle ) const
998{
999 return pAttrArray->IsStyleSheetUsed( rStyle );
1000}
1001
1002inline bool ScColumn::ApplyFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1003{
1004 return pAttrArray->ApplyFlags( nStartRow, nEndRow, nFlags );
1005}
1006
1007inline bool ScColumn::RemoveFlags( SCROW nStartRow, SCROW nEndRow, ScMF nFlags )
1008{
1009 return pAttrArray->RemoveFlags( nStartRow, nEndRow, nFlags );
1010}
1011
1012inline void ScColumn::ClearItems( SCROW nStartRow, SCROW nEndRow, const sal_uInt16* pWhich )
1013{
1014 pAttrArray->ClearItems( nStartRow, nEndRow, pWhich );
1015}
1016
1017inline const ScPatternAttr* ScColumn::SetPattern( SCROW nRow, std::unique_ptr<ScPatternAttr> pPatAttr )
1018{
1019 return pAttrArray->SetPattern( nRow, std::move(pPatAttr), true/*bPutToPool*/ );
1020}
1021
1022inline void ScColumn::SetPattern( SCROW nRow, const ScPatternAttr& rPatAttr )
1023{
1024 pAttrArray->SetPattern( nRow, &rPatAttr, true/*bPutToPool*/ );
1025}
1026
1027inline void ScColumn::SetPatternArea( SCROW nStartRow, SCROW nEndRow,
1028 const ScPatternAttr& rPatAttr )
1029{
1030 pAttrArray->SetPatternArea( nStartRow, nEndRow, &rPatAttr, true/*bPutToPool*/ );
1031}
1032
1033inline void ScColumnData::SetAttrEntries(std::vector<ScAttrEntry> && vNewData)
1034{
1035 pAttrArray->SetAttrEntries( std::move( vNewData ));
1036}
1037
1038inline bool ScColumnData::TestInsertRow( SCSIZE nSize ) const
1039{
1040 return pAttrArray->TestInsertRow( nSize );
1041}
1042
1043inline void ScColumnData::InsertRow( SCROW nStartRow, SCSIZE nSize )
1044{
1045 pAttrArray->InsertRow( nStartRow, nSize );
1046}
1047
1048/* 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:982
const ScPatternAttr * GetPattern(SCROW nRow) const
Definition: column.hxx:952
const SfxPoolItem & GetAttr(SCROW nRow, sal_uInt16 nWhich) const
Definition: column.hxx:957
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:1033
bool HasAttrib(SCROW nRow1, SCROW nRow2, HasAttrFlags nMask) const
Definition: column.hxx:917
const ScAttrArray & AttrArray() const
Definition: column.hxx:130
bool IsAllAttrEqual(const ScColumnData &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:865
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:1038
void InitAttrArray(ScAttrArray *attrArray)
Definition: column.hxx:125
void MergePatternArea(ScMergePatternState &rState, SCROW nRow1, SCROW nRow2, bool bDeep) const
Definition: column.hxx:934
void InsertRow(SCROW nStartRow, SCSIZE nSize)
Definition: column.hxx:1043
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:912
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:987
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:967
std::unique_ptr< ScAttrIterator > CreateAttrIterator(SCROW nStartRow, SCROW nEndRow) const
Definition: column3.cxx:2010
void SetDirtyVar()
Definition: column.cxx:3119
void DeleteCellNotes(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, bool bForgetCaptionOwnership)
Definition: column2.cxx:2240
void DeleteBroadcasters(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:1969
void UpdateNoteCaptions(SCROW nRow1, SCROW nRow2)
Definition: column.cxx:1824
void CreateSparklineCell(SCROW nRow, std::shared_ptr< sc::Sparkline > const &pSparkline)
Definition: column2.cxx:2041
SCROW GetFirstDataPos() const
Definition: column2.cxx:1385
void CollectFormulaCells(std::vector< ScFormulaCell * > &rCells, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1377
SCTAB GetTab() const
Definition: column.hxx:254
svl::SharedString GetSharedString(SCROW nRow) const
Definition: column3.cxx:2499
bool ApplyFlags(SCROW nStartRow, SCROW nEndRow, ScMF nFlags)
Definition: column.hxx:1002
void CellStorageModified()
Called whenever the state of cell array gets modified i.e.
Definition: column2.cxx:1660
bool HasStringData(SCROW nRow) const
Definition: column3.cxx:3239
void CopyCellTextAttrsToDocument(SCROW nRow1, SCROW nRow2, ScColumn &rDestCol) const
Definition: column2.cxx:1833
void DeleteBeforeCopyFromClip(sc::CopyFromClipContext &rCxt, const ScColumn &rClipCol, sc::ColumnSpanSet &rBroadcastSpans)
Definition: column4.cxx:93
~ScColumn() COVERITY_NOEXCEPT_FALSE
Definition: column.cxx:96
bool IsVisibleAttrEqual(const ScColumn &rCol, SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:870
void FindStyleSheet(const SfxStyleSheetBase *pStyleSheet, ScFlatBoolRowSegments &rUsedRows, bool bReset)
Definition: column.hxx:992
SCROW GetNotePosition(size_t nIndex) const
Definition: column4.cxx:779
void ApplyPattern(SCROW nRow, const ScPatternAttr &rPatAttr)
Definition: column.cxx:467
void ClearItems(SCROW nStartRow, SCROW nEndRow, const sal_uInt16 *pWhich)
Definition: column.hxx:1012
void UpdateSelectionFunction(const ScRangeList &rRanges, ScFunctionData &rData, const ScFlatBoolRowSegments &rHiddenRows)
Definition: column2.cxx:3635
FormulaError GetErrCode(SCROW nRow) const
Definition: column3.cxx:3225
SCCOL nCol
Definition: column.hxx:203
bool IsEmptyAttr() const
Definition: column.hxx:860
bool HasCellNote(SCROW nStartRow, SCROW nEndRow) const
Definition: column4.cxx:865
void PreprocessDBDataUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1080
bool IsNotesEmptyBlock(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1326
void SetValue(SCROW nRow, double fVal)
Definition: column3.cxx:3042
sc::CellTextAttrStoreType maCellTextAttrs
Definition: column.hxx:187
void SetFormula(SCROW nRow, const ScTokenArray &rArray, formula::FormulaGrammar::Grammar eGram)
Definition: column3.cxx:2384
bool HasValueData(SCROW nRow) const
Definition: column3.cxx:3259
void GetAllNoteEntries(std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:844
bool TestInsertCol(SCROW nStartRow, SCROW nEndRow) const
Definition: column.cxx:713
bool HasFormulaCell() const
Definition: column4.cxx:1386
void EndListeningGroup(sc::EndListeningContext &rCxt, SCROW nRow)
Definition: column4.cxx:1700
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:1952
SCTAB nTab
Definition: column.hxx:204
void SplitFormulaGroupByRelativeRef(const ScRange &rBoundRange)
Definition: column4.cxx:1317
void SetDirty(SCROW nRow1, SCROW nRow2, BroadcastMode)
Definition: column.cxx:3199
void PreprocessRangeNameUpdate(sc::EndListeningContext &rEndListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1066
bool HasVisibleDataAt(SCROW nRow) const
Definition: column2.cxx:1298
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:426
void GetUnprotectedCells(SCROW nStartRow, SCROW nEndRow, ScRangeList &rRangeList) const
Definition: column4.cxx:897
void RegroupFormulaCells(std::vector< ScAddress > *pGroupPos=nullptr)
Regroup formula cells for the entire column.
Definition: column3.cxx:3674
void SetError(SCROW nRow, const FormulaError nError)
Definition: column3.cxx:2975
SCROW FindNextVisibleRowWithContent(sc::CellStoreType::const_iterator &itPos, SCROW nRow, bool bForward) const
Definition: column2.cxx:1596
ScFormulaCell * SetFormulaCell(SCROW nRow, ScFormulaCell *pCell, sc::StartListeningType eListenType=sc::SingleCellListening, bool bInheritNumFormatIfNeeded=true)
Takes ownership of pCell.
Definition: column3.cxx:2420
void CloneFormulaCell(sc::ColumnBlockPosition &rBlockPos, const ScFormulaCell &rSrc, const sc::CellTextAttr &rAttr, const std::vector< sc::RowSpan > &rRanges)
Definition: column4.cxx:623
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:1368
ScPostIt * GetCellNote(SCROW nRow)
Definition: column2.cxx:2174
void ApplyBlockFrame(const SvxBoxItem &rLineOuter, const SvxBoxInfoItem *pLineInner, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight)
Definition: column.hxx:946
void BroadcastCells(const std::vector< SCROW > &rRows, SfxHintId nHint)
Definition: column3.cxx:80
void CheckIntegrity() const
Definition: column4.cxx:2194
bool TestTabRefAbs(SCTAB nTable) const
Definition: column2.cxx:1257
void DeleteRanges(const std::vector< sc::RowSpan > &rRanges, InsertDeleteFlags nDelFlag)
Definition: column4.cxx:617
void RestoreFromCache(SvStream &rStrm)
Definition: column4.cxx:2106
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:3561
void BroadcastRecalcOnRefMove()
Definition: column.cxx:3285
bool ExtendMerge(SCCOL nThisCol, SCROW nStartRow, SCROW nEndRow, SCCOL &rPaintCol, SCROW &rPaintRow, bool bRefresh)
Definition: column.hxx:927
SCROW GetSparklinesMinRow() const
Definition: column2.cxx:2159
bool SetFormulaCells(SCROW nRow, std::vector< ScFormulaCell * > &rCells)
Definition: column3.cxx:2458
void InterpretDirtyCells(SCROW nRow1, SCROW nRow2)
Definition: column3.cxx:185
bool GetLastVisibleAttr(SCROW &rLastRow) const
Definition: column.hxx:880
void InitBlockPosition(sc::ColumnBlockPosition &rBlockPos)
Definition: column3.cxx:1122
void StartListeners(sc::StartListeningContext &rCxt, bool bAll)
Definition: column3.cxx:2053
SCSIZE VisibleCount(SCROW nStartRow, SCROW nEndRow) const
Definition: column2.cxx:1291
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:517
void DumpColumnStorage() const
void MergeBlockFrame(SvxBoxItem *pLineOuter, SvxBoxInfoItem *pLineInner, ScLineFlags &rFlags, SCROW nStartRow, SCROW nEndRow, bool bLeft, SCCOL nDistRight) const
Definition: column.hxx:939
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:1027
sal_Int32 GetMaxNumberStringLen(sal_uInt16 &nPrecision, SCROW nRowStart, SCROW nRowEnd) const
Definition: column3.cxx:3536
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:2124
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:2301
OUString GetFormula(SCROW nRow) const
Definition: column3.cxx:3158
void RemoveProtected(SCROW nStartRow, SCROW nEndRow)
Definition: column3.cxx:2949
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:2071
void DuplicateSparklines(SCROW nStartRow, size_t nDataSize, ScColumn &rDestCol, sc::ColumnBlockPosition &rDestBlockPos, SCROW nRowOffsetDest=0) const
Definition: column2.cxx:2134
void GetFilterEntries(sc::ColumnBlockConstPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow, ScFilterEntries &rFilterEntries, bool bFiltering, bool bFilteredRow)
Definition: column3.cxx:2711
void RemoveEditAttribs(sc::ColumnBlockPosition &rBlockPos, SCROW nStartRow, SCROW nEndRow)
Definition: column2.cxx:1247
bool HasStringCells(SCROW nStartRow, SCROW nEndRow) const
Return true if there is a string or editcell in the range.
Definition: column3.cxx:3281
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:1760
void EndListeningFormulaCells(sc::EndListeningContext &rCxt, SCROW nRow1, SCROW nRow2, SCROW *pStartRow, SCROW *pEndRow)
Definition: column4.cxx:1604
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:2293
void EndListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3472
const ScFormulaCell * GetFormulaCell(SCROW nRow) const
Definition: column3.cxx:3166
void FindDataAreaPos(SCROW &rRow, bool bDown) const
Definition: column2.cxx:3308
sc::MultiDataCellState::StateType HasDataCellsInRange(SCROW nRow1, SCROW nRow2, SCROW *pRow1) const
Definition: column4.cxx:45
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:579
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:977
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:1283
const EditTextObject * GetEditText(SCROW nRow) const
Definition: column3.cxx:3131
void MixMarked(sc::MixDocContext &rCxt, const ScMarkData &rMark, ScPasteFunc nFunction, bool bSkipEmpty, const ScColumn &rSrcCol)
Definition: column3.cxx:1570
bool TrimEmptyBlocks(SCROW &rRowStart, SCROW &rRowEnd) const
Definition: column2.cxx:1526
void StoreToCache(SvStream &rStrm) const
Definition: column4.cxx:2096
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:2233
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:3269
void CopyFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, tools::Long nDy, ScColumn &rColumn)
Definition: column3.cxx:1493
void DeleteCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2, InsertDeleteFlags nDelFlag, sc::SingleColumnSpanSet &rDeleted)
Definition: column3.cxx:1040
void AssertNoInterpretNeeded(SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:3158
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:3375
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:880
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:3764
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:3165
void GetDataExtrasAt(SCROW nRow, ScDataAreaExtras &rDataAreaExtras) const
Definition: column2.cxx:3390
void CompileDBFormula(sc::CompileFormulaContext &rCxt)
Definition: column2.cxx:3554
std::unique_ptr< ScPostIt > ReleaseNote(SCROW nRow)
Definition: column4.cxx:711
void EndListeningIntersectedGroup(sc::EndListeningContext &rCxt, SCROW nRow, std::vector< ScAddress > *pGroupPos)
Definition: column4.cxx:1621
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:1993
bool HasCellNotes() const
Definition: column2.cxx:2248
bool IsEmptyData() const
Definition: column2.cxx:1264
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:1655
void Swap(ScColumn &rOther, SCROW nRow1, SCROW nRow2, bool bPattern)
Definition: column4.cxx:1204
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:1193
void SetNeedsListeningGroup(SCROW nRow)
Definition: column4.cxx:1730
SCROW GetCellNotesMaxRow() const
Definition: column2.cxx:2255
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:2141
void CompileHybridFormula(sc::StartListeningContext &rStartListenCxt, sc::CompileFormulaContext &rCompileCxt)
Definition: column4.cxx:1095
bool GetDataEntries(SCROW nRow, std::set< ScTypedStrData > &rStrings) const
Definition: column3.cxx:2846
void CopyOneCellFromClip(sc::CopyFromClipContext &rCxt, SCROW nRow1, SCROW nRow2, size_t nColOffset)
Definition: column4.cxx:239
void MergeSelectionPattern(ScMergePatternState &rState, const ScMarkData &rMark, bool bDeep) const
Definition: column.cxx:320
SCROW FindNextVisibleRow(SCROW nRow, bool bForward) const
Definition: column2.cxx:1572
void CalculateInThread(ScInterpreterContext &rContext, SCROW nRow, size_t nLen, size_t nOffset, unsigned nThisThread, unsigned nThreadsTotal)
Definition: column2.cxx:3201
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:1017
void ApplyStyle(SCROW nRow, const ScStyleSheet *rStyle)
Definition: column.cxx:516
bool GetNextDataPos(SCROW &rRow) const
Definition: column2.cxx:1480
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:2942
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:396
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:972
bool GetFirstVisibleAttr(SCROW &rFirstRow) const
Definition: column.hxx:875
bool DeleteSparkline(SCROW nRow)
Definition: column2.cxx:2056
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:3218
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:718
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:1930
void FillMatrix(ScMatrix &rMat, size_t nMatCol, SCROW nRow1, SCROW nRow2, svl::SharedStringPool *pPool) const
Definition: column2.cxx:2671
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:2200
const sc::SparklineStoreType & GetSparklineStore() const
Definition: column.hxx:263
bool GetNextSpellingCell(SCROW &nRow, bool bInSel, const ScMarkData &rData) const
Definition: column2.cxx:1084
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:766
sal_uInt64 GetCodeCount() const
Definition: column2.cxx:3796
bool IsMerged(SCROW nRow) const
Definition: column.hxx:907
void CreateAllNoteCaptions()
Definition: column4.cxx:760
void CalcAll()
Definition: column.cxx:3293
void StartListeningFormulaCells(sc::StartListeningContext &rStartCxt, sc::EndListeningContext &rEndCxt, SCROW nRow1, SCROW nRow2)
Definition: column4.cxx:1593
void PrepareBroadcastersForDestruction()
Definition: column2.cxx:1975
void BroadcastRows(SCROW nStartRow, SCROW nEndRow, SfxHintId nHint)
Definition: column3.cxx:95
void CopyCellValuesFrom(SCROW nRow, const sc::CellValues &rSrc)
Definition: column4.cxx:451
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:2266
double * GetValueCell(SCROW nRow)
Definition: column3.cxx:3091
void DeleteEmptyBroadcasters()
Definition: column2.cxx:2001
bool IsStyleSheetUsed(const ScStyleSheet &rStyle) const
Definition: column.hxx:997
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:3430
void ChangeSelectionIndent(bool bIncrement, const ScMarkData &rMark)
Definition: column.cxx:421
void DeleteSparklineCells(sc::ColumnBlockPosition &rBlockPos, SCROW nRow1, SCROW nRow2)
Definition: column2.cxx:2048
void SwapCol(ScColumn &rCol)
Definition: column.cxx:1867
void SetEditText(SCROW nRow, std::unique_ptr< EditTextObject > pEditText)
Definition: column3.cxx:2322
void ApplyPatternIfNumberformatIncompatible(const ScRange &rRange, const ScPatternAttr &rPattern, SvNumFormatType nNewType)
Definition: column.cxx:490
bool GetPrevDataPos(SCROW &rRow) const
Definition: column2.cxx:1434
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:2302
bool HasVisibleAttrIn(SCROW nStartRow, SCROW nEndRow) const
Definition: column.hxx:887
void GetNotesInRange(SCROW nStartRow, SCROW nEndRow, std::vector< sc::NoteEntry > &rNotes) const
Definition: column4.cxx:849
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:1007
void DeleteArea(SCROW nStartRow, SCROW nEndRow, InsertDeleteFlags nDelFlag, bool bBroadcast=true, sc::ColumnSpanSet *pBroadcastSpans=nullptr)
Definition: column3.cxx:1062
sc::SparklineCell * GetSparklineCell(SCROW nRow)
Definition: column2.cxx:2036
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:3110
size_t GetNoteCount() const
Definition: column4.cxx:721
bool HandleRefArrayForParallelism(SCROW nRow1, SCROW nRow2, const ScFormulaCellGroupRef &mxGroup)
Definition: column4.cxx:1993
formula::FormulaTokenRef ResolveStaticReference(SCROW nRow)
Definition: column2.cxx:2386
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:367
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:2993
bool ReservePatternCount(SCSIZE nReserve)
Definition: column.hxx:902
void RemoveEditTextCharAttribs(SCROW nRow, const ScPatternAttr &rAttr)
Definition: column3.cxx:3144
SCROW GetLastDataPos() const
Definition: column2.cxx:1397
CellType GetCellType(SCROW nRow) const
Definition: column3.cxx:3176
void FindRangeNamesInUse(SCROW nRow1, SCROW nRow2, sc::UpdatedRangeNames &rIndexes) const
Definition: column.cxx:3113
const ScFormulaCell * FetchFormulaCell(SCROW nRow) const
Definition: column2.cxx:3301
ScColumn(ScSheetLimits const &)
Definition: column.cxx:82
void SetScriptType(SCROW nRow, SvtScriptType nType)
Definition: column2.cxx:2372
SCROW GetSparklinesMaxRow() const
Definition: column2.cxx:2148
ScDocument & GetDoc() const
Definition: column.hxx:127
void HandleStuffAfterParallelCalculation(SCROW nRow, size_t nLen, ScInterpreter *pInterpreter)
Definition: column2.cxx:3240
ScFormulaCell *const * GetFormulaCellBlockAddress(SCROW nRow, size_t &rBlockSize) const
Definition: column2.cxx:3274
SvtBroadcaster * GetBroadcaster(SCROW nRow)
Definition: column2.cxx:1959
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:3356
bool EnsureFormulaCellResults(SCROW nRow1, SCROW nRow2, bool bSkipRunning=false)
Definition: column4.cxx:1980
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:892
void SetTextWidth(SCROW nRow, sal_uInt16 nWidth)
Definition: column2.cxx:2282
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:2068
void StartListening(SvtListener &rLst, SCROW nRow)
Definition: column2.cxx:3466
sal_uInt16 GetTextWidth(SCROW nRow) const
Definition: column2.cxx:2277
SCSIZE GetEmptyLinesInBlock(SCROW nStartRow, SCROW nEndRow, ScDirection eDir) const
Definition: column2.cxx:1343
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:41
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:86
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.
MatrixEdge
Definition: types.hxx:65
mdds::mtv::soa::multi_type_vector< CNoteFunc > CellNoteStoreType
mdds::mtv::soa::multi_type_vector< BCBlkFunc > BroadcasterStoreType
mdds::mtv::soa::multi_type_vector< CellFunc, CellStoreTrait > CellStoreType
StartListeningType
Definition: types.hxx:124
@ SingleCellListening
Definition: types.hxx:126
mdds::mtv::soa::multi_type_vector< CTAttrFunc > CellTextAttrStoreType
mdds::mtv::soa::multi_type_vector< CSparklineFunction > SparklineStoreType
long Long
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
Store arbitrary cell value of any kind.
Definition: cellvalue.hxx:32
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