xlnt
|
Represents the header and footer of a sheet in a workbook. More...
#include <header_footer.hpp>
Public Types | |
enum | location { left, center, right } |
Enumerates the three possible locations of a header or footer. More... | |
Public Member Functions | |
bool | has_header () const |
True if any text has been added for a header at any location on any page. More... | |
bool | has_footer () const |
True if any text has been added for a footer at any location on any page. More... | |
bool | align_with_margins () const |
True if headers and footers should align to the page margins. More... | |
header_footer & | align_with_margins (bool align) |
Set to true if headers and footers should align to the page margins. Set to false if headers and footers should align to the edge of the page. More... | |
bool | different_odd_even () const |
True if headers and footers differ based on page number. More... | |
bool | different_first () const |
True if headers and footers are different on the first page. More... | |
bool | scale_with_doc () const |
True if headers and footers should scale to match the worksheet. More... | |
header_footer & | scale_with_doc (bool scale) |
Set to true if headers and footers should scale to match the worksheet. More... | |
bool | has_header (location where) const |
True if any text has been added at the given location on any page. More... | |
void | clear_header () |
Remove all headers from all pages. More... | |
void | clear_header (location where) |
Remove header at the given location on any page. More... | |
header_footer & | header (location where, const std::string &text) |
Add a header at the given location with the given text. More... | |
header_footer & | header (location where, const rich_text &text) |
Add a header at the given location with the given text. More... | |
rich_text | header (location where) const |
Get the text of the header at the given location. If headers are different on odd and even pages, the odd header will be returned. More... | |
bool | has_first_page_header () const |
True if a header has been set for the first page at any location. More... | |
bool | has_first_page_header (location where) const |
True if a header has been set for the first page at the given location. More... | |
void | clear_first_page_header () |
Remove all headers from the first page. More... | |
void | clear_first_page_header (location where) |
Remove header from the first page at the given location. More... | |
header_footer & | first_page_header (location where, const rich_text &text) |
Add a header on the first page at the given location with the given text. More... | |
rich_text | first_page_header (location where) const |
Get the text of the first page header at the given location. If no first page header has been set, the general header for that location will be returned. More... | |
bool | has_odd_even_header () const |
True if different headers have been set for odd and even pages. More... | |
bool | has_odd_even_header (location where) const |
True if different headers have been set for odd and even pages at the given location. More... | |
void | clear_odd_even_header () |
Remove odd/even headers at all locations. More... | |
void | clear_odd_even_header (location where) |
Remove odd/even headers at the given location. More... | |
header_footer & | odd_even_header (location where, const rich_text &odd, const rich_text &even) |
Add a header for odd pages at the given location with the given text. More... | |
rich_text | odd_header (location where) const |
Get the text of the odd page header at the given location. If no odd page header has been set, the general header for that location will be returned. More... | |
rich_text | even_header (location where) const |
Get the text of the even page header at the given location. If no even page header has been set, the general header for that location will be returned. More... | |
bool | has_footer (location where) const |
True if any text has been added at the given location on any page. More... | |
void | clear_footer () |
Remove all footers from all pages. More... | |
void | clear_footer (location where) |
Remove footer at the given location on any page. More... | |
header_footer & | footer (location where, const std::string &text) |
Add a footer at the given location with the given text. More... | |
header_footer & | footer (location where, const rich_text &text) |
Add a footer at the given location with the given text. More... | |
rich_text | footer (location where) const |
Get the text of the footer at the given location. If footers are different on odd and even pages, the odd footer will be returned. More... | |
bool | has_first_page_footer () const |
True if a footer has been set for the first page at any location. More... | |
bool | has_first_page_footer (location where) const |
True if a footer has been set for the first page at the given location. More... | |
void | clear_first_page_footer () |
Remove all footers from the first page. More... | |
void | clear_first_page_footer (location where) |
Remove footer from the first page at the given location. More... | |
header_footer & | first_page_footer (location where, const rich_text &text) |
Add a footer on the first page at the given location with the given text. More... | |
rich_text | first_page_footer (location where) const |
Get the text of the first page footer at the given location. If no first page footer has been set, the general footer for that location will be returned. More... | |
bool | has_odd_even_footer () const |
True if different footers have been set for odd and even pages. More... | |
bool | has_odd_even_footer (location where) const |
True if different footers have been set for odd and even pages at the given location. More... | |
void | clear_odd_even_footer () |
Remove odd/even footers at all locations. More... | |
void | clear_odd_even_footer (location where) |
Remove odd/even footers at the given location. More... | |
header_footer & | odd_even_footer (location where, const rich_text &odd, const rich_text &even) |
Add a footer for odd pages at the given location with the given text. More... | |
rich_text | odd_footer (location where) const |
Get the text of the odd page footer at the given location. If no odd page footer has been set, the general footer for that location will be returned. More... | |
rich_text | even_footer (location where) const |
Get the text of the even page footer at the given location. If no even page footer has been set, the general footer for that location will be returned. More... | |
bool | operator== (const header_footer &rhs) const |
Represents the header and footer of a sheet in a workbook.
|
strong |
Enumerates the three possible locations of a header or footer.
bool xlnt::header_footer::align_with_margins | ( | ) | const |
True if headers and footers should align to the page margins.
header_footer& xlnt::header_footer::align_with_margins | ( | bool | align | ) |
Set to true if headers and footers should align to the page margins. Set to false if headers and footers should align to the edge of the page.
void xlnt::header_footer::clear_first_page_footer | ( | ) |
Remove all footers from the first page.
void xlnt::header_footer::clear_first_page_footer | ( | location | where | ) |
Remove footer from the first page at the given location.
void xlnt::header_footer::clear_first_page_header | ( | ) |
Remove all headers from the first page.
void xlnt::header_footer::clear_first_page_header | ( | location | where | ) |
Remove header from the first page at the given location.
void xlnt::header_footer::clear_footer | ( | ) |
Remove all footers from all pages.
void xlnt::header_footer::clear_footer | ( | location | where | ) |
Remove footer at the given location on any page.
void xlnt::header_footer::clear_header | ( | ) |
Remove all headers from all pages.
void xlnt::header_footer::clear_header | ( | location | where | ) |
Remove header at the given location on any page.
void xlnt::header_footer::clear_odd_even_footer | ( | ) |
Remove odd/even footers at all locations.
void xlnt::header_footer::clear_odd_even_footer | ( | location | where | ) |
Remove odd/even footers at the given location.
void xlnt::header_footer::clear_odd_even_header | ( | ) |
Remove odd/even headers at all locations.
void xlnt::header_footer::clear_odd_even_header | ( | location | where | ) |
Remove odd/even headers at the given location.
bool xlnt::header_footer::different_first | ( | ) | const |
True if headers and footers are different on the first page.
bool xlnt::header_footer::different_odd_even | ( | ) | const |
True if headers and footers differ based on page number.
Get the text of the even page footer at the given location. If no even page footer has been set, the general footer for that location will be returned.
Get the text of the even page header at the given location. If no even page header has been set, the general header for that location will be returned.
header_footer& xlnt::header_footer::first_page_footer | ( | location | where, |
const rich_text & | text | ||
) |
Add a footer on the first page at the given location with the given text.
Get the text of the first page footer at the given location. If no first page footer has been set, the general footer for that location will be returned.
header_footer& xlnt::header_footer::first_page_header | ( | location | where, |
const rich_text & | text | ||
) |
Add a header on the first page at the given location with the given text.
Get the text of the first page header at the given location. If no first page header has been set, the general header for that location will be returned.
header_footer& xlnt::header_footer::footer | ( | location | where, |
const std::string & | text | ||
) |
Add a footer at the given location with the given text.
header_footer& xlnt::header_footer::footer | ( | location | where, |
const rich_text & | text | ||
) |
Add a footer at the given location with the given text.
Get the text of the footer at the given location. If footers are different on odd and even pages, the odd footer will be returned.
bool xlnt::header_footer::has_first_page_footer | ( | ) | const |
True if a footer has been set for the first page at any location.
bool xlnt::header_footer::has_first_page_footer | ( | location | where | ) | const |
True if a footer has been set for the first page at the given location.
bool xlnt::header_footer::has_first_page_header | ( | ) | const |
True if a header has been set for the first page at any location.
bool xlnt::header_footer::has_first_page_header | ( | location | where | ) | const |
True if a header has been set for the first page at the given location.
bool xlnt::header_footer::has_footer | ( | ) | const |
True if any text has been added for a footer at any location on any page.
bool xlnt::header_footer::has_footer | ( | location | where | ) | const |
True if any text has been added at the given location on any page.
bool xlnt::header_footer::has_header | ( | ) | const |
True if any text has been added for a header at any location on any page.
bool xlnt::header_footer::has_header | ( | location | where | ) | const |
True if any text has been added at the given location on any page.
bool xlnt::header_footer::has_odd_even_footer | ( | ) | const |
True if different footers have been set for odd and even pages.
bool xlnt::header_footer::has_odd_even_footer | ( | location | where | ) | const |
True if different footers have been set for odd and even pages at the given location.
bool xlnt::header_footer::has_odd_even_header | ( | ) | const |
True if different headers have been set for odd and even pages.
bool xlnt::header_footer::has_odd_even_header | ( | location | where | ) | const |
True if different headers have been set for odd and even pages at the given location.
header_footer& xlnt::header_footer::header | ( | location | where, |
const std::string & | text | ||
) |
Add a header at the given location with the given text.
header_footer& xlnt::header_footer::header | ( | location | where, |
const rich_text & | text | ||
) |
Add a header at the given location with the given text.
Get the text of the header at the given location. If headers are different on odd and even pages, the odd header will be returned.
header_footer& xlnt::header_footer::odd_even_footer | ( | location | where, |
const rich_text & | odd, | ||
const rich_text & | even | ||
) |
Add a footer for odd pages at the given location with the given text.
header_footer& xlnt::header_footer::odd_even_header | ( | location | where, |
const rich_text & | odd, | ||
const rich_text & | even | ||
) |
Add a header for odd pages at the given location with the given text.
Get the text of the odd page footer at the given location. If no odd page footer has been set, the general footer for that location will be returned.
Get the text of the odd page header at the given location. If no odd page header has been set, the general header for that location will be returned.
bool xlnt::header_footer::scale_with_doc | ( | ) | const |
True if headers and footers should scale to match the worksheet.
header_footer& xlnt::header_footer::scale_with_doc | ( | bool | scale | ) |
Set to true if headers and footers should scale to match the worksheet.