LibreOffice Module shell (master) 1
document_statistic.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SHELL_SOURCE_WIN32_SHLXTHANDLER_PROPSHEETS_DOCUMENT_STATISTIC_HXX
21#define INCLUDED_SHELL_SOURCE_WIN32_SHLXTHANDLER_PROPSHEETS_DOCUMENT_STATISTIC_HXX
22
23#include <utility>
24#include <string>
25#include <memory>
26#include <vector>
27#include <metainforeader.hxx>
28
29
31{
33
35 const std::wstring& title,
36 const std::wstring& value,
37 bool editable) :
38 title_(title),
40 editable_(editable)
41 {}
42
43 std::wstring title_;
44 std::wstring value_;
46};
47
48
49typedef std::vector<statistic_item> statistic_item_list_t;
50typedef std::pair<std::wstring, statistic_item_list_t> statistic_group_t;
51typedef std::vector<statistic_group_t> statistic_group_list_t;
52
53
55typedef std::unique_ptr<document_statistic_reader> document_statistic_reader_ptr;
56
57document_statistic_reader_ptr create_document_statistic_reader(const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
58
59
61{
62public:
64
65 void read(statistic_group_list_t* group_list);
66
67 std::wstring get_document_name() const;
68
69protected:
70 document_statistic_reader(const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
71
72 virtual void fill_description_section(CMetaInfoReader *meta_info_accessor,statistic_group_list_t* group_list) = 0;
73
74 virtual void fill_origin_section( CMetaInfoReader *meta_info_accessor,statistic_group_list_t* group_list);
75
76private:
77 std::wstring document_name_;
79
81 const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
82};
83
84
86{
87protected:
88 writer_document_statistic_reader(const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
89
90 virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t* group_list) override;
91
93 const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
94};
95
96
98{
99protected:
100 calc_document_statistic_reader(const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
101
102 virtual void fill_description_section( CMetaInfoReader *meta_info_accessor,statistic_group_list_t* group_list) override;
103
105 const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
106};
107
108
110{
111protected:
112 draw_impress_math_document_statistic_reader(const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
113
114 virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t* group_list) override;
115
117 const std::wstring& document_name, CMetaInfoReader* meta_info_accessor);
118};
119
120#endif
121
122/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t *group_list) override
calc_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
friend document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
void read(statistic_group_list_t *group_list)
std::wstring get_document_name() const
document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
CMetaInfoReader * meta_info_accessor_
virtual void fill_origin_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t *group_list)
friend document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t *group_list)=0
virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t *group_list) override
draw_impress_math_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
friend document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
virtual void fill_description_section(CMetaInfoReader *meta_info_accessor, statistic_group_list_t *group_list) override
friend document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
writer_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
Any value
std::unique_ptr< document_statistic_reader > document_statistic_reader_ptr
std::vector< statistic_item > statistic_item_list_t
std::vector< statistic_group_t > statistic_group_list_t
document_statistic_reader_ptr create_document_statistic_reader(const std::wstring &document_name, CMetaInfoReader *meta_info_accessor)
std::pair< std::wstring, statistic_item_list_t > statistic_group_t
statistic_item(const std::wstring &title, const std::wstring &value, bool editable)