1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 */ 7 8 #include "orcus/orcus_import_ods.hpp" 9 #include "orcus/spreadsheet/styles.hpp" 10 #include "orcus/spreadsheet/factory.hpp" 11 #include "orcus/string_pool.hpp" 12 #include "orcus/stream.hpp" 13 14 #include "orcus_filter_global.hpp" 15 16 #include <cstdlib> 17 #include <iostream> 18 19 using namespace std; 20 using namespace orcus; 21 main(int argc,char ** argv)22int main(int argc, char** argv) 23 { 24 if (argc != 2) 25 return EXIT_FAILURE; 26 27 string_pool sp; 28 spreadsheet::styles styles; 29 spreadsheet::import_styles istyles(styles, sp); 30 31 try 32 { 33 file_content content(argv[1]); 34 import_ods::read_styles(content.data(), content.size(), &istyles); 35 } 36 catch(std::exception& ex) 37 { 38 std::cerr << ex.what() << std::endl; 39 return EXIT_FAILURE; 40 } 41 42 return EXIT_SUCCESS; 43 } 44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 45