change include style

This commit is contained in:
Thomas Fussell 2014-08-13 18:56:34 -04:00
parent 5ccc345f8c
commit 01e8937ddf
28 changed files with 108 additions and 90 deletions

View File

@ -0,0 +1,7 @@
#define MINIZ_HEADER_FILE_ONLY
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
#define MINIZ_LITTLE_ENDIAN 1
#define MINIZ_HAS_64BIT_REGISTERS 1
#include "../../../third-party/miniz/miniz.c"

View File

@ -50,5 +50,6 @@ const std::string download_url = "https://github.com/tfussell/xlnt/archive/maste
#include "workbook/document_properties.hpp" #include "workbook/document_properties.hpp"
#include "cell/value.hpp" #include "cell/value.hpp"
#include "cell/comment.hpp" #include "cell/comment.hpp"
#include "common/miniz.h"
#pragma comment(lib, "xlnt.lib") //#pragma comment(lib, "xlnt.lib")

View File

@ -2,17 +2,18 @@
#include <locale> #include <locale>
#include <sstream> #include <sstream>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "cell/cell_reference.hpp" #include <xlnt/cell/cell_reference.hpp>
#include "cell/comment.hpp" #include <xlnt/cell/comment.hpp>
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include "common/datetime.hpp" #include <xlnt/common/datetime.hpp>
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
#include <xlnt/common/exceptions.hpp>
#include <xlnt/workbook/workbook.hpp>
#include <xlnt/workbook/document_properties.hpp>
#include "detail/cell_impl.hpp" #include "detail/cell_impl.hpp"
#include "common/exceptions.hpp"
#include "workbook/workbook.hpp"
#include "workbook/document_properties.hpp"
namespace { namespace {

View File

@ -1,9 +1,10 @@
#include <locale> #include <locale>
#include "cell/cell_reference.hpp" #include <xlnt/cell/cell_reference.hpp>
#include <xlnt/common/exceptions.hpp>
#include <xlnt/worksheet/range_reference.hpp>
#include "constants.hpp" #include "constants.hpp"
#include "common/exceptions.hpp"
#include "worksheet/range_reference.hpp"
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "cell/comment.hpp" #include <xlnt/cell/comment.hpp>
namespace xlnt { namespace xlnt {

View File

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

View File

@ -3,7 +3,7 @@
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include "common/types.hpp" #include <xlnt/common/types.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,7 +1,7 @@
#include <cmath> #include <cmath>
#include <ctime> #include <ctime>
#include "common/datetime.hpp" #include <xlnt/common/datetime.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,5 +1,5 @@
#include "cell_impl.hpp" #include "cell_impl.hpp"
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
namespace xlnt { namespace xlnt {
namespace detail { namespace detail {

View File

@ -1,10 +1,10 @@
#pragma once #pragma once
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "cell/comment.hpp" #include <xlnt/cell/comment.hpp>
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include "common/types.hpp" #include <xlnt/common/types.hpp>
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "workbook/document_properties.hpp" #include <xlnt/workbook/document_properties.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "drawing/drawing.hpp" #include <xlnt/drawing/drawing.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "common/exceptions.hpp" #include <xlnt/common/exceptions.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,6 +1,6 @@
#include <algorithm> #include <algorithm>
#include "styles/number_format.hpp" #include <xlnt/styles/number_format.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "styles/protection.hpp" #include <xlnt/styles/protection.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,7 +1,7 @@
#include "worksheet/range.hpp" #include <xlnt/worksheet/range.hpp>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "worksheet/range_reference.hpp" #include <xlnt/worksheet/range_reference.hpp>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,6 +1,6 @@
#include <locale> #include <locale>
#include "worksheet/range_reference.hpp" #include <xlnt/worksheet/range_reference.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,17 +1,17 @@
#include <algorithm> #include <algorithm>
#include <pugixml.hpp> #include <pugixml.hpp>
#include "reader/reader.hpp" #include <xlnt/reader/reader.hpp>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include "common/datetime.hpp" #include <xlnt/common/datetime.hpp>
#include "worksheet/range_reference.hpp" #include <xlnt/worksheet/range_reference.hpp>
#include "workbook/workbook.hpp" #include <xlnt/workbook/workbook.hpp>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
#include "workbook/document_properties.hpp" #include <xlnt/workbook/document_properties.hpp>
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
#include "common/zip_file.hpp" #include <xlnt/common/zip_file.hpp>
#include "common/exceptions.hpp" #include <xlnt/common/exceptions.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
namespace xlnt { namespace xlnt {

View File

@ -2,7 +2,7 @@
#include <locale> #include <locale>
#include <sstream> #include <sstream>
#include "worksheet/sheet_protection.hpp" #include <xlnt/worksheet/sheet_protection.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,6 +1,6 @@
#include <stdexcept> #include <stdexcept>
#include "common/string_table.hpp" #include <xlnt/common/string_table.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,4 +1,4 @@
#include "styles/style.hpp" #include <xlnt/styles/style.hpp>
namespace xlnt { namespace xlnt {

View File

@ -1,11 +1,11 @@
#include <sstream> #include <sstream>
#include <pugixml.hpp> #include <pugixml.hpp>
#include "writer/style_writer.hpp" #include <xlnt/writer/style_writer.hpp>
#include "workbook/workbook.hpp" #include <xlnt/workbook/workbook.hpp>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
#include "worksheet/range.hpp" #include <xlnt/worksheet/range.hpp>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
namespace xlnt { namespace xlnt {
@ -63,14 +63,20 @@ std::string style_writer::write_table() const
style_sheet_node.append_attribute("mc:Ignorable").set_value("x14ac"); style_sheet_node.append_attribute("mc:Ignorable").set_value("x14ac");
style_sheet_node.append_attribute("xmlns:x14ac").set_value("http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"); style_sheet_node.append_attribute("xmlns:x14ac").set_value("http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac");
std::vector<style> custom_styles;
for(auto style : get_styles()) for(auto style : get_styles())
{ {
if((int)style.get_number_format().get_format_code() > 163) if((int)style.get_number_format().get_format_code() > 163)
{ {
custom_styles.push_back(style);
} }
} }
if(!custom_styles.empty())
{
}
auto fonts_node = style_sheet_node.append_child("fonts"); auto fonts_node = style_sheet_node.append_child("fonts");
fonts_node.append_attribute("count").set_value(1); fonts_node.append_attribute("count").set_value(1);
fonts_node.append_attribute("x14ac:knownFonts").set_value(1); fonts_node.append_attribute("x14ac:knownFonts").set_value(1);

View File

@ -1,5 +1,5 @@
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include "common/datetime.hpp" #include <xlnt/common/datetime.hpp>
namespace xlnt { namespace xlnt {

View File

@ -9,20 +9,21 @@
#include <Windows.h> #include <Windows.h>
#endif #endif
#include "workbook/workbook.hpp" #include <xlnt/workbook/workbook.hpp>
#include "common/exceptions.hpp" #include <xlnt/common/exceptions.hpp>
#include "drawing/drawing.hpp" #include <xlnt/drawing/drawing.hpp>
#include "worksheet/range.hpp" #include <xlnt/worksheet/range.hpp>
#include "reader/reader.hpp" #include <xlnt/reader/reader.hpp>
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
#include "writer/writer.hpp" #include <xlnt/writer/writer.hpp>
#include "common/zip_file.hpp" #include <xlnt/common/zip_file.hpp>
#include "workbook/document_properties.hpp" #include <xlnt/workbook/document_properties.hpp>
#include <xlnt/writer/style_writer.hpp>
#include "detail/cell_impl.hpp" #include "detail/cell_impl.hpp"
#include "detail/workbook_impl.hpp" #include "detail/workbook_impl.hpp"
#include "detail/worksheet_impl.hpp" #include "detail/worksheet_impl.hpp"
#include "writer/style_writer.hpp"
static std::string CreateTemporaryFilename() static std::string CreateTemporaryFilename()
{ {

View File

@ -1,15 +1,16 @@
#include <algorithm> #include <algorithm>
#include "worksheet/worksheet.hpp" #include <xlnt/worksheet/worksheet.hpp>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include "common/datetime.hpp" #include <xlnt/common/datetime.hpp>
#include "worksheet/range.hpp" #include <xlnt/worksheet/range.hpp>
#include "worksheet/range_reference.hpp" #include <xlnt/worksheet/range_reference.hpp>
#include "common/relationship.hpp" #include <xlnt/common/relationship.hpp>
#include "workbook/workbook.hpp" #include <xlnt/workbook/workbook.hpp>
#include <xlnt/common/exceptions.hpp>
#include "detail/worksheet_impl.hpp" #include "detail/worksheet_impl.hpp"
#include "common/exceptions.hpp"
namespace xlnt { namespace xlnt {

View File

@ -7,16 +7,17 @@
#include <pugixml.hpp> #include <pugixml.hpp>
#include "writer/writer.hpp" #include <xlnt/writer/writer.hpp>
#include "cell/cell.hpp" #include <xlnt/cell/cell.hpp>
#include "cell/value.hpp" #include <xlnt/cell/value.hpp>
#include <xlnt/worksheet/range.hpp>
#include <xlnt/worksheet/range_reference.hpp>
#include <xlnt/worksheet/worksheet.hpp>
#include <xlnt/workbook/workbook.hpp>
#include <xlnt/common/relationship.hpp>
#include <xlnt/workbook/document_properties.hpp>
#include "constants.hpp" #include "constants.hpp"
#include "worksheet/range.hpp"
#include "worksheet/range_reference.hpp"
#include "worksheet/worksheet.hpp"
#include "workbook/workbook.hpp"
#include "common/relationship.hpp"
#include "workbook/document_properties.hpp"
namespace xlnt { namespace xlnt {

View File

@ -1,9 +1,6 @@
#include <algorithm> #include <algorithm>
#include <fstream> #include <fstream>
#define MINIZ_HEADER_FILE_ONLY
#include "miniz.c"
#ifdef _WIN32 #ifdef _WIN32
#define NOMINMAX #define NOMINMAX
#include <Windows.h> #include <Windows.h>
@ -11,7 +8,8 @@
#endif #endif
#include "common/zip_file.hpp" #include <xlnt/common/zip_file.hpp>
#include <xlnt/common/miniz.h>
namespace { namespace {