50constexpr 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 );
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
static Size GetDefaultPaperSize(MapUnit eUnit=MapUnit::MapTwip)
static Size GetPaperSize(Paper ePaper, MapUnit eUnit=MapUnit::MapTwip)
#define SAL_N_ELEMENTS(arr)
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
sal_uInt16 mnPaperSize
Right margin to footer.
sal_uInt16 mnVerPrintRes
Horizontal printing resolution.
double mfHeaderMargin
Bottom margin in inches.
sal_uInt16 mnScaling
Start page number.
bool mbBlackWhite
true = in rows; false = in columns.
SvxBrushItemPtr mxBrushItem
Vertical page breaks.
sal_uInt16 mnPaperHeight
Paper Width in mm.
bool mbUseEvenHF
Vertical printing resolution.
bool mbPrintHeadings
true = centered vertically; false = top aligned.
bool mbManualStart
true = print notes.
ScfUInt16Vec maHorPageBreaks
OUString maFooterEven
Excel header string for even pages (empty = off).
sal_uInt16 mnFitToHeight
Fit to number of pages in width.
double mfRightMargin
Left margin in inches.
bool mbPortrait
false = some of the values are not valid.
bool mbVerCenter
true = centered horizontally; false = left aligned.
sal_uInt16 mnStrictPaperSize
Index into paper size table.
void SetDefaults()
Sets Excel default page settings.
double mfFooterMargin
Margin main page to header.
bool mbValid
True = use maHeaderFirst/maFooterFirst.
double mfFtrRightMargin
Left margin to footer.
XclPageData()
true = print grid lines.
bool mbDraftQuality
true = black/white; false = colors.
OUString maFooter
Excel header string (empty = off).
bool mbPrintGrid
true = print column and row headings.
sal_uInt16 mnFitToWidth
Scaling in percent.
bool mbUseFirstHF
True = use maHeaderEven/maFooterEven.
double mfHdrRightMargin
Left margin to header.
sal_uInt16 mnPaperWidth
Same as papersize - but for ooxml (considering stricter dimensions)
OUString maHeaderEven
Excel footer string (empty = off).
void SetScPaperSize(const Size &rSize, bool bPortrait, bool bStrict=false)
Sets the Excel paper size index and paper orientation from Calc paper size (twips).
sal_uInt16 mnCopies
Paper Height in mm.
double mfBottomMargin
Top margin in inches.
bool mbHorCenter
true = fit to pages; false = scale in percent.
sal_uInt16 mnHorPrintRes
Fit to number of pages in height.
bool mbPrintNotes
true = draft; false = default quality.
double mfHdrLeftMargin
Margin main page to footer.
ScfUInt16Vec maVerPageBreaks
Horizontal page breaks.
Size GetScPaperSize() const
Returns the real paper size (twips) from the paper size index and paper orientation.
double mfTopMargin
Right margin in inches.
double mfFtrLeftMargin
Right margin to header.
bool mbFitToPages
true = mnStartPage valid; false = automatic.
bool mbPrintInRows
true = portrait; false = landscape.
OUString maHeader
Background bitmap.
sal_uInt16 mnStartPage
Number of copies.
double mfLeftMargin
Excel footer string for first page (empty = off).
const sal_Int32 EXC_MARGIN_DEFAULT_TB
Left/right default margin in 1/100mm.
const sal_Int32 EXC_MARGIN_DEFAULT_LR
const sal_uInt16 EXC_PAPERSIZE_DEFAULT
const sal_uInt16 EXC_PAPERSIZE_USER
const sal_Int32 EXC_MARGIN_DEFAULT_HF
Top/bottom default margin in 1/100mm.
const sal_Int32 EXC_MARGIN_DEFAULT_FLR
Left/right header default margin in 1/100mm.
const sal_Int32 EXC_MARGIN_DEFAULT_HLR
Header/footer default margin in 1/100mm.