skip unused gz sources in zlib, fix style equality operator exports

This commit is contained in:
Thomas Fussell 2016-10-31 21:53:22 -04:00
parent d8169b82d1
commit 98d506a5db
21 changed files with 45 additions and 45 deletions

View File

@ -64,12 +64,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const alignment &left, const alignment &right); XLNT_API friend bool operator==(const alignment &left, const alignment &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const alignment &left, const alignment &right) { return !(left == right); } XLNT_API friend bool operator!=(const alignment &left, const alignment &right) { return !(left == right); }
private: private:
optional<bool> shrink_to_fit_; optional<bool> shrink_to_fit_;

View File

@ -95,12 +95,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const border &left, const border &right); XLNT_API friend bool operator==(const border &left, const border &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const border &left, const border &right) { return !(left == right); } XLNT_API friend bool operator!=(const border &left, const border &right) { return !(left == right); }
private: private:
optional<border_property> start_; optional<border_property> start_;

View File

@ -27,7 +27,6 @@
#include <string> #include <string>
#include <xlnt/xlnt_config.hpp> #include <xlnt/xlnt_config.hpp>
#include <xlnt/utils/hashable.hpp>
namespace xlnt { namespace xlnt {

View File

@ -74,12 +74,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const pattern_fill &left, const pattern_fill &right); XLNT_API friend bool operator==(const pattern_fill &left, const pattern_fill &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const pattern_fill &left, const pattern_fill &right) { return !(left == right); } XLNT_API friend bool operator!=(const pattern_fill &left, const pattern_fill &right) { return !(left == right); }
private: private:
pattern_fill_type type_ = pattern_fill_type::none; pattern_fill_type type_ = pattern_fill_type::none;
@ -145,12 +145,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const gradient_fill &left, const gradient_fill &right); XLNT_API friend bool operator==(const gradient_fill &left, const gradient_fill &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const gradient_fill &left, const gradient_fill &right) { return !(left == right); } XLNT_API friend bool operator!=(const gradient_fill &left, const gradient_fill &right) { return !(left == right); }
private: private:
gradient_fill_type type_ = gradient_fill_type::linear; gradient_fill_type type_ = gradient_fill_type::linear;
@ -221,12 +221,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const fill &left, const fill &right); XLNT_API friend bool operator==(const fill &left, const fill &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const fill &left, const fill &right) { return !(left == right); } XLNT_API friend bool operator!=(const fill &left, const fill &right) { return !(left == right); }
private: private:
fill_type type_ = fill_type::pattern; fill_type type_ = fill_type::pattern;

View File

@ -95,12 +95,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const font &left, const font &right); XLNT_API friend bool operator==(const font &left, const font &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const font &left, const font &right) { return !(left == right); } XLNT_API friend bool operator!=(const font &left, const font &right) { return !(left == right); }
private: private:
friend class style; friend class style;

View File

@ -91,12 +91,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const number_format &left, const number_format &right); XLNT_API friend bool operator==(const number_format &left, const number_format &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const number_format &left, const number_format &right) { return !(left == right); } XLNT_API friend bool operator!=(const number_format &left, const number_format &right) { return !(left == right); }
private: private:
bool id_set_; bool id_set_;

View File

@ -52,12 +52,12 @@ public:
/// <summary> /// <summary>
/// Returns true if left is exactly equal to right. /// Returns true if left is exactly equal to right.
/// </summary> /// </summary>
friend bool operator==(const protection &left, const protection &right); XLNT_API friend bool operator==(const protection &left, const protection &right);
/// <summary> /// <summary>
/// Returns true if left is not exactly equal to right. /// Returns true if left is not exactly equal to right.
/// </summary> /// </summary>
friend bool operator!=(const protection &left, const protection &right) { return !(left == right); } XLNT_API friend bool operator!=(const protection &left, const protection &right) { return !(left == right); }
private: private:
bool locked_; bool locked_;

View File

@ -844,7 +844,7 @@ bool cell::has_format() const
void cell::set_format(const format &new_format) void cell::set_format(const format &new_format)
{ {
d_->format_id_ = get_workbook().create_format().id(); d_->format_id_ = new_format.id();
} }
calendar cell::get_base_date() const calendar cell::get_base_date() const

View File

@ -76,9 +76,7 @@ private:
return static_cast<std::streamsize>(data_.size() - position_); return static_cast<std::streamsize>(data_.size() - position_);
} }
std::streampos seekoff(std::streamoff off, std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode)
std::ios_base::seekdir way,
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
{ {
if (way == std::ios_base::beg) if (way == std::ios_base::beg)
{ {
@ -117,8 +115,7 @@ private:
return static_cast<std::ptrdiff_t>(position_); return static_cast<std::ptrdiff_t>(position_);
} }
std::streampos seekpos(std::streampos sp, std::streampos seekpos(std::streampos sp, std::ios_base::openmode)
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
{ {
if (sp < 0) if (sp < 0)
{ {
@ -189,9 +186,7 @@ private:
return n; return n;
} }
std::streampos seekoff(std::streamoff off, std::streampos seekoff(std::streamoff off, std::ios_base::seekdir way, std::ios_base::openmode)
std::ios_base::seekdir way,
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
{ {
if (way == std::ios_base::beg) if (way == std::ios_base::beg)
{ {
@ -230,8 +225,7 @@ private:
return static_cast<std::ptrdiff_t>(position_); return static_cast<std::ptrdiff_t>(position_);
} }
std::streampos seekpos(std::streampos sp, std::streampos seekpos(std::streampos sp, std::ios_base::openmode)
std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
{ {
if (sp < 0) if (sp < 0)
{ {

View File

@ -2374,7 +2374,8 @@ void xlsx_producer::write_comments(const relationship &rel, worksheet ws,
serializer().end_element(xmlns, "comments"); serializer().end_element(xmlns, "comments");
} }
void xlsx_producer::write_vml_drawings(const relationship &rel, worksheet ws, const std::vector<cell_reference> &cells) void xlsx_producer::write_vml_drawings(const relationship &rel, worksheet ws,
const std::vector<cell_reference> &cells)
{ {
static const auto xmlns_o = std::string("urn:schemas-microsoft-com:vml"); static const auto xmlns_o = std::string("urn:schemas-microsoft-com:vml");
static const auto xmlns_mv = std::string("http://macVmlSchemaUri"); static const auto xmlns_mv = std::string("http://macVmlSchemaUri");
@ -2420,6 +2421,8 @@ void xlsx_producer::write_vml_drawings(const relationship &rel, worksheet ws, co
for (const auto &cell_ref : cells) for (const auto &cell_ref : cells)
{ {
auto comment = ws.get_cell(cell_ref).comment();
serializer().start_element(xmlns_v, "shape"); serializer().start_element(xmlns_v, "shape");
serializer().attribute("id", "_x0000_s" + std::to_string(file_index) + "02" + std::to_string(comment_index)); serializer().attribute("id", "_x0000_s" + std::to_string(file_index) + "02" + std::to_string(comment_index));
serializer().attribute("type", "#_x0000_t202"); serializer().attribute("type", "#_x0000_t202");

View File

@ -38,11 +38,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#include <fstream> #include <fstream>
#include <iomanip> #include <iomanip>
#include <iostream> #include <iostream>
#include <iterator> // for std::back_inserter
#include <stdexcept> #include <stdexcept>
#include <cstring> #include <cstring>
#include <string> #include <string>
extern C { extern "C" {
#include <zlib.h> #include <zlib.h>
} }

View File

@ -92,7 +92,7 @@ optional<int> alignment::rotation() const
return text_rotation_; return text_rotation_;
} }
bool operator==(const alignment &left, const alignment &right) XLNT_API bool operator==(const alignment &left, const alignment &right)
{ {
if (left.horizontal().is_set() != right.horizontal().is_set()) if (left.horizontal().is_set() != right.horizontal().is_set())
{ {

View File

@ -144,7 +144,7 @@ optional<diagonal_direction> border::diagonal() const
return diagonal_direction_; return diagonal_direction_;
} }
bool operator==(const border &left, const border &right) XLNT_API bool operator==(const border &left, const border &right)
{ {
for (auto side : border::all_sides()) for (auto side : border::all_sides())
{ {

View File

@ -214,7 +214,7 @@ void color::assert_type(type t) const
} }
} }
bool color::operator==(const xlnt::color &other) const XLNT_API bool color::operator==(const xlnt::color &other) const
{ {
if (type_ != other.type_ || tint_ != other.tint_) return false; if (type_ != other.type_ || tint_ != other.tint_) return false;
switch(type_) switch(type_)

View File

@ -72,7 +72,7 @@ pattern_fill &pattern_fill::background(const color &new_background)
return *this; return *this;
} }
bool operator==(const pattern_fill &left, const pattern_fill &right) XLNT_API bool operator==(const pattern_fill &left, const pattern_fill &right)
{ {
if (left.background().is_set() != right.background().is_set()) if (left.background().is_set() != right.background().is_set())
{ {
@ -198,7 +198,7 @@ std::unordered_map<double, color> gradient_fill::stops() const
return stops_; return stops_;
} }
bool operator==(const gradient_fill &left, const gradient_fill &right) XLNT_API bool operator==(const gradient_fill &left, const gradient_fill &right)
{ {
if (left.type() != right.type()) if (left.type() != right.type())
{ {
@ -289,7 +289,7 @@ pattern_fill fill::pattern_fill() const
return pattern_; return pattern_;
} }
bool operator==(const fill &left, const fill &right) XLNT_API bool operator==(const fill &left, const fill &right)
{ {
if (left.type() != right.type()) if (left.type() != right.type())
{ {

View File

@ -153,7 +153,7 @@ optional<std::string> font::scheme() const
return scheme_; return scheme_;
} }
bool operator==(const font &left, const font &right) XLNT_API bool operator==(const font &left, const font &right)
{ {
if (left.bold() != right.bold()) if (left.bold() != right.bold())
{ {

View File

@ -353,7 +353,7 @@ std::string number_format::format(long double number, calendar base_date) const
return detail::number_formatter(format_string_, base_date).format_number(number); return detail::number_formatter(format_string_, base_date).format_number(number);
} }
bool operator==(const number_format &left, const number_format &right) XLNT_API bool operator==(const number_format &left, const number_format &right)
{ {
return left.id_set_ == right.id_set_ return left.id_set_ == right.id_set_
&& left.id_ == right.id_ && left.id_ == right.id_

View File

@ -52,7 +52,7 @@ protection &protection::hidden(bool hidden)
return *this; return *this;
} }
bool operator==(const protection &left, const protection &right) XLNT_API bool operator==(const protection &left, const protection &right)
{ {
return left.locked_ == right.locked_ && left.hidden_ == right.hidden_; return left.locked_ == right.locked_ && left.hidden_ == right.hidden_;
} }

View File

@ -818,6 +818,14 @@ worksheet workbook::create_sheet_with_rel(const std::string &title, const relati
auto sheet_id = d_->worksheets_.size() + 1; auto sheet_id = d_->worksheets_.size() + 1;
d_->worksheets_.push_back(detail::worksheet_impl(this, sheet_id, title)); d_->worksheets_.push_back(detail::worksheet_impl(this, sheet_id, title));
auto workbook_rel = d_->manifest_.get_relationship(path("/"), relationship::type::office_document);
auto sheet_absoulute_path = workbook_rel.get_target().get_path().parent().append(rel.get_target().get_path());
d_->manifest_.register_override_type(sheet_absoulute_path,
"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml");
auto ws_rel = d_->manifest_.register_relationship(workbook_rel.get_target(),
relationship::type::worksheet, rel.get_target(), target_mode::internal);
d_->sheet_title_rel_id_map_[title] = ws_rel;
return worksheet(&d_->worksheets_.back()); return worksheet(&d_->worksheets_.back());
} }

View File

@ -75,10 +75,6 @@ set(ZLIB ${CMAKE_CURRENT_SOURCE_DIR}/zlib/adler32.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/compress.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/compress.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/crc32.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/crc32.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/deflate.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/deflate.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/gzclose.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/gzlib.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/gzread.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/gzwrite.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/infback.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/infback.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffast.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffast.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/inflate.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/inflate.c
@ -88,7 +84,6 @@ set(ZLIB ${CMAKE_CURRENT_SOURCE_DIR}/zlib/adler32.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/zutil.c ${CMAKE_CURRENT_SOURCE_DIR}/zlib/zutil.c
${CMAKE_CURRENT_SOURCE_DIR}/zlib/crc32.h ${CMAKE_CURRENT_SOURCE_DIR}/zlib/crc32.h
${CMAKE_CURRENT_SOURCE_DIR}/zlib/deflate.h ${CMAKE_CURRENT_SOURCE_DIR}/zlib/deflate.h
${CMAKE_CURRENT_SOURCE_DIR}/zlib/gzguts.h
${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffast.h ${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffast.h
${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffixed.h ${CMAKE_CURRENT_SOURCE_DIR}/zlib/inffixed.h
${CMAKE_CURRENT_SOURCE_DIR}/zlib/inflate.h ${CMAKE_CURRENT_SOURCE_DIR}/zlib/inflate.h

2
third-party/botan vendored

@ -1 +1 @@
Subproject commit 73c2605f50e6192bf6cb560c51d32bc53b4c5597 Subproject commit dad94a550613733d8c75b2fbd8db47048dfdaf13