mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix formatting
This commit is contained in:
parent
15eeccf044
commit
34aa24bdd6
@ -1,6 +1,9 @@
|
|||||||
---
|
---
|
||||||
BasedOnStyle: LLVM
|
BasedOnStyle: LLVM
|
||||||
AccessModifierOffset: 0
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: DontAlign
|
||||||
|
AlignTrailingComments: false
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
AllowShortBlocksOnASingleLine: false
|
AllowShortBlocksOnASingleLine: false
|
||||||
AllowShortFunctionsOnASingleLine: None
|
AllowShortFunctionsOnASingleLine: None
|
||||||
AllowShortIfStatementsOnASingleLine: true
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
@ -21,7 +24,7 @@ BraceWrapping:
|
|||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
ColumnLimit: 120
|
ColumnLimit: 120
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
||||||
Cpp11BracedListStyle: false
|
Cpp11BracedListStyle: true
|
||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
IndentCaseLabels: false
|
IndentCaseLabels: false
|
||||||
@ -30,6 +33,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
|
|||||||
Language: Cpp
|
Language: Cpp
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: None
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
|
PenaltyBreakComment: 1000
|
||||||
PointerAlignment: Right
|
PointerAlignment: Right
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceBeforeParens: ControlStatements
|
SpaceBeforeParens: ControlStatements
|
||||||
|
@ -51,7 +51,9 @@ struct datetime;
|
|||||||
struct time;
|
struct time;
|
||||||
struct timedelta;
|
struct timedelta;
|
||||||
|
|
||||||
namespace detail { struct cell_impl; }
|
namespace detail {
|
||||||
|
struct cell_impl;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Describes cell associated properties.
|
/// Describes cell associated properties.
|
||||||
@ -66,7 +68,7 @@ class XLNT_CLASS cell
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using type = cell_type;
|
using type = cell_type;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a map of error strings such as \#DIV/0! and their associated indices.
|
/// Return a map of error strings such as \#DIV/0! and their associated indices.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -126,7 +128,7 @@ public:
|
|||||||
/// Return the type of this cell.
|
/// Return the type of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
type get_data_type() const;
|
type get_data_type() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the type of this cell.
|
/// Set the type of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -146,130 +148,130 @@ public:
|
|||||||
bool is_date() const;
|
bool is_date() const;
|
||||||
|
|
||||||
// position
|
// position
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a cell_reference that points to the location of this cell.
|
/// Return a cell_reference that points to the location of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference get_reference() const;
|
cell_reference get_reference() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the column of this cell.
|
/// Return the column of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t get_column() const;
|
column_t get_column() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the row of this cell.
|
/// Return the row of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
row_t get_row() const;
|
row_t get_row() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the location of this cell as an ordered pair.
|
/// Return the location of this cell as an ordered pair.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::pair<int, int> get_anchor() const;
|
std::pair<int, int> get_anchor() const;
|
||||||
|
|
||||||
// hyperlink
|
// hyperlink
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a relationship representing this cell's hyperlink.
|
/// Return a relationship representing this cell's hyperlink.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
relationship get_hyperlink() const;
|
relationship get_hyperlink() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add a hyperlink to this cell pointing to the URI of the given value.
|
/// Add a hyperlink to this cell pointing to the URI of the given value.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void set_hyperlink(const std::string &value);
|
void set_hyperlink(const std::string &value);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this cell has a hyperlink set.
|
/// Return true if this cell has a hyperlink set.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool has_hyperlink() const;
|
bool has_hyperlink() const;
|
||||||
|
|
||||||
// style
|
// style
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this cell has had a style applied to it.
|
/// Return true if this cell has had a style applied to it.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool has_style() const;
|
bool has_style() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the index of this cell's style in its parent workbook.
|
/// Return the index of this cell's style in its parent workbook.
|
||||||
/// This is also the index of the style in the stylesheet XML, xl/styles.xml.
|
/// This is also the index of the style in the stylesheet XML, xl/styles.xml.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::size_t get_style_id() const;
|
std::size_t get_style_id() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the style index of this cell. This should be an existing style in
|
/// Set the style index of this cell. This should be an existing style in
|
||||||
/// the parent workbook.
|
/// the parent workbook.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void set_style_id(std::size_t style_id);
|
void set_style_id(std::size_t style_id);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the number format of this cell.
|
/// Return the number format of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const number_format &get_number_format() const;
|
const number_format &get_number_format() const;
|
||||||
void set_number_format(const number_format &format);
|
void set_number_format(const number_format &format);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the font applied to the text in this cell.
|
/// Return the font applied to the text in this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const font &get_font() const;
|
const font &get_font() const;
|
||||||
|
|
||||||
void set_font(const font &font_);
|
void set_font(const font &font_);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the fill applied to this cell.
|
/// Return the fill applied to this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const fill &get_fill() const;
|
const fill &get_fill() const;
|
||||||
|
|
||||||
void set_fill(const fill &fill_);
|
void set_fill(const fill &fill_);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the border of this cell.
|
/// Return the border of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const border &get_border() const;
|
const border &get_border() const;
|
||||||
|
|
||||||
void set_border(const border &border_);
|
void set_border(const border &border_);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the alignment of the text in this cell.
|
/// Return the alignment of the text in this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const alignment &get_alignment() const;
|
const alignment &get_alignment() const;
|
||||||
|
|
||||||
void set_alignment(const alignment &alignment_);
|
void set_alignment(const alignment &alignment_);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the protection of this cell.
|
/// Return the protection of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const protection &get_protection() const;
|
const protection &get_protection() const;
|
||||||
|
|
||||||
void set_protection(const protection &protection_);
|
void set_protection(const protection &protection_);
|
||||||
|
|
||||||
void set_pivot_button(bool b);
|
void set_pivot_button(bool b);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true iff pivot button?
|
/// Return true iff pivot button?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool pivot_button() const;
|
bool pivot_button() const;
|
||||||
|
|
||||||
void set_quote_prefix(bool b);
|
void set_quote_prefix(bool b);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true iff quote prefix?
|
/// Return true iff quote prefix?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool quote_prefix() const;
|
bool quote_prefix() const;
|
||||||
|
|
||||||
// comment
|
// comment
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the comment of this cell.
|
/// Return the comment of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
comment get_comment();
|
comment get_comment();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the comment of this cell.
|
/// Return the comment of this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const comment get_comment() const;
|
const comment get_comment() const;
|
||||||
|
|
||||||
void set_comment(const comment &comment);
|
void set_comment(const comment &comment);
|
||||||
void clear_comment();
|
void clear_comment();
|
||||||
bool has_comment() const;
|
bool has_comment() const;
|
||||||
@ -294,13 +296,13 @@ public:
|
|||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
|
|
||||||
// merging
|
// merging
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true iff this cell has been merged with one or more
|
/// Return true iff this cell has been merged with one or more
|
||||||
/// surrounding cells.
|
/// surrounding cells.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool is_merged() const;
|
bool is_merged() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make this a merged cell iff merged is true.
|
/// Make this a merged cell iff merged is true.
|
||||||
/// Generally, this shouldn't be called directly. Instead,
|
/// Generally, this shouldn't be called directly. Instead,
|
||||||
@ -312,7 +314,7 @@ public:
|
|||||||
/// Return the error string that is stored in this cell.
|
/// Return the error string that is stored in this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::string get_error() const;
|
std::string get_error() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Directly assign the value of this cell to be the given error.
|
/// Directly assign the value of this cell to be the given error.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -323,12 +325,12 @@ public:
|
|||||||
/// a relative offset given by the parameters.
|
/// a relative offset given by the parameters.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell offset(int column, int row);
|
cell offset(int column, int row);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the worksheet that owns this cell.
|
/// Return the worksheet that owns this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
worksheet get_parent();
|
worksheet get_parent();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the worksheet that owns this cell.
|
/// Return the worksheet that owns this cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -346,7 +348,7 @@ public:
|
|||||||
std::string check_string(const std::string &to_check);
|
std::string check_string(const std::string &to_check);
|
||||||
|
|
||||||
// operators
|
// operators
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make this cell point to rhs.
|
/// Make this cell point to rhs.
|
||||||
/// The cell originally pointed to by this cell will be unchanged.
|
/// The cell originally pointed to by this cell will be unchanged.
|
||||||
@ -357,30 +359,30 @@ public:
|
|||||||
/// Return true if this cell the same cell as comparand (compare by reference).
|
/// Return true if this cell the same cell as comparand (compare by reference).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const cell &comparand) const;
|
bool operator==(const cell &comparand) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this cell is uninitialized.
|
/// Return true if this cell is uninitialized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(std::nullptr_t) const;
|
bool operator==(std::nullptr_t) const;
|
||||||
|
|
||||||
// friend operators, so we can put cell on either side of comparisons with other types
|
// friend operators, so we can put cell on either side of comparisons with other types
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this cell is uninitialized.
|
/// Return true if this cell is uninitialized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend XLNT_FUNCTION bool operator==(std::nullptr_t, const cell &cell);
|
friend XLNT_FUNCTION bool operator==(std::nullptr_t, const cell &cell);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of left.get_reference() < right.get_reference().
|
/// Return the result of left.get_reference() < right.get_reference().
|
||||||
/// What's the point of this?
|
/// What's the point of this?
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend XLNT_FUNCTION bool operator<(cell left, cell right);
|
friend XLNT_FUNCTION bool operator<(cell left, cell right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convenience function for writing cell to an ostream.
|
/// Convenience function for writing cell to an ostream.
|
||||||
/// Uses cell::to_string() internally.
|
/// Uses cell::to_string() internally.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend XLNT_FUNCTION std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell);
|
friend XLNT_FUNCTION std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// make these friends so they can use the private constructor
|
// make these friends so they can use the private constructor
|
||||||
@ -392,7 +394,7 @@ private:
|
|||||||
/// Private constructor to create a cell from its implementation.
|
/// Private constructor to create a cell from its implementation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell(detail::cell_impl *d);
|
cell(detail::cell_impl *d);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A pointer to this cell's implementation.
|
/// A pointer to this cell's implementation.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -52,7 +52,7 @@ struct XLNT_CLASS cell_reference_hash
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS cell_reference
|
class XLNT_CLASS cell_reference
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Split a coordinate string like "A1" into an equivalent pair like {"A", 1}.
|
/// Split a coordinate string like "A1" into an equivalent pair like {"A", 1}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -64,41 +64,41 @@ class XLNT_CLASS cell_reference
|
|||||||
/// if column part or row part are prefixed by a dollar-sign indicating they
|
/// if column part or row part are prefixed by a dollar-sign indicating they
|
||||||
/// are absolute, otherwise false.
|
/// are absolute, otherwise false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
static std::pair<std::string, row_t> split_reference(const std::string &reference_string,
|
static std::pair<std::string, row_t> split_reference(
|
||||||
bool &absolute_column, bool &absolute_row);
|
const std::string &reference_string, bool &absolute_column, bool &absolute_row);
|
||||||
|
|
||||||
// constructors
|
// constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor makes a reference to the top-left-most cell, "A1".
|
/// Default constructor makes a reference to the top-left-most cell, "A1".
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference();
|
cell_reference();
|
||||||
|
|
||||||
//TODO: should these be explicit? The implicit conversion is nice sometimes.
|
// TODO: should these be explicit? The implicit conversion is nice sometimes.
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
|
/// Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference(const char *reference_string);
|
cell_reference(const char *reference_string);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
|
/// Constructs a cell_reference from a string reprenting a cell coordinate (e.g. $B14).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference(const std::string &reference_string);
|
cell_reference(const std::string &reference_string);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a cell_reference from a string reprenting a column (e.g. A) and
|
/// Constructs a cell_reference from a string reprenting a column (e.g. A) and
|
||||||
/// a 1-indexed row.
|
/// a 1-indexed row.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference(const std::string &column, row_t row);
|
cell_reference(const std::string &column, row_t row);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a cell_reference from a 1-indexed column index and row index.
|
/// Constructs a cell_reference from a 1-indexed column index and row index.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
cell_reference(column_t column, row_t row);
|
cell_reference(column_t column, row_t row);
|
||||||
|
|
||||||
// absoluateness
|
// absoluateness
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a coordinate to an absolute coordinate string (e.g. B12 -> $B$12)
|
/// Convert a coordinate to an absolute coordinate string (e.g. B12 -> $B$12)
|
||||||
/// Defaulting to true, absolute_column and absolute_row can optionally control
|
/// Defaulting to true, absolute_column and absolute_row can optionally control
|
||||||
@ -113,7 +113,7 @@ class XLNT_CLASS cell_reference
|
|||||||
/// return copy;
|
/// return copy;
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
cell_reference &make_absolute(bool absolute_column = true, bool absolute_row = true);
|
cell_reference &make_absolute(bool absolute_column = true, bool absolute_row = true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if the reference refers to an absolute column, otherwise false.
|
/// Return true if the reference refers to an absolute column, otherwise false.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -137,13 +137,13 @@ class XLNT_CLASS cell_reference
|
|||||||
void row_absolute(bool absolute_row);
|
void row_absolute(bool absolute_row);
|
||||||
|
|
||||||
// getters/setters
|
// getters/setters
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a string that identifies the column of this reference
|
/// Return a string that identifies the column of this reference
|
||||||
/// (e.g. second column from left is "B")
|
/// (e.g. second column from left is "B")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t get_column() const;
|
column_t get_column() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the column of this reference from a string that identifies a particular column.
|
/// Set the column of this reference from a string that identifies a particular column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -153,7 +153,7 @@ class XLNT_CLASS cell_reference
|
|||||||
/// Return a 1-indexed numeric index of the column of this reference.
|
/// Return a 1-indexed numeric index of the column of this reference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t get_column_index() const;
|
column_t get_column_index() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the column of this reference from a 1-indexed number that identifies a particular column.
|
/// Set the column of this reference from a 1-indexed number that identifies a particular column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -163,7 +163,7 @@ class XLNT_CLASS cell_reference
|
|||||||
/// Return a 1-indexed numeric index of the row of this reference.
|
/// Return a 1-indexed numeric index of the row of this reference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
row_t get_row() const;
|
row_t get_row() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set the row of this reference from a 1-indexed number that identifies a particular row.
|
/// Set the row of this reference from a 1-indexed number that identifies a particular row.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -188,7 +188,7 @@ class XLNT_CLASS cell_reference
|
|||||||
range_reference to_range() const;
|
range_reference to_range() const;
|
||||||
|
|
||||||
// operators
|
// operators
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// I've always wanted to overload the comma operator.
|
/// I've always wanted to overload the comma operator.
|
||||||
/// cell_reference("A", 1), cell_reference("B", 1) will return
|
/// cell_reference("A", 1), cell_reference("B", 1) will return
|
||||||
@ -201,44 +201,44 @@ class XLNT_CLASS cell_reference
|
|||||||
/// in absoluteness of column and row.
|
/// in absoluteness of column and row.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const cell_reference &comparand) const;
|
bool operator==(const cell_reference &comparand) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a cell_reference from reference_string and return the result
|
/// Construct a cell_reference from reference_string and return the result
|
||||||
/// of their comparison.
|
/// of their comparison.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const std::string &reference_string) const;
|
bool operator==(const std::string &reference_string) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a cell_reference from reference_string and return the result
|
/// Construct a cell_reference from reference_string and return the result
|
||||||
/// of their comparison.
|
/// of their comparison.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const char *reference_string) const;
|
bool operator==(const char *reference_string) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this reference is not identical to comparand including
|
/// Return true if this reference is not identical to comparand including
|
||||||
/// in absoluteness of column and row.
|
/// in absoluteness of column and row.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(const cell_reference &comparand) const;
|
bool operator!=(const cell_reference &comparand) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a cell_reference from reference_string and return the result
|
/// Construct a cell_reference from reference_string and return the result
|
||||||
/// of their comparison.
|
/// of their comparison.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(const std::string &reference_string) const;
|
bool operator!=(const std::string &reference_string) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a cell_reference from reference_string and return the result
|
/// Construct a cell_reference from reference_string and return the result
|
||||||
/// of their comparison.
|
/// of their comparison.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(const char *reference_string) const;
|
bool operator!=(const char *reference_string) const;
|
||||||
|
|
||||||
//TODO: are these useful? maybe get rid of them
|
// TODO: are these useful? maybe get rid of them
|
||||||
bool operator<(const cell_reference &other);
|
bool operator<(const cell_reference &other);
|
||||||
bool operator>(const cell_reference &other);
|
bool operator>(const cell_reference &other);
|
||||||
bool operator<=(const cell_reference &other);
|
bool operator<=(const cell_reference &other);
|
||||||
bool operator>=(const cell_reference &other);
|
bool operator>=(const cell_reference &other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Index of the column. Important: this is one-indexed to conform
|
/// Index of the column. Important: this is one-indexed to conform
|
||||||
/// with Excel. Column "A", the first column, would have an index of 1.
|
/// with Excel. Column "A", the first column, would have an index of 1.
|
||||||
@ -255,7 +255,7 @@ class XLNT_CLASS cell_reference
|
|||||||
/// True if the reference's row is absolute. This looks like "A$1" in Excel.
|
/// True if the reference's row is absolute. This looks like "A$1" in Excel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool absolute_row_;
|
bool absolute_row_;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// True if the reference's column is absolute. This looks like "$A1" in Excel.
|
/// True if the reference's column is absolute. This looks like "$A1" in Excel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -30,31 +30,33 @@
|
|||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class cell;
|
class cell;
|
||||||
namespace detail { struct comment_impl; }
|
namespace detail {
|
||||||
|
struct comment_impl;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A comment can be applied to a cell to provide extra information.
|
/// A comment can be applied to a cell to provide extra information.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS comment
|
class XLNT_CLASS comment
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The default constructor makes an invalid comment without a parent cell.
|
/// The default constructor makes an invalid comment without a parent cell.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
comment();
|
comment();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructs a comment applied to the given cell, parent, and with the comment
|
/// Constructs a comment applied to the given cell, parent, and with the comment
|
||||||
/// text and author set to the provided respective values.
|
/// text and author set to the provided respective values.
|
||||||
comment(cell parent, const std::string &text, const std::string &auth);
|
comment(cell parent, const std::string &text, const std::string &auth);
|
||||||
|
|
||||||
~comment();
|
~comment();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the text that will be displayed for this comment.
|
/// Return the text that will be displayed for this comment.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::string get_text() const;
|
std::string get_text() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the author of this comment.
|
/// Return the author of this comment.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -68,14 +70,14 @@ class XLNT_CLASS comment
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const comment &other) const;
|
bool operator==(const comment &other) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class cell; // cell needs access to private constructor
|
friend class cell; // cell needs access to private constructor
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a comment from an implementation of a comment.
|
/// Construct a comment from an implementation of a comment.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
comment(detail::comment_impl *d);
|
comment(detail::comment_impl *d);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to the implementation of this comment.
|
/// Pointer to the implementation of this comment.
|
||||||
/// This allows comments to be passed by value while
|
/// This allows comments to be passed by value while
|
||||||
|
@ -67,62 +67,62 @@ public:
|
|||||||
/// ordinals by adding 64.
|
/// ordinals by adding 64.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
static std::string column_string_from_index(index_t column_index);
|
static std::string column_string_from_index(index_t column_index);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default column_t is the first (left-most) column.
|
/// Default column_t is the first (left-most) column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t();
|
column_t();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a column from a number.
|
/// Construct a column from a number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t(index_t column_index);
|
column_t(index_t column_index);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a column from a string.
|
/// Construct a column from a string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
explicit column_t(const std::string &column_string);
|
explicit column_t(const std::string &column_string);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a column from a string.
|
/// Construct a column from a string.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
explicit column_t(const char *column_string);
|
explicit column_t(const char *column_string);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Copy constructor
|
/// Copy constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t(const column_t &other);
|
column_t(const column_t &other);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Move constructor
|
/// Move constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t(column_t &&other);
|
column_t(column_t &&other);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a string representation of this column index.
|
/// Return a string representation of this column index.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::string column_string() const;
|
std::string column_string() const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set this column to be the same as rhs's and return reference to self.
|
/// Set this column to be the same as rhs's and return reference to self.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator=(column_t rhs);
|
column_t &operator=(column_t rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set this column to be equal to rhs and return reference to self.
|
/// Set this column to be equal to rhs and return reference to self.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator=(const std::string &rhs);
|
column_t &operator=(const std::string &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set this column to be equal to rhs and return reference to self.
|
/// Set this column to be equal to rhs and return reference to self.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator=(const char *rhs);
|
column_t &operator=(const char *rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column refers to the same column as other.
|
/// Return true if this column refers to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const column_t &other) const;
|
bool operator==(const column_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column doesn't refer to the same column as other.
|
/// Return true if this column doesn't refer to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -132,177 +132,177 @@ public:
|
|||||||
/// Return true if this column refers to the same column as other.
|
/// Return true if this column refers to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(int other) const;
|
bool operator==(int other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column refers to the same column as other.
|
/// Return true if this column refers to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(index_t other) const;
|
bool operator==(index_t other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column refers to the same column as other.
|
/// Return true if this column refers to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const std::string &other) const;
|
bool operator==(const std::string &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column refers to the same column as other.
|
/// Return true if this column refers to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator==(const char *other) const;
|
bool operator==(const char *other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column doesn't refer to the same column as other.
|
/// Return true if this column doesn't refer to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(int other) const;
|
bool operator!=(int other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column doesn't refer to the same column as other.
|
/// Return true if this column doesn't refer to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(index_t other) const;
|
bool operator!=(index_t other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column doesn't refer to the same column as other.
|
/// Return true if this column doesn't refer to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(const std::string &other) const;
|
bool operator!=(const std::string &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if this column doesn't refer to the same column as other.
|
/// Return true if this column doesn't refer to the same column as other.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator!=(const char *other) const;
|
bool operator!=(const char *other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of this column.
|
/// Return true if other is to the right of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator>(const column_t &other) const;
|
bool operator>(const column_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of or equal to this column.
|
/// Return true if other is to the right of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator>=(const column_t &other) const;
|
bool operator>=(const column_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of this column.
|
/// Return true if other is to the left of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator<(const column_t &other) const;
|
bool operator<(const column_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of or equal to this column.
|
/// Return true if other is to the left of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator<=(const column_t &other) const;
|
bool operator<=(const column_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of this column.
|
/// Return true if other is to the right of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator>(const column_t::index_t &other) const;
|
bool operator>(const column_t::index_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of or equal to this column.
|
/// Return true if other is to the right of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator>=(const column_t::index_t &other) const;
|
bool operator>=(const column_t::index_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of this column.
|
/// Return true if other is to the left of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator<(const column_t::index_t &other) const;
|
bool operator<(const column_t::index_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of or equal to this column.
|
/// Return true if other is to the left of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool operator<=(const column_t::index_t &other) const;
|
bool operator<=(const column_t::index_t &other) const;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pre-increment this column, making it point to the column one to the right.
|
/// Pre-increment this column, making it point to the column one to the right.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator++();
|
column_t &operator++();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pre-deccrement this column, making it point to the column one to the left.
|
/// Pre-deccrement this column, making it point to the column one to the left.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator--();
|
column_t &operator--();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Post-increment this column, making it point to the column one to the right and returning the old column.
|
/// Post-increment this column, making it point to the column one to the right and returning the old column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator++(int);
|
column_t operator++(int);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Post-decrement this column, making it point to the column one to the left and returning the old column.
|
/// Post-decrement this column, making it point to the column one to the left and returning the old column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator--(int);
|
column_t operator--(int);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator+(const column_t &rhs);
|
column_t operator+(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator-(const column_t &rhs);
|
column_t operator-(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator*(const column_t &rhs);
|
column_t operator*(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator/(const column_t &rhs);
|
column_t operator/(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return the result of adding rhs to this column.
|
/// Return the result of adding rhs to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t operator%(const column_t &rhs);
|
column_t operator%(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add rhs to this column and return a reference to this column.
|
/// Add rhs to this column and return a reference to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator+=(const column_t &rhs);
|
column_t &operator+=(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Subtrac rhs from this column and return a reference to this column.
|
/// Subtrac rhs from this column and return a reference to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator-=(const column_t &rhs);
|
column_t &operator-=(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Multiply this column by rhs and return a reference to this column.
|
/// Multiply this column by rhs and return a reference to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator*=(const column_t &rhs);
|
column_t &operator*=(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Divide this column by rhs and return a reference to this column.
|
/// Divide this column by rhs and return a reference to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator/=(const column_t &rhs);
|
column_t &operator/=(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Mod this column by rhs and return a reference to this column.
|
/// Mod this column by rhs and return a reference to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
column_t &operator%=(const column_t &rhs);
|
column_t &operator%=(const column_t &rhs);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of this column.
|
/// Return true if other is to the right of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend bool operator>(const column_t::index_t &left, const column_t &right);
|
friend bool operator>(const column_t::index_t &left, const column_t &right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the right of or equal to this column.
|
/// Return true if other is to the right of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend bool operator>=(const column_t::index_t &left, const column_t &right);
|
friend bool operator>=(const column_t::index_t &left, const column_t &right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of this column.
|
/// Return true if other is to the left of this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend bool operator<(const column_t::index_t &left, const column_t &right);
|
friend bool operator<(const column_t::index_t &left, const column_t &right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return true if other is to the left of or equal to this column.
|
/// Return true if other is to the left of or equal to this column.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend bool operator<=(const column_t::index_t &left, const column_t &right);
|
friend bool operator<=(const column_t::index_t &left, const column_t &right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Swap the columns that left and right refer to.
|
/// Swap the columns that left and right refer to.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
friend void swap(column_t &left, column_t &right);
|
friend void swap(column_t &left, column_t &right);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal numeric value of this column index.
|
/// Internal numeric value of this column index.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -329,7 +329,7 @@ struct hash<xlnt::column_t>
|
|||||||
{
|
{
|
||||||
return hasher(k);
|
return hasher(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
xlnt::column_hash hasher;
|
xlnt::column_hash hasher;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS axis {
|
class XLNT_CLASS axis
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS bar_chart {
|
class XLNT_CLASS bar_chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS chart {
|
class XLNT_CLASS chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS error_bar {
|
class XLNT_CLASS error_bar
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS graph_chart {
|
class XLNT_CLASS graph_chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS legend {
|
class XLNT_CLASS legend
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS line_chart {
|
class XLNT_CLASS line_chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS pie_chart {
|
class XLNT_CLASS pie_chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS scatter_chart {
|
class XLNT_CLASS scatter_chart
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS series {
|
class XLNT_CLASS series
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -32,10 +32,10 @@ struct drawing_struct;
|
|||||||
|
|
||||||
class XLNT_CLASS drawing
|
class XLNT_CLASS drawing
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
drawing();
|
drawing();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class worksheet;
|
friend class worksheet;
|
||||||
drawing(drawing_struct *root);
|
drawing(drawing_struct *root);
|
||||||
drawing_struct *root_;
|
drawing_struct *root_;
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS known_formulae {
|
class XLNT_CLASS known_formulae
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
|
|
||||||
class XLNT_CLASS tokenizer {
|
class XLNT_CLASS tokenizer
|
||||||
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -47,7 +47,7 @@ class XLNT_CLASS translator
|
|||||||
void translate_range(const range_reference &range_ref);
|
void translate_range(const range_reference &range_ref);
|
||||||
void translate_formula(const cell_reference &dest);
|
void translate_formula(const cell_reference &dest);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string ROW_RANGE_RE;
|
const std::string ROW_RANGE_RE;
|
||||||
const std::string COL_RANGE_RE;
|
const std::string COL_RANGE_RE;
|
||||||
const std::string CELL_REF_RE;
|
const std::string CELL_REF_RE;
|
||||||
|
@ -36,7 +36,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS default_type
|
class XLNT_CLASS default_type
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
default_type();
|
default_type();
|
||||||
default_type(const std::string &extension, const std::string &content_type);
|
default_type(const std::string &extension, const std::string &content_type);
|
||||||
default_type(const default_type &other);
|
default_type(const default_type &other);
|
||||||
@ -45,7 +45,7 @@ class XLNT_CLASS default_type
|
|||||||
std::string get_extension() const;
|
std::string get_extension() const;
|
||||||
std::string get_content_type() const;
|
std::string get_content_type() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string extension_;
|
std::string extension_;
|
||||||
std::string content_type_;
|
std::string content_type_;
|
||||||
};
|
};
|
||||||
|
@ -38,18 +38,18 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS manifest
|
class XLNT_CLASS manifest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool has_default_type(const std::string &extension) const;
|
bool has_default_type(const std::string &extension) const;
|
||||||
std::string get_default_type(const std::string &extension) const;
|
std::string get_default_type(const std::string &extension) const;
|
||||||
const std::vector<default_type> &get_default_types() const;
|
const std::vector<default_type> &get_default_types() const;
|
||||||
void add_default_type(const std::string &extension, const std::string &content_type);
|
void add_default_type(const std::string &extension, const std::string &content_type);
|
||||||
|
|
||||||
bool has_override_type(const std::string &part_name) const;
|
bool has_override_type(const std::string &part_name) const;
|
||||||
std::string get_override_type(const std::string &part_name) const;
|
std::string get_override_type(const std::string &part_name) const;
|
||||||
const std::vector<override_type> &get_override_types() const;
|
const std::vector<override_type> &get_override_types() const;
|
||||||
void add_override_type(const std::string &part_name, const std::string &content_type);
|
void add_override_type(const std::string &part_name, const std::string &content_type);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<default_type> default_types_;
|
std::vector<default_type> default_types_;
|
||||||
std::vector<override_type> override_types_;
|
std::vector<override_type> override_types_;
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS override_type
|
class XLNT_CLASS override_type
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
override_type();
|
override_type();
|
||||||
override_type(const std::string &extension, const std::string &content_type);
|
override_type(const std::string &extension, const std::string &content_type);
|
||||||
override_type(const override_type &other);
|
override_type(const override_type &other);
|
||||||
@ -44,7 +44,7 @@ class XLNT_CLASS override_type
|
|||||||
std::string get_part_name() const;
|
std::string get_part_name() const;
|
||||||
std::string get_content_type() const;
|
std::string get_content_type() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string part_name_;
|
std::string part_name_;
|
||||||
std::string content_type_;
|
std::string content_type_;
|
||||||
};
|
};
|
||||||
|
@ -50,7 +50,7 @@ enum class XLNT_CLASS target_mode
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS relationship
|
class XLNT_CLASS relationship
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class type
|
enum class type
|
||||||
{
|
{
|
||||||
invalid,
|
invalid,
|
||||||
@ -70,11 +70,11 @@ class XLNT_CLASS relationship
|
|||||||
static type type_from_string(const std::string &type_string);
|
static type type_from_string(const std::string &type_string);
|
||||||
|
|
||||||
static std::string type_to_string(type t);
|
static std::string type_to_string(type t);
|
||||||
|
|
||||||
relationship();
|
relationship();
|
||||||
|
|
||||||
relationship(const std::string &t, const std::string &r_id = "", const std::string &target_uri = "");
|
relationship(const std::string &t, const std::string &r_id = "", const std::string &target_uri = "");
|
||||||
|
|
||||||
relationship(type t, const std::string &r_id = "", const std::string &target_uri = "");
|
relationship(type t, const std::string &r_id = "", const std::string &target_uri = "");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -98,12 +98,12 @@ class XLNT_CLASS relationship
|
|||||||
std::string get_target_uri() const;
|
std::string get_target_uri() const;
|
||||||
|
|
||||||
type get_type() const;
|
type get_type() const;
|
||||||
|
|
||||||
std::string get_type_string() const;
|
std::string get_type_string() const;
|
||||||
|
|
||||||
bool operator==(const relationship &rhs) const;
|
bool operator==(const relationship &rhs) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
type type_;
|
type type_;
|
||||||
std::string id_;
|
std::string id_;
|
||||||
std::string source_uri_;
|
std::string source_uri_;
|
||||||
|
@ -83,7 +83,7 @@ struct XLNT_CLASS zip_info
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS zip_file
|
class XLNT_CLASS zip_file
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
zip_file();
|
zip_file();
|
||||||
zip_file(const std::string &filename);
|
zip_file(const std::string &filename);
|
||||||
zip_file(const std::vector<unsigned char> &bytes);
|
zip_file(const std::vector<unsigned char> &bytes);
|
||||||
@ -143,7 +143,7 @@ class XLNT_CLASS zip_file
|
|||||||
|
|
||||||
std::string comment;
|
std::string comment;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void start_read();
|
void start_read();
|
||||||
void start_write();
|
void start_write();
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class XLNT_CLASS comment_serializer
|
|||||||
xml_document write_comments() const;
|
xml_document write_comments() const;
|
||||||
xml_document write_comments_vml() const;
|
xml_document write_comments_vml() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet sheet_;
|
worksheet sheet_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class workbook;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS excel_serializer
|
class XLNT_CLASS excel_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -73,8 +73,8 @@ class XLNT_CLASS excel_serializer
|
|||||||
/// Create a ZIP file in memory, load archive from bytes, then populate workbook
|
/// Create a ZIP file in memory, load archive from bytes, then populate workbook
|
||||||
/// with data from archive.
|
/// with data from archive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool load_virtual_workbook(const std::vector<std::uint8_t> &bytes, bool guess_types = false,
|
bool load_virtual_workbook(
|
||||||
bool data_only = false);
|
const std::vector<std::uint8_t> &bytes, bool guess_types = false, bool data_only = false);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create a ZIP file in memory, save workbook to this archive, then save archive
|
/// Create a ZIP file in memory, save workbook to this archive, then save archive
|
||||||
@ -94,7 +94,7 @@ class XLNT_CLASS excel_serializer
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool save_stream_workbook(std::ostream &stream, bool as_template = false);
|
bool save_stream_workbook(std::ostream &stream, bool as_template = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads all files in archive and populates workbook with associated data
|
/// Reads all files in archive and populates workbook with associated data
|
||||||
/// using other appropriate serializers such as workbook_serializer.
|
/// using other appropriate serializers such as workbook_serializer.
|
||||||
|
@ -37,7 +37,7 @@ class xml_document;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS manifest_serializer
|
class XLNT_CLASS manifest_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
manifest_serializer(manifest &m);
|
manifest_serializer(manifest &m);
|
||||||
|
|
||||||
void read_manifest(const xml_document &xml);
|
void read_manifest(const xml_document &xml);
|
||||||
@ -45,7 +45,7 @@ class XLNT_CLASS manifest_serializer
|
|||||||
|
|
||||||
std::string determine_document_type() const;
|
std::string determine_document_type() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
manifest &manifest_;
|
manifest &manifest_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -43,17 +43,17 @@ public:
|
|||||||
/// Construct a serializer which operates on archive.
|
/// Construct a serializer which operates on archive.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
relationship_serializer(zip_file &archive);
|
relationship_serializer(zip_file &archive);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Return a vector of relationships corresponding to target.
|
/// Return a vector of relationships corresponding to target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
std::vector<relationship> read_relationships(const std::string &target);
|
std::vector<relationship> read_relationships(const std::string &target);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Write relationships to archive for the given target.
|
/// Write relationships to archive for the given target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
bool write_relationships(const std::vector<relationship> &relationships, const std::string &target);
|
bool write_relationships(const std::vector<relationship> &relationships, const std::string &target);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal archive which is used for reading and writing.
|
/// Internal archive which is used for reading and writing.
|
||||||
|
@ -37,7 +37,7 @@ class xml_document;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS shared_strings_serializer
|
class XLNT_CLASS shared_strings_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static bool read_shared_strings(const xml_document &xml, std::vector<std::string> &strings);
|
static bool read_shared_strings(const xml_document &xml, std::vector<std::string> &strings);
|
||||||
static xml_document write_shared_strings(const std::vector<std::string> &strings);
|
static xml_document write_shared_strings(const std::vector<std::string> &strings);
|
||||||
};
|
};
|
||||||
|
@ -51,7 +51,7 @@ class xml_node;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS style_serializer
|
class XLNT_CLASS style_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Construct a style_serializer which can write styles.xml based on wb or populate wb
|
/// Construct a style_serializer which can write styles.xml based on wb or populate wb
|
||||||
/// with styles from an existing styles.xml.
|
/// with styles from an existing styles.xml.
|
||||||
@ -269,7 +269,7 @@ class XLNT_CLASS style_serializer
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool write_style(const style &style_, xml_node &style_node) const;
|
bool write_style(const style &style_, xml_node &style_node) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set in the constructor, this workbook is used as the source or target for all writing or reading, respectively.
|
/// Set in the constructor, this workbook is used as the source or target for all writing or reading, respectively.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -37,11 +37,11 @@ class xml_document;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS theme_serializer
|
class XLNT_CLASS theme_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
bool read_theme(const xml_document &xml, theme &t);
|
bool read_theme(const xml_document &xml, theme &t);
|
||||||
xml_document write_theme(const theme &t) const;
|
xml_document write_theme(const theme &t) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -44,7 +44,7 @@ class xml_node;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS workbook_serializer
|
class XLNT_CLASS workbook_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using string_pair = std::pair<std::string, std::string>;
|
using string_pair = std::pair<std::string, std::string>;
|
||||||
|
|
||||||
workbook_serializer(workbook &wb);
|
workbook_serializer(workbook &wb);
|
||||||
@ -59,7 +59,7 @@ class XLNT_CLASS workbook_serializer
|
|||||||
|
|
||||||
xml_node write_named_ranges() const;
|
xml_node write_named_ranges() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
workbook &workbook_;
|
workbook &workbook_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -41,13 +41,13 @@ class xml_document;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS worksheet_serializer
|
class XLNT_CLASS worksheet_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
worksheet_serializer(worksheet sheet);
|
worksheet_serializer(worksheet sheet);
|
||||||
|
|
||||||
bool read_worksheet(const xml_document &xml);
|
bool read_worksheet(const xml_document &xml);
|
||||||
xml_document write_worksheet() const;
|
xml_document write_worksheet() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet sheet_;
|
worksheet sheet_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
namespace detail { struct xml_document_impl; }
|
namespace detail {
|
||||||
|
struct xml_document_impl;
|
||||||
|
}
|
||||||
|
|
||||||
class xml_node;
|
class xml_node;
|
||||||
class xml_serializer;
|
class xml_serializer;
|
||||||
@ -39,7 +41,7 @@ class xml_serializer;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS xml_document
|
class XLNT_CLASS xml_document
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using string_pair = std::pair<std::string, std::string>;
|
using string_pair = std::pair<std::string, std::string>;
|
||||||
|
|
||||||
xml_document();
|
xml_document();
|
||||||
@ -65,7 +67,7 @@ class XLNT_CLASS xml_document
|
|||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
xml_document &from_string(const std::string &xml_string);
|
xml_document &from_string(const std::string &xml_string);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class xml_serializer;
|
friend class xml_serializer;
|
||||||
std::unique_ptr<detail::xml_document_impl> d_;
|
std::unique_ptr<detail::xml_document_impl> d_;
|
||||||
};
|
};
|
||||||
|
@ -29,7 +29,9 @@
|
|||||||
#include <xlnt/xlnt_config.hpp>
|
#include <xlnt/xlnt_config.hpp>
|
||||||
|
|
||||||
namespace xlnt {
|
namespace xlnt {
|
||||||
namespace detail { struct xml_node_impl; }
|
namespace detail {
|
||||||
|
struct xml_node_impl;
|
||||||
|
}
|
||||||
|
|
||||||
class xml_document;
|
class xml_document;
|
||||||
|
|
||||||
@ -38,7 +40,7 @@ class xml_document;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS xml_node
|
class XLNT_CLASS xml_node
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using string_pair = std::pair<std::string, std::string>;
|
using string_pair = std::pair<std::string, std::string>;
|
||||||
|
|
||||||
xml_node();
|
xml_node();
|
||||||
@ -68,7 +70,7 @@ class XLNT_CLASS xml_node
|
|||||||
|
|
||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class xml_document;
|
friend class xml_document;
|
||||||
friend class xml_serializer;
|
friend class xml_serializer;
|
||||||
xml_node(const detail::xml_node_impl &d);
|
xml_node(const detail::xml_node_impl &d);
|
||||||
|
@ -36,7 +36,7 @@ class xml_node;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS xml_serializer
|
class XLNT_CLASS xml_serializer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::string serialize(const xml_document &xml);
|
static std::string serialize(const xml_document &xml);
|
||||||
static xml_document deserialize(const std::string &xml_string);
|
static xml_document deserialize(const std::string &xml_string);
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
vertical_alignment get_vertical() const;
|
vertical_alignment get_vertical() const;
|
||||||
|
|
||||||
void set_vertical(vertical_alignment vertical);
|
void set_vertical(vertical_alignment vertical);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class XLNT_CLASS border : public hashable
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static border default_border();
|
static border default_border();
|
||||||
|
|
||||||
std::experimental::optional<side> &get_start();
|
std::experimental::optional<side> &get_start();
|
||||||
const std::experimental::optional<side> &get_start() const;
|
const std::experimental::optional<side> &get_start() const;
|
||||||
std::experimental::optional<side> &get_end();
|
std::experimental::optional<side> &get_end();
|
||||||
@ -63,7 +63,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::experimental::optional<side> start_;
|
std::experimental::optional<side> start_;
|
||||||
std::experimental::optional<side> end_;
|
std::experimental::optional<side> end_;
|
||||||
|
@ -61,7 +61,7 @@ public:
|
|||||||
color();
|
color();
|
||||||
|
|
||||||
color(type t, std::size_t v);
|
color(type t, std::size_t v);
|
||||||
|
|
||||||
color(type t, const std::string &v);
|
color(type t, const std::string &v);
|
||||||
|
|
||||||
void set_auto(std::size_t auto_index);
|
void set_auto(std::size_t auto_index);
|
||||||
@ -79,7 +79,7 @@ public:
|
|||||||
std::size_t get_theme() const;
|
std::size_t get_theme() const;
|
||||||
|
|
||||||
std::string get_rgb_string() const;
|
std::string get_rgb_string() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS fill : public hashable
|
class XLNT_CLASS fill : public hashable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class type
|
enum class type
|
||||||
{
|
{
|
||||||
none,
|
none,
|
||||||
@ -73,11 +73,11 @@ class XLNT_CLASS fill : public hashable
|
|||||||
};
|
};
|
||||||
|
|
||||||
type get_type() const;
|
type get_type() const;
|
||||||
|
|
||||||
void set_type(type t);
|
void set_type(type t);
|
||||||
|
|
||||||
std::string get_pattern_type_string() const;
|
std::string get_pattern_type_string() const;
|
||||||
|
|
||||||
std::string get_gradient_type_string() const;
|
std::string get_gradient_type_string() const;
|
||||||
|
|
||||||
pattern_type get_pattern_type() const;
|
pattern_type get_pattern_type() const;
|
||||||
@ -87,17 +87,17 @@ class XLNT_CLASS fill : public hashable
|
|||||||
void set_gradient_type(gradient_type t);
|
void set_gradient_type(gradient_type t);
|
||||||
|
|
||||||
std::experimental::optional<color> &get_foreground_color();
|
std::experimental::optional<color> &get_foreground_color();
|
||||||
|
|
||||||
const std::experimental::optional<color> &get_foreground_color() const;
|
const std::experimental::optional<color> &get_foreground_color() const;
|
||||||
|
|
||||||
std::experimental::optional<color> &get_background_color();
|
std::experimental::optional<color> &get_background_color();
|
||||||
|
|
||||||
const std::experimental::optional<color> &get_background_color() const;
|
const std::experimental::optional<color> &get_background_color() const;
|
||||||
|
|
||||||
std::experimental::optional<color> &get_start_color();
|
std::experimental::optional<color> &get_start_color();
|
||||||
|
|
||||||
const std::experimental::optional<color> &get_start_color() const;
|
const std::experimental::optional<color> &get_start_color() const;
|
||||||
|
|
||||||
std::experimental::optional<color> &get_end_color();
|
std::experimental::optional<color> &get_end_color();
|
||||||
|
|
||||||
const std::experimental::optional<color> &get_end_color() const;
|
const std::experimental::optional<color> &get_end_color() const;
|
||||||
@ -105,15 +105,15 @@ class XLNT_CLASS fill : public hashable
|
|||||||
void set_rotation(double rotation);
|
void set_rotation(double rotation);
|
||||||
|
|
||||||
double get_rotation() const;
|
double get_rotation() const;
|
||||||
|
|
||||||
double get_gradient_left() const;
|
double get_gradient_left() const;
|
||||||
|
|
||||||
double get_gradient_right() const;
|
double get_gradient_right() const;
|
||||||
|
|
||||||
double get_gradient_top() const;
|
double get_gradient_top() const;
|
||||||
|
|
||||||
double get_gradient_bottom() const;
|
double get_gradient_bottom() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class style;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS font : public hashable
|
class XLNT_CLASS font : public hashable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class underline_style
|
enum class underline_style
|
||||||
{
|
{
|
||||||
none,
|
none,
|
||||||
@ -49,49 +49,49 @@ class XLNT_CLASS font : public hashable
|
|||||||
};
|
};
|
||||||
|
|
||||||
void set_bold(bool bold);
|
void set_bold(bool bold);
|
||||||
|
|
||||||
bool is_bold() const;
|
bool is_bold() const;
|
||||||
|
|
||||||
void set_italic(bool italic);
|
void set_italic(bool italic);
|
||||||
|
|
||||||
bool is_italic() const;
|
bool is_italic() const;
|
||||||
|
|
||||||
void set_strikethrough(bool strikethrough);
|
void set_strikethrough(bool strikethrough);
|
||||||
|
|
||||||
bool is_strikethrough() const;
|
bool is_strikethrough() const;
|
||||||
|
|
||||||
void set_underline(underline_style new_underline);
|
void set_underline(underline_style new_underline);
|
||||||
|
|
||||||
bool is_underline() const;
|
bool is_underline() const;
|
||||||
|
|
||||||
underline_style get_underline() const;
|
underline_style get_underline() const;
|
||||||
|
|
||||||
void set_size(std::size_t size);
|
void set_size(std::size_t size);
|
||||||
|
|
||||||
std::size_t get_size() const;
|
std::size_t get_size() const;
|
||||||
|
|
||||||
void set_name(const std::string &name);
|
void set_name(const std::string &name);
|
||||||
|
|
||||||
std::string get_name() const;
|
std::string get_name() const;
|
||||||
|
|
||||||
void set_color(color c);
|
void set_color(color c);
|
||||||
|
|
||||||
void set_family(std::size_t family);
|
void set_family(std::size_t family);
|
||||||
|
|
||||||
void set_scheme(const std::string &scheme);
|
void set_scheme(const std::string &scheme);
|
||||||
|
|
||||||
color get_color() const;
|
color get_color() const;
|
||||||
|
|
||||||
bool has_family() const;
|
bool has_family() const;
|
||||||
|
|
||||||
std::size_t get_family() const;
|
std::size_t get_family() const;
|
||||||
|
|
||||||
bool has_scheme() const;
|
bool has_scheme() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class style;
|
friend class style;
|
||||||
|
|
||||||
std::string name_ = "Calibri";
|
std::string name_ = "Calibri";
|
||||||
|
@ -82,19 +82,19 @@ public:
|
|||||||
|
|
||||||
void set_format_string(const std::string &format_code);
|
void set_format_string(const std::string &format_code);
|
||||||
void set_format_string(const std::string &format_code, std::size_t custom_id);
|
void set_format_string(const std::string &format_code, std::size_t custom_id);
|
||||||
|
|
||||||
std::string get_format_string() const;
|
std::string get_format_string() const;
|
||||||
|
|
||||||
bool has_id() const;
|
bool has_id() const;
|
||||||
void set_id(std::size_t id);
|
void set_id(std::size_t id);
|
||||||
|
|
||||||
std::size_t get_id() const;
|
std::size_t get_id() const;
|
||||||
|
|
||||||
std::string format(const std::string &text) const;
|
std::string format(const std::string &text) const;
|
||||||
std::string format(long double number, calendar base_date) const;
|
std::string format(long double number, calendar base_date) const;
|
||||||
|
|
||||||
bool is_date_format() const;
|
bool is_date_format() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS protection : public hashable
|
class XLNT_CLASS protection : public hashable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum class type
|
enum class type
|
||||||
{
|
{
|
||||||
inherit,
|
inherit,
|
||||||
@ -48,7 +48,7 @@ class XLNT_CLASS protection : public hashable
|
|||||||
|
|
||||||
void set_locked(type locked_type);
|
void set_locked(type locked_type);
|
||||||
void set_hidden(type hidden_type);
|
void set_hidden(type hidden_type);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -38,20 +38,20 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS side : public hashable
|
class XLNT_CLASS side : public hashable
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
side();
|
side();
|
||||||
|
|
||||||
std::experimental::optional<border_style> &get_border_style();
|
std::experimental::optional<border_style> &get_border_style();
|
||||||
|
|
||||||
const std::experimental::optional<border_style> &get_border_style() const;
|
const std::experimental::optional<border_style> &get_border_style() const;
|
||||||
|
|
||||||
std::experimental::optional<color> &get_color();
|
std::experimental::optional<color> &get_color();
|
||||||
|
|
||||||
const std::experimental::optional<color> &get_color() const;
|
const std::experimental::optional<color> &get_color() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::experimental::optional<border_style> border_style_;
|
std::experimental::optional<border_style> border_style_;
|
||||||
std::experimental::optional<color> color_;
|
std::experimental::optional<color> color_;
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
void apply_font(bool apply);
|
void apply_font(bool apply);
|
||||||
void apply_number_format(bool apply);
|
void apply_number_format(bool apply);
|
||||||
void apply_protection(bool apply);
|
void apply_protection(bool apply);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string to_hash_string() const override;
|
std::string to_hash_string() const override;
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS cell_coordinates_exception : public std::runtime_error
|
class XLNT_CLASS cell_coordinates_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
cell_coordinates_exception(column_t column, row_t row);
|
cell_coordinates_exception(column_t column, row_t row);
|
||||||
cell_coordinates_exception(const std::string &coord_string);
|
cell_coordinates_exception(const std::string &coord_string);
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS column_string_index_exception : public std::runtime_error
|
class XLNT_CLASS column_string_index_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
column_string_index_exception();
|
column_string_index_exception();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class XLNT_CLASS hashable
|
|||||||
public:
|
public:
|
||||||
std::size_t hash() const;
|
std::size_t hash() const;
|
||||||
bool operator==(const hashable &other) const;
|
bool operator==(const hashable &other) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual std::string to_hash_string() const = 0;
|
virtual std::string to_hash_string() const = 0;
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS invalid_file_exception : public std::runtime_error
|
class XLNT_CLASS invalid_file_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
invalid_file_exception(const std::string &filename);
|
invalid_file_exception(const std::string &filename);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS named_range_exception : public std::runtime_error
|
class XLNT_CLASS named_range_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
named_range_exception();
|
named_range_exception();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS read_only_workbook_exception : public std::runtime_error
|
class XLNT_CLASS read_only_workbook_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
read_only_workbook_exception();
|
read_only_workbook_exception();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS sheet_title_exception : public std::runtime_error
|
class XLNT_CLASS sheet_title_exception : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
sheet_title_exception(const std::string &title);
|
sheet_title_exception(const std::string &title);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS unicode_decode_error : public std::runtime_error
|
class XLNT_CLASS unicode_decode_error : public std::runtime_error
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
unicode_decode_error();
|
unicode_decode_error();
|
||||||
unicode_decode_error(char c);
|
unicode_decode_error(char c);
|
||||||
unicode_decode_error(std::uint8_t b);
|
unicode_decode_error(std::uint8_t b);
|
||||||
|
@ -34,13 +34,13 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS document_security
|
class XLNT_CLASS document_security
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
document_security();
|
document_security();
|
||||||
|
|
||||||
bool lock_revision;
|
bool lock_revision;
|
||||||
bool lock_structure;
|
bool lock_structure;
|
||||||
bool lock_windows;
|
bool lock_windows;
|
||||||
|
|
||||||
std::string revision_password;
|
std::string revision_password;
|
||||||
std::string workbook_password;
|
std::string workbook_password;
|
||||||
};
|
};
|
||||||
|
@ -33,7 +33,7 @@ namespace xlnt {
|
|||||||
class range_reference;
|
class range_reference;
|
||||||
class worksheet;
|
class worksheet;
|
||||||
|
|
||||||
//TODO: why is this not in a class?
|
// TODO: why is this not in a class?
|
||||||
std::vector<std::pair<std::string, std::string>> XLNT_FUNCTION split_named_range(const std::string &named_range_string);
|
std::vector<std::pair<std::string, std::string>> XLNT_FUNCTION split_named_range(const std::string &named_range_string);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -42,7 +42,7 @@ std::vector<std::pair<std::string, std::string>> XLNT_FUNCTION split_named_range
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS named_range
|
class XLNT_CLASS named_range
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using target = std::pair<worksheet, range_reference>;
|
using target = std::pair<worksheet, range_reference>;
|
||||||
|
|
||||||
named_range();
|
named_range();
|
||||||
@ -54,7 +54,7 @@ class XLNT_CLASS named_range
|
|||||||
|
|
||||||
named_range &operator=(const named_range &other);
|
named_range &operator=(const named_range &other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string name_;
|
std::string name_;
|
||||||
std::vector<target> targets_;
|
std::vector<target> targets_;
|
||||||
};
|
};
|
||||||
|
@ -56,17 +56,19 @@ class zip_file;
|
|||||||
|
|
||||||
enum class encoding;
|
enum class encoding;
|
||||||
|
|
||||||
namespace detail { struct workbook_impl; } // namespace detail
|
namespace detail {
|
||||||
|
struct workbook_impl;
|
||||||
|
} // namespace detail
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// workbook is the container for all other parts of the document.
|
/// workbook is the container for all other parts of the document.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS workbook
|
class XLNT_CLASS workbook
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
class XLNT_CLASS iterator
|
class XLNT_CLASS iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
iterator(workbook &wb, std::size_t index);
|
iterator(workbook &wb, std::size_t index);
|
||||||
iterator(const iterator &);
|
iterator(const iterator &);
|
||||||
iterator &operator=(const iterator &);
|
iterator &operator=(const iterator &);
|
||||||
@ -79,14 +81,14 @@ class XLNT_CLASS workbook
|
|||||||
iterator operator++(int);
|
iterator operator++(int);
|
||||||
iterator &operator++();
|
iterator &operator++();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
workbook &wb_;
|
workbook &wb_;
|
||||||
std::size_t index_;
|
std::size_t index_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class XLNT_CLASS const_iterator
|
class XLNT_CLASS const_iterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_iterator(const workbook &wb, std::size_t index);
|
const_iterator(const workbook &wb, std::size_t index);
|
||||||
const_iterator(const const_iterator &);
|
const_iterator(const const_iterator &);
|
||||||
const_iterator &operator=(const const_iterator &);
|
const_iterator &operator=(const const_iterator &);
|
||||||
@ -99,7 +101,7 @@ class XLNT_CLASS workbook
|
|||||||
const_iterator operator++(int);
|
const_iterator operator++(int);
|
||||||
const_iterator &operator++();
|
const_iterator &operator++();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const workbook &wb_;
|
const workbook &wb_;
|
||||||
std::size_t index_;
|
std::size_t index_;
|
||||||
};
|
};
|
||||||
@ -251,7 +253,7 @@ class XLNT_CLASS workbook
|
|||||||
std::vector<std::string> &get_shared_strings();
|
std::vector<std::string> &get_shared_strings();
|
||||||
const std::vector<std::string> &get_shared_strings() const;
|
const std::vector<std::string> &get_shared_strings() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class worksheet;
|
friend class worksheet;
|
||||||
std::shared_ptr<detail::workbook_impl> d_;
|
std::shared_ptr<detail::workbook_impl> d_;
|
||||||
};
|
};
|
||||||
|
@ -41,10 +41,10 @@ class range_reference;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS cell_vector
|
class XLNT_CLASS cell_vector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
class XLNT_CLASS iterator : public std::iterator<std::bidirectional_iterator_tag, cell>
|
class XLNT_CLASS iterator : public std::iterator<std::bidirectional_iterator_tag, cell>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
iterator(worksheet ws, const cell_reference &start_cell, major_order order = major_order::row);
|
iterator(worksheet ws, const cell_reference &start_cell, major_order order = major_order::row);
|
||||||
|
|
||||||
iterator(const iterator &other);
|
iterator(const iterator &other);
|
||||||
@ -56,23 +56,23 @@ class XLNT_CLASS cell_vector
|
|||||||
bool operator!=(const iterator &other) const;
|
bool operator!=(const iterator &other) const;
|
||||||
|
|
||||||
iterator &operator--();
|
iterator &operator--();
|
||||||
|
|
||||||
iterator operator--(int);
|
iterator operator--(int);
|
||||||
|
|
||||||
iterator &operator++();
|
iterator &operator++();
|
||||||
|
|
||||||
iterator operator++(int);
|
iterator operator++(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet ws_;
|
worksheet ws_;
|
||||||
cell_reference current_cell_;
|
cell_reference current_cell_;
|
||||||
range_reference range_;
|
range_reference range_;
|
||||||
major_order order_;
|
major_order order_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class XLNT_CLASS const_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell>
|
class XLNT_CLASS const_iterator : public std::iterator<std::bidirectional_iterator_tag, const cell>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_iterator(worksheet ws, const cell_reference &start_cell, major_order order = major_order::row);
|
const_iterator(worksheet ws, const cell_reference &start_cell, major_order order = major_order::row);
|
||||||
|
|
||||||
const_iterator(const const_iterator &other);
|
const_iterator(const const_iterator &other);
|
||||||
@ -88,10 +88,10 @@ class XLNT_CLASS cell_vector
|
|||||||
const_iterator operator--(int);
|
const_iterator operator--(int);
|
||||||
|
|
||||||
const_iterator &operator++();
|
const_iterator &operator++();
|
||||||
|
|
||||||
const_iterator operator++(int);
|
const_iterator operator++(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet ws_;
|
worksheet ws_;
|
||||||
cell_reference current_cell_;
|
cell_reference current_cell_;
|
||||||
range_reference range_;
|
range_reference range_;
|
||||||
@ -125,11 +125,11 @@ class XLNT_CLASS cell_vector
|
|||||||
|
|
||||||
const_iterator begin() const;
|
const_iterator begin() const;
|
||||||
const_iterator cbegin() const;
|
const_iterator cbegin() const;
|
||||||
|
|
||||||
const_iterator end() const;
|
const_iterator end() const;
|
||||||
const_iterator cend() const;
|
const_iterator cend() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet ws_;
|
worksheet ws_;
|
||||||
range_reference ref_;
|
range_reference ref_;
|
||||||
major_order order_;
|
major_order order_;
|
||||||
|
@ -35,20 +35,20 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS footer
|
class XLNT_CLASS footer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
footer();
|
footer();
|
||||||
|
|
||||||
void set_text(const std::string &text);
|
void set_text(const std::string &text);
|
||||||
|
|
||||||
void set_font_name(const std::string &font_name);
|
void set_font_name(const std::string &font_name);
|
||||||
|
|
||||||
void set_font_size(std::size_t font_size);
|
void set_font_size(std::size_t font_size);
|
||||||
|
|
||||||
void set_font_color(const std::string &font_color);
|
void set_font_color(const std::string &font_color);
|
||||||
|
|
||||||
bool is_default() const;
|
bool is_default() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool default_;
|
bool default_;
|
||||||
std::string text_;
|
std::string text_;
|
||||||
std::string font_name_;
|
std::string font_name_;
|
||||||
|
@ -35,20 +35,20 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS header
|
class XLNT_CLASS header
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
header();
|
header();
|
||||||
|
|
||||||
void set_text(const std::string &text);
|
void set_text(const std::string &text);
|
||||||
|
|
||||||
void set_font_name(const std::string &font_name);
|
void set_font_name(const std::string &font_name);
|
||||||
|
|
||||||
void set_font_size(std::size_t font_size);
|
void set_font_size(std::size_t font_size);
|
||||||
|
|
||||||
void set_font_color(const std::string &font_color);
|
void set_font_color(const std::string &font_color);
|
||||||
|
|
||||||
bool is_default() const;
|
bool is_default() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool default_;
|
bool default_;
|
||||||
std::string text_;
|
std::string text_;
|
||||||
std::string font_name_;
|
std::string font_name_;
|
||||||
|
@ -37,13 +37,13 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS header_footer
|
class XLNT_CLASS header_footer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
header_footer();
|
header_footer();
|
||||||
|
|
||||||
header &get_left_header();
|
header &get_left_header();
|
||||||
header &get_center_header();
|
header &get_center_header();
|
||||||
header &get_right_header();
|
header &get_right_header();
|
||||||
|
|
||||||
footer &get_left_footer();
|
footer &get_left_footer();
|
||||||
footer &get_center_footer();
|
footer &get_center_footer();
|
||||||
footer &get_right_footer();
|
footer &get_right_footer();
|
||||||
@ -52,7 +52,7 @@ class XLNT_CLASS header_footer
|
|||||||
bool is_default_footer() const;
|
bool is_default_footer() const;
|
||||||
bool is_default() const;
|
bool is_default() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
header left_header_, right_header_, center_header_;
|
header left_header_, right_header_, center_header_;
|
||||||
footer left_footer_, right_footer_, center_footer_;
|
footer left_footer_, right_footer_, center_footer_;
|
||||||
};
|
};
|
||||||
|
@ -32,30 +32,30 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS page_margins
|
class XLNT_CLASS page_margins
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
page_margins();
|
page_margins();
|
||||||
|
|
||||||
bool is_default() const;
|
bool is_default() const;
|
||||||
|
|
||||||
double get_top() const;
|
double get_top() const;
|
||||||
void set_top(double top);
|
void set_top(double top);
|
||||||
|
|
||||||
double get_left() const;
|
double get_left() const;
|
||||||
void set_left(double left);
|
void set_left(double left);
|
||||||
|
|
||||||
double get_bottom() const;
|
double get_bottom() const;
|
||||||
void set_bottom(double bottom);
|
void set_bottom(double bottom);
|
||||||
|
|
||||||
double get_right() const;
|
double get_right() const;
|
||||||
void set_right(double right);
|
void set_right(double right);
|
||||||
|
|
||||||
double get_header() const;
|
double get_header() const;
|
||||||
void set_header(double header);
|
void set_header(double header);
|
||||||
|
|
||||||
double get_footer() const;
|
double get_footer() const;
|
||||||
void set_footer(double footer);
|
void set_footer(double footer);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool default_;
|
bool default_;
|
||||||
double top_;
|
double top_;
|
||||||
double left_;
|
double left_;
|
||||||
|
@ -36,9 +36,9 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
struct XLNT_CLASS page_setup
|
struct XLNT_CLASS page_setup
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
page_setup();
|
page_setup();
|
||||||
|
|
||||||
bool is_default() const;
|
bool is_default() const;
|
||||||
|
|
||||||
page_break get_break() const;
|
page_break get_break() const;
|
||||||
@ -78,10 +78,10 @@ struct XLNT_CLASS page_setup
|
|||||||
bool get_vertical_centered() const;
|
bool get_vertical_centered() const;
|
||||||
|
|
||||||
void set_scale(double scale);
|
void set_scale(double scale);
|
||||||
|
|
||||||
double get_scale() const;
|
double get_scale() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool default_;
|
bool default_;
|
||||||
page_break break_;
|
page_break break_;
|
||||||
sheet_state sheet_state_;
|
sheet_state sheet_state_;
|
||||||
|
@ -41,10 +41,10 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS range
|
class XLNT_CLASS range
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using iterator = range_iterator_2d;
|
using iterator = range_iterator_2d;
|
||||||
using const_iterator = const_range_iterator_2d;
|
using const_iterator = const_range_iterator_2d;
|
||||||
|
|
||||||
range(worksheet ws, const range_reference &reference, major_order order = major_order::row, bool skip_null = false);
|
range(worksheet ws, const range_reference &reference, major_order order = major_order::row, bool skip_null = false);
|
||||||
|
|
||||||
~range();
|
~range();
|
||||||
@ -80,7 +80,7 @@ class XLNT_CLASS range
|
|||||||
const_iterator cbegin() const;
|
const_iterator cbegin() const;
|
||||||
const_iterator cend() const;
|
const_iterator cend() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
worksheet ws_;
|
worksheet ws_;
|
||||||
range_reference ref_;
|
range_reference ref_;
|
||||||
major_order order_;
|
major_order order_;
|
||||||
|
@ -32,7 +32,9 @@ namespace xlnt {
|
|||||||
class cell_vector;
|
class cell_vector;
|
||||||
class worksheet;
|
class worksheet;
|
||||||
|
|
||||||
namespace detail { struct worksheet_impl; }
|
namespace detail {
|
||||||
|
struct worksheet_impl;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An iterator used by worksheet and range for traversing
|
/// An iterator used by worksheet and range for traversing
|
||||||
@ -40,7 +42,7 @@ namespace detail { struct worksheet_impl; }
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS range_iterator_2d : public std::iterator<std::bidirectional_iterator_tag, cell_vector>
|
class XLNT_CLASS range_iterator_2d : public std::iterator<std::bidirectional_iterator_tag, cell_vector>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
range_iterator_2d(worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
range_iterator_2d(worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
||||||
|
|
||||||
range_iterator_2d(const range_iterator_2d &other);
|
range_iterator_2d(const range_iterator_2d &other);
|
||||||
@ -59,22 +61,22 @@ class XLNT_CLASS range_iterator_2d : public std::iterator<std::bidirectional_ite
|
|||||||
|
|
||||||
range_iterator_2d operator++(int);
|
range_iterator_2d operator++(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
detail::worksheet_impl *ws_;
|
detail::worksheet_impl *ws_;
|
||||||
cell_reference current_cell_;
|
cell_reference current_cell_;
|
||||||
range_reference range_;
|
range_reference range_;
|
||||||
major_order order_;
|
major_order order_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A const version of range_iterator_2d which does not allow modification
|
/// A const version of range_iterator_2d which does not allow modification
|
||||||
/// to the dereferenced cell_vector.
|
/// to the dereferenced cell_vector.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS const_range_iterator_2d : public std::iterator<std::bidirectional_iterator_tag, const cell_vector>
|
class XLNT_CLASS const_range_iterator_2d : public std::iterator<std::bidirectional_iterator_tag, const cell_vector>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
const_range_iterator_2d(const worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
const_range_iterator_2d(
|
||||||
|
const worksheet &ws, const range_reference &start_cell, major_order order = major_order::row);
|
||||||
|
|
||||||
const_range_iterator_2d(const const_range_iterator_2d &other);
|
const_range_iterator_2d(const const_range_iterator_2d &other);
|
||||||
|
|
||||||
@ -92,7 +94,7 @@ class XLNT_CLASS const_range_iterator_2d : public std::iterator<std::bidirection
|
|||||||
|
|
||||||
const_range_iterator_2d operator++(int);
|
const_range_iterator_2d operator++(int);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
detail::worksheet_impl *ws_;
|
detail::worksheet_impl *ws_;
|
||||||
cell_reference current_cell_;
|
cell_reference current_cell_;
|
||||||
range_reference range_;
|
range_reference range_;
|
||||||
|
@ -33,7 +33,7 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS range_reference
|
class XLNT_CLASS range_reference
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Convert a coordinate to an absolute coordinate string (B12 -> $B$12)
|
/// Convert a coordinate to an absolute coordinate string (B12 -> $B$12)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -47,17 +47,17 @@ class XLNT_CLASS range_reference
|
|||||||
range_reference(column_t column_index_start, row_t row_index_start, column_t column_index_end, row_t row_index_end);
|
range_reference(column_t column_index_start, row_t row_index_start, column_t column_index_end, row_t row_index_end);
|
||||||
|
|
||||||
bool is_single_cell() const;
|
bool is_single_cell() const;
|
||||||
|
|
||||||
std::size_t get_width() const;
|
std::size_t get_width() const;
|
||||||
|
|
||||||
std::size_t get_height() const;
|
std::size_t get_height() const;
|
||||||
|
|
||||||
cell_reference get_top_left() const;
|
cell_reference get_top_left() const;
|
||||||
|
|
||||||
cell_reference get_bottom_right() const;
|
cell_reference get_bottom_right() const;
|
||||||
|
|
||||||
cell_reference &get_top_left();
|
cell_reference &get_top_left();
|
||||||
|
|
||||||
cell_reference &get_bottom_right();
|
cell_reference &get_bottom_right();
|
||||||
|
|
||||||
range_reference make_offset(int column_offset, int row_offset) const;
|
range_reference make_offset(int column_offset, int row_offset) const;
|
||||||
@ -65,17 +65,17 @@ class XLNT_CLASS range_reference
|
|||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
|
|
||||||
bool operator==(const range_reference &comparand) const;
|
bool operator==(const range_reference &comparand) const;
|
||||||
|
|
||||||
bool operator==(const std::string &reference_string) const;
|
bool operator==(const std::string &reference_string) const;
|
||||||
|
|
||||||
bool operator==(const char *reference_string) const;
|
bool operator==(const char *reference_string) const;
|
||||||
|
|
||||||
bool operator!=(const range_reference &comparand) const;
|
bool operator!=(const range_reference &comparand) const;
|
||||||
|
|
||||||
bool operator!=(const std::string &reference_string) const;
|
bool operator!=(const std::string &reference_string) const;
|
||||||
|
|
||||||
bool operator!=(const char *reference_string) const;
|
bool operator!=(const char *reference_string) const;
|
||||||
|
|
||||||
XLNT_FUNCTION friend bool operator==(const std::string &reference_string, const range_reference &ref);
|
XLNT_FUNCTION friend bool operator==(const std::string &reference_string, const range_reference &ref);
|
||||||
|
|
||||||
XLNT_FUNCTION friend bool operator==(const char *reference_string, const range_reference &ref);
|
XLNT_FUNCTION friend bool operator==(const char *reference_string, const range_reference &ref);
|
||||||
@ -84,11 +84,9 @@ class XLNT_CLASS range_reference
|
|||||||
|
|
||||||
XLNT_FUNCTION friend bool operator!=(const char *reference_string, const range_reference &ref);
|
XLNT_FUNCTION friend bool operator!=(const char *reference_string, const range_reference &ref);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cell_reference top_left_;
|
cell_reference top_left_;
|
||||||
cell_reference bottom_right_;
|
cell_reference bottom_right_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace xlnt
|
} // namespace xlnt
|
||||||
|
@ -34,13 +34,13 @@ namespace xlnt {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
class XLNT_CLASS sheet_protection
|
class XLNT_CLASS sheet_protection
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static std::string hash_password(const std::string &password);
|
static std::string hash_password(const std::string &password);
|
||||||
|
|
||||||
void set_password(const std::string &password);
|
void set_password(const std::string &password);
|
||||||
std::string get_hashed_password() const;
|
std::string get_hashed_password() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string hashed_password_;
|
std::string hashed_password_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -51,7 +51,9 @@ class workbook;
|
|||||||
|
|
||||||
struct date;
|
struct date;
|
||||||
|
|
||||||
namespace detail { struct worksheet_impl; }
|
namespace detail {
|
||||||
|
struct worksheet_impl;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A worksheet is a 2D array of cells starting with cell A1 in the top-left corner
|
/// A worksheet is a 2D array of cells starting with cell A1 in the top-left corner
|
||||||
@ -62,7 +64,7 @@ class XLNT_CLASS worksheet
|
|||||||
public:
|
public:
|
||||||
using iterator = range_iterator_2d;
|
using iterator = range_iterator_2d;
|
||||||
using const_iterator = const_range_iterator_2d;
|
using const_iterator = const_range_iterator_2d;
|
||||||
|
|
||||||
worksheet();
|
worksheet();
|
||||||
worksheet(const worksheet &rhs);
|
worksheet(const worksheet &rhs);
|
||||||
worksheet(workbook &parent_workbook, const std::string &title = std::string());
|
worksheet(workbook &parent_workbook, const std::string &title = std::string());
|
||||||
@ -211,15 +213,15 @@ public:
|
|||||||
|
|
||||||
const_iterator cbegin() const;
|
const_iterator cbegin() const;
|
||||||
const_iterator cend() const;
|
const_iterator cend() const;
|
||||||
|
|
||||||
range iter_cells(bool skip_null);
|
range iter_cells(bool skip_null);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class workbook;
|
friend class workbook;
|
||||||
friend class cell;
|
friend class cell;
|
||||||
friend class range_iterator_2d;
|
friend class range_iterator_2d;
|
||||||
friend class const_range_iterator_2d;
|
friend class const_range_iterator_2d;
|
||||||
|
|
||||||
worksheet(detail::worksheet_impl *d);
|
worksheet(detail::worksheet_impl *d);
|
||||||
detail::worksheet_impl *d_;
|
detail::worksheet_impl *d_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user