1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SHELL_SOURCE_WIN32_SHLXTHANDLER_PROPSHEETS_DOCUMENT_STATISTIC_HXX
21 #define INCLUDED_SHELL_SOURCE_WIN32_SHLXTHANDLER_PROPSHEETS_DOCUMENT_STATISTIC_HXX
27 #include <metainforeader.hxx>
35 const std::wstring
& title
,
36 const std::wstring
& value
,
49 typedef std::vector
<statistic_item
> statistic_item_list_t
;
50 typedef std::pair
<std::wstring
, statistic_item_list_t
> statistic_group_t
;
51 typedef std::vector
<statistic_group_t
> statistic_group_list_t
;
54 class document_statistic_reader
;
55 typedef std::unique_ptr
<document_statistic_reader
> document_statistic_reader_ptr
;
57 document_statistic_reader_ptr
create_document_statistic_reader(const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
60 class document_statistic_reader
63 virtual ~document_statistic_reader();
65 void read(statistic_group_list_t
* group_list
);
67 std::wstring
get_document_name() const;
70 document_statistic_reader(const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
72 virtual void fill_description_section(CMetaInfoReader
*meta_info_accessor
,statistic_group_list_t
* group_list
) = 0;
74 virtual void fill_origin_section( CMetaInfoReader
*meta_info_accessor
,statistic_group_list_t
* group_list
);
77 std::wstring document_name_
;
78 CMetaInfoReader
* meta_info_accessor_
;
80 friend document_statistic_reader_ptr
create_document_statistic_reader(
81 const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
85 class writer_document_statistic_reader
: public document_statistic_reader
88 writer_document_statistic_reader(const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
90 virtual void fill_description_section(CMetaInfoReader
*meta_info_accessor
, statistic_group_list_t
* group_list
) override
;
92 friend document_statistic_reader_ptr
create_document_statistic_reader(
93 const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
97 class calc_document_statistic_reader
: public document_statistic_reader
100 calc_document_statistic_reader(const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
102 virtual void fill_description_section( CMetaInfoReader
*meta_info_accessor
,statistic_group_list_t
* group_list
) override
;
104 friend document_statistic_reader_ptr
create_document_statistic_reader(
105 const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
109 class draw_impress_math_document_statistic_reader
: public document_statistic_reader
112 draw_impress_math_document_statistic_reader(const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
114 virtual void fill_description_section(CMetaInfoReader
*meta_info_accessor
, statistic_group_list_t
* group_list
) override
;
116 friend document_statistic_reader_ptr
create_document_statistic_reader(
117 const std::wstring
& document_name
, CMetaInfoReader
* meta_info_accessor
);
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */