1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
23 #include "markarr.hxx"
25 #include "address.hxx"
26 #include "rangenam.hxx"
28 #include "mtvelements.hxx"
29 #include "formula/types.hxx"
34 #include <boost/intrusive_ptr.hpp>
36 namespace editeng
{ class SvxBorderLine
; }
39 struct FormulaGroupContext
;
40 class StartListeningContext
;
41 class EndListeningContext
;
42 class CopyFromClipContext
;
43 class CopyToClipContext
;
44 class CopyToDocContext
;
46 struct ColumnBlockPosition
;
51 class SfxItemPoolCache
;
54 class SfxStyleSheetBase
;
63 class ScEditDataArray
;
71 struct ScFunctionData
;
73 struct ScMergePatternState
;
74 class ScFlatBoolRowSegments
;
75 struct ScSetStringParam
;
76 struct ScColWidthParam
;
77 class ScColumnTextWidthIterator
;
78 struct ScFormulaCellGroup
;
80 struct ScRefCellValue
;
81 class ScDocumentImport
;
83 struct ScNeededSizeOptions
85 const ScPatternAttr
* pPattern
;
91 ScNeededSizeOptions();
99 struct Less
: std::binary_function
<ColEntry
, ColEntry
, bool>
101 bool operator() (const ColEntry
& r1
, const ColEntry
& r2
) const;
105 struct ColDoubleEntry
108 std::vector
<double> maData
;
110 struct LessByPtr
: std::binary_function
<ColDoubleEntry
*, ColDoubleEntry
*, bool>
112 bool operator() (const ColDoubleEntry
* p1
, const ColDoubleEntry
* p2
) const;
118 // Empty values correspond with empty cells. All non-empty cell positions
119 // must have non-empty elements. For text width, the value should be
120 // either the real text width, or TEXTWIDTH_DIRTY in case it hasn't been
121 // calculated yet. For script type, it should be either the real script
122 // type value or SC_SCRIPTTYPE_UNKNOWN.
123 sc::CellTextAttrStoreType maCellTextAttrs
;
125 sc::BroadcasterStoreType maBroadcasters
;
130 std::vector
<ColEntry
> maItems
;
132 // temporary until we switch to mdds container
133 std::vector
<ColDoubleEntry
*> maDoubles
;
134 std::vector
<ScFormulaCellGroupRef
> maFnGroups
;
136 ScAttrArray
* pAttrArray
;
137 ScDocument
* pDocument
;
138 bool mbDirtyGroups
; /// formula groups are dirty.
140 friend class ScDocument
; // for FillInfo
141 friend class ScDocumentIterator
;
142 friend class ScValueIterator
;
143 friend class ScHorizontalValueIterator
;
144 friend class ScDBQueryDataIterator
;
145 friend class ScColumnIterator
;
146 friend class ScQueryCellIterator
;
147 friend class ScMarkedDataIter
;
148 friend class ScCellIterator
;
149 friend class ScHorizontalCellIterator
;
150 friend class ScHorizontalAttrIterator
;
151 friend class ScColumnTextWidthIterator
;
152 friend class ScDocumentImport
;
154 ScColumn(const ScColumn
&); // disabled
155 ScColumn
& operator= (const ScColumn
&); // disabled
157 std::vector
<ColEntry
>::iterator
Search( SCROW nRow
);
158 std::vector
<ColEntry
>::const_iterator
Search( SCROW nRow
) const;
162 SCROW nRow
, SCTAB nTab
, const String
& rString
, formula::FormulaGrammar::AddressConvention eConv
,
163 ScSetStringParam
* pParam
);
169 void Init(SCCOL nNewCol
, SCTAB nNewTab
, ScDocument
* pDoc
);
171 bool Search( SCROW nRow
, SCSIZE
& nIndex
) const;
172 ScBaseCell
* GetCell( SCROW nRow
) const;
173 ScRefCellValue
GetCellValue( SCROW nRow
) const;
174 void Insert( sc::ColumnBlockPosition
& rBlockPos
, SCROW nRow
, ScBaseCell
* pCell
);
175 void Insert( SCROW nRow
, ScBaseCell
* pCell
);
176 void Insert( SCROW nRow
, sal_uInt32 nFormatIndex
, ScBaseCell
* pCell
);
177 void Append( sc::ColumnBlockPosition
& rBlockPos
, SCROW nRow
, ScBaseCell
* pCell
);
178 void Append( SCROW nRow
, ScBaseCell
* pCell
);
179 void Delete( SCROW nRow
);
180 void DeleteAtIndex( SCSIZE nIndex
);
182 void ReserveSize( SCSIZE nSize
);
183 void SwapRow( SCROW nRow1
, SCROW nRow2
);
184 void SwapCell( SCROW nRow
, ScColumn
& rCol
);
185 void RebuildFormulaGroups();
187 bool HasAttrib( SCROW nRow1
, SCROW nRow2
, sal_uInt16 nMask
) const;
188 bool HasAttribSelection( const ScMarkData
& rMark
, sal_uInt16 nMask
) const;
189 bool ExtendMerge( SCCOL nThisCol
, SCROW nStartRow
, SCROW nEndRow
,
190 SCCOL
& rPaintCol
, SCROW
& rPaintRow
,
193 bool IsEmptyVisData() const; // without Broadcaster
194 bool IsEmptyData() const;
195 bool IsEmptyAttr() const;
196 bool IsEmpty() const;
199 bool IsEmptyBlock(SCROW nStartRow
, SCROW nEndRow
) const;
200 SCSIZE
GetEmptyLinesInBlock( SCROW nStartRow
, SCROW nEndRow
, ScDirection eDir
) const;
201 bool HasDataAt(SCROW nRow
) const;
202 bool HasVisibleDataAt(SCROW nRow
) const;
203 SCROW
GetFirstDataPos() const;
204 SCROW
GetLastDataPos() const;
205 SCROW
GetLastVisDataPos() const; // without Broadcaster
206 SCROW
GetFirstVisDataPos() const;
207 bool GetPrevDataPos(SCROW
& rRow
) const;
208 bool GetNextDataPos(SCROW
& rRow
) const;
209 void FindDataAreaPos(SCROW
& rRow
, bool bDown
) const; // (without Broadcaster)
210 void FindUsed( SCROW nStartRow
, SCROW nEndRow
, bool* pUsed
) const;
212 SCSIZE
VisibleCount( SCROW nStartRow
, SCROW nEndRow
) const;
213 sal_uInt16
GetBlockMatrixEdges( SCROW nRow1
, SCROW nRow2
, sal_uInt16 nMask
) const;
214 bool HasSelectionMatrixFragment(const ScMarkData
& rMark
) const;
216 bool GetFirstVisibleAttr( SCROW
& rFirstRow
) const;
217 bool GetLastVisibleAttr( SCROW
& rLastRow
, bool bFullFormattedArea
= false ) const;
218 bool HasVisibleAttrIn( SCROW nStartRow
, SCROW nEndRow
) const;
219 bool IsVisibleAttrEqual( const ScColumn
& rCol
, SCROW nStartRow
= 0,
220 SCROW nEndRow
= MAXROW
) const;
221 bool IsAllAttrEqual( const ScColumn
& rCol
, SCROW nStartRow
, SCROW nEndRow
) const;
223 bool TestInsertCol( SCROW nStartRow
, SCROW nEndRow
) const;
224 bool TestInsertRow( SCSIZE nSize
) const;
225 void InsertRow( SCROW nStartRow
, SCSIZE nSize
);
226 void DeleteRow( SCROW nStartRow
, SCSIZE nSize
);
227 void DeleteArea(SCROW nStartRow
, SCROW nEndRow
, sal_uInt16 nDelFlag
);
229 sc::CopyToClipContext
& rCxt
, SCROW nRow1
, SCROW nRow2
, ScColumn
& rColumn
) const;
230 void CopyStaticToDocument(SCROW nRow1
, SCROW nRow2
, ScColumn
& rDestCol
);
231 void CopyCellToDocument( SCROW nSrcRow
, SCROW nDestRow
, ScColumn
& rDestCol
);
232 bool InitBlockPosition( sc::ColumnBlockPosition
& rBlockPos
);
234 sc::CopyFromClipContext
& rCxt
, SCROW nRow1
, SCROW nRow2
, long nDy
, ScColumn
& rColumn
);
236 void StartListeningInArea( sc::StartListeningContext
& rCxt
, SCROW nRow1
, SCROW nRow2
);
237 void BroadcastInArea( SCROW nRow1
, SCROW nRow2
);
239 void RemoveEditAttribs( SCROW nStartRow
, SCROW nEndRow
);
241 // Selection (?) of this document
243 sc::MixDocContext
& rCxt
, const ScMarkData
& rMark
, sal_uInt16 nFunction
,
244 bool bSkipEmpty
, const ScColumn
& rSrcCol
);
246 sc::MixDocContext
& rCxt
, SCROW nRow1
, SCROW nRow2
, sal_uInt16 nFunction
, bool bSkipEmpty
,
247 const ScColumn
& rSrcCol
);
249 ScFormulaCell
* CreateRefCell( ScDocument
* pDestDoc
, const ScAddress
& rDestPos
,
250 SCSIZE nIndex
, sal_uInt16 nFlags
) const;
252 ScAttrIterator
* CreateAttrIterator( SCROW nStartRow
, SCROW nEndRow
) const;
255 SCCOL
GetCol() const { return nCol
; }
257 // UpdateSelectionFunction: multi-select
258 void UpdateSelectionFunction(
259 const ScMarkData
& rMark
, ScFunctionData
& rData
, ScFlatBoolRowSegments
& rHiddenRows
,
260 bool bDoExclude
, SCROW nExStartRow
, SCROW nExEndRow
) const;
262 void UpdateAreaFunction(
263 ScFunctionData
& rData
, ScFlatBoolRowSegments
& rHiddenRows
, SCROW nStartRow
, SCROW nEndRow
) const;
266 sc::CopyToDocContext
& rCxt
, SCROW nRow1
, SCROW nRow2
, sal_uInt16 nFlags
, bool bMarked
,
267 ScColumn
& rColumn
, const ScMarkData
* pMarkData
= NULL
, bool bAsLink
= false) const;
270 sc::CopyToDocContext
& rCxt
, SCROW nRow1
, SCROW nRow2
, sal_uInt16 nFlags
, bool bMarked
,
271 ScColumn
& rColumn
, const ScMarkData
* pMarkData
= NULL
) const;
273 void CopyScenarioFrom( const ScColumn
& rSrcCol
);
274 void CopyScenarioTo( ScColumn
& rDestCol
) const;
275 bool TestCopyScenarioTo( const ScColumn
& rDestCol
) const;
276 void MarkScenarioIn( ScMarkData
& rDestMark
) const;
278 void CopyUpdated( const ScColumn
& rPosCol
, ScColumn
& rDestCol
) const;
280 void SwapCol(ScColumn
& rCol
);
281 void MoveTo(SCROW nStartRow
, SCROW nEndRow
, ScColumn
& rCol
);
284 bool HasEditCells(SCROW nStartRow
, SCROW nEndRow
, SCROW
& rFirst
);
287 SCROW nRow
, SCTAB nTab
, const String
& rString
, formula::FormulaGrammar::AddressConvention eConv
,
288 ScSetStringParam
* pParam
= NULL
);
290 void SetEditText( SCROW nRow
, EditTextObject
* pEditText
);
291 void SetEditText( SCROW nRow
, const EditTextObject
& rEditText
, const SfxItemPool
* pEditPool
);
292 void SetFormula( SCROW nRow
, const ScTokenArray
& rArray
, formula::FormulaGrammar::Grammar eGram
);
293 void SetFormula( SCROW nRow
, const OUString
& rFormula
, formula::FormulaGrammar::Grammar eGram
);
294 void SetFormulaCell( SCROW nRow
, ScFormulaCell
* pCell
);
296 void SetRawString( SCROW nRow
, const OUString
& rStr
);
297 void SetValue( SCROW nRow
, const double& rVal
);
298 void SetError( SCROW nRow
, const sal_uInt16 nError
);
300 void GetString( SCROW nRow
, OUString
& rString
) const;
301 const OUString
* GetStringCell( SCROW nRow
) const;
302 double* GetValueCell( SCROW nRow
);
303 void GetInputString( SCROW nRow
, OUString
& rString
) const;
304 double GetValue( SCROW nRow
) const;
305 const EditTextObject
* GetEditText( SCROW nRow
) const;
306 void RemoveEditTextCharAttribs( SCROW nRow
, const ScPatternAttr
& rAttr
);
307 void GetFormula( SCROW nRow
, OUString
& rFormula
) const;
308 const ScTokenArray
* GetFormulaTokens( SCROW nRow
) const;
309 const ScFormulaCell
* GetFormulaCell( SCROW nRow
) const;
310 ScFormulaCell
* GetFormulaCell( SCROW nRow
);
311 CellType
GetCellType( SCROW nRow
) const;
312 SCSIZE
GetCellCount() const;
313 sal_uInt32
GetWeightedCount() const;
314 sal_uInt32
GetCodeCount() const; // RPN-Code in formulas
315 sal_uInt16
GetErrCode( SCROW nRow
) const;
317 bool HasStringData( SCROW nRow
) const;
318 bool HasValueData( SCROW nRow
) const;
319 bool HasStringCells( SCROW nStartRow
, SCROW nEndRow
) const;
321 bool IsFormulaDirty( SCROW nRow
) const;
324 void SetDirty( const ScRange
& );
326 void SetDirtyAfterLoad();
327 void SetTableOpDirty( const ScRange
& );
329 void CalcAfterLoad();
331 void CompileXML( ScProgress
& rProgress
);
333 bool CompileErrorCells(sal_uInt16 nErrCode
);
335 void ResetChanged( SCROW nStartRow
, SCROW nEndRow
);
337 bool UpdateReference( UpdateRefMode eUpdateRefMode
, SCCOL nCol1
, SCROW nRow1
, SCTAB nTab1
,
338 SCCOL nCol2
, SCROW nRow2
, SCTAB nTab2
,
339 SCsCOL nDx
, SCsROW nDy
, SCsTAB nDz
,
340 ScDocument
* pUndoDoc
= NULL
);
341 void UpdateInsertTab(SCTAB nInsPos
, SCTAB nNewSheets
= 1);
342 void UpdateInsertTabOnlyCells(SCTAB nInsPos
, SCTAB nNewSheets
= 1);
343 void UpdateDeleteTab(SCTAB nDelPos
, bool bIsMove
, ScColumn
* pRefUndo
= NULL
, SCTAB nSheets
= 1);
344 void UpdateMoveTab(SCTAB nOldPos
, SCTAB nNewPos
, SCTAB nTabNo
);
345 void UpdateCompile( bool bForceIfNameInUse
= false );
346 void UpdateTranspose( const ScRange
& rSource
, const ScAddress
& rDest
,
347 ScDocument
* pUndoDoc
);
348 void UpdateGrow( const ScRange
& rArea
, SCCOL nGrowX
, SCROW nGrowY
);
350 void SetTabNo(SCTAB nNewTab
);
351 void FindRangeNamesInUse(SCROW nRow1
, SCROW nRow2
, std::set
<sal_uInt16
>& rIndexes
) const;
353 const SfxPoolItem
* GetAttr( SCROW nRow
, sal_uInt16 nWhich
) const;
354 const ScPatternAttr
* GetPattern( SCROW nRow
) const;
355 const ScPatternAttr
* GetMostUsedPattern( SCROW nStartRow
, SCROW nEndRow
) const;
357 sal_uInt32
GetNumberFormat( SCROW nRow
) const;
358 sal_uInt32
GetNumberFormat( SCROW nStartRow
, SCROW nEndRow
) const;
360 void MergeSelectionPattern( ScMergePatternState
& rState
, const ScMarkData
& rMark
, bool bDeep
) const;
361 void MergePatternArea( ScMergePatternState
& rState
, SCROW nRow1
, SCROW nRow2
, bool bDeep
) const;
362 void MergeBlockFrame( SvxBoxItem
* pLineOuter
, SvxBoxInfoItem
* pLineInner
,
364 SCROW nStartRow
, SCROW nEndRow
, bool bLeft
, SCCOL nDistRight
) const;
365 void ApplyBlockFrame( const SvxBoxItem
* pLineOuter
, const SvxBoxInfoItem
* pLineInner
,
366 SCROW nStartRow
, SCROW nEndRow
, bool bLeft
, SCCOL nDistRight
);
368 void ApplyAttr( SCROW nRow
, const SfxPoolItem
& rAttr
);
369 void ApplyPattern( SCROW nRow
, const ScPatternAttr
& rPatAttr
);
370 void ApplyPatternArea( SCROW nStartRow
, SCROW nEndRow
, const ScPatternAttr
& rPatAttr
,
371 ScEditDataArray
* pDataArray
= NULL
);
372 bool SetAttrEntries(ScAttrEntry
* pData
, SCSIZE nSize
);
373 void SetPattern( SCROW nRow
, const ScPatternAttr
& rPatAttr
, bool bPutToPool
= false );
374 void SetPatternArea( SCROW nStartRow
, SCROW nEndRow
,
375 const ScPatternAttr
& rPatAttr
, bool bPutToPool
= false );
376 void ApplyPatternIfNumberformatIncompatible( const ScRange
& rRange
,
377 const ScPatternAttr
& rPattern
, short nNewType
);
379 void ApplyStyle( SCROW nRow
, const ScStyleSheet
& rStyle
);
380 void ApplyStyleArea( SCROW nStartRow
, SCROW nEndRow
, const ScStyleSheet
& rStyle
);
381 void ApplySelectionStyle(const ScStyleSheet
& rStyle
, const ScMarkData
& rMark
);
382 void ApplySelectionLineStyle( const ScMarkData
& rMark
,
383 const ::editeng::SvxBorderLine
* pLine
, bool bColorOnly
);
384 void AddCondFormat(SCROW nStartRow
, SCROW nEndRow
, sal_uInt32 nIndex
);
385 void RemoveCondFormat(SCROW nStartRow
, SCROW nEndRow
, sal_uInt32 nIndex
);
387 const ScStyleSheet
* GetStyle( SCROW nRow
) const;
388 const ScStyleSheet
* GetSelectionStyle( const ScMarkData
& rMark
, bool& rFound
) const;
389 const ScStyleSheet
* GetAreaStyle( bool& rFound
, SCROW nRow1
, SCROW nRow2
) const;
391 void FindStyleSheet( const SfxStyleSheetBase
* pStyleSheet
, ScFlatBoolRowSegments
& rUsedRows
, bool bReset
);
392 bool IsStyleSheetUsed( const ScStyleSheet
& rStyle
, bool bGatherAllStyles
) const;
394 /// May return -1 if not found
396 SCsROW nRow
, const ScStyleSheet
* pSearchStyle
, bool bUp
, bool bInSelection
,
397 const ScMarkData
& rMark
) const;
399 bool SearchStyleRange(
400 SCsROW
& rRow
, SCsROW
& rEndRow
, const ScStyleSheet
* pSearchStyle
, bool bUp
,
401 bool bInSelection
, const ScMarkData
& rMark
) const;
403 bool ApplyFlags( SCROW nStartRow
, SCROW nEndRow
, sal_Int16 nFlags
);
404 bool RemoveFlags( SCROW nStartRow
, SCROW nEndRow
, sal_Int16 nFlags
);
405 void ClearItems( SCROW nStartRow
, SCROW nEndRow
, const sal_uInt16
* pWhich
);
407 void RemoveProtected( SCROW nStartRow
, SCROW nEndRow
);
409 SCsROW
ApplySelectionCache( SfxItemPoolCache
* pCache
, const ScMarkData
& rMark
, ScEditDataArray
* pDataArray
= NULL
);
410 void DeleteSelection( sal_uInt16 nDelFlag
, const ScMarkData
& rMark
);
412 void ClearSelectionItems( const sal_uInt16
* pWhich
, const ScMarkData
& rMark
);
413 void ChangeSelectionIndent( bool bIncrement
, const ScMarkData
& rMark
);
416 SCROW nRow
, OutputDevice
* pDev
, double nPPTX
, double nPPTY
,
417 const Fraction
& rZoomX
, const Fraction
& rZoomY
,
418 bool bWidth
, const ScNeededSizeOptions
& rOptions
) const;
420 sal_uInt16
GetOptimalColWidth(
421 OutputDevice
* pDev
, double nPPTX
, double nPPTY
,
422 const Fraction
& rZoomX
, const Fraction
& rZoomY
,
423 bool bFormula
, sal_uInt16 nOldWidth
, const ScMarkData
* pMarkData
, const ScColWidthParam
* pParam
) const;
425 void GetOptimalHeight(
426 SCROW nStartRow
, SCROW nEndRow
, sal_uInt16
* pHeight
, OutputDevice
* pDev
,
427 double nPPTX
, double nPPTY
, const Fraction
& rZoomX
, const Fraction
& rZoomY
,
428 bool bShrink
, sal_uInt16 nMinHeight
, SCROW nMinStart
);
430 /// Including current, may return -1
431 SCsROW
GetNextUnprotected( SCROW nRow
, bool bUp
) const;
433 void GetFilterEntries(SCROW nStartRow
, SCROW nEndRow
, std::vector
<ScTypedStrData
>& rStrings
, bool& rHasDates
);
434 bool GetDataEntries(SCROW nRow
, std::set
<ScTypedStrData
>& rStrings
, bool bLimit
);
436 void UpdateInsertTabAbs(SCTAB nNewPos
);
437 bool TestTabRefAbs(SCTAB nTable
) const;
438 bool GetNextSpellingCell(SCROW
& nRow
, bool bInSel
, const ScMarkData
& rData
) const;
440 void RemoveAutoSpellObj();
442 void StartListening( SvtListener
& rLst
, SCROW nRow
);
443 void EndListening( SvtListener
& rLst
, SCROW nRow
);
444 void StartListening( sc::StartListeningContext
& rCxt
, SCROW nRow
, SvtListener
& rListener
);
445 void EndListening( sc::EndListeningContext
& rCxt
, SCROW nRow
, SvtListener
& rListener
);
446 void MoveListeners( SvtBroadcaster
& rSource
, SCROW nDestRow
);
447 void StartAllListeners();
448 void StartNeededListeners(); // only for cells where NeedsListening()==true
449 void SetDirtyIfPostponed();
450 void BroadcastRecalcOnRefMove();
452 void CompileDBFormula();
453 void CompileDBFormula( bool bCreateFormulaString
);
454 void CompileNameFormula( bool bCreateFormulaString
);
455 void CompileColRowNameFormula();
457 sal_Int32
GetMaxStringLen( SCROW nRowStart
, SCROW nRowEnd
, CharSet eCharSet
) const;
458 xub_StrLen
GetMaxNumberStringLen( sal_uInt16
& nPrecision
,
459 SCROW nRowStart
, SCROW nRowEnd
) const;
461 sal_uInt16
GetTextWidth(SCROW nRow
) const;
462 void SetTextWidth(SCROW nRow
, sal_uInt16 nWidth
);
464 sal_uInt8
GetScriptType( SCROW nRow
) const;
465 sal_uInt8
GetRangeScriptType( sc::CellTextAttrStoreType::iterator
& itPos
, SCROW nRow1
, SCROW nRow2
);
467 void SetScriptType( SCROW nRow
, sal_uInt8 nType
);
469 size_t GetFormulaHash( SCROW nRow
) const;
471 ScFormulaVectorState
GetFormulaVectorState( SCROW nRow
) const;
472 formula::FormulaTokenRef
ResolveStaticReference( SCROW nRow
);
473 bool ResolveStaticReference( ScMatrix
& rMat
, SCCOL nMatCol
, SCROW nRow1
, SCROW nRow2
);
474 const double* FetchDoubleArray( sc::FormulaGroupContext
& rCxt
, SCROW nRow1
, SCROW nRow2
) const;
476 ScRefCellValue
GetRefCellValue( SCROW
);
478 void SetNumberFormat( SCROW nRow
, sal_uInt32 nNumberFormat
);
480 SvtBroadcaster
* GetBroadcaster( SCROW nRow
);
481 const SvtBroadcaster
* GetBroadcaster( SCROW nRow
) const;
482 void DeleteBroadcasters( sc::ColumnBlockPosition
& rBlockPos
, SCROW nRow1
, SCROW nRow2
);
483 bool HasBroadcaster() const;
486 void UpdateScriptType( sc::CellTextAttr
& rAttr
, SCROW nRow
);
489 SCSIZE nStartIndex
, SCSIZE nEndIndex
, sal_uInt16 nDelFlag
, std::vector
<SCROW
>& rDeletedRows
);
491 const ScFormulaCell
* FetchFormulaCell( SCROW nRow
) const;
493 ScBaseCell
* CloneCell(SCSIZE nIndex
, sal_uInt16 nFlags
, ScDocument
& rDestDoc
, const ScAddress
& rDestPos
) const;
495 SCROW
FindNextVisibleRowWithContent(SCROW nRow
, bool bForward
) const;
496 SCROW
FindNextVisibleRow(SCROW nRow
, bool bForward
) const;
499 * Called whenever the state of cell array gets modified i.e. new cell
500 * insertion, cell removal or relocation, cell value update and so on.
502 * Call this only from those methods where maItems is modified directly.
504 void CellStorageModified();
506 void CopyCellTextAttrsToDocument(SCROW nRow1
, SCROW nRow2
, ScColumn
& rDestCol
) const;
508 void SetCell( sc::ColumnBlockPosition
& rBlockPos
, SCROW nRow
, ScBaseCell
* pNewCell
);
509 void SetCell( SCROW nRow
, ScBaseCell
* pNewCell
);
510 void PostSetCell( SCROW nRow
, ScBaseCell
* pNewCell
);
513 * Clear and re-populate the cell text attribute array from the non-empty
514 * cells stored in the cell array.
516 void ResetCellTextAttrs();
520 class ScColumnIterator
// walk through all data of a area/range
522 const ScColumn
* pColumn
;
527 ScColumnIterator( const ScColumn
* pCol
, SCROW nStart
=0, SCROW nEnd
=MAXROW
);
530 bool Next( SCROW
& rRow
, ScBaseCell
*& rpCell
);
531 SCSIZE
GetIndex() const;
535 class ScMarkedDataIter
// walk through data in a selected area/range
537 const ScColumn
* pColumn
;
539 ScMarkArrayIter
* pMarkIter
;
546 ScMarkedDataIter( const ScColumn
* pCol
, const ScMarkData
* pMarkData
,
547 bool bAllIfNone
= false );
550 bool Next( SCSIZE
& rIndex
);
557 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */