23#include <osl/diagnose.h>
73 OSL_ENSURE(nTab<
nTabCount,
"ScPrintRangeSaver Tab too big");
79 OSL_ENSURE(nTab<
nTabCount,
"ScPrintRangeSaver Tab too big");
86 auto printRanges = rPrintRanges.
startArray(
"printranges");
93 rPrintRanges.
put(
"sheet",
static_cast<sal_Int32
>(nTab));
96 auto sheetRanges = rPrintRanges.
startArray(
"ranges");
97 OStringBuffer aRanges;
98 sal_Int32 nLast = rRangeVec.size() - 1;
99 for (sal_Int32 nIdx = 0; nIdx <= nLast; ++nIdx)
101 const ScRange& rRange = rRangeVec[nIdx];
102 aRanges.append(
"[ " +
103 OString::number(rRange.
aStart.
Col()) +
", " +
104 OString::number(rRange.
aStart.
Row()) +
", " +
105 OString::number(rRange.
aEnd.
Col()) +
", " +
106 OString::number(rRange.
aEnd.
Row()) +
107 (nLast == nIdx ? std::string_view(
"]") : std::string_view(
"], ")));
110 rPrintRanges.
putRaw(aRanges);
ScPrintSaverTab & GetTabData(SCTAB nTab)
void GetPrintRangesInfo(tools::JsonWriter &rPrintRanges) const
std::unique_ptr< ScPrintSaverTab[]> pData
bool operator==(const ScPrintRangeSaver &rCmp) const
ScPrintRangeSaver(SCTAB nCount)
ScRangeVec maPrintRanges
Array.
std::optional< ScRange > moRepeatCol
single
std::optional< ScRange > moRepeatRow
single
::std::vector< ScRange > ScRangeVec
bool operator==(const ScPrintSaverTab &rCmp) const
const ScRangeVec & GetPrintRanges() const
void SetRepeat(std::optional< ScRange > oCol, std::optional< ScRange > oRow)
void SetAreas(ScRangeVec &&rRanges, bool bEntireSheet)