21 #include <osl/diagnose.h>
31 aSelection( rStatus ),
36 bLocInitialized( false )
44 const ScRange* pSelRange =
nullptr;
59 for ( nTab=0; nTab<nTabCount; nTab++ )
68 nFirstAttr.push_back( aFunc.GetFirstPageNo() );
73 nPages.push_back( nThisTab );
88 const ScRange* pSelRange =
nullptr;
100 for (
SCTAB nTab : rMark)
102 if (nTab >= nTabCount)
111 Range aPageRange( nRenderer+1, nRenderer+1 );
114 aPage.
Select( aPageRange );
117 aFunc.DoPrint( aPage, nTabStart, nDisplayStart,
false, &aLocData );
122 aLocations.emplace_back( nRenderer, aCellRange, aPixRect );
127 nTabStart += nPages[nTab];
155 while ( nTab < nTabCount && nPage >=
nPages[nTab] )
157 if (nTab >= nTabCount)
158 nTab = nTabCount - 1;
165 const SCTAB maxIndex = std::min(nTab, static_cast<SCTAB>(
nPages.size()));
183 if (
i < static_cast<SCTAB>(
nPages.size()) )
186 OSL_FAIL(
"nPages out of bounds, FIX IT!");
189 return nDisplayStart;
Stores the selection in the ScPrintFuncCache so it is only used for the same selection again...
void UpdatePendingRowHeights(SCTAB nUpdateTab, bool bBefore=false)
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
SfxPrinter * GetPrinter(bool bCreateIfNotExist=true)
The range that is printed on a page (excluding repeated columns/rows), and its position on the page...
bool Select(sal_Int32 nIndex, bool bSelect=true)
void GetMarkArea(ScRange &rRange) const
std::vector< tools::Long > nFirstAttr
ScPrintFuncCache(ScDocShell *pD, const ScMarkData &rMark, const ScPrintSelectionStatus &rStatus)
SC_DLLPUBLIC SCTAB GetTableCount() const
SCTAB GetSelectCount() const
tools::Long GetTotalPages() const
bool FindLocation(const ScAddress &rCell, ScPrintPageLocation &rLocation) const
void InitLocations(const ScMarkData &rMark, OutputDevice *pDev)
tools::Long GetTabStart(SCTAB nTab) const
void SetTotalRange(const Range &rTotRange)
std::vector< tools::Long > nPages
SC_DLLPUBLIC bool NeedPageResetAfterTab(SCTAB nTab) const
const ScDocument & GetDocument() const
SCTAB GetTabForPage(tools::Long nPage) const
bool IsSameSelection(const ScPrintSelectionStatus &rStatus) const
tools::Long GetDisplayStart(SCTAB nTab) const
const ScPrintOptions & GetOptions() const
bool GetTableSelect(SCTAB nTab) const
void SetRenderFlag(bool bFlag)
bool GetMainCellRange(ScRange &rRange, tools::Rectangle &rPixRect) const
ScPrintSelectionStatus aSelection
std::vector< ScPrintPageLocation > aLocations