add macro to classes and functions for dll export/import

This commit is contained in:
Thomas Fussell 2015-11-04 00:36:14 -05:00
parent 706ece0d27
commit 3bb988c422
60 changed files with 239 additions and 106 deletions

View File

@ -20,8 +20,10 @@ foreach(file ${files})
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
message(STATUS "Uninstalling @INC_DEST_DIR@/xlnt")
exec_program("@CMAKE_COMMAND@"
ARGS "-E remove_directory @INC_DEST_DIR@/xlnt")
ARGS "-E remove_directory @INC_DEST_DIR@/xlnt"
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)

View File

@ -17,6 +17,7 @@ if(NOT LIB_DEST_DIR)
endif()
include_directories(../include)
include_directories(../include/xlnt)
include_directories(../source)
include_directories(../third-party/miniz)
include_directories(../third-party/pugixml/src)

View File

@ -29,6 +29,8 @@
#include <xlnt/cell/types.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
enum class calendar;
@ -60,7 +62,7 @@ namespace detail { struct cell_impl; }
/// and any other features of an Excel cell.Utilities for referencing
/// cells using Excel's 'A1' column/row nomenclature are also provided.
/// </remarks>
class cell
class XLNT_CLASS cell
{
public:
/// <summary>
@ -407,7 +409,7 @@ private:
/// Convenience function for writing cell to an ostream.
/// Uses cell::to_string() internally.
/// </summary>
inline std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell)
inline std::ostream & XLNT_FUNCTION operator<<(std::ostream &stream, const xlnt::cell &cell)
{
return stream << cell.to_string();
}

View File

@ -28,6 +28,8 @@
#include <xlnt/cell/types.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class cell_reference;
@ -37,7 +39,7 @@ class range_reference;
/// Functor for hashing a cell reference.
/// Allows for use of std::unordered_set<cell_reference, cel_reference_hash> and similar.
/// </summary>
struct cell_reference_hash
struct XLNT_CLASS cell_reference_hash
{
std::size_t operator()(const cell_reference &k) const;
};
@ -49,7 +51,7 @@ struct cell_reference_hash
/// can be initialized from a string of this form or a 1-indexed ordered pair of the form
/// column, row.
/// </summary>
class cell_reference
class XLNT_CLASS cell_reference
{
public:
/// <summary>

View File

@ -2,6 +2,8 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
class cell;
@ -10,7 +12,7 @@ namespace detail { struct comment_impl; }
/// <summary>
/// A comment can be applied to a cell to provide extra information.
/// </summary>
class comment
class XLNT_CLASS comment
{
public:
/// <summary>

View File

@ -26,6 +26,8 @@
#include <cstdint>
#include <string>
#include "xlnt_config.hpp"
// We might want to change these types for various optimizations in the future
// so use typedefs.
@ -41,7 +43,7 @@ using row_t = std::uint32_t;
/// or as a 1-indexed index. This class encapsulates both of these forms of
/// column referencing and allows for convertions between them.
/// </summary>
class column_t
class XLNT_CLASS column_t
{
public:
using index_t = std::uint32_t;
@ -315,7 +317,7 @@ public:
/// Functor for hashing a column.
/// Allows for use of std::unordered_set<column, column_hash> and similar.
/// </summary>
struct column_hash
struct XLNT_CLASS column_hash
{
std::size_t operator()(const column_t &k) const;
};

View File

@ -23,12 +23,14 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class worksheet;
struct drawing_struct;
class drawing
class XLNT_CLASS drawing
{
public:
drawing();

View File

@ -1,6 +1,10 @@
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class tokenizer
class XLNT_CLASS tokenizer
{
};

View File

@ -1,12 +1,16 @@
#pragma once
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class cell_reference;
class tokenizer;
class translator
class XLNT_CLASS translator
{
translator(const std::string &formula, const cell_reference &ref);

View File

@ -27,12 +27,14 @@
#include <xlnt/utils/datetime.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// High-level properties of the document.
/// </summary>
class document_properties
class XLNT_CLASS document_properties
{
public:
document_properties();

View File

@ -3,9 +3,11 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class default_type
class XLNT_CLASS default_type
{
public:
default_type();
@ -27,7 +29,7 @@ class default_type
std::string content_type_;
};
class override_type
class XLNT_CLASS override_type
{
public:
override_type();
@ -49,7 +51,7 @@ class override_type
std::string content_type_;
};
class manifest
class XLNT_CLASS manifest
{
public:
void add_default_type(const std::string &extension, const std::string &content_type);

View File

@ -7,6 +7,8 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
// Note: this comes from https://github.com/tfussell/miniz-cpp
struct mz_zip_archive_tag;
@ -16,7 +18,7 @@ namespace xlnt {
/// <summary>
/// Information about a specific file in zip_file.
/// </summary>
struct zip_info
struct XLNT_CLASS zip_info
{
/// <summary>
/// A struct representing a particular date and time.
@ -57,7 +59,7 @@ struct zip_info
/// A compressed archive file that exists in memory which can read
/// or write to and from the filesystem, std::iostreams, and byte vectors.
/// </summary>
class zip_file
class XLNT_CLASS zip_file
{
public:
zip_file();

View File

@ -28,11 +28,13 @@
#include <xlnt/cell/comment.hpp>
#include <xlnt/worksheet/worksheet.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class xml_document;
class comment_serializer
class XLNT_CLASS comment_serializer
{
comment_serializer(worksheet sheet);

View File

@ -1,12 +1,14 @@
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// Specifies the encoding used in a worksheet.
/// This isn't really supported yet.
/// </summary>
enum class encoding
enum class XLNT_CLASS encoding
{
utf8,
latin1,

View File

@ -30,6 +30,8 @@
#include <xlnt/packaging/zip_file.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class workbook;
@ -38,7 +40,7 @@ class workbook;
/// Handles reading and writing workbooks from an actual XLSX archive
/// using other serializers.
/// </summary>
class excel_serializer
class XLNT_CLASS excel_serializer
{
public:
/// <summary>

View File

@ -2,12 +2,14 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
class manifest;
class xml_document;
class manifest_serializer
class XLNT_CLASS manifest_serializer
{
public:
manifest_serializer(manifest &m);

View File

@ -3,6 +3,8 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class relationship;
@ -11,7 +13,7 @@ class zip_file;
/// <summary>
/// Reads and writes collections of relationshps for a particular file.
/// </summary>
class relationship_serializer
class XLNT_CLASS relationship_serializer
{
public:
/// <summary>

View File

@ -26,11 +26,13 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class xml_document;
class shared_strings_serializer
class XLNT_CLASS shared_strings_serializer
{
public:
static bool read_shared_strings(const xml_document &xml, std::vector<std::string> &strings);

View File

@ -29,6 +29,8 @@
#include <xlnt/workbook/workbook.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class alignment;
@ -48,7 +50,7 @@ class xml_node;
/// <summary>
/// Reads and writes xl/styles.xml from/to an associated workbook.
/// </summary>
class style_serializer
class XLNT_CLASS style_serializer
{
public:
/// <summary>

View File

@ -25,12 +25,14 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
class theme;
class xml_document;
class theme_serializer
class XLNT_CLASS theme_serializer
{
public:
bool read_theme(const xml_document &xml, theme &t);

View File

@ -26,6 +26,8 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class document_properties;
@ -37,7 +39,7 @@ class zip_file;
class xml_document;
class xml_node;
class workbook_serializer
class XLNT_CLASS workbook_serializer
{
public:
using string_pair = std::pair<std::string, std::string>;

View File

@ -28,6 +28,8 @@
#include <xlnt/worksheet/worksheet.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class relationship;
@ -35,7 +37,7 @@ class workbook;
class worksheet;
class xml_document;
class worksheet_serializer
class XLNT_CLASS worksheet_serializer
{
public:
worksheet_serializer(worksheet sheet);

View File

@ -4,15 +4,15 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
namespace detail {
struct xml_document_impl;
} // namespace detail
namespace detail { struct xml_document_impl; }
class xml_node;
class xml_serializer;
class xml_document
class XLNT_CLASS xml_document
{
public:
using string_pair = std::pair<std::string, std::string>;

View File

@ -4,14 +4,14 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
namespace detail {
struct xml_node_impl;
} // namespace detail
namespace detail { struct xml_node_impl; }
class xml_document;
class xml_node
class XLNT_CLASS xml_node
{
public:
using string_pair = std::pair<std::string, std::string>;

View File

@ -2,12 +2,14 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
class xml_document;
class xml_node;
class xml_serializer
class XLNT_CLASS xml_serializer
{
public:
static std::string serialize(const xml_document &xml);

View File

@ -25,12 +25,14 @@
#include <xlnt/utils/hash_combine.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// Alignment options for use in styles.
/// </summary>
class alignment
class XLNT_CLASS alignment
{
public:
enum class horizontal_alignment

View File

@ -29,9 +29,11 @@
#include <xlnt/utils/hash_combine.hpp>
#include <xlnt/styles/side.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
enum class diagonal_direction
enum class XLNT_CLASS diagonal_direction
{
none,
up,
@ -39,7 +41,7 @@ enum class diagonal_direction
both
};
class border
class XLNT_CLASS border
{
public:
static border default_border();

View File

@ -27,9 +27,11 @@
#include <xlnt/utils/hash_combine.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class color
class XLNT_CLASS color
{
public:
enum class type

View File

@ -26,9 +26,11 @@
#include <xlnt/styles/color.hpp>
#include <xlnt/utils/hash_combine.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class fill
class XLNT_CLASS fill
{
public:
enum class type

View File

@ -28,11 +28,13 @@
#include <xlnt/utils/hash_combine.hpp>
#include <xlnt/styles/color.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class style;
class font
class XLNT_CLASS font
{
public:
enum class underline_style

View File

@ -23,11 +23,13 @@
// @author: see AUTHORS file
#pragma once
#include "style.hpp"
#include <xlnt/styles/style.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class named_style
class XLNT_CLASS named_style
{
public:
named_style();

View File

@ -27,9 +27,11 @@
#include <unordered_map>
#include <utility>
#include "xlnt_config.hpp"
namespace xlnt {
class number_format
class XLNT_CLASS number_format
{
public:
static const number_format general();

View File

@ -27,9 +27,11 @@
#include <xlnt/utils/hash_combine.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class protection
class XLNT_CLASS protection
{
public:
enum class type

View File

@ -27,9 +27,11 @@
#include <xlnt/styles/color.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
enum class border_style
enum class XLNT_CLASS border_style
{
none,
dashdot,
@ -47,7 +49,7 @@ enum class border_style
thin
};
class side
class XLNT_CLASS side
{
public:
side();

View File

@ -30,11 +30,13 @@
#include <xlnt/styles/number_format.hpp>
#include <xlnt/styles/protection.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class workbook;
class style
class XLNT_CLASS style
{
public:
style();

View File

@ -24,13 +24,15 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// An enumeration of possible base dates.
/// Dates in Excel are stored as days since this base date.
/// </summary>
enum class calendar
enum class XLNT_CLASS calendar
{
windows_1900,
mac_1904
@ -41,7 +43,7 @@ enum class calendar
/// It can also be initialized as a number of days since a base date
/// using date::from_number.
/// </summary>
struct date
struct XLNT_CLASS date
{
/// <summary>
/// Return the current date according to the system time.
@ -78,7 +80,7 @@ struct date
/// minute, second, and microsecond (0-999999).
/// It can also be initialized as a fraction of a day using time::from_number.
/// </summary>
struct time
struct XLNT_CLASS time
{
/// <summary>
/// Return the current time according to the system time.
@ -107,7 +109,7 @@ struct time
int microsecond;
};
struct datetime
struct XLNT_CLASS datetime
{
/// <summary>
/// Return the current date and time according to the system time.
@ -158,7 +160,7 @@ struct datetime
/// Represents a span of time between two datetimes. This is
/// not fully supported yet.
/// </summary>
struct timedelta
struct XLNT_CLASS timedelta
{
static timedelta from_number(long double number);

View File

@ -27,12 +27,14 @@
#include <xlnt/cell/types.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// Error for converting between numeric and A1-style cell references.
/// </summary>
class cell_coordinates_exception : public std::runtime_error
class XLNT_CLASS cell_coordinates_exception : public std::runtime_error
{
public:
cell_coordinates_exception(column_t column, row_t row);
@ -43,7 +45,7 @@ class cell_coordinates_exception : public std::runtime_error
/// The data submitted which cannot be used directly in Excel files. It
/// must be removed or escaped.
/// </summary>
class illegal_character_error : public std::runtime_error
class XLNT_CLASS illegal_character_error : public std::runtime_error
{
public:
illegal_character_error(char c);
@ -52,7 +54,7 @@ class illegal_character_error : public std::runtime_error
/// <summary>
/// Error for bad column names in A1-style cell references.
/// </summary>
class column_string_index_exception : public std::runtime_error
class XLNT_CLASS column_string_index_exception : public std::runtime_error
{
public:
column_string_index_exception();
@ -61,7 +63,7 @@ class column_string_index_exception : public std::runtime_error
/// <summary>
/// Error for any data type inconsistencies.
/// </summary>
class data_type_exception : public std::runtime_error
class XLNT_CLASS data_type_exception : public std::runtime_error
{
public:
data_type_exception();
@ -70,7 +72,7 @@ class data_type_exception : public std::runtime_error
/// <summary>
/// Error for badly formatted named ranges.
/// </summary>
class named_range_exception : public std::runtime_error
class XLNT_CLASS named_range_exception : public std::runtime_error
{
public:
named_range_exception();
@ -79,7 +81,7 @@ class named_range_exception : public std::runtime_error
/// <summary>
/// Error for bad sheet names.
/// </summary>
class sheet_title_exception : public std::runtime_error
class XLNT_CLASS sheet_title_exception : public std::runtime_error
{
public:
sheet_title_exception(const std::string &title);
@ -88,7 +90,7 @@ class sheet_title_exception : public std::runtime_error
/// <summary>
/// Error for trying to open a non-ooxml file.
/// </summary>
class invalid_file_exception : public std::runtime_error
class XLNT_CLASS invalid_file_exception : public std::runtime_error
{
public:
invalid_file_exception(const std::string &filename);
@ -97,7 +99,7 @@ class invalid_file_exception : public std::runtime_error
/// <summary>
/// Error for trying to modify a read-only workbook.
/// </summary>
class read_only_workbook_exception : public std::runtime_error
class XLNT_CLASS read_only_workbook_exception : public std::runtime_error
{
public:
read_only_workbook_exception();
@ -106,7 +108,7 @@ class read_only_workbook_exception : public std::runtime_error
/// <summary>
/// Error when a references number format is not in the stylesheet.
/// </summary>
class missing_number_format : public std::runtime_error
class XLNT_CLASS missing_number_format : public std::runtime_error
{
public:
missing_number_format();
@ -115,13 +117,13 @@ class missing_number_format : public std::runtime_error
/// <summary>
/// Error when an attribute value is invalid.
/// </summary>
class attribute_error : public std::runtime_error
class XLNT_CLASS attribute_error : public std::runtime_error
{
public:
attribute_error();
};
class value_error : public std::runtime_error
class XLNT_CLASS value_error : public std::runtime_error
{
public:
value_error() : std::runtime_error("")

View File

@ -2,11 +2,13 @@
#include <functional>
#include "xlnt_config.hpp"
namespace xlnt {
// TODO: Can this be in source->detail, or must it be in a header?
template <class T>
inline void hash_combine(std::size_t &seed, const T &v)
inline void XLNT_FUNCTION hash_combine(std::size_t &seed, const T &v)
{
std::hash<T> hasher;
seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);

View File

@ -25,12 +25,14 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
/// <summary>
/// Security information about the document.
/// </summary>
class document_security
class XLNT_CLASS document_security
{
public:
document_security();

View File

@ -1,8 +1,11 @@
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class external_book
class XLNT_CLASS external_book
{
};
}

View File

@ -3,14 +3,16 @@
#include <string>
#include <vector>
#include "xlnt_config.hpp"
namespace xlnt {
class range_reference;
class worksheet;
std::vector<std::pair<std::string, std::string>> 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);
class named_range
class XLNT_CLASS named_range
{
public:
using target = std::pair<worksheet, range_reference>;

View File

@ -1,8 +1,10 @@
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class theme
class XLNT_CLASS theme
{
};

View File

@ -31,6 +31,8 @@
#include <xlnt/packaging/relationship.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class alignment;
@ -55,14 +57,12 @@ class zip_file;
enum class encoding;
namespace detail {
struct workbook_impl;
} // namespace detail
namespace detail { struct workbook_impl; } // namespace detail
/// <summary>
/// workbook is the container for all other parts of the document.
/// </summary>
class workbook
class XLNT_CLASS workbook
{
public:
class iterator

View File

@ -7,12 +7,14 @@
#include <xlnt/worksheet/major_order.hpp>
#include <xlnt/worksheet/worksheet.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class cell;
class range_reference;
class cell_vector
class XLNT_CLASS cell_vector
{
public:
template <bool is_const = true>

View File

@ -23,9 +23,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class column_properties
class XLNT_CLASS column_properties
{
public:
long double width;

View File

@ -1,8 +1,10 @@
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
enum class major_order
enum class XLNT_CLASS major_order
{
column,
row

View File

@ -23,9 +23,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class page_margins
class XLNT_CLASS page_margins
{
public:
page_margins() : default_(true), top_(0), left_(0), bottom_(0), right_(0), header_(0), footer_(0)

View File

@ -23,9 +23,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
struct page_setup
struct XLNT_CLASS page_setup
{
enum class page_break
{

View File

@ -22,9 +22,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class pane
class XLNT_CLASS pane
{
};

View File

@ -32,9 +32,11 @@
#include <xlnt/worksheet/range_reference.hpp>
#include <xlnt/worksheet/worksheet.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class range
class XLNT_CLASS range
{
public:
template <bool is_const = true>

View File

@ -24,9 +24,11 @@
#include <xlnt/cell/cell_reference.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class range_reference
class XLNT_CLASS range_reference
{
public:
/// <summary>
@ -92,22 +94,22 @@ class range_reference
cell_reference bottom_right_;
};
inline bool operator==(const std::string &reference_string, const range_reference &ref)
inline bool XLNT_FUNCTION operator==(const std::string &reference_string, const range_reference &ref)
{
return ref == reference_string;
}
inline bool operator==(const char *reference_string, const range_reference &ref)
inline bool XLNT_FUNCTION operator==(const char *reference_string, const range_reference &ref)
{
return ref == reference_string;
}
inline bool operator!=(const std::string &reference_string, const range_reference &ref)
inline bool XLNT_FUNCTION operator!=(const std::string &reference_string, const range_reference &ref)
{
return ref != reference_string;
}
inline bool operator!=(const char *reference_string, const range_reference &ref)
inline bool XLNT_FUNCTION operator!=(const char *reference_string, const range_reference &ref)
{
return ref != reference_string;
}

View File

@ -23,9 +23,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class row_properties
class XLNT_CLASS row_properties
{
public:
long double height;

View File

@ -22,9 +22,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class selection
class XLNT_CLASS selection
{
};

View File

@ -2,9 +2,11 @@
#include <string>
#include "xlnt_config.hpp"
namespace xlnt {
class sheet_protection
class XLNT_CLASS sheet_protection
{
public:
static std::string hash_password(const std::string &password);

View File

@ -22,9 +22,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class sheet_view
class XLNT_CLASS sheet_view
{
};

View File

@ -33,6 +33,8 @@
#include <xlnt/packaging/relationship.hpp>
#include <xlnt/worksheet/page_setup.hpp>
#include "xlnt_config.hpp"
namespace xlnt {
class cell;
@ -47,14 +49,12 @@ class workbook;
struct date;
namespace detail {
struct worksheet_impl;
} // namespace detail
namespace detail { struct worksheet_impl; }
/// <summary>
/// Worksheet header
/// </summary>
class header
class XLNT_CLASS header
{
public:
header();
@ -94,7 +94,7 @@ class header
/// <summary>
/// Worksheet footer
/// </summary>
class footer
class XLNT_CLASS footer
{
public:
footer();
@ -134,7 +134,7 @@ class footer
/// <summary>
/// Worksheet header and footer
/// </summary>
class header_footer
class XLNT_CLASS header_footer
{
public:
header_footer();
@ -185,7 +185,7 @@ class header_footer
/// <summary>
/// Worksheet margins
/// </summary>
struct margins
struct XLNT_CLASS margins
{
public:
margins() : default_(true), top_(0), left_(0), bottom_(0), right_(0), header_(0), footer_(0)
@ -264,7 +264,7 @@ struct margins
/// <summary>
/// A worksheet is a 2D array of cells.
/// </summary>
class worksheet
class XLNT_CLASS worksheet
{
public:
worksheet();

View File

@ -23,9 +23,11 @@
// @author: see AUTHORS file
#pragma once
#include "xlnt_config.hpp"
namespace xlnt {
class worksheet_properties
class XLNT_CLASS worksheet_properties
{
};

View File

@ -25,7 +25,7 @@
#include <string>
#include <xlnt/config.hpp>
#include "xlnt_config.hpp"
#include <xlnt/cell/cell.hpp>
#include <xlnt/cell/cell_reference.hpp>

View File

@ -54,4 +54,27 @@ enum class limit_style
/// </summary>
const limit_style LimitStyle = limit_style::openpyxl;
}
// If no API is defined, assume default
#ifndef XLNT_API
#ifdef _MSC_VER
#ifdef _DLL
#define XLNT_API __declspec(dllexport)
#else
#define XLNT_API __declspec(dllimport)
#endif
#else
#define XLNT_API
#endif
#endif
// If no API for classes is defined, assume default
#ifndef XLNT_CLASS
#define XLNT_CLASS XLNT_API
#endif
// If no API for functions is defined, assume default
#ifndef XLNT_FUNCTION
#define XLNT_FUNCTION XLNT_API
#endif
} // namespace xlnt

View File

@ -1,8 +1,8 @@
#include <limits>
#include <xlnt/config.hpp>
#include <detail/constants.hpp>
#include "constants.hpp"
#include "xlnt_config.hpp"
namespace xlnt {