Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
ea8dc009
Commit
ea8dc009
authored
Jul 20, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatReader - pilot(pivot) tables
parent
b3a83ad6
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
611 additions
and
1 deletion
+611
-1
ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
+4
-0
ASCOfficeOdfFile/linux/odffilereaderlib_odf.cpp
ASCOfficeOdfFile/linux/odffilereaderlib_odf.cpp
+1
-0
ASCOfficeOdfFile/linux/odffilereaderlib_odf_datatypes.cpp
ASCOfficeOdfFile/linux/odffilereaderlib_odf_datatypes.cpp
+1
-0
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.cpp
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.cpp
+66
-0
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.h
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.h
+67
-0
ASCOfficeOdfFile/src/odf/office_elements_type.h
ASCOfficeOdfFile/src/odf/office_elements_type.h
+9
-0
ASCOfficeOdfFile/src/odf/office_spreadsheet.cpp
ASCOfficeOdfFile/src/odf/office_spreadsheet.cpp
+8
-1
ASCOfficeOdfFile/src/odf/office_spreadsheet.h
ASCOfficeOdfFile/src/odf/office_spreadsheet.h
+1
-0
ASCOfficeOdfFile/src/odf/table.h
ASCOfficeOdfFile/src/odf/table.h
+2
-0
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.cpp
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.cpp
+209
-0
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.h
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.h
+227
-0
ASCOfficeOdfFile/win32/cpcommon.vcproj
ASCOfficeOdfFile/win32/cpcommon.vcproj
+8
-0
ASCOfficeOdfFile/win32/cpodf.vcproj
ASCOfficeOdfFile/win32/cpodf.vcproj
+8
-0
No files found.
ASCOfficeOdfFile/linux/OdfFileReaderLib.pro
View file @
ea8dc009
...
@@ -105,6 +105,7 @@ SOURCES += \
...
@@ -105,6 +105,7 @@ SOURCES += \
..
/
src
/
odf
/
table_calculation_settings
.
cpp
\
..
/
src
/
odf
/
table_calculation_settings
.
cpp
\
..
/
src
/
odf
/
table_docx
.
cpp
\
..
/
src
/
odf
/
table_docx
.
cpp
\
..
/
src
/
odf
/
table_named_expressions
.
cpp
\
..
/
src
/
odf
/
table_named_expressions
.
cpp
\
..
/
src
/
odf
/
table_data_pilot_tables
.
cpp
\
..
/
src
/
odf
/
table_pptx
.
cpp
\
..
/
src
/
odf
/
table_pptx
.
cpp
\
..
/
src
/
odf
/
table_xlsx
.
cpp
\
..
/
src
/
odf
/
table_xlsx
.
cpp
\
..
/
src
/
odf
/
templates
.
cpp
\
..
/
src
/
odf
/
templates
.
cpp
\
...
@@ -210,6 +211,7 @@ SOURCES += \
...
@@ -210,6 +211,7 @@ SOURCES += \
..
/
src
/
odf
/
datatypes
/
writingmode
.
cpp
\
..
/
src
/
odf
/
datatypes
/
writingmode
.
cpp
\
..
/
src
/
odf
/
datatypes
/
xlink
.
cpp
\
..
/
src
/
odf
/
datatypes
/
xlink
.
cpp
\
..
/
src
/
odf
/
datatypes
/
chartlabelposition
.
cpp
\
..
/
src
/
odf
/
datatypes
/
chartlabelposition
.
cpp
\
..
/
src
/
odf
/
datatypes
/
grandtotal
.
cpp
\
..
/
src
/
docx
/
xlsx_conditionalFormatting
.
cpp
\
..
/
src
/
docx
/
xlsx_conditionalFormatting
.
cpp
\
..
/
src
/
docx
/
xlsx_dxfs
.
cpp
\
..
/
src
/
docx
/
xlsx_dxfs
.
cpp
\
..
/
src
/
docx
/
docx_content_type
.
cpp
\
..
/
src
/
docx
/
docx_content_type
.
cpp
\
...
@@ -463,6 +465,8 @@ HEADERS += \
...
@@ -463,6 +465,8 @@ HEADERS += \
..
/
src
/
odf
/
datatypes
/
wrapoption
.
h
\
..
/
src
/
odf
/
datatypes
/
wrapoption
.
h
\
..
/
src
/
odf
/
datatypes
/
writingmode
.
h
\
..
/
src
/
odf
/
datatypes
/
writingmode
.
h
\
..
/
src
/
odf
/
datatypes
/
xlink
.
h
\
..
/
src
/
odf
/
datatypes
/
xlink
.
h
\
..
/
src
/
odf
/
datatypes
/
chartlabelposition
.
h
\
..
/
src
/
odf
/
datatypes
/
grandtotal
.
h
\
..
/
src
/
docx
/
docx_content_type
.
h
\
..
/
src
/
docx
/
docx_content_type
.
h
\
..
/
src
/
docx
/
docx_conversion_context
.
h
\
..
/
src
/
docx
/
docx_conversion_context
.
h
\
..
/
src
/
docx
/
docx_conversion_state
.
h
\
..
/
src
/
docx
/
docx_conversion_state
.
h
\
...
...
ASCOfficeOdfFile/linux/odffilereaderlib_odf.cpp
View file @
ea8dc009
...
@@ -88,6 +88,7 @@
...
@@ -88,6 +88,7 @@
#include "../src/odf/table_calculation_settings.cpp"
#include "../src/odf/table_calculation_settings.cpp"
#include "../src/odf/table_docx.cpp"
#include "../src/odf/table_docx.cpp"
#include "../src/odf/table_named_expressions.cpp"
#include "../src/odf/table_named_expressions.cpp"
#include "../src/odf/table_data_pilot_tables.cpp"
#include "../src/odf/table_pptx.cpp"
#include "../src/odf/table_pptx.cpp"
#include "../src/odf/table_xlsx.cpp"
#include "../src/odf/table_xlsx.cpp"
#include "../src/odf/templates.cpp"
#include "../src/odf/templates.cpp"
...
...
ASCOfficeOdfFile/linux/odffilereaderlib_odf_datatypes.cpp
View file @
ea8dc009
...
@@ -120,3 +120,4 @@
...
@@ -120,3 +120,4 @@
#include "../src/odf/datatypes/writingmode.cpp"
#include "../src/odf/datatypes/writingmode.cpp"
#include "../src/odf/datatypes/xlink.cpp"
#include "../src/odf/datatypes/xlink.cpp"
#include "../src/odf/datatypes/chartlabelposition.cpp"
#include "../src/odf/datatypes/chartlabelposition.cpp"
#include "../src/odf/datatypes/grandtotal.cpp"
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.cpp
0 → 100644
View file @
ea8dc009
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "grandtotal.h"
#include <boost/algorithm/string.hpp>
#include <ostream>
namespace
cpdoccore
{
namespace
odf_types
{
std
::
wostream
&
operator
<<
(
std
::
wostream
&
_Wostream
,
const
grand_total
&
_Val
)
{
switch
(
_Val
.
get_type
())
{
case
grand_total
:
:
none
:
_Wostream
<<
L"none"
;
break
;
case
grand_total
:
:
both
:
_Wostream
<<
L"both"
;
break
;
case
grand_total
:
:
column
:
_Wostream
<<
L"column"
;
break
;
case
grand_total
:
:
row
:
_Wostream
<<
L"row"
;
break
;
}
return
_Wostream
;
}
grand_total
grand_total
::
parse
(
const
std
::
wstring
&
Str
)
{
std
::
wstring
tmp
=
Str
;
boost
::
algorithm
::
to_lower
(
tmp
);
if
(
tmp
==
L"none"
)
return
grand_total
(
none
);
else
if
(
tmp
==
L"both"
)
return
grand_total
(
both
);
else
if
(
tmp
==
L"column"
)
return
grand_total
(
column
);
else
if
(
tmp
==
L"row"
)
return
grand_total
(
row
);
else
{
return
grand_total
(
none
);
}
}
}
}
ASCOfficeOdfFile/src/odf/datatypes/grandtotal.h
0 → 100644
View file @
ea8dc009
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <iosfwd>
#include <string>
#include "odfattributes.h"
namespace
cpdoccore
{
namespace
odf_types
{
class
grand_total
{
public:
enum
type
{
none
,
both
,
column
,
row
};
grand_total
()
{}
grand_total
(
type
_Type
)
:
type_
(
_Type
)
{}
type
get_type
()
const
{
return
type_
;
};
static
grand_total
parse
(
const
std
::
wstring
&
Str
);
private:
type
type_
;
};
std
::
wostream
&
operator
<<
(
std
::
wostream
&
_Wostream
,
const
grand_total
&
_Val
);
}
APPLY_PARSE_XML_ATTRIBUTES
(
odf_types
::
grand_total
);
}
ASCOfficeOdfFile/src/odf/office_elements_type.h
View file @
ea8dc009
...
@@ -220,6 +220,15 @@ enum ElementType
...
@@ -220,6 +220,15 @@ enum ElementType
typeTableTableRowNoGroup
,
typeTableTableRowNoGroup
,
typeTableTableSource
,
typeTableTableSource
,
typeTableDataPilotTables
,
typeTableDataPilotTable
,
typeTableDataPilotField
,
typeTableDatabaseSourceTable
,
typeTableDatabaseSourceQuery
,
typeTableDatabaseSourceSql
,
typeTableSourceCellRange
,
typeTableSourceService
,
typeOfficeBody
,
typeOfficeBody
,
typeOfficeText
,
typeOfficeText
,
typeOfficeDocument
,
typeOfficeDocument
,
...
...
ASCOfficeOdfFile/src/odf/office_spreadsheet.cpp
View file @
ea8dc009
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include "serialize_elements.h"
#include "serialize_elements.h"
...
@@ -51,6 +50,10 @@ void office_spreadsheet::add_child_element( xml::sax * Reader, const std::wstrin
...
@@ -51,6 +50,10 @@ void office_spreadsheet::add_child_element( xml::sax * Reader, const std::wstrin
if
CP_CHECK_NAME
(
L"table"
,
L"database-ranges"
)
if
CP_CHECK_NAME
(
L"table"
,
L"database-ranges"
)
{
{
CP_CREATE_ELEMENT
(
table_database_ranges_
);
CP_CREATE_ELEMENT
(
table_database_ranges_
);
}
else
if
CP_CHECK_NAME
(
L"table"
,
L"data-pilot-tables"
)
{
CP_CREATE_ELEMENT
(
table_data_pilot_tables_
);
}
}
else
else
CP_CREATE_ELEMENT
(
content_
);
CP_CREATE_ELEMENT
(
content_
);
...
@@ -87,6 +90,10 @@ void office_spreadsheet::xlsx_convert(oox::xlsx_conversion_context & Context)
...
@@ -87,6 +90,10 @@ void office_spreadsheet::xlsx_convert(oox::xlsx_conversion_context & Context)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
content_
[
i
]
->
xlsx_convert
(
Context
);
content_
[
i
]
->
xlsx_convert
(
Context
);
}
for
(
size_t
i
=
0
;
i
<
table_data_pilot_tables_
.
size
();
i
++
)
{
table_data_pilot_tables_
[
i
]
->
xlsx_convert
(
Context
);
}
}
Context
.
end_office_spreadsheet
();
Context
.
end_office_spreadsheet
();
}
}
...
...
ASCOfficeOdfFile/src/odf/office_spreadsheet.h
View file @
ea8dc009
...
@@ -66,6 +66,7 @@ public:
...
@@ -66,6 +66,7 @@ public:
// TODO: table-decls
// TODO: table-decls
office_element_ptr_array
table_database_ranges_
;
office_element_ptr_array
table_database_ranges_
;
office_element_ptr_array
table_data_pilot_tables_
;
office_element_ptr
tracked_changes_
;
//??
office_element_ptr
tracked_changes_
;
//??
office_element_ptr_array
content_
;
office_element_ptr_array
content_
;
...
...
ASCOfficeOdfFile/src/odf/table.h
View file @
ea8dc009
...
@@ -35,11 +35,13 @@
...
@@ -35,11 +35,13 @@
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements.h"
#include "office_elements_create.h"
#include "office_elements_create.h"
#include "table_named_expressions.h"
#include "table_named_expressions.h"
#include "table_database_ranges.h"
#include "table_database_ranges.h"
#include "table_data_pilot_tables.h"
#include "calcext_elements.h"
#include "calcext_elements.h"
#include "datatypes/tablemode.h"
#include "datatypes/tablemode.h"
...
...
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.cpp
0 → 100644
View file @
ea8dc009
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#include "table_data_pilot_tables.h"
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include "serialize_elements.h"
namespace
cpdoccore
{
using
namespace
odf_types
;
namespace
odf_reader
{
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_data_pilot_tables
::
ns
=
L"table"
;
const
wchar_t
*
table_data_pilot_tables
::
name
=
L"data-pilot-tables"
;
void
table_data_pilot_tables
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_data_pilot_tables
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_data_pilot_tables
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_data_pilot_table
::
ns
=
L"table"
;
const
wchar_t
*
table_data_pilot_table
::
name
=
L"data-pilot-table"
;
void
table_data_pilot_table
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
CP_APPLY_ATTR
(
L"table:name"
,
table_name_
);
CP_APPLY_ATTR
(
L"table:application-data"
,
table_application_data_
);
CP_APPLY_ATTR
(
L"table:buttons"
,
table_buttons_
);
CP_APPLY_ATTR
(
L"table:drill-down-ondouble-click"
,
table_drill_down_ondouble_click_
);
CP_APPLY_ATTR
(
L"table:grand-total"
,
table_grand_total_
);
CP_APPLY_ATTR
(
L"table:identify-categories"
,
table_identify_categories_
);
CP_APPLY_ATTR
(
L"table:ignore-empty-rows"
,
table_ignore_empty_rows_
);
CP_APPLY_ATTR
(
L"table:show-filterbutton"
,
table_show_filterbutton_
);
CP_APPLY_ATTR
(
L"table:show-target-range-address"
,
table_show_target_range_address_
);
}
void
table_data_pilot_table
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_data_pilot_table
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_data_pilot_field
::
ns
=
L"table"
;
const
wchar_t
*
table_data_pilot_field
::
name
=
L"data-pilot-field"
;
void
table_data_pilot_field
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_data_pilot_field
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_data_pilot_field
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_database_source_table
::
ns
=
L"table"
;
const
wchar_t
*
table_database_source_table
::
name
=
L"database-source-table"
;
void
table_database_source_table
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_database_source_table
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_database_source_table
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_database_source_query
::
ns
=
L"table"
;
const
wchar_t
*
table_database_source_query
::
name
=
L"database-source-query"
;
void
table_database_source_query
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_database_source_query
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_database_source_query
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_database_source_sql
::
ns
=
L"table"
;
const
wchar_t
*
table_database_source_sql
::
name
=
L"database-source-sql"
;
void
table_database_source_sql
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_database_source_sql
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_database_source_sql
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_source_cell_range
::
ns
=
L"table"
;
const
wchar_t
*
table_source_cell_range
::
name
=
L"source-cell-range"
;
void
table_source_cell_range
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_source_cell_range
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_source_cell_range
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
//-------------------------------------------------------------------------------------------------
const
wchar_t
*
table_source_service
::
ns
=
L"table"
;
const
wchar_t
*
table_source_service
::
name
=
L"source-service"
;
void
table_source_service
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
}
void
table_source_service
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
content_
);
}
void
table_source_service
::
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
)
{
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
xlsx_convert
(
Context
);
}
}
}
}
ASCOfficeOdfFile/src/odf/table_data_pilot_tables.h
0 → 100644
View file @
ea8dc009
/*
* (c) Copyright Ascensio System SIA 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include <iosfwd>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/xml/xmlelement.h>
#include <cpdoccore/xml/nodetype.h>
#include "office_elements.h"
#include "office_elements_create.h"
#include "datatypes/common_attlists.h"
#include "datatypes/bool.h"
#include "datatypes/grandtotal.h"
namespace
cpdoccore
{
namespace
odf_reader
{
class
table_data_pilot_tables
:
public
office_element_impl
<
table_data_pilot_tables
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDataPilotTables
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_data_pilot_tables
);
//-------------------------------------------------------------------------------------
class
table_data_pilot_table
:
public
office_element_impl
<
table_data_pilot_table
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDataPilotTable
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
_CP_OPT
(
std
::
wstring
)
table_name_
;
_CP_OPT
(
std
::
wstring
)
table_application_data_
;
_CP_OPT
(
std
::
wstring
)
table_buttons_
;
_CP_OPT
(
odf_types
::
Bool
)
table_drill_down_ondouble_click_
;
_CP_OPT
(
odf_types
::
grand_total
)
table_grand_total_
;
_CP_OPT
(
odf_types
::
Bool
)
table_identify_categories_
;
_CP_OPT
(
odf_types
::
Bool
)
table_ignore_empty_rows_
;
_CP_OPT
(
odf_types
::
Bool
)
table_show_filterbutton_
;
_CP_OPT
(
odf_types
::
Bool
)
table_show_target_range_address_
;
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_data_pilot_table
);
//-------------------------------------------------------------------------------------
class
table_data_pilot_field
:
public
office_element_impl
<
table_data_pilot_field
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDataPilotField
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_data_pilot_field
);
//-------------------------------------------------------------------------------------
class
table_database_source_table
:
public
office_element_impl
<
table_database_source_table
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDatabaseSourceTable
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_database_source_table
);
//-------------------------------------------------------------------------------------
class
table_database_source_query
:
public
office_element_impl
<
table_database_source_query
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDatabaseSourceQuery
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_database_source_query
);
//-------------------------------------------------------------------------------------
class
table_database_source_sql
:
public
office_element_impl
<
table_database_source_sql
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableDatabaseSourceSql
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_database_source_sql
);
//-------------------------------------------------------------------------------------
class
table_source_cell_range
:
public
office_element_impl
<
table_source_cell_range
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableSourceCellRange
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_source_cell_range
);
//-------------------------------------------------------------------------------------
class
table_source_service
:
public
office_element_impl
<
table_source_service
>
{
public:
static
const
wchar_t
*
ns
;
static
const
wchar_t
*
name
;
static
const
xml
::
NodeType
xml_type
=
xml
::
typeElement
;
static
const
ElementType
type
=
typeTableSourceService
;
CPDOCCORE_DEFINE_VISITABLE
();
virtual
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
table_source_service
);
//-------------------------------------------------------------------------------------
}
}
\ No newline at end of file
ASCOfficeOdfFile/win32/cpcommon.vcproj
View file @
ea8dc009
...
@@ -565,6 +565,14 @@
...
@@ -565,6 +565,14 @@
RelativePath=
"..\src\odf\datatypes\gradientstyle.h"
RelativePath=
"..\src\odf\datatypes\gradientstyle.h"
>
>
</File>
</File>
<File
RelativePath=
"..\src\odf\datatypes\grandtotal.cpp"
>
</File>
<File
RelativePath=
"..\src\odf\datatypes\grandtotal.h"
>
</File>
<File
<File
RelativePath=
"..\src\odf\datatypes\hatchstyle.cpp"
RelativePath=
"..\src\odf\datatypes\hatchstyle.cpp"
>
>
...
...
ASCOfficeOdfFile/win32/cpodf.vcproj
View file @
ea8dc009
...
@@ -1659,6 +1659,14 @@
...
@@ -1659,6 +1659,14 @@
RelativePath=
"..\src\odf\table_calculation_settings.h"
RelativePath=
"..\src\odf\table_calculation_settings.h"
>
>
</File>
</File>
<File
RelativePath=
"..\src\odf\table_data_pilot_tables.cpp"
>
</File>
<File
RelativePath=
"..\src\odf\table_data_pilot_tables.h"
>
</File>
<File
<File
RelativePath=
"..\src\odf\table_database_ranges.cpp"
RelativePath=
"..\src\odf\table_database_ranges.cpp"
>
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment