62 nStartCol =
static_cast<SCCOL>(nStart);
63 nEndCol =
static_cast<SCCOL>(nEnd);
71 if (rDoc.
HasAttrib( nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
90 std::unique_ptr<ScOutlineTable> pUndoTab;
103 bRes = rArray.
Insert( nStartCol, nEndCol, bSize );
105 bRes = rArray.
Insert( nStartRow, nEndRow, bSize );
112 std::make_unique<ScUndoMakeOutline>( &
rDocShell,
113 nStartCol,nStartRow,nTab,nEndCol,nEndRow,nTab,
114 std::move(pUndoTab), bColumns,
true ) );
155 std::unique_ptr<ScOutlineTable> pUndoTab;
164 bRes = rArray.
Remove( nStartCol, nEndCol, bSize );
166 bRes = rArray.
Remove( nStartRow, nEndRow, bSize );
173 std::make_unique<ScUndoMakeOutline>( &
rDocShell,
174 nStartCol,nStartRow,nTab, nEndCol,nEndRow,nTab,
175 std::move(pUndoTab), bColumns,
false ) );
203 bool bSuccess =
false;
213 SCCOLROW nCol1, nCol2, nRow1, nRow2;
217 SCROW nStartRow = nRow1;
219 SCROW nEndRow = nRow2;
222 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
226 std::unique_ptr<ScOutlineTable> pUndoTab(
new ScOutlineTable( *pTable ));
229 std::make_unique<ScUndoRemoveAllOutlines>( &
rDocShell,
230 nStartCol, nStartRow, nTab,
231 nEndCol, nEndRow, nTab,
232 std::move(pUndoDoc), std::move(pUndoTab) ) );
268 std::unique_ptr<ScOutlineTable> pUndoTab;
276 SCCOLROW nCol1, nCol2, nRow1, nRow2;
279 SCCOL nOutStartCol =
static_cast<SCCOL>(nCol1);
280 SCROW nOutStartRow = nRow1;
282 SCROW nOutEndRow = nRow2;
285 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
296 rDoc.
DoAutoOutline( nStartCol,nStartRow, nEndCol,nEndRow, nTab );
301 std::make_unique<ScUndoAutoOutline>( &
rDocShell,
302 nStartCol, nStartRow, nTab,
303 nEndCol, nEndRow, nTab,
304 std::move(pUndoDoc), std::move(pUndoTab) ) );
315 bool bRecord,
bool bPaint )
334 std::unique_ptr<ScOutlineTable> pUndoTab(
new ScOutlineTable( *pTable ));
338 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true );
345 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
350 std::make_unique<ScUndoOutlineLevel>( &
rDocShell,
352 std::move(pUndoDoc), std::move(pUndoTab),
353 bColumns, nLevel ) );
358 while ((pEntry=aIter.
GetNext()) !=
nullptr)
363 sal_uInt16 nThisLevel = aIter.
LastLevel();
364 bool bShow = (nThisLevel < nLevel);
374 else if ( nThisLevel == nLevel )
385 if (pParentEntry && pParentEntry->
IsHidden())
402 bool bFiltered = rDoc.
RowFiltered(
i, nTab,
nullptr, &nFilterEnd );
403 nFilterEnd = std::min( nThisEnd, nFilterEnd );
404 if ( !bShow || !bFiltered )
405 rDoc.
ShowRows(
i, nFilterEnd, nTab, bShow );
455 std::unique_ptr<ScOutlineTable> pUndoTab(
new ScOutlineTable( *pTable ));
457 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
462 std::make_unique<ScUndoOutlineBlock>( &
rDocShell,
463 nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
464 std::move(pUndoDoc), std::move(pUndoTab),
true ) );
473 while ((pEntry=aColIter.
GetNext()) !=
nullptr)
477 if ( nStart>=nStartCol && nEnd<=nEndCol )
481 if (nStart<nMin) nMin=nStart;
482 if (nEnd>nMax) nMax=nEnd;
486 for (
i=nMin;
i<=nMax;
i++ )
495 while ((pEntry=aRowIter.
GetNext()) !=
nullptr)
499 if ( nStart>=nStartRow && nEnd<=nEndRow )
503 if (nStart<nMin) nMin=nStart;
504 if (nEnd>nMax) nMax=nEnd;
508 for (
i=nMin;
i<=nMax;
i++ )
512 bool bFiltered = rDoc.
RowFiltered(
i, nTab,
nullptr, &nFilterEnd );
513 nFilterEnd = std::min( nMax, nFilterEnd );
515 rDoc.
ShowRows(
i, nFilterEnd, nTab,
true );
570 rColArray.
ExtendBlock( nColLevel, nEffStartCol, nEffEndCol );
575 rRowArray.
ExtendBlock( nRowLevel, nEffStartRow, nEffEndRow );
581 std::unique_ptr<ScOutlineTable> pUndoTab(
new ScOutlineTable( *pTable ));
583 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true,
true );
590 std::make_unique<ScUndoOutlineBlock>( &
rDocShell,
591 nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab,
592 std::move(pUndoDoc), std::move(pUndoTab),
false ) );
600 pEntry = rColArray.
GetEntry(nColLevel,
i);
604 if (
static_cast<SCCOLROW>(nStartCol)<=nEnd &&
static_cast<SCCOLROW>(nEndCol)>=nStart )
613 pEntry = rRowArray.
GetEntry(nRowLevel,
i);
617 if ( nStartRow<=nEnd && nEndRow>=nStart )
636 bool bRecord,
bool bPaint )
658 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true );
665 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
670 std::make_unique<ScUndoDoOutline>( &
rDocShell,
671 nStart, nEnd, nTab, std::move(pUndoDoc),
672 bColumns, nLevel, nEntry,
true ) );
677 for (
i = nStart;
i <= nEnd;
i++ )
685 bool bFiltered = rDoc.
RowFiltered(
i, nTab,
nullptr, &nFilterEnd );
686 nFilterEnd = std::min( nEnd, nFilterEnd );
688 rDoc.
ShowRows(
i, nFilterEnd, nTab,
true );
694 while ((pEntry=aIter.
GetNext()) !=
nullptr)
701 for (
i = nSubStart;
i <= nSubEnd;
i++ )
704 rDoc.
ShowRows( nSubStart, nSubEnd, nTab,
false );
727 bool bRecord,
bool bPaint )
752 pUndoDoc->InitUndo( rDoc, nTab, nTab,
true );
759 pUndoDoc->InitUndo( rDoc, nTab, nTab,
false,
true );
764 std::make_unique<ScUndoDoOutline>( &
rDocShell,
765 nStart, nEnd, nTab, std::move(pUndoDoc),
766 bColumns, nLevel, nEntry,
false ) );
772 for (
i = nStart;
i <= nEnd;
i++ )
775 rDoc.
ShowRows( nStart, nEnd, nTab,
false );
void OnLOKShowHideColRow(bool bColumns, SCCOLROW nStartRow)
void SetDocumentModified()
SfxBindings * GetViewBindings()
void ErrorMessage(TranslateId pGlobStrId)
const ScDocument & GetDocument() const
ScTabViewShell * GetBestViewShell(bool bOnlyVisible=true)
void PostPaint(SCCOL nStartCol, SCROW nStartRow, SCTAB nStartTab, SCCOL nEndCol, SCROW nEndRow, SCTAB nEndTab, PaintPartFlags nPart, sal_uInt16 nExtFlags=0)
virtual SfxUndoManager * GetUndoManager() override
void UpdatePageBreaks(SCTAB nTab, const ScRange *pUserArea=nullptr)
bool SetOutlineTable(SCTAB nTab, const ScOutlineTable *pNewOutline)
void InvalidatePageBreaks(SCTAB nTab)
SC_DLLPUBLIC SCCOL MaxCol() const
SC_DLLPUBLIC bool RowFiltered(SCROW nRow, SCTAB nTab, SCROW *pFirstRow=nullptr, SCROW *pLastRow=nullptr) const
SC_DLLPUBLIC SCROW MaxRow() const
void SetStreamValid(SCTAB nTab, bool bSet, bool bIgnoreLock=false)
SC_DLLPUBLIC void ShowCol(SCCOL nCol, SCTAB nTab, bool bShow)
SC_DLLPUBLIC void SetDrawPageSize(SCTAB nTab)
SC_DLLPUBLIC void ShowRows(SCROW nRow1, SCROW nRow2, SCTAB nTab, bool bShow)
void DoAutoOutline(SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow, SCTAB nTab)
SC_DLLPUBLIC bool HasAttrib(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, HasAttrFlags nMask) const
void CopyToDocument(SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2, InsertDeleteFlags nFlags, bool bMarked, ScDocument &rDestDoc, const ScMarkData *pMarks=nullptr, bool bColRowFlags=true)
SC_DLLPUBLIC ScOutlineTable * GetOutlineTable(SCTAB nTab, bool bCreate=false)
bool IsUndoEnabled() const
size_t GetCount(size_t nLevel) const
void GetRange(SCCOLROW &rStart, SCCOLROW &rEnd) const
ScOutlineEntry * GetEntry(size_t nLevel, size_t nIndex)
bool FindTouchedLevel(SCCOLROW nBlockStart, SCCOLROW nBlockEnd, size_t &rFindLevel) const
bool Remove(SCCOLROW nBlockStart, SCCOLROW nBlockEnd, bool &rSizeChanged)
const ScOutlineEntry * GetEntryByPos(size_t nLevel, SCCOLROW nPos) const
void SetVisibleBelow(size_t nLevel, size_t nEntry, bool bValue, bool bSkipHidden=false)
bool Insert(SCCOLROW nStartPos, SCCOLROW nEndPos, bool &rSizeChanged, bool bHidden=false)
void ExtendBlock(size_t nLevel, SCCOLROW &rBlkStart, SCCOLROW &rBlkEnd)
void RemoveOutline(const ScRange &rRange, bool bColumns, bool bRecord, bool bApi)
bool HideOutline(SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, bool bRecord, bool bPaint)
bool HideMarkedOutlines(const ScRange &rRange, bool bRecord)
void MakeOutline(const ScRange &rRange, bool bColumns, bool bRecord, bool bApi)
bool RemoveAllOutlines(SCTAB nTab, bool bRecord)
bool ShowMarkedOutlines(const ScRange &rRange, bool bRecord)
void AutoOutline(const ScRange &rRange, bool bRecord)
bool SelectLevel(SCTAB nTab, bool bColumns, sal_uInt16 nLevel, bool bRecord, bool bPaint)
void ShowOutline(SCTAB nTab, bool bColumns, sal_uInt16 nLevel, sal_uInt16 nEntry, bool bRecord, bool bPaint)
SC_DLLPUBLIC SCCOLROW GetStart() const
SC_DLLPUBLIC bool IsHidden() const
SC_DLLPUBLIC SCCOLROW GetEnd() const
void SetVisible(bool bNewVisible)
void SetHidden(bool bNewHidden)
const ScOutlineArray & GetColArray() const
const ScOutlineArray & GetRowArray() const
ScOutlineEntry * GetNext()
static bool isAnyEditViewInRange(const SfxViewShell *pForViewShell, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
void Invalidate(sal_uInt16 nId)
virtual void AddUndoAction(std::unique_ptr< SfxUndoAction > pAction, bool bTryMerg=false)
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
static void lcl_InvalidateOutliner(SfxBindings *pBindings)
static void lcl_PaintWidthHeight(ScDocShell &rDocShell, SCTAB nTab, bool bColumns, SCCOLROW nStart, SCCOLROW nEnd)
Move PaintWidthHeight to DocShell ?
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW