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
076de8bb
Commit
076de8bb
authored
Jun 23, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatWriter - настройки табличек (активный лист, текущие ячейки, ...) + закрепленные области
parent
bfbdc714
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
377 additions
and
101 deletions
+377
-101
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
...fficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
+10
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
+6
-5
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.cpp
+95
-26
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.h
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.h
+22
-4
ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
...fficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
+8
-4
ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
+1
-1
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
+5
-8
ASCOfficeOdfFileW/source/OdfFormat/office_settings.h
ASCOfficeOdfFileW/source/OdfFormat/office_settings.h
+4
-3
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
+133
-37
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
+11
-9
Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h
...Format/Source/XlsxFormat/Worksheets/WorksheetChildOther.h
+81
-3
Common/DocxFormat/Source/XlsxFormat/WritingElement.h
Common/DocxFormat/Source/XlsxFormat/WritingElement.h
+1
-0
No files found.
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
View file @
076de8bb
...
@@ -47,21 +47,30 @@ void odf_conversion_context::set_fonts_directory(std::wstring pathFonts)
...
@@ -47,21 +47,30 @@ void odf_conversion_context::set_fonts_directory(std::wstring pathFonts)
odf_style_context
*
odf_conversion_context
::
styles_context
()
odf_style_context
*
odf_conversion_context
::
styles_context
()
{
{
if
(
objects_
.
size
()
>
0
)
if
(
!
objects_
.
empty
()
)
return
objects_
[
current_object_
].
style_context
.
get
();
return
objects_
[
current_object_
].
style_context
.
get
();
else
else
return
NULL
;
return
NULL
;
}
}
odf_settings_context
*
odf_conversion_context
::
settings_context
()
{
if
(
!
objects_
.
empty
())
return
objects_
[
current_object_
].
settings_context
.
get
();
else
return
NULL
;
}
odf_page_layout_context
*
odf_conversion_context
::
page_layout_context
()
odf_page_layout_context
*
odf_conversion_context
::
page_layout_context
()
{
{
return
&
page_layout_context_
;
return
&
page_layout_context_
;
}
}
odf_chart_context
*
odf_conversion_context
::
chart_context
()
odf_chart_context
*
odf_conversion_context
::
chart_context
()
{
{
return
&
chart_context_
;
return
&
chart_context_
;
}
}
odf_number_styles_context
*
odf_conversion_context
::
numbers_styles_context
()
odf_number_styles_context
*
odf_conversion_context
::
numbers_styles_context
()
{
{
if
(
objects_
.
size
()
>
0
&&
objects_
[
current_object_
].
style_context
)
if
(
objects_
.
size
()
>
0
&&
objects_
[
current_object_
].
style_context
)
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.h
View file @
076de8bb
...
@@ -51,16 +51,17 @@ public:
...
@@ -51,16 +51,17 @@ public:
CApplicationFonts
*
applicationFonts_
;
CApplicationFonts
*
applicationFonts_
;
virtual
odf_drawing_context
*
drawing_context
()
=
0
;
virtual
odf_drawing_context
*
drawing_context
()
=
0
;
virtual
odf_text_context
*
text_context
()
=
0
;
virtual
odf_text_context
*
text_context
()
=
0
;
virtual
void
start_text_context
()
=
0
;
virtual
void
start_text_context
()
=
0
;
virtual
void
end_text_context
()
=
0
;
virtual
void
end_text_context
()
=
0
;
virtual
void
start_image
(
const
std
::
wstring
&
image_file_name
)
=
0
;
virtual
void
start_image
(
const
std
::
wstring
&
image_file_name
)
=
0
;
virtual
odf_style_context
*
styles_context
();
virtual
odf_style_context
*
styles_context
();
odf_settings_context
*
settings_context
();
odf_chart_context
*
chart_context
();
odf_chart_context
*
chart_context
();
odf_page_layout_context
*
page_layout_context
();
odf_page_layout_context
*
page_layout_context
();
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.cpp
View file @
076de8bb
...
@@ -15,6 +15,8 @@ namespace odf_writer {
...
@@ -15,6 +15,8 @@ namespace odf_writer {
odf_settings_context
::
odf_settings_context
()
odf_settings_context
::
odf_settings_context
()
{
{
current_view_
=
-
1
;
current_table_
=
-
1
;
}
}
void
odf_settings_context
::
set_odf_context
(
odf_conversion_context
*
Context
)
void
odf_settings_context
::
set_odf_context
(
odf_conversion_context
*
Context
)
...
@@ -23,6 +25,68 @@ void odf_settings_context::set_odf_context(odf_conversion_context * Context)
...
@@ -23,6 +25,68 @@ void odf_settings_context::set_odf_context(odf_conversion_context * Context)
}
}
void
odf_settings_context
::
start_view
()
{
_view
v
;
views_
.
push_back
(
v
);
current_view_
=
views_
.
size
()
-
1
;
}
void
odf_settings_context
::
end_view
()
{
current_view_
=
-
1
;
}
void
odf_settings_context
::
set_current_view
(
int
id
)
{
if
(
id
<
0
||
id
>=
views_
.
size
())
return
;
current_view_
=
id
;
}
void
odf_settings_context
::
start_table
(
std
::
wstring
name
)
{
if
(
current_view_
<
0
)
return
;
_table
t
;
t
.
name
=
name
;
views_
[
current_view_
].
tables
.
push_back
(
t
);
current_table_
=
views_
[
current_view_
].
tables
.
size
()
-
1
;
}
void
odf_settings_context
::
end_table
()
{
current_table_
=
-
1
;
}
void
odf_settings_context
::
add_property
(
std
::
wstring
name
,
std
::
wstring
type
,
std
::
wstring
value
)
{
if
(
current_view_
<
0
)
return
;
if
(
name
.
empty
()
||
type
.
empty
())
return
;
office_element_ptr
prop
;
create_element
(
L"config"
,
L"config-item"
,
prop
,
odf_context_
);
settings_config_item
*
item
=
NULL
;
item
=
dynamic_cast
<
settings_config_item
*>
(
prop
.
get
());
if
(
!
item
)
return
;
item
->
config_name_
=
name
;
item
->
config_type_
=
type
;
item
->
content_
=
value
;
if
(
current_table_
<
0
)
{
views_
[
current_view_
].
content
.
push_back
(
prop
);
}
else
{
views_
[
current_view_
].
tables
.
back
().
content
.
push_back
(
prop
);
}
}
void
odf_settings_context
::
process_office_settings
(
office_element_ptr
root
)
void
odf_settings_context
::
process_office_settings
(
office_element_ptr
root
)
{
{
settings_config_item_set
*
item_set
=
NULL
;
settings_config_item_set
*
item_set
=
NULL
;
...
@@ -30,7 +94,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
...
@@ -30,7 +94,7 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
settings_config_item_map_indexed
*
item_map_indexed
=
NULL
;
settings_config_item_map_indexed
*
item_map_indexed
=
NULL
;
settings_config_item_map_entry
*
item_map_entry
=
NULL
;
settings_config_item_map_entry
*
item_map_entry
=
NULL
;
if
(
!
views_
.
content
.
empty
()
||
!
views_
.
tables
.
empty
())
if
(
!
views_
.
empty
())
{
{
office_element_ptr
ooo_view_elm
;
office_element_ptr
ooo_view_elm
;
{
{
...
@@ -47,36 +111,41 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
...
@@ -47,36 +111,41 @@ void odf_settings_context::process_office_settings(office_element_ptr root )
if
(
item_map_indexed
)
item_map_indexed
->
config_name_
=
L"Views"
;
if
(
item_map_indexed
)
item_map_indexed
->
config_name_
=
L"Views"
;
}
}
office_element_ptr
views_entry_elm
;
for
(
int
v
=
0
;
v
<
views_
.
size
();
v
++
)
{
{
create_element
(
L"config"
,
L"config-item-map-entry"
,
views_entry_elm
,
odf_context_
);
office_element_ptr
views_entry_elm
;
views_elm
->
add_child_element
(
views_entry_elm
);
{
}
create_element
(
L"config"
,
L"config-item-map-entry"
,
views_entry_elm
,
odf_context_
);
views_elm
->
add_child_element
(
views_entry_elm
);
for
(
int
i
=
0
;
i
<
views_
.
content
.
size
();
i
++
)
}
{
views_entry_elm
->
add_child_element
(
views_
.
content
[
i
]);
}
if
(
!
views_
.
tables
.
empty
())
{
office_element_ptr
tables_elm
;
create_element
(
L"config"
,
L"config-item-map-named"
,
tables_elm
,
odf_context_
);
views_entry_elm
->
add_child_element
(
tables_elm
);
item_map_named
=
dynamic_cast
<
settings_config_item_map_named
*>
(
tables_elm
.
get
());
if
(
item_map_named
)
item_map_indexed
->
config_name_
=
L"Tables"
;
for
(
std
::
map
<
std
::
wstring
,
std
::
vector
<
office_element_ptr
>>::
iterator
it
=
views_
.
tables
.
begin
();
it
!=
views_
.
tables
.
end
();
it
++
)
for
(
int
i
=
0
;
i
<
views_
[
v
].
content
.
size
();
i
++
)
{
{
office_element_ptr
table_elm
;
views_entry_elm
->
add_child_element
(
views_
[
v
].
content
[
i
]);
create_element
(
L"config"
,
L"config-item-map-entry"
,
table_elm
,
odf_context_
);
}
tables_elm
->
add_child_element
(
table_elm
);
item_map_entry
=
dynamic_cast
<
settings_config_item_map_entry
*>
(
table_elm
.
get
());
if
(
item_map_entry
)
item_map_indexed
->
config_name_
=
it
->
first
;
for
(
int
j
=
0
;
j
<
it
->
second
.
size
();
j
++
)
if
(
!
views_
[
v
].
tables
.
empty
())
{
office_element_ptr
tables_elm
;
create_element
(
L"config"
,
L"config-item-map-named"
,
tables_elm
,
odf_context_
);
views_entry_elm
->
add_child_element
(
tables_elm
);
item_map_named
=
dynamic_cast
<
settings_config_item_map_named
*>
(
tables_elm
.
get
());
if
(
item_map_named
)
item_map_named
->
config_name_
=
L"Tables"
;
for
(
int
t
=
0
;
t
<
views_
[
v
].
tables
.
size
();
t
++
)
{
{
table_elm
->
add_child_element
(
it
->
second
[
j
]);
office_element_ptr
table_elm
;
create_element
(
L"config"
,
L"config-item-map-entry"
,
table_elm
,
odf_context_
);
tables_elm
->
add_child_element
(
table_elm
);
item_map_entry
=
dynamic_cast
<
settings_config_item_map_entry
*>
(
table_elm
.
get
());
if
(
item_map_entry
)
item_map_entry
->
config_name_
=
views_
[
v
].
tables
[
t
].
name
;
for
(
int
j
=
0
;
j
<
views_
[
v
].
tables
[
t
].
content
.
size
();
j
++
)
{
table_elm
->
add_child_element
(
views_
[
v
].
tables
[
t
].
content
[
j
]);
}
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_settings_context.h
View file @
076de8bb
...
@@ -26,16 +26,34 @@ public:
...
@@ -26,16 +26,34 @@ public:
void
process_office_settings
(
office_element_ptr
root
);
void
process_office_settings
(
office_element_ptr
root
);
void
start_view
();
void
end_view
();
void
set_current_view
(
int
id
);
void
start_table
(
std
::
wstring
name
);
void
end_table
();
void
add_property
(
std
::
wstring
name
,
std
::
wstring
type
,
std
::
wstring
value
);
private:
private:
struct
views
struct
_table
{
std
::
wstring
name
;
std
::
vector
<
office_element_ptr
>
content
;
};
struct
_view
{
{
std
::
map
<
std
::
wstring
,
std
::
vector
<
office_element_ptr
>>
tables
;
std
::
vector
<
_table
>
tables
;
std
::
vector
<
office_element_ptr
>
content
;
std
::
vector
<
office_element_ptr
>
content
;
}
views_
;
};
std
::
vector
<
_view
>
views_
;
std
::
vector
<
office_element_ptr
>
config_content_
;
std
::
vector
<
office_element_ptr
>
config_content_
;
odf_conversion_context
*
odf_context_
;
odf_conversion_context
*
odf_context_
;
int
current_table_
;
int
current_view_
;
};
};
...
...
ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp
View file @
076de8bb
...
@@ -101,10 +101,10 @@ void ods_conversion_context::start_sheet()
...
@@ -101,10 +101,10 @@ void ods_conversion_context::start_sheet()
void
ods_conversion_context
::
set_sheet_dimension
(
const
std
::
wstring
&
ref
)
void
ods_conversion_context
::
set_sheet_dimension
(
const
std
::
wstring
&
ref
)
{
{
std
::
vector
<
std
::
wstring
>
ref_cells
;
std
::
vector
<
std
::
wstring
>
ref_cells
;
boost
::
algorithm
::
split
(
ref_cells
,
ref
,
boost
::
algorithm
::
is_any_of
(
L":"
),
boost
::
algorithm
::
token_compress_on
);
boost
::
algorithm
::
split
(
ref_cells
,
ref
,
boost
::
algorithm
::
is_any_of
(
L":"
),
boost
::
algorithm
::
token_compress_on
);
int
max_col
=
0
,
max_row
=
0
;
int
max_col
=
0
,
max_row
=
0
;
for
(
long
i
=
0
;
i
<
ref_cells
.
size
();
i
++
)
for
(
long
i
=
0
;
i
<
ref_cells
.
size
();
i
++
)
{
{
int
col
=
-
1
,
row
=
-
1
;
int
col
=
-
1
,
row
=
-
1
;
utils
::
parsing_ref
(
ref_cells
[
i
],
col
,
row
);
utils
::
parsing_ref
(
ref_cells
[
i
],
col
,
row
);
...
@@ -112,7 +112,7 @@ void ods_conversion_context::set_sheet_dimension(const std::wstring & ref)
...
@@ -112,7 +112,7 @@ void ods_conversion_context::set_sheet_dimension(const std::wstring & ref)
if
(
col
>
max_col
)
max_col
=
col
;
if
(
col
>
max_col
)
max_col
=
col
;
if
(
col
>
max_row
)
max_row
=
row
;
if
(
col
>
max_row
)
max_row
=
row
;
}
}
current_table
().
set_table_dimension
(
max_col
,
max_row
);
current_table
().
set_table_dimension
(
max_col
,
max_row
);
}
}
void
ods_conversion_context
::
end_sheet
()
void
ods_conversion_context
::
end_sheet
()
...
@@ -488,12 +488,16 @@ double ods_conversion_context::convert_symbol_width(double val)
...
@@ -488,12 +488,16 @@ double ods_conversion_context::convert_symbol_width(double val)
return
pixels
*
0.75
;
//* 9525. * 72.0 / (360000.0 * 2.54);
return
pixels
*
0.75
;
//* 9525. * 72.0 / (360000.0 * 2.54);
}
}
void
ods_conversion_context
::
start_table_view
(
std
::
wstring
table_name
,
int
view_id
)
void
ods_conversion_context
::
start_table_view
(
int
view_id
)
{
{
settings_context
()
->
set_current_view
(
view_id
);
settings_context
()
->
start_table
(
current_table
().
office_table_name_
);
}
}
void
ods_conversion_context
::
end_table_view
()
void
ods_conversion_context
::
end_table_view
()
{
{
settings_context
()
->
end_table
();
settings_context
()
->
set_current_view
(
-
1
);
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.h
View file @
076de8bb
...
@@ -83,7 +83,7 @@ public:
...
@@ -83,7 +83,7 @@ public:
void
start_conditional_formats
();
void
start_conditional_formats
();
void
end_conditional_formats
(){}
void
end_conditional_formats
(){}
void
start_table_view
(
std
::
wstring
table_name
,
int
view_id
);
void
start_table_view
(
int
view_id
);
void
end_table_view
();
void
end_table_view
();
private:
private:
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
View file @
076de8bb
...
@@ -112,10 +112,7 @@ void settings_config_item_map_indexed::serialize(std::wostream & _Wostream)
...
@@ -112,10 +112,7 @@ void settings_config_item_map_indexed::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
if
(
!
config_name_
.
empty
())
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
{
CP_XML_ATTR
(
L"config:name"
,
config_name_
);
}
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
{
{
...
@@ -144,10 +141,8 @@ void settings_config_item_map_named::serialize(std::wostream & _Wostream)
...
@@ -144,10 +141,8 @@ void settings_config_item_map_named::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
if
(
!
config_name_
.
empty
())
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
{
CP_XML_ATTR
(
L"config:name"
,
config_name_
);
}
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
elm
->
serialize
(
CP_XML_STREAM
());
...
@@ -175,6 +170,8 @@ void settings_config_item_map_entry::serialize(std::wostream & _Wostream)
...
@@ -175,6 +170,8 @@ void settings_config_item_map_entry::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
elm
->
serialize
(
CP_XML_STREAM
());
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_settings.h
View file @
076de8bb
...
@@ -88,7 +88,7 @@ public:
...
@@ -88,7 +88,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
std
::
wstring
config_name_
;
_CP_OPT
(
std
::
wstring
)
config_name_
;
office_element_ptr_array
content_
;
office_element_ptr_array
content_
;
};
};
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_indexed
);
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_indexed
);
...
@@ -108,7 +108,7 @@ public:
...
@@ -108,7 +108,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
std
::
wstring
config_name_
;
_CP_OPT
(
std
::
wstring
)
config_name_
;
office_element_ptr_array
content_
;
office_element_ptr_array
content_
;
};
};
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_named
);
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_named
);
...
@@ -128,7 +128,8 @@ public:
...
@@ -128,7 +128,8 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
office_element_ptr_array
content_
;
_CP_OPT
(
std
::
wstring
)
config_name_
;
office_element_ptr_array
content_
;
};
};
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_entry
);
CP_REGISTER_OFFICE_ELEMENT2
(
settings_config_item_map_entry
);
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
View file @
076de8bb
...
@@ -136,6 +136,13 @@ void XlsxConverter::convert_sheets()
...
@@ -136,6 +136,13 @@ void XlsxConverter::convert_sheets()
std
::
map
<
CString
,
OOX
::
Spreadsheet
::
CWorksheet
*>
&
arrWorksheets
=
xlsx_document
->
GetWorksheets
();
std
::
map
<
CString
,
OOX
::
Spreadsheet
::
CWorksheet
*>
&
arrWorksheets
=
xlsx_document
->
GetWorksheets
();
if
(
Workbook
->
m_oBookViews
.
IsInit
())
{
for
(
unsigned
int
i
=
0
;
i
<
Workbook
->
m_oBookViews
->
m_arrItems
.
size
();
i
++
)
{
convert
(
Workbook
->
m_oBookViews
->
m_arrItems
[
i
]);
}
}
if
(
Workbook
->
m_oSheets
.
IsInit
())
if
(
Workbook
->
m_oSheets
.
IsInit
())
{
{
for
(
unsigned
int
i
=
0
,
length
=
Workbook
->
m_oSheets
->
m_arrItems
.
size
();
i
<
length
;
++
i
)
for
(
unsigned
int
i
=
0
,
length
=
Workbook
->
m_oSheets
->
m_arrItems
.
size
();
i
<
length
;
++
i
)
...
@@ -238,7 +245,6 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -238,7 +245,6 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
oox_sheet
->
m_oSheetData
->
m_arrItems
[
row
]
=
NULL
;
oox_sheet
->
m_oSheetData
->
m_arrItems
[
row
]
=
NULL
;
}
}
ods_context
->
end_rows
();
ods_context
->
end_rows
();
// .. :( - 64 -
oox_sheet
->
m_oSheetData
.
reset
();
oox_sheet
->
m_oSheetData
.
reset
();
}
}
...
@@ -248,7 +254,6 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -248,7 +254,6 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
if
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
IsInit
())
if
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
IsInit
())
ods_context
->
add_merge_cells
(
string2std_string
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
get
()));
ods_context
->
add_merge_cells
(
string2std_string
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
get
()));
}
}
// - () ...
if
(
oox_sheet
->
m_oDrawing
.
IsInit
()
&&
oox_sheet
->
m_oDrawing
->
m_oId
.
IsInit
())
if
(
oox_sheet
->
m_oDrawing
.
IsInit
()
&&
oox_sheet
->
m_oDrawing
->
m_oId
.
IsInit
())
{
{
smart_ptr
<
OOX
::
File
>
oFile
=
oox_sheet
->
Find
(
oox_sheet
->
m_oDrawing
->
m_oId
->
GetValue
());
smart_ptr
<
OOX
::
File
>
oFile
=
oox_sheet
->
Find
(
oox_sheet
->
m_oDrawing
->
m_oId
->
GetValue
());
...
@@ -773,55 +778,146 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetPr *oox_sheet_pr)
...
@@ -773,55 +778,146 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetPr *oox_sheet_pr)
ods_context
->
current_table
().
set_table_tab_color
(
odf_color
);
ods_context
->
current_table
().
set_table_tab_color
(
odf_color
);
}
}
}
}
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CWorkbookView
*
oox_book_views
)
{
if
(
!
oox_book_views
)
return
;
const
OOX
::
Spreadsheet
::
CWorkbook
*
Workbook
=
xlsx_document
->
GetWorkbook
();
if
(
!
Workbook
)
return
;
ods_context
->
settings_context
()
->
start_view
();
if
(
oox_book_views
->
m_oActiveTab
.
IsInit
())
{
int
table_id
=
oox_book_views
->
m_oActiveTab
->
GetValue
()
+
1
;
for
(
int
i
=
0
;
i
<
Workbook
->
m_oSheets
->
m_arrItems
.
size
();
i
++
)
{
OOX
::
Spreadsheet
::
CSheet
*
pSheet
=
Workbook
->
m_oSheets
->
m_arrItems
[
i
];
if
(
!
pSheet
)
continue
;
if
(
pSheet
->
m_oSheetId
.
IsInit
()
&&
pSheet
->
m_oSheetId
->
GetValue
()
==
table_id
)
{
ods_context
->
settings_context
()
->
add_property
(
L"ActiveTable"
,
L"string"
,
string2std_string
(
pSheet
->
m_oName
.
get2
()));
}
}
}
ods_context
->
settings_context
()
->
add_property
(
L"ZoomType"
,
L"short"
,
L"0"
);
ods_context
->
settings_context
()
->
add_property
(
L"ZoomValue"
,
L"int"
,
L"100"
);
ods_context
->
settings_context
()
->
end_view
();
//nullable<SimpleTypes::COnOff<>> m_oAutoFilterDateGrouping;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oFirstSheet;
//nullable<SimpleTypes::COnOff<>> m_oMinimized;
//nullable<SimpleTypes::COnOff<>> m_oShowHorizontalScroll;
//nullable<SimpleTypes::COnOff<>> m_oShowSheetTabs;
//nullable<SimpleTypes::COnOff<>> m_oShowVerticalScroll;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oTabRatio;
//nullable<SimpleTypes::Spreadsheet::CVisibleType<>> m_oVisibility;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oWindowHeight;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oWindowWidth;
//nullable<SimpleTypes::CDecimalNumber<>> m_oXWindow;
//nullable<SimpleTypes::CDecimalNumber<>> m_oYWindow;
}
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CSheetViews
*
oox_sheet_views
)
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CSheetViews
*
oox_sheet_views
)
{
{
if
(
!
oox_sheet_views
)
return
;
if
(
!
oox_sheet_views
)
return
;
for
(
unsigned
long
i
=
0
;
i
<
oox_sheet_views
->
m_arrItems
.
size
();
i
++
)
for
(
unsigned
long
i
=
0
;
i
<
oox_sheet_views
->
m_arrItems
.
size
();
i
++
)
{
{
if
(
!
oox_sheet_views
->
m_arrItems
[
i
])
continue
;
if
(
!
oox_sheet_views
->
m_arrItems
[
i
])
continue
;
int
view_id
=
-
1
;
int
view_id
=
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oWorkbookViewId
->
GetValue
();
if
(
view_id
<
0
)
continue
;
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oWorkbookViewId
.
IsInit
())
ods_context
->
start_table_view
(
view_id
);
view_id
=
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oWorkbookViewId
->
GetValue
();
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oRightToLeft
.
IsInit
()
&&
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oRightToLeft
->
GetValue
()
==
1
)
ods_context
->
current_table
().
set_table_rtl
(
true
);
ods_context
->
start_table_view
(
ods_context
->
current_table
().
office_table_name_
,
view_id
);
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oShowGridLines
.
IsInit
()
&&
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oShowGridLines
->
GetValue
()
==
0
)
{
ods_context
->
settings_context
()
->
add_property
(
L"ShowGrid"
,
L"boolean"
,
L"false"
);
}
else
{
ods_context
->
settings_context
()
->
add_property
(
L"ShowGrid"
,
L"boolean"
,
L"true"
);
}
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oRightToLeft
.
IsInit
()
&&
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oRightToLeft
->
GetValue
()
==
1
)
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oView
.
IsInit
())
ods_context
->
current_table
().
set_table_rtl
(
true
);
{
//ods_context->set_settings_table_viewtype(oox_sheet_views->m_arrItems[i]->m_oView->GetValue());
}
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oShowGridLines
.
IsInit
()
&&
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oShowGridLines
->
GetValue
()
==
0
)
ods_context
->
settings_context
()
->
add_property
(
L"ZoomType"
,
L"short"
,
L"0"
);
{
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oZoomScale
.
IsInit
())
//ods_context->set_settings_show_gridlines(false);
{
}
ods_context
->
settings_context
()
->
add_property
(
L"ZoomValue"
,
L"int"
,
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oZoomScale
->
ToString
().
GetBuffer
());
}
else
{
ods_context
->
settings_context
()
->
add_property
(
L"ZoomValue"
,
L"int"
,
L"100"
);
}
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oColorId
.
IsInit
()
&&
!
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oDefaultGridColor
.
IsInit
())
{
ods_context
->
settings_context
()
->
add_property
(
L"GridColor"
,
L"int"
,
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oColorId
->
ToString
().
GetBuffer
());
}
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oSelection
.
IsInit
())
{
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oSelection
->
m_oActiveCell
.
IsInit
())
{
int
col
=
-
1
,
row
=
-
1
;
odf_writer
::
utils
::
parsing_ref
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oSelection
->
m_oActiveCell
->
GetBuffer
(),
col
,
row
);
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oView
.
IsInit
()
)
if
(
col
>=
0
&&
row
>=
0
)
{
{
//ods_context->set_settings_table_viewtype(oox_sheet_views->m_arrItems[i]->m_oView->GetValue());
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionX"
,
L"int"
,
boost
::
lexical_cast
<
std
::
wstring
>
(
col
));
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionY"
,
L"int"
,
boost
::
lexical_cast
<
std
::
wstring
>
(
row
));
}
}
}
//nullable<CPane> m_oPane;
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oSelection
->
m_oSqref
.
IsInit
())
{
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oColorId;
//D6:D9 I9:I12 M16:M21 C20:I24
//nullable<SimpleTypes::COnOff<>> m_oDefaultGridColor;
// OpenOffice
//nullable<SimpleTypes::COnOff<>> m_oShowFormulas;
}
//nullable<SimpleTypes::COnOff<>> m_oShowGridLines;
}
//nullable<SimpleTypes::COnOff<>> m_oShowOutlineSymbols;
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oPane
.
IsInit
())
//nullable<SimpleTypes::COnOff<>> m_oShowRowColHeaders;
{
//nullable<SimpleTypes::COnOff<>> m_oShowRuler;
//nullable<SimpleTypes::COnOff<>> m_oShowWhiteSpace;
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oPane
->
m_oXSplit
.
IsInit
())
//nullable<SimpleTypes::COnOff<>> m_oShowZeros;
{
//nullable<SimpleTypes::COnOff<>> m_oTabSelected;
std
::
wstring
sVal
=
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oPane
->
m_oXSplit
->
GetValue
());
//nullable<CString> m_oTopLeftCell;
//nullable<SimpleTypes::Spreadsheet::CSheetViewType<>>m_oView;
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitMode"
,
L"short"
,
L"2"
);
//nullable<SimpleTypes::COnOff<>> m_oWindowProtection;
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitPosition"
,
L"int"
,
sVal
);
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oWorkbookViewId;
ods_context
->
settings_context
()
->
add_property
(
L"PositionLeft"
,
L"int"
,
L"0"
);
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScale;
ods_context
->
settings_context
()
->
add_property
(
L"PositionRight"
,
L"int"
,
sVal
);
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScaleNormal;
}
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScalePageLayoutView;
if
(
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oPane
->
m_oYSplit
.
IsInit
())
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScaleSheetLayoutView;
{
std
::
wstring
sVal
=
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
oox_sheet_views
->
m_arrItems
[
i
]
->
m_oPane
->
m_oYSplit
->
GetValue
());
ods_context
->
settings_context
()
->
add_property
(
L"VerticalSplitMode"
,
L"short"
,
L"2"
);
ods_context
->
settings_context
()
->
add_property
(
L"VerticalSplitPosition"
,
L"int"
,
sVal
);
ods_context
->
settings_context
()
->
add_property
(
L"PositionTop"
,
L"int"
,
L"0"
);
ods_context
->
settings_context
()
->
add_property
(
L"PositionBottom"
,
L"int"
,
sVal
);
}
}
//nullable<SimpleTypes::COnOff<>> m_oDefaultGridColor;
//nullable<SimpleTypes::COnOff<>> m_oShowFormulas;
//nullable<SimpleTypes::COnOff<>> m_oShowOutlineSymbols;
//nullable<SimpleTypes::COnOff<>> m_oShowRowColHeaders;
//nullable<SimpleTypes::COnOff<>> m_oShowRuler;
//nullable<SimpleTypes::COnOff<>> m_oShowWhiteSpace;
//nullable<SimpleTypes::COnOff<>> m_oShowZeros;
//nullable<SimpleTypes::COnOff<>> m_oTabSelected;
//nullable<CString> m_oTopLeftCell;
//nullable<SimpleTypes::Spreadsheet::CSheetViewType<>>m_oView;
//nullable<SimpleTypes::COnOff<>> m_oWindowProtection;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oWorkbookViewId;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScaleNormal;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScalePageLayoutView;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oZoomScaleSheetLayoutView;
ods_context
->
end_table_view
();
ods_context
->
end_table_view
();
}
}
}
}
...
@@ -1683,7 +1779,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CShape* oox_shape)
...
@@ -1683,7 +1779,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CShape* oox_shape)
if
(
oox_shape
->
m_oNvSpPr
.
IsInit
())
if
(
oox_shape
->
m_oNvSpPr
.
IsInit
())
{
{
OoxConverter
::
convert
(
oox_shape
->
m_oNvSpPr
->
m_oCNvPr
.
GetPointer
());
//, , ...
OoxConverter
::
convert
(
oox_shape
->
m_oNvSpPr
->
m_oCNvPr
.
GetPointer
());
//, , ...
convert
(
oox_shape
->
m_oNvSpPr
->
m_oCNvSpPr
.
GetPointer
());
//
convert
(
oox_shape
->
m_oNvSpPr
->
m_oCNvSpPr
.
GetPointer
());
//
... todooo
}
}
if
(
oox_shape
->
m_oShapeStyle
.
IsInit
())
if
(
oox_shape
->
m_oShapeStyle
.
IsInit
())
{
{
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
View file @
076de8bb
...
@@ -61,6 +61,7 @@ namespace OOX
...
@@ -61,6 +61,7 @@ namespace OOX
class
CPageSetup
;
class
CPageSetup
;
class
CPageMargins
;
class
CPageMargins
;
class
CSi
;
class
CSi
;
class
CWorkbookView
;
}
}
}
}
...
@@ -140,7 +141,8 @@ namespace Oox2Odf
...
@@ -140,7 +141,8 @@ namespace Oox2Odf
void
convert
(
OOX
::
Spreadsheet
::
CSheetViews
*
oox_sheet_views
);
void
convert
(
OOX
::
Spreadsheet
::
CSheetViews
*
oox_sheet_views
);
void
convert
(
OOX
::
Spreadsheet
::
CPageSetup
*
oox_page
);
void
convert
(
OOX
::
Spreadsheet
::
CPageSetup
*
oox_page
);
void
convert
(
OOX
::
Spreadsheet
::
CPageMargins
*
oox_page
);
void
convert
(
OOX
::
Spreadsheet
::
CPageMargins
*
oox_page
);
void
convert
(
OOX
::
Spreadsheet
::
CWorkbookView
*
oox_book_views
);
void
convert
(
OOX
::
Spreadsheet
::
CFont
*
font
,
odf_writer
::
style_text_properties
*
text_properties
);
void
convert
(
OOX
::
Spreadsheet
::
CFont
*
font
,
odf_writer
::
style_text_properties
*
text_properties
);
void
convert
(
OOX
::
Spreadsheet
::
CBorder
*
border
,
odf_writer
::
style_table_cell_properties
*
cell_properties
);
void
convert
(
OOX
::
Spreadsheet
::
CBorder
*
border
,
odf_writer
::
style_table_cell_properties
*
cell_properties
);
void
convert
(
OOX
::
Spreadsheet
::
CFill
*
fill
,
odf_writer
::
style_table_cell_properties
*
cell_properties
);
void
convert
(
OOX
::
Spreadsheet
::
CFill
*
fill
,
odf_writer
::
style_table_cell_properties
*
cell_properties
);
...
@@ -156,16 +158,16 @@ namespace Oox2Odf
...
@@ -156,16 +158,16 @@ namespace Oox2Odf
void
convert
(
OOX
::
Spreadsheet
::
CNumFmt
*
numFmt
);
void
convert
(
OOX
::
Spreadsheet
::
CNumFmt
*
numFmt
);
void
convert
(
OOX
::
Spreadsheet
::
CDxf
*
dxFmt
,
int
oox_id
);
void
convert
(
OOX
::
Spreadsheet
::
CDxf
*
dxFmt
,
int
oox_id
);
void
convert
(
OOX
::
Spreadsheet
::
CCellAnchor
*
oox_anchor
);
void
convert
(
OOX
::
Spreadsheet
::
CCellAnchor
*
oox_anchor
);
void
convert
(
OOX
::
Spreadsheet
::
CDrawing
*
oox_drawing
);
void
convert
(
OOX
::
Spreadsheet
::
CDrawing
*
oox_drawing
);
void
convert
(
OOX
::
Spreadsheet
::
CFromTo
*
oox_from_to
,
oox_table_position
*
pos
);
void
convert
(
OOX
::
Spreadsheet
::
CFromTo
*
oox_from_to
,
oox_table_position
*
pos
);
void
convert
(
OOX
::
Spreadsheet
::
CPic
*
oox_picture
);
void
convert
(
OOX
::
Spreadsheet
::
CPic
*
oox_picture
);
void
convert
(
OOX
::
Spreadsheet
::
CShape
*
oox_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CShape
*
oox_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CConnShape
*
oox_conn_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CConnShape
*
oox_conn_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CGraphicFrame
*
oox_graphic_frame
);
void
convert
(
OOX
::
Spreadsheet
::
CGraphicFrame
*
oox_graphic_frame
);
void
convert
(
OOX
::
Spreadsheet
::
CGroupShape
*
oox_group_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CGroupShape
*
oox_group_shape
);
void
convert
(
OOX
::
Spreadsheet
::
CConditionalFormatting
*
oox_cond_fmt
);
void
convert
(
OOX
::
Spreadsheet
::
CConditionalFormatting
*
oox_cond_fmt
);
void
convert
(
OOX
::
Spreadsheet
::
CConditionalFormattingRule
*
oox_cond_rule
);
void
convert
(
OOX
::
Spreadsheet
::
CConditionalFormattingRule
*
oox_cond_rule
);
...
...
Common/DocxFormat/Source/XlsxFormat/Worksheets/WorksheetChildOther.h
View file @
076de8bb
...
@@ -409,7 +409,6 @@ namespace OOX
...
@@ -409,7 +409,6 @@ namespace OOX
nullable
<
SimpleTypes
::
COnOff
<>>
m_oThickTop
;
nullable
<
SimpleTypes
::
COnOff
<>>
m_oThickTop
;
nullable
<
SimpleTypes
::
COnOff
<>>
m_oZeroHeight
;
nullable
<
SimpleTypes
::
COnOff
<>>
m_oZeroHeight
;
};
};
class
CPane
:
public
WritingElement
class
CPane
:
public
WritingElement
{
{
public:
public:
...
@@ -487,10 +486,84 @@ namespace OOX
...
@@ -487,10 +486,84 @@ namespace OOX
nullable
<
SimpleTypes
::
CDouble
>
m_oYSplit
;
nullable
<
SimpleTypes
::
CDouble
>
m_oYSplit
;
};
};
class
CSelection
:
public
WritingElement
{
public:
WritingElementSpreadsheet_AdditionConstructors
(
CSelection
)
CSelection
()
{
}
virtual
~
CSelection
()
{
}
public:
virtual
CString
toXML
()
const
{
return
_T
(
""
);
}
virtual
void
toXML
(
XmlUtils
::
CStringWriter
&
writer
)
const
{
writer
.
WriteString
(
_T
(
"<selection"
));
if
(
m_oActiveCell
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" activeCell=
\"
%ls
\"
"
),
m_oActiveCell
.
get
());
writer
.
WriteString
(
sVal
);
}
if
(
m_oActiveCellId
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" activeCellId=
\"
%d
\"
"
),
m_oActiveCellId
.
get
());
writer
.
WriteString
(
sVal
);
}
if
(
m_oSqref
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" sqref=
\"
%ls
\"
"
),
m_oSqref
.
get
());
writer
.
WriteString
(
sVal
);
}
if
(
m_oPane
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" pane=
\"
%ls
\"
"
),
m_oPane
.
get
());
writer
.
WriteString
(
sVal
);
}
writer
.
WriteString
(
_T
(
"/>"
));
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
!
oReader
.
IsEmptyNode
()
)
oReader
.
ReadTillEnd
();
}
virtual
EElementType
getType
()
const
{
return
et_Selection
;
}
private:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
//
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"activeCell"
)
,
m_oActiveCell
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"activeCellId"
)
,
m_oActiveCellId
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"sqref"
)
,
m_oSqref
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"pane"
)
,
m_oPane
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
nullable
<
CString
>
m_oActiveCell
;
nullable
<
SimpleTypes
::
CUnsignedDecimalNumber
<>>
m_oActiveCellId
;
nullable
<
CString
>
m_oSqref
;
nullable
<
CString
>
m_oPane
;
//bottomLeft, bottomRight, topLeft, topRight
};
//:
//:
//<extLst>
//<extLst>
//<pivotSelection>
//<pivotSelection>
//<selection>
class
CSheetView
:
public
WritingElement
class
CSheetView
:
public
WritingElement
{
{
public:
public:
...
@@ -609,6 +682,9 @@ namespace OOX
...
@@ -609,6 +682,9 @@ namespace OOX
if
(
m_oPane
.
IsInit
())
if
(
m_oPane
.
IsInit
())
m_oPane
->
toXML
(
writer
);
m_oPane
->
toXML
(
writer
);
if
(
m_oSelection
.
IsInit
())
m_oSelection
->
toXML
(
writer
);
writer
.
WriteString
(
_T
(
"</sheetView>"
));
writer
.
WriteString
(
_T
(
"</sheetView>"
));
}
}
...
@@ -626,7 +702,8 @@ namespace OOX
...
@@ -626,7 +702,8 @@ namespace OOX
if
(
_T
(
"pane"
)
==
sName
)
if
(
_T
(
"pane"
)
==
sName
)
m_oPane
=
oReader
;
m_oPane
=
oReader
;
}
if
(
_T
(
"selection"
)
==
sName
)
m_oSelection
=
oReader
;
}
}
}
virtual
EElementType
getType
()
const
virtual
EElementType
getType
()
const
...
@@ -666,6 +743,7 @@ namespace OOX
...
@@ -666,6 +743,7 @@ namespace OOX
public:
public:
nullable
<
CPane
>
m_oPane
;
nullable
<
CPane
>
m_oPane
;
nullable
<
CSelection
>
m_oSelection
;
nullable
<
SimpleTypes
::
CUnsignedDecimalNumber
<>>
m_oColorId
;
nullable
<
SimpleTypes
::
CUnsignedDecimalNumber
<>>
m_oColorId
;
nullable
<
SimpleTypes
::
COnOff
<>>
m_oDefaultGridColor
;
nullable
<
SimpleTypes
::
COnOff
<>>
m_oDefaultGridColor
;
...
...
Common/DocxFormat/Source/XlsxFormat/WritingElement.h
View file @
076de8bb
...
@@ -304,6 +304,7 @@ namespace Spreadsheet
...
@@ -304,6 +304,7 @@ namespace Spreadsheet
et_SheetPr
,
et_SheetPr
,
et_Pane
,
et_Pane
,
et_ExternalBook
,
et_ExternalBook
,
et_Selection
,
et_PictureNonVisual
,
et_PictureNonVisual
,
et_NonVisualDrawingProperties
,
et_NonVisualDrawingProperties
,
...
...
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