21 #include <osl/diagnose.h>
31 aSelection( rStatus ),
34 bLocInitialized(
false )
42 const ScRange* pSelRange =
nullptr;
57 for ( nTab=0; nTab<nTabCount; nTab++ )
66 nFirstAttr.push_back( aFunc.GetFirstPageNo() );
71 nPages.push_back( nThisTab );
86 const ScRange* pSelRange =
nullptr;
98 for (
SCTAB nTab : rMark)
100 if (nTab >= nTabCount)
109 Range aPageRange( nRenderer+1, nRenderer+1 );
112 aPage.
Select( aPageRange );
115 aFunc.DoPrint( aPage, nTabStart, nDisplayStart,
false, &aLocData );
120 aLocations.emplace_back( nRenderer, aCellRange, aPixRect );
125 nTabStart += nPages[nTab];
153 while ( nTab < nTabCount && nPage >=
nPages[nTab] )
155 if (nTab >= nTabCount)
156 nTab = nTabCount - 1;
163 const SCTAB maxIndex = std::min(nTab, static_cast<SCTAB>(
nPages.size()));
181 if (
i < static_cast<SCTAB>(
nPages.size()) )
184 OSL_FAIL(
"nPages out of bounds, FIX IT!");
187 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)
const ScRange & GetMarkArea() 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
bool m_bDetectedRangeSegmentation false