50 constexpr XclPaperSize pPaperSizeTable[] =
54 {
PAPER_USER, in2twips( 8.5 ), in2twips( 11 ) },
60 {
PAPER_A3, mm2twips( 297 ), mm2twips( 420 ) },
61 {
PAPER_A4, mm2twips( 210 ), mm2twips( 297 ) },
62 {
PAPER_USER, mm2twips( 210 ), mm2twips( 297 ) },
63 {
PAPER_A5, mm2twips( 148 ), mm2twips( 210 ) },
70 {
PAPER_USER, in2twips( 8.5 ), in2twips( 13 ) },
73 {
PAPER_USER, in2twips( 11 ), in2twips( 17 ) },
74 {
PAPER_USER, in2twips( 8.5 ), in2twips( 11 ) },
75 {
PAPER_ENV_9, in2twips( 3.875 ), in2twips( 8.875 ) },
80 {
PAPER_C, in2twips( 17 ), in2twips( 22 ) },
81 {
PAPER_D, in2twips( 22 ), in2twips( 34 ) },
82 {
PAPER_E, in2twips( 34 ), in2twips( 44 ) },
100 {
PAPER_9x11, in2twips( 9 ), in2twips( 11 ) },
107 {
PAPER_USER, in2twips( 9.5 ), in2twips( 12 ) },
108 {
PAPER_USER, in2twips( 9.5 ), in2twips( 15 ) },
109 {
PAPER_USER, in2twips( 11.69 ), in2twips( 18 ) },
110 {
PAPER_USER, mm2twips( 235 ), mm2twips( 322 ) },
111 {
PAPER_USER, in2twips( 8.5 ), in2twips( 11 ) },
112 {
PAPER_USER, mm2twips( 210 ), mm2twips( 297 ) },
113 {
PAPER_USER, in2twips( 9.5 ), in2twips( 12 ) },
118 {
PAPER_USER, mm2twips( 148 ), mm2twips( 210 ) },
119 {
PAPER_USER, mm2twips( 182 ), mm2twips( 257 ) },
120 {
PAPER_USER, mm2twips( 322 ), mm2twips( 445 ) },
121 {
PAPER_USER, mm2twips( 174 ), mm2twips( 235 ) },
122 {
PAPER_USER, mm2twips( 201 ), mm2twips( 276 ) },
123 {
PAPER_A2, mm2twips( 420 ), mm2twips( 594 ) },
124 {
PAPER_USER, mm2twips( 297 ), mm2twips( 420 ) },
125 {
PAPER_USER, mm2twips( 322 ), mm2twips( 445 ) },
127 {
PAPER_A6, mm2twips( 105 ), mm2twips( 148 ) },
132 {
PAPER_USER, in2twips( 11 ), in2twips( 8.5 ) },
133 {
PAPER_USER, mm2twips( 420 ), mm2twips( 297 ) },
134 {
PAPER_USER, mm2twips( 297 ), mm2twips( 210 ) },
135 {
PAPER_USER, mm2twips( 210 ), mm2twips( 148 ) },
136 {
PAPER_USER, mm2twips( 364 ), mm2twips( 257 ) },
137 {
PAPER_USER, mm2twips( 257 ), mm2twips( 182 ) },
138 {
PAPER_USER, mm2twips( 148 ), mm2twips( 100 ) },
139 {
PAPER_USER, mm2twips( 148 ), mm2twips( 200 ) },
140 {
PAPER_USER, mm2twips( 148 ), mm2twips( 105 ) },
146 {
PAPER_USER, mm2twips( 182 ), mm2twips( 128 ) },
195 const XclPaperSize* pEntry = pPaperSizeTable;
201 aSize =
Size( pEntry->mnWidth, pEntry->mnHeight );
242 for(
const auto &rEntry : pPaperSizeTable)
244 tools::Long nWDiff = std::abs( rEntry.mnWidth - nWidth );
245 tools::Long nHDiff = std::abs( rEntry.mnHeight - nHeight );
246 if( ((nWDiff <= nMaxWDiff) && (nHDiff < nMaxHDiff)) ||
247 ((nWDiff < nMaxWDiff) && (nHDiff <= nMaxHDiff)) )
249 sal_uInt16
nIndex =
static_cast< sal_uInt16
>( &rEntry - pPaperSizeTable );
double mfHdrRightMargin
Left margin to header.
double mfRightMargin
Left margin in inches.
double mfFtrLeftMargin
Right margin to header.
const sal_Int32 EXC_MARGIN_DEFAULT_HF
Top/bottom default margin in 1/100mm.
sal_uInt16 mnVerPrintRes
Horizontal printing resolution.
sal_uInt16 mnCopies
Paper Height in mm.
const sal_Int32 EXC_MARGIN_DEFAULT_FLR
Left/right header default margin in 1/100mm.
bool mbManualStart
true = print notes.
void setWidth(tools::Long nWidth)
bool mbVerCenter
true = centered horizontally; false = left aligned.
double mfHdrLeftMargin
Margin main page to footer.
const sal_Int32 EXC_MARGIN_DEFAULT_HLR
Header/footer default margin in 1/100mm.
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
const sal_uInt16 EXC_PAPERSIZE_USER
OUString maFooterEven
Excel header string for even pages (empty = off).
sal_uInt16 mnPaperSize
Right margin to footer.
bool mbPrintGrid
true = print column and row headings.
bool mbUseFirstHF
True = use maHeaderEven/maFooterEven.
bool mbHorCenter
true = fit to pages; false = scale in percent.
constexpr tools::Long Width() const
void SetDefaults()
Sets Excel default page settings.
double mfTopMargin
Right margin in inches.
bool mbFitToPages
true = mnStartPage valid; false = automatic.
OUString maHeader
Background bitmap.
const sal_uInt16 EXC_PAPERSIZE_DEFAULT
#define SAL_N_ELEMENTS(arr)
static Size GetDefaultPaperSize(MapUnit eUnit=MapUnit::MapTwip)
bool mbValid
True = use maHeaderFirst/maFooterFirst.
sal_uInt16 mnPaperWidth
Same as papersize - but for ooxml (considering stricter dimensions)
const sal_Int32 EXC_MARGIN_DEFAULT_LR
XclPageData()
true = print grid lines.
sal_uInt16 mnStrictPaperSize
Index into paper size table.
OUString maFooter
Excel header string (empty = off).
sal_uInt16 mnStartPage
Number of copies.
SvxBrushItemPtr mxBrushItem
Vertical page breaks.
sal_uInt16 mnScaling
Start page number.
double mfFtrRightMargin
Left margin to footer.
const sal_Int32 EXC_MARGIN_DEFAULT_TB
Left/right default margin in 1/100mm.
void SetScPaperSize(const Size &rSize, bool bPortrait, bool bStrict=false)
Sets the Excel paper size index and paper orientation from Calc paper size (twips).
bool mbPrintNotes
true = draft; false = default quality.
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
ScfUInt16Vec maVerPageBreaks
Horizontal page breaks.
sal_uInt16 mnFitToWidth
Scaling in percent.
OUString maHeaderEven
Excel footer string (empty = off).
bool mbDraftQuality
true = black/white; false = colors.
bool mbPortrait
false = some of the values are not valid.
bool mbUseEvenHF
Vertical printing resolution.
ScfUInt16Vec maHorPageBreaks
sal_uInt16 mnPaperHeight
Paper Width in mm.
double mfBottomMargin
Top margin in inches.
double mfHeaderMargin
Bottom margin in inches.
constexpr tools::Long Height() const
Size GetScPaperSize() const
Returns the real paper size (twips) from the paper size index and paper orientation.
double mfFooterMargin
Margin main page to header.
bool mbBlackWhite
true = in rows; false = in columns.
sal_uInt16 mnHorPrintRes
Fit to number of pages in height.
void setHeight(tools::Long nHeight)
bool mbPrintHeadings
true = centered vertically; false = top aligned.
sal_uInt16 mnFitToHeight
Fit to number of pages in width.
bool mbPrintInRows
true = portrait; false = landscape.
double mfLeftMargin
Excel footer string for first page (empty = off).