21#include <osl/diagnose.h>
32 aSelection(
std::move( aStatus )),
35 bLocInitialized( false )
43 const ScRange* pSelRange =
nullptr;
58 for ( nTab=0; nTab<nTabCount; nTab++ )
72 nPages.push_back( nThisTab );
87 const ScRange* pSelRange =
nullptr;
99 for (
SCTAB nTab : rMark)
101 if (nTab >= nTabCount)
110 Range aPageRange( nRenderer+1, nRenderer+1 );
113 aPage.
Select( aPageRange );
116 aFunc.
DoPrint( aPage, nTabStart, nDisplayStart,
false, &aLocData );
121 aLocations.emplace_back( nRenderer, aCellRange, aPixRect );
126 nTabStart +=
nPages[nTab];
154 while ( nTab < nTabCount && nPage >=
nPages[nTab] )
156 if (nTab >= nTabCount)
157 nTab = nTabCount - 1;
185 OSL_FAIL(
"nPages out of bounds, FIX IT!");
188 return nDisplayStart;
bool Select(sal_Int32 nIndex, bool bSelect=true)
void SetTotalRange(const Range &rTotRange)
const ScDocument & GetDocument() const
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
SC_DLLPUBLIC bool NeedPageResetAfterTab(SCTAB nTab) const
SC_DLLPUBLIC SCTAB GetTableCount() const
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
const ScRange & GetMarkArea() const
bool GetTableSelect(SCTAB nTab) const
SCTAB GetSelectCount() const
bool GetMainCellRange(ScRange &rRange, tools::Rectangle &rPixRect) const
std::vector< ScPrintPageLocation > aLocations
tools::Long GetTabStart(SCTAB nTab) const
std::vector< tools::Long > nFirstAttr
std::vector< tools::Long > nPages
tools::Long GetDisplayStart(SCTAB nTab) const
ScPrintFuncCache(ScDocShell *pD, const ScMarkData &rMark, ScPrintSelectionStatus aStatus)
ScPrintSelectionStatus aSelection
bool FindLocation(const ScAddress &rCell, ScPrintPageLocation &rLocation) const
SCTAB GetTabForPage(tools::Long nPage) const
void InitLocations(const ScMarkData &rMark, OutputDevice *pDev)
bool IsSameSelection(const ScPrintSelectionStatus &rStatus) const
void SetRenderFlag(bool bFlag)
tools::Long GetFirstPageNo() const
tools::Long DoPrint(const MultiSelection &rPageRanges, tools::Long nStartPage, tools::Long nDisplayStart, bool bDoPrint, ScPreviewLocationData *pLocationData)
tools::Long GetTotalPages() const
Stores the selection in the ScPrintFuncCache so it is only used for the same selection again.
const ScPrintOptions & GetOptions() const
The range that is printed on a page (excluding repeated columns/rows), and its position on the page,...