[liborcus] 01/03: New upstream version 0.12.1

Rene Engelhard rene at moszumanska.debian.org
Tue Sep 20 21:03:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch experimental
in repository liborcus.

commit 9eee68a2c22b91b0e4fec1297d415c2b1d800cc0
Author: Rene Engelhard <rene at debian.org>
Date:   Tue Sep 20 22:51:56 2016 +0200

    New upstream version 0.12.1
---
 CHANGELOG                           |  9 ++++++
 ChangeLog                           | 61 +++++++++++++++++++++++++++++++++++++
 README.md                           |  2 ++
 configure                           | 52 ++++++++++++++++++++++++-------
 configure.ac                        | 18 ++++++++++-
 src/liborcus/xlsx_context.cpp       | 10 +++---
 src/liborcus/xlsx_pivot_context.cpp | 54 ++++++++++++++++++++++++++------
 src/liborcus/xlsx_pivot_context.hpp |  3 ++
 src/orcus_filter_global.cpp         |  6 ++--
 src/parser/stream.cpp               |  2 +-
 src/python/Makefile.am              | 10 ++++--
 src/python/Makefile.in              |  8 ++---
 src/python/python.cpp               |  3 ++
 src/python/xlsx.cpp                 |  9 ++----
 14 files changed, 205 insertions(+), 42 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index c5e7fbb..8d0f05b 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,12 @@
+orcus 0.12.1
+
+  * fix build when --disable-spreadsheet-model is specified and the
+    ixion headers are not present.
+
+  * fix loading of file streams on Windows.
+
+  * get the debug flag to work again
+
 orcus 0.12.0
 
   * handle escaped unicode in the xml parser
diff --git a/ChangeLog b/ChangeLog
index 3987c39..e5a92e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,64 @@
+2016-09-18  Kohei Yoshida  <kohei.yoshida at gmail.com>  [9bd4c5459c266fdefa62afb044cb0857f15d6998]
+
+	Add boost-filesystem package for CI.
+
+
+2016-09-18  Kohei Yoshida  <kohei.yoshida at gmail.com>  [638c70faf2f0e3c07dfa79b70d61ec08e851bc90]
+
+	Update CHANGELOG etc.
+
+
+2016-09-18  Kohei Yoshida  <kohei.yoshida at gmail.com>  [175d7e743e40e4e10b82d4603f06d54b80d0a584]
+
+	Remove version number from the boost dev package.
+
+
+2016-09-18  Kohei Yoshida  <kohei.yoshida at gmail.com>  [f4969601e79b37a1e0b63b49b75f3739a1824e35]
+
+	Install more packages for the CI.
+
+
+2016-09-18  Kohei Yoshida  <kohei.yoshida at gmail.com>  [8eaa932123d99bdfacd17aab692cc02809e6ab92]
+
+	Load stream as binary stream.
+
+	Apparently without this, the stream doesn't load correctly on
+	Windows.
+
+	https://gitlab.com/orcus/orcus/issues/30
+
+2016-09-17  Markus Mohrhard  <markus.mohrhard at googlemail.com>  [172faa0a99481d84d5bb2f3296261e29aa5e603e]
+
+	Add initial CI support
+
+
+2016-09-16  Kohei Yoshida  <kohei.yoshida at gmail.com>  [4a0a45f9fed05f0fd8afac1bd4b0ec8a22a7fd70]
+
+	Python's xlsx API implicitly depends on the spreadsheet model.
+
+	When --disable-spreadsheet-model is passed, we should disable Python's
+	xlsx API so that it builds fine without dependency on ixion.
+
+2016-09-08  Kohei Yoshida  <kohei.yoshida at gmail.com>  [7588097dc08c0692d2287d87ee425cfc61447ae6]
+
+	It's element s, not x.
+
+
+2016-09-08  Kohei Yoshida  <kohei.yoshida at gmail.com>  [74cfb7010a3385350d8f88d92afc8dc93751d987]
+
+	Improve the parsing of pivot table contents etc.
+
+
+2016-09-08  Kohei Yoshida  <kohei.yoshida at gmail.com>  [26f28ff6ea4de65337dfc1b40323b0ff1870e900]
+
+	Get the debug flag to work again.
+
+
+2016-08-21  Kohei Yoshida  <kohei.yoshida at gmail.com>  [78cf3467cd4ff29207d677714e52b81a2346fadc]
+
+	Add download entries to 0.12.0 packages.
+
+
 2016-08-20  Kohei Yoshida  <kohei.yoshida at gmail.com>  [ff4bb90adb4db0ff68e9904c21293724ae9b2356]
 
 	make distclean finally passes.
diff --git a/README.md b/README.md
index 8fda17b..64b50b3 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,8 @@ callbacks from the parser as the file is being parsed.
 
 | Version | API Version | Release Date | Download | Checksum | File Size (bytes) |
 |---------|-------------|--------------|----------|----------|-------------------|
+| 0.12.0 | 0.12 | 2016-08-21 | [liborcus-0.12.0.tar.xz](http://kohei.us/files/orcus/src/liborcus-0.12.0.tar.xz) | sha256sum: a0b904c4c501a4428cacf1178b2a0c4c8dc89fcade8d0310f4826a32495750df | 1672940 |
+| | | | [liborcus-0.12.0.tar.gz](http://kohei.us/files/orcus/src/liborcus-0.12.0.tar.gz) | sha256sum: 0c3ea6cee3700aeab20878d7d4d8a03b5fb594b81cbb2bb1ff6b603847fd6568 | 2116641 |
 | 0.11.2 | 0.11 | 2016-05-11 | [liborcus-0.11.2.tar.xz](http://kohei.us/files/orcus/src/liborcus-0.11.2.tar.xz) | sha256sum: 6911dc65a4d8276e42d32764e9ebee920b325cf59cfa7070fc72744d43b259ad | 1627540 |
 | | | | [liborcus-0.11.2.tar.gz](http://kohei.us/files/orcus/src/liborcus-0.11.2.tar.gz) | sha256sum: 10afc617fd7600fa02bd4467d2e3c7bd058f84e4d672d558e1db90e82dafd256 | 2034926 |
 | 0.11.1 | 0.11 | 2016-03-11 | [liborcus-0.11.1.tar.xz](http://kohei.us/files/orcus/src/liborcus-0.11.1.tar.xz) | sha256sum: 02a6251a9b732c2c555c1be083411a2d0383dfd2ebc79f60ac282875b1ada49b | 1627332 |
diff --git a/configure b/configure
index e087d2d..f4637ca 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for liborcus 0.12.0.
+# Generated by GNU Autoconf 2.69 for liborcus 0.12.1.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='liborcus'
 PACKAGE_TARNAME='liborcus'
-PACKAGE_VERSION='0.12.0'
-PACKAGE_STRING='liborcus 0.12.0'
+PACKAGE_VERSION='0.12.1'
+PACKAGE_STRING='liborcus 0.12.1'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -631,6 +631,8 @@ ac_includes_default="\
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 LTLIBOBJS
+WITH_PYTHON_XLSX_FALSE
+WITH_PYTHON_XLSX_TRUE
 BUILD_PYTHON_FALSE
 BUILD_PYTHON_TRUE
 PYTHON_LIBS
@@ -1415,7 +1417,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures liborcus 0.12.0 to adapt to many kinds of systems.
+\`configure' configures liborcus 0.12.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1486,7 +1488,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of liborcus 0.12.0:";;
+     short | recursive ) echo "Configuration of liborcus 0.12.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1637,7 +1639,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-liborcus configure 0.12.0
+liborcus configure 0.12.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2286,7 +2288,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by liborcus $as_me 0.12.0, which was
+It was created by liborcus $as_me 0.12.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3153,7 +3155,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='liborcus'
- VERSION='0.12.0'
+ VERSION='0.12.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17527,7 +17529,7 @@ IXION_REQUIRED_API_VERSION=0.12
 ORCUS_API_VERSION=0.12
 ORCUS_MAJOR_VERSION=0
 ORCUS_MINOR_VERSION=12
-ORCUS_MICRO_VERSION=0
+ORCUS_MICRO_VERSION=1
 
 
 
@@ -20522,6 +20524,28 @@ else
 fi
 
 
+with_python_xlsx="no"
+if test "x$enable_spreadsheet_model" != "xno"; then
+    if test "x$enable_python" != "xno"; then
+        if test "x$with_xlsx_filter" != "xno"; then
+            with_python_xlsx="yes"
+        fi
+    fi
+fi
+
+if test "x$with_python_xlsx" != "xno"; then
+    CXXFLAGS="$CXXFLAGS -D__ORCUS_PYTHON_XLSX"
+fi
+
+ if test "x$with_python_xlsx" != "xno"; then
+  WITH_PYTHON_XLSX_TRUE=
+  WITH_PYTHON_XLSX_FALSE='#'
+else
+  WITH_PYTHON_XLSX_TRUE='#'
+  WITH_PYTHON_XLSX_FALSE=
+fi
+
+
 ac_config_files="$ac_config_files Makefile liborcus-$ORCUS_API_VERSION.pc:liborcus.pc.in liborcus-spreadsheet-model-$ORCUS_API_VERSION.pc:liborcus-spreadsheet-model.pc.in VERSION include/Makefile include/orcus/Makefile include/orcus/detail/Makefile include/orcus/mso/Makefile include/orcus/spreadsheet/Makefile src/Makefile src/liborcus/Makefile src/liborcus/constants.inl src/mso/Makefile src/parser/Makefile src/python/Makefile src/spreadsheet/Makefile parser_handlers/Makefile benchmark/Makefile"
 
 cat >confcache <<\_ACEOF
@@ -20697,6 +20721,10 @@ if test -z "${BUILD_PYTHON_TRUE}" && test -z "${BUILD_PYTHON_FALSE}"; then
   as_fn_error $? "conditional \"BUILD_PYTHON\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${WITH_PYTHON_XLSX_TRUE}" && test -z "${WITH_PYTHON_XLSX_FALSE}"; then
+  as_fn_error $? "conditional \"WITH_PYTHON_XLSX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 
 : "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
@@ -21094,7 +21122,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by liborcus $as_me 0.12.0, which was
+This file was extended by liborcus $as_me 0.12.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -21160,7 +21188,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-liborcus config.status 0.12.0
+liborcus config.status 0.12.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -23148,6 +23176,7 @@ Build configuration:
         xlsx-filter:           $with_xlsx_filter
         xls-xml-filter:        $with_xls_xml_filter
         tools:                 $with_tools
+        python-xlsx            $with_python_xlsx
 ==============================================================================
 " >&5
 $as_echo "$as_me:
@@ -23162,6 +23191,7 @@ Build configuration:
         xlsx-filter:           $with_xlsx_filter
         xls-xml-filter:        $with_xls_xml_filter
         tools:                 $with_tools
+        python-xlsx            $with_python_xlsx
 ==============================================================================
 " >&6;}
 
diff --git a/configure.ac b/configure.ac
index afdf0ed..67541ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_PREREQ([2.65])
 # ===================
 m4_define([orcus_major_version], [0])
 m4_define([orcus_minor_version], [12])
-m4_define([orcus_micro_version], [0])
+m4_define([orcus_micro_version], [1])
 m4_define([orcus_version], [orcus_major_version.orcus_minor_version.orcus_micro_version])
 
 # ===============
@@ -236,6 +236,21 @@ AS_IF([test "x$enable_python" != "xno"], [
 ])
 AM_CONDITIONAL([BUILD_PYTHON], [test "x$enable_python" != "xno"])
 
+with_python_xlsx="no"
+if test "x$enable_spreadsheet_model" != "xno"; then
+    if test "x$enable_python" != "xno"; then
+        if test "x$with_xlsx_filter" != "xno"; then
+            with_python_xlsx="yes"
+        fi
+    fi
+fi
+
+if test "x$with_python_xlsx" != "xno"; then
+    CXXFLAGS="$CXXFLAGS -D__ORCUS_PYTHON_XLSX"
+fi
+
+AM_CONDITIONAL([WITH_PYTHON_XLSX], [test "x$with_python_xlsx" != "xno"])
+
 AC_CONFIG_FILES([Makefile
 	liborcus-$ORCUS_API_VERSION.pc:liborcus.pc.in
 	liborcus-spreadsheet-model-$ORCUS_API_VERSION.pc:liborcus-spreadsheet-model.pc.in
@@ -272,6 +287,7 @@ Build configuration:
         xlsx-filter:           $with_xlsx_filter
         xls-xml-filter:        $with_xls_xml_filter
         tools:                 $with_tools
+        python-xlsx            $with_python_xlsx
 ==============================================================================
 ])
 
diff --git a/src/liborcus/xlsx_context.cpp b/src/liborcus/xlsx_context.cpp
index 6007358..1635daf 100644
--- a/src/liborcus/xlsx_context.cpp
+++ b/src/liborcus/xlsx_context.cpp
@@ -634,10 +634,12 @@ void xlsx_styles_context::start_element(xmlns_id_t ns, xml_token_t name, const x
         break;
         case XML_fill:
         {
-            xml_elem_stack_t expected_elements;
-            expected_elements.push_back(xml_token_pair_t(NS_ooxml_xlsx, XML_fills));
-            expected_elements.push_back(xml_token_pair_t(NS_ooxml_xlsx, XML_dxf));
-            xml_element_expected(parent, NS_ooxml_xlsx, XML_fills);
+            xml_elem_stack_t expected = {
+                xml_token_pair_t(NS_ooxml_xlsx, XML_fills),
+                xml_token_pair_t(NS_ooxml_xlsx, XML_dxf)
+            };
+
+            xml_element_expected(parent, expected);
         }
         break;
         case XML_patternFill:
diff --git a/src/liborcus/xlsx_pivot_context.cpp b/src/liborcus/xlsx_pivot_context.cpp
index a2ee075..550077a 100644
--- a/src/liborcus/xlsx_pivot_context.cpp
+++ b/src/liborcus/xlsx_pivot_context.cpp
@@ -256,11 +256,9 @@ void xlsx_pivot_cache_def_context::start_element(xmlns_id_t ns, xml_token_t name
         break;
         case XML_s:
         {
-            xml_element_expected(parent, NS_ooxml_xlsx, XML_sharedItems);
-            s_attr_parser func;
-            for_each(attrs.begin(), attrs.end(), func);
+            start_element_s(parent, attrs);
+            break;
         }
-        break;
         default:
             warn_unhandled();
     }
@@ -275,6 +273,29 @@ void xlsx_pivot_cache_def_context::characters(const pstring& /*str*/, bool /*tra
 {
 }
 
+void xlsx_pivot_cache_def_context::start_element_s(
+    const xml_token_pair_t& parent, const std::vector<xml_token_attr_t>& attrs)
+{
+    if (parent.first != NS_ooxml_xlsx)
+    {
+        warn_unhandled();
+        return;
+    }
+
+    switch (parent.second)
+    {
+        case XML_sharedItems:
+        {
+            xml_element_expected(parent, NS_ooxml_xlsx, XML_sharedItems);
+            s_attr_parser func;
+            for_each(attrs.begin(), attrs.end(), func);
+            break;
+        }
+        default:
+            warn_unhandled();
+    }
+}
+
 xlsx_pivot_cache_rec_context::xlsx_pivot_cache_rec_context(session_context& cxt, const tokens& tokens) :
     xml_context_base(cxt, tokens) {}
 
@@ -942,13 +963,24 @@ void xlsx_pivot_table_context::start_element(xmlns_id_t ns, xml_token_t name, co
             break;
             case XML_x:
             {
-                xml_element_expected(parent, NS_ooxml_xlsx, XML_i);
-                long idx = single_long_attr_getter::get(attrs, NS_ooxml_xlsx, XML_v);
-                if (idx < 0)
-                    // 0 is default when not set.
-                    idx = 0;
+                if (parent.first != NS_ooxml_xlsx)
+                {
+                    warn_unhandled();
+                    break;
+                }
 
-                cout << "  * v = " << idx << endl;
+                if (parent.second == XML_i)
+                {
+                    long idx = single_long_attr_getter::get(attrs, NS_ooxml_xlsx, XML_v);
+                    if (idx < 0)
+                        // 0 is default when not set.
+                        idx = 0;
+
+                    cout << "  * v = " << idx << endl;
+                    break;
+                }
+
+                warn_unhandled();
             }
             break;
             case XML_pivotTableStyleInfo:
@@ -965,6 +997,8 @@ void xlsx_pivot_table_context::start_element(xmlns_id_t ns, xml_token_t name, co
                 warn_unhandled();
         }
     }
+    else
+        warn_unhandled();
 }
 
 bool xlsx_pivot_table_context::end_element(xmlns_id_t ns, xml_token_t name)
diff --git a/src/liborcus/xlsx_pivot_context.hpp b/src/liborcus/xlsx_pivot_context.hpp
index 695e7d6..4013fb0 100644
--- a/src/liborcus/xlsx_pivot_context.hpp
+++ b/src/liborcus/xlsx_pivot_context.hpp
@@ -27,6 +27,9 @@ public:
     virtual void start_element(xmlns_id_t ns, xml_token_t name, const::std::vector<xml_token_attr_t>& attrs);
     virtual bool end_element(xmlns_id_t ns, xml_token_t name);
     virtual void characters(const pstring& str, bool transient);
+
+private:
+    void start_element_s(const xml_token_pair_t& parent, const std::vector<xml_token_attr_t>& attrs);
 };
 
 /**
diff --git a/src/orcus_filter_global.cpp b/src/orcus_filter_global.cpp
index 22ea8ae..57bede3 100644
--- a/src/orcus_filter_global.cpp
+++ b/src/orcus_filter_global.cpp
@@ -137,8 +137,6 @@ bool parse_import_filter_args(
     if (vm.count("output-format"))
         outformat = vm["output-format"].as<string>();
 
-    json_config opt;
-
     if (infile.empty())
     {
         cerr << err_no_input_file << endl;
@@ -151,6 +149,10 @@ bool parse_import_filter_args(
         return handle_dump_check(app, doc, infile, outdir);
     }
 
+    config opt;
+    opt.debug = vm.count("debug") > 0;
+    app.set_config(opt);
+
     if (outformat.empty())
     {
         cerr << "No output format specified.  Choose either 'flat', 'html' or 'none'." << endl;
diff --git a/src/parser/stream.cpp b/src/parser/stream.cpp
index eb73dcc..58fe321 100644
--- a/src/parser/stream.cpp
+++ b/src/parser/stream.cpp
@@ -64,7 +64,7 @@ std::tuple<pstring, size_t, size_t> find_line_with_offset(
 
 std::string load_file_content(const char* filepath)
 {
-    std::ifstream file(filepath);
+    std::ifstream file(filepath, std::ios::binary);
     if (!file)
     {
         // failed to open the specified file.
diff --git a/src/python/Makefile.am b/src/python/Makefile.am
index 18776f2..6138871 100644
--- a/src/python/Makefile.am
+++ b/src/python/Makefile.am
@@ -58,7 +58,13 @@ AM_TESTS_ENVIRONMENT = PYTHONPATH=$(top_srcdir)/src/python:.libs$${PYTHONPATH:+:
 
 TESTS = \
 	../../test/python/json.py \
-	../../test/python/module.py \
-	../../test/python/xlsx.py
+	../../test/python/module.py
+
+if WITH_PYTHON_XLSX
+
+TESTS += ../../test/python/xlsx.py
+
+endif # WITH_PYTHON_XLSX
+
 
 endif # BUILD_PYTHON
diff --git a/src/python/Makefile.in b/src/python/Makefile.in
index bdce9b2..d7c3738 100644
--- a/src/python/Makefile.in
+++ b/src/python/Makefile.in
@@ -100,6 +100,7 @@ host_triplet = @host@
 @BUILD_PYTHON_TRUE@@BUILD_SPREADSHEET_MODEL_TRUE at am__append_2 = \
 @BUILD_PYTHON_TRUE@@BUILD_SPREADSHEET_MODEL_TRUE@	../spreadsheet/liborcus-spreadsheet-model- at ORCUS_API_VERSION@.la
 
+ at BUILD_PYTHON_TRUE@@WITH_PYTHON_XLSX_TRUE at am__append_3 = ../../test/python/xlsx.py
 subdir = src/python
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
@@ -632,11 +633,8 @@ top_srcdir = @top_srcdir@
 @BUILD_PYTHON_TRUE@	./orcus/xlsx.py
 
 @BUILD_PYTHON_TRUE at AM_TESTS_ENVIRONMENT = PYTHONPATH=$(top_srcdir)/src/python:.libs$${PYTHONPATH:+:$${PYTHONPATH}}; export PYTHONPATH;
- at BUILD_PYTHON_TRUE@TESTS = \
- at BUILD_PYTHON_TRUE@	../../test/python/json.py \
- at BUILD_PYTHON_TRUE@	../../test/python/module.py \
- at BUILD_PYTHON_TRUE@	../../test/python/xlsx.py
-
+ at BUILD_PYTHON_TRUE@TESTS = ../../test/python/json.py \
+ at BUILD_PYTHON_TRUE@	../../test/python/module.py $(am__append_3)
 all: all-am
 
 .SUFFIXES:
diff --git a/src/python/python.cpp b/src/python/python.cpp
index a80306a..c5eb40f 100644
--- a/src/python/python.cpp
+++ b/src/python/python.cpp
@@ -10,9 +10,12 @@
 
 #include "root.hpp"
 #include "xlsx.hpp"
+
+#ifdef __ORCUS_SPREADSHEET_MODEL
 #include "document.hpp"
 #include "sheet.hpp"
 #include "sheet_rows.hpp"
+#endif
 
 #include <iostream>
 #include <string>
diff --git a/src/python/xlsx.cpp b/src/python/xlsx.cpp
index dab66d8..d12a543 100644
--- a/src/python/xlsx.cpp
+++ b/src/python/xlsx.cpp
@@ -6,16 +6,13 @@
  */
 
 #include "xlsx.hpp"
-#include "document.hpp"
 
-#if defined(__ORCUS_XLSX) && defined(__ORCUS_SPREADSHEET_MODEL)
+#ifdef __ORCUS_PYTHON_XLSX
+#include "document.hpp"
 #include "orcus/orcus_xlsx.hpp"
 #include "orcus/spreadsheet/document.hpp"
 #include "orcus/spreadsheet/factory.hpp"
 #include "orcus/global.hpp"
-#define XLSX_ENABLED 1
-#else
-#define XLSX_ENABLED 0
 #endif
 
 #include <iostream>
@@ -24,7 +21,7 @@ using namespace std;
 
 namespace orcus { namespace python {
 
-#if XLSX_ENABLED
+#ifdef __ORCUS_PYTHON_XLSX
 
 PyObject* xlsx_read_file(PyObject* /*module*/, PyObject* args, PyObject* kwargs)
 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/liborcus.git



More information about the Pkg-openoffice-commits mailing list