Skip to content

Commit

Permalink
Merge e8ee585 into 85e6878
Browse files Browse the repository at this point in the history
  • Loading branch information
tfussell committed Feb 8, 2020
2 parents 85e6878 + e8ee585 commit 1a8410b
Show file tree
Hide file tree
Showing 267 changed files with 5,903 additions and 4,895 deletions.
40 changes: 20 additions & 20 deletions include/xlnt/cell/cell.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -272,12 +272,12 @@ class XLNT_API cell
/// <summary>
/// Adds an internal hyperlink to this cell pointing to the given cell.
/// </summary>
void hyperlink(xlnt::cell target, const std::string& display = "");
void hyperlink(xlnt::cell target, const std::string &display = "");

/// <summary>
/// Adds an internal hyperlink to this cell pointing to the given range.
/// </summary>
void hyperlink(xlnt::range target, const std::string& display = "");
void hyperlink(xlnt::range target, const std::string &display = "");

/// <summary>
/// Returns true if this cell has a hyperlink set.
Expand Down Expand Up @@ -431,10 +431,10 @@ class XLNT_API cell
/// </summary>
class style style();

/// <summary>
/// Returns a wrapper pointing to the named style applied to this cell.
/// </summary>
const class style style() const;
/// <summary>
/// Returns a wrapper pointing to the named style applied to this cell.
/// </summary>
const class style style() const;

/// <summary>
/// Sets the named style applied to this cell to a style named style_name.
Expand Down Expand Up @@ -670,43 +670,43 @@ XLNT_API bool operator==(const cell &cell, std::nullptr_t);
/// </summary>
XLNT_API std::ostream &operator<<(std::ostream &stream, const xlnt::cell &cell);

template<>
template <>
bool cell::value<bool>() const;

template<>
template <>
int cell::value<int>() const;

template<>
template <>
unsigned int cell::value<unsigned int>() const;

template<>
template <>
long long int cell::value<long long int>() const;

template<>
template <>
unsigned long long cell::value<unsigned long long int>() const;

template<>
template <>
float cell::value<float>() const;

template<>
template <>
double cell::value<double>() const;

template<>
template <>
date cell::value<date>() const;

template<>
template <>
time cell::value<time>() const;

template<>
template <>
datetime cell::value<datetime>() const;

template<>
template <>
timedelta cell::value<timedelta>() const;

template<>
template <>
std::string cell::value<std::string>() const;

template<>
template <>
rich_text cell::value<rich_text>() const;

} // namespace xlnt
13 changes: 6 additions & 7 deletions include/xlnt/cell/cell_reference.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand All @@ -23,12 +23,12 @@

#pragma once

#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/index_types.hpp>
#include <cstdint>
#include <string>
#include <utility>
#include <tuple>
#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/index_types.hpp>
#include <utility>

namespace xlnt {

Expand Down Expand Up @@ -256,8 +256,7 @@ class XLNT_API cell_reference

} // namespace xlnt

namespace std
{
namespace std {
template <>
struct hash<xlnt::cell_reference>
{
Expand All @@ -268,4 +267,4 @@ struct hash<xlnt::cell_reference>
return hash<std::uint64_t>{}(x.row() | static_cast<std::uint64_t>(x.column_index()) << 32);
}
};
}
} // namespace std
2 changes: 1 addition & 1 deletion include/xlnt/cell/cell_type.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
2 changes: 1 addition & 1 deletion include/xlnt/cell/comment.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
9 changes: 4 additions & 5 deletions include/xlnt/cell/hyperlink.hpp
Expand Up @@ -23,8 +23,8 @@

#pragma once

#include <string>
#include <xlnt/xlnt_config.hpp>
#include <string>

namespace xlnt {

Expand All @@ -51,15 +51,15 @@ class XLNT_API hyperlink

bool has_display() const;
void display(const std::string &value);
const std::string& display() const;
const std::string &display() const;

bool has_tooltip() const;
void tooltip(const std::string &value);
const std::string& tooltip() const;
const std::string &tooltip() const;

bool has_location() const;
void location(const std::string &value);
const std::string& location() const;
const std::string &location() const;

private:
friend class cell;
Expand All @@ -68,4 +68,3 @@ class XLNT_API hyperlink
};

} // namespace xlnt

2 changes: 1 addition & 1 deletion include/xlnt/cell/index_types.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion include/xlnt/cell/phonetic_run.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2018
// Copyright (c) 2016-2020
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 5 additions & 5 deletions include/xlnt/cell/rich_text.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2018 Thomas Fussell
// Copyright (c) 2016-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -27,8 +27,8 @@
#include <vector>

#include <xlnt/xlnt_config.hpp>
#include <xlnt/cell/rich_text_run.hpp>
#include <xlnt/cell/phonetic_run.hpp>
#include <xlnt/cell/rich_text_run.hpp>
#include <xlnt/worksheet/phonetic_pr.hpp>

namespace xlnt {
Expand Down Expand Up @@ -124,12 +124,12 @@ class XLNT_API rich_text
/// <summary>
/// Sets the phonetic properties of this text to phonetic_props
/// </summary>
void phonetic_properties(const phonetic_pr& phonetic_props);
void phonetic_properties(const phonetic_pr &phonetic_props);

/// <summary>
/// Copies rich text object from other
/// </summary>
rich_text& operator=(const rich_text &rhs);
rich_text &operator=(const rich_text &rhs);

/// <summary>
/// Returns true if the runs that make up this text are identical to those in rhs.
Expand Down Expand Up @@ -163,7 +163,7 @@ class XLNT_API rich_text
class XLNT_API rich_text_hash
{
public:
std::size_t operator()(const rich_text& k) const
std::size_t operator()(const rich_text &k) const
{
std::size_t res = 0;

Expand Down
2 changes: 1 addition & 1 deletion include/xlnt/cell/rich_text_run.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2016-2018 Thomas Fussell
// Copyright (c) 2016-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 6 additions & 6 deletions include/xlnt/drawing/spreadsheet_drawing.hpp
Expand Up @@ -23,14 +23,14 @@

#pragma once

#include <xlnt/xlnt_config.hpp>
#include <string>
#include <vector>
#include <xlnt/xlnt_config.hpp>

namespace xml {
class parser;
class serializer;
}
class parser;
class serializer;
} // namespace xml

namespace xlnt {

Expand All @@ -49,11 +49,11 @@ class XLNT_API spreadsheet_drawing
void serialize(xml::serializer &serializer);

std::vector<std::string> get_embed_ids();

private:
std::string serialized_value_;
std::string serialized_value_;
std::vector<std::string> embed_ids_;
};

} // namespace drawing
} // namespace xlnt

21 changes: 11 additions & 10 deletions include/xlnt/packaging/ext_list.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -32,7 +32,7 @@
namespace xml {
class parser;
class serializer;
}
} // namespace xml

namespace xlnt {

Expand All @@ -46,16 +46,16 @@ class XLNT_API ext_list
public:
struct ext
{
ext(xml::parser &parser, const std::string& ns);
ext(const uri& ID, const std::string& serialised);
void serialise(xml::serializer &serialiser, const std::string& ns);
ext(xml::parser &parser, const std::string &ns);
ext(const uri &ID, const std::string &serialised);
void serialise(xml::serializer &serialiser, const std::string &ns);

uri extension_ID_;
std::string serialised_value_;
};
ext_list() = default; // default ctor required by xlnt::optional
explicit ext_list(xml::parser &parser, const std::string& ns);
void serialize(xml::serializer &serialiser, const std::string& ns);
explicit ext_list(xml::parser &parser, const std::string &ns);
void serialize(xml::serializer &serialiser, const std::string &ns);

void add_extension(const uri &ID, const std::string &element);

Expand All @@ -65,14 +65,15 @@ class XLNT_API ext_list

const std::vector<ext> &extensions() const;

bool operator==(const ext_list& rhs) const;
bool operator==(const ext_list &rhs) const;

private:
std::vector<ext> extensions_;
};

inline bool operator==(const ext_list::ext& lhs, const ext_list::ext& rhs)
inline bool operator==(const ext_list::ext &lhs, const ext_list::ext &rhs)
{
return lhs.extension_ID_ == rhs.extension_ID_
&& lhs.serialised_value_ == rhs.serialised_value_;
}
} // namespace xlnt
} // namespace xlnt
2 changes: 1 addition & 1 deletion include/xlnt/packaging/manifest.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down
4 changes: 2 additions & 2 deletions include/xlnt/packaging/relationship.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
// Copyright (c) 2010-2015 openpyxl
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand Down Expand Up @@ -115,7 +115,7 @@ class XLNT_API relationship
/// <summary>
/// Returns a string of the form rId# that identifies the relationship.
/// </summary>
const std::string& id() const;
const std::string &id() const;

/// <summary>
/// Returns the type of this relationship.
Expand Down
4 changes: 2 additions & 2 deletions include/xlnt/packaging/uri.hpp
@@ -1,4 +1,4 @@
// Copyright (c) 2014-2018 Thomas Fussell
// Copyright (c) 2014-2020 Thomas Fussell
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -123,7 +123,7 @@ class XLNT_API uri
/// Returns the path of this URI.
/// E.g. the path of http://example.com/document is "/document"
/// </summary>
const class path& path() const;
const class path &path() const;

/// <summary>
/// Returns true if this URI has a non-null query string section.
Expand Down

0 comments on commit 1a8410b

Please sign in to comment.