xlnt - community edition
Public Member Functions | Public Attributes | Friends | List of all members
xlnt::page_setup Struct Reference

Describes how a worksheet will be converted into a page during printing. More...

#include <page_setup.hpp>

Public Member Functions

 page_setup ()
 Default constructor. More...
 
xlnt::page_break page_break () const
 Returns the page break. More...
 
void page_break (xlnt::page_break b)
 Sets the page break to b. More...
 
xlnt::sheet_state sheet_state () const
 Returns the current sheet state of this page setup. More...
 
void sheet_state (xlnt::sheet_state sheet_state)
 Sets the sheet state to sheet_state. More...
 
xlnt::paper_size paper_size () const
 Returns the paper size which should be used to print the worksheet using this page setup. Assumes that this page setup has a paper size (please call has_paper_size() to check). If this workbook has no paper size, the default paper_size::letter will be returned. More...
 
void paper_size (xlnt::paper_size paper_size)
 Sets the paper size of this page setup. More...
 
bool has_paper_size () const
 Check if current paper setting has paper size setting More...
 
bool fit_to_page () const
 Returns true if this worksheet should be scaled to fit on a single page during printing. More...
 
void fit_to_page (bool fit_to_page)
 If true, forces the worksheet to be scaled to fit on a single page during printing. More...
 
bool fit_to_height () const
 Returns true if the height of this worksheet should be scaled to fit on a printed page. More...
 
void fit_to_height (bool fit_to_height)
 Sets whether the height of the page should be scaled to fit on a printed page. More...
 
bool fit_to_width () const
 Returns true if the width of this worksheet should be scaled to fit on a printed page. More...
 
void fit_to_width (bool fit_to_width)
 Sets whether the width of the page should be scaled to fit on a printed page. More...
 
void scale (unsigned int scale)
 Sets the scale percentage by which the page should be scaled during printing. A value of 150 means 150% scaling. Possible values are between 10 and 400. Values outside this range will be clipped to the range limits. More...
 
unsigned int scale () const
 Returns the scale percentage by which the page should be scaled during printing. A value of 150 means 150% scaling. If no scale has been set (has_scale() returns false), the default scale of 100 will be returned. More...
 
bool has_scale () const
 Check if current paper setting has scale setting More...
 
const std::string & rel_id () const
 Gets reference relationship Id More...
 
void rel_id (const std::string &val)
 Sets reference relationship Id More...
 
bool has_rel_id () const
 Check if current paper setting has a reference relationship More...
 
bool operator== (const page_setup &rhs) const
 
bool operator!= (const page_setup &rhs) const
 

Public Attributes

xlnt::optional< xlnt::orientationorientation_
 The orientation More...
 
xlnt::optional< std::size_t > horizontal_dpi_
 The horizontal dpi More...
 
xlnt::optional< std::size_t > vertical_dpi_
 The vertical dpi More...
 

Friends

class xlnt::detail::xlsx_producer
 

Detailed Description

Describes how a worksheet will be converted into a page during printing.

Constructor & Destructor Documentation

◆ page_setup()

xlnt::page_setup::page_setup ( )

Default constructor.

Member Function Documentation

◆ fit_to_height() [1/2]

bool xlnt::page_setup::fit_to_height ( ) const

Returns true if the height of this worksheet should be scaled to fit on a printed page.

◆ fit_to_height() [2/2]

void xlnt::page_setup::fit_to_height ( bool  fit_to_height)

Sets whether the height of the page should be scaled to fit on a printed page.

◆ fit_to_page() [1/2]

bool xlnt::page_setup::fit_to_page ( ) const

Returns true if this worksheet should be scaled to fit on a single page during printing.

◆ fit_to_page() [2/2]

void xlnt::page_setup::fit_to_page ( bool  fit_to_page)

If true, forces the worksheet to be scaled to fit on a single page during printing.

◆ fit_to_width() [1/2]

bool xlnt::page_setup::fit_to_width ( ) const

Returns true if the width of this worksheet should be scaled to fit on a printed page.

◆ fit_to_width() [2/2]

void xlnt::page_setup::fit_to_width ( bool  fit_to_width)

Sets whether the width of the page should be scaled to fit on a printed page.

◆ has_paper_size()

bool xlnt::page_setup::has_paper_size ( ) const

Check if current paper setting has paper size setting

◆ has_rel_id()

bool xlnt::page_setup::has_rel_id ( ) const

Check if current paper setting has a reference relationship

◆ has_scale()

bool xlnt::page_setup::has_scale ( ) const

Check if current paper setting has scale setting

◆ page_break() [1/2]

xlnt::page_break xlnt::page_setup::page_break ( ) const

Returns the page break.

◆ page_break() [2/2]

void xlnt::page_setup::page_break ( xlnt::page_break  b)

Sets the page break to b.

◆ paper_size() [1/2]

xlnt::paper_size xlnt::page_setup::paper_size ( ) const

Returns the paper size which should be used to print the worksheet using this page setup. Assumes that this page setup has a paper size (please call has_paper_size() to check). If this workbook has no paper size, the default paper_size::letter will be returned.

◆ paper_size() [2/2]

void xlnt::page_setup::paper_size ( xlnt::paper_size  paper_size)

Sets the paper size of this page setup.

◆ rel_id() [1/2]

const std::string& xlnt::page_setup::rel_id ( ) const

Gets reference relationship Id

◆ rel_id() [2/2]

void xlnt::page_setup::rel_id ( const std::string &  val)

Sets reference relationship Id

◆ scale() [1/2]

void xlnt::page_setup::scale ( unsigned int  scale)

Sets the scale percentage by which the page should be scaled during printing. A value of 150 means 150% scaling. Possible values are between 10 and 400. Values outside this range will be clipped to the range limits.

◆ scale() [2/2]

unsigned int xlnt::page_setup::scale ( ) const

Returns the scale percentage by which the page should be scaled during printing. A value of 150 means 150% scaling. If no scale has been set (has_scale() returns false), the default scale of 100 will be returned.

◆ sheet_state() [1/2]

xlnt::sheet_state xlnt::page_setup::sheet_state ( ) const

Returns the current sheet state of this page setup.

◆ sheet_state() [2/2]

void xlnt::page_setup::sheet_state ( xlnt::sheet_state  sheet_state)

Sets the sheet state to sheet_state.

Member Data Documentation

◆ horizontal_dpi_

xlnt::optional<std::size_t> xlnt::page_setup::horizontal_dpi_

The horizontal dpi

◆ orientation_

xlnt::optional<xlnt::orientation> xlnt::page_setup::orientation_

The orientation

◆ vertical_dpi_

xlnt::optional<std::size_t> xlnt::page_setup::vertical_dpi_

The vertical dpi


The documentation for this struct was generated from the following file: