8 #ifndef INCLUDED_ORCUS_SPREADSHEET_SHARED_STRINGS_HPP
9 #define INCLUDED_ORCUS_SPREADSHEET_SHARED_STRINGS_HPP
11 #include "orcus/spreadsheet/import_interface.hpp"
12 #include "orcus/spreadsheet/styles.hpp"
13 #include "orcus/pstring.hpp"
14 #include "orcus/env.hpp"
18 #include <unordered_map>
20 namespace ixion {
class model_context; }
26 namespace spreadsheet {
43 bool formatted()
const;
46 typedef std::vector<format_run> format_runs_t;
53 typedef std::unordered_map<pstring, size_t, pstring::hash> str_index_map_type;
62 typedef std::unordered_map<size_t, format_runs_t*> format_runs_map_type;
67 virtual size_t append(
const char* s,
size_t n);
68 virtual size_t add(
const char* s,
size_t n);
79 const format_runs_t* get_format_runs(
size_t index)
const;
81 const std::string* get_string(
size_t index)
const;
87 ixion::model_context& m_cxt;
94 format_runs_map_type m_formats;
96 ::std::string m_cur_segment_string;
98 format_runs_t* mp_cur_format_runs;
99 str_index_map_type m_set;