Orcus
Toggle main menu visibility
Loading...
Searching...
No Matches
include
orcus
orcus_ods.hpp
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
#ifndef INCLUDED_ORCUS_ORCUS_ODS_HPP
9
#define INCLUDED_ORCUS_ORCUS_ODS_HPP
10
11
#include "orcus/spreadsheet/import_interface.hpp"
12
#include "orcus/env.hpp"
13
#include "interface.hpp"
14
15
#include <memory>
16
#include <string_view>
17
18
namespace
orcus {
19
20
namespace
spreadsheet {
namespace
iface {
class
import_factory
; }}
21
22
struct
orcus_ods_impl;
23
class
zip_archive
;
24
class
zip_archive_stream
;
25
26
class
ORCUS_DLLPUBLIC orcus_ods :
public
iface::import_filter
27
{
28
public
:
29
orcus_ods(
spreadsheet::iface::import_factory
* factory);
30
~orcus_ods();
31
32
orcus_ods() =
delete
;
33
orcus_ods(
const
orcus_ods&) =
delete
;
34
orcus_ods& operator= (
const
orcus_ods&) =
delete
;
35
36
static
bool
detect(std::string_view strm);
37
38
virtual
void
read_file
(std::string_view filepath)
override
;
39
virtual
void
read_file
(std::u16string_view filepath)
override
;
40
41
virtual
void
read_stream
(std::string_view stream)
override
;
42
43
virtual
std::string_view
get_name
()
const override
;
44
45
private
:
46
static
void
list_content(
const
zip_archive
& archive);
47
void
read_styles(
const
zip_archive
& archive);
48
void
read_content(
const
zip_archive
& archive);
49
void
read_content_xml(
const
unsigned
char
* p,
size_t
size);
50
51
void
read_file_impl(
zip_archive_stream
* stream);
52
53
private
:
54
struct
impl;
55
std::unique_ptr<impl> mp_impl;
56
};
57
58
}
59
60
#endif
61
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::iface::import_filter
Definition
interface.hpp:27
orcus::orcus_ods::read_stream
virtual void read_stream(std::string_view stream) override
orcus::orcus_ods::read_file
virtual void read_file(std::string_view filepath) override
orcus::orcus_ods::get_name
virtual std::string_view get_name() const override
orcus::spreadsheet::iface::import_factory
Definition
import_interface.hpp:1184
orcus::zip_archive_stream
Definition
zip_archive_stream.hpp:20
orcus::zip_archive
Definition
zip_archive.hpp:54
Generated on
for Orcus by
1.17.0