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
925bca71
Commit
925bca71
authored
Aug 09, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatWriter - small refactoring, fix chart size (from xls)
parent
c9f23151
Changes
42
Show whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
372 additions
and
395 deletions
+372
-395
ASCOfficeOdfFileW/source/OdfFormat/abstract_xml.cpp
ASCOfficeOdfFileW/source/OdfFormat/abstract_xml.cpp
+0
-2
ASCOfficeOdfFileW/source/OdfFormat/calcext_elements.cpp
ASCOfficeOdfFileW/source/OdfFormat/calcext_elements.cpp
+10
-12
ASCOfficeOdfFileW/source/OdfFormat/draw_base.cpp
ASCOfficeOdfFileW/source/OdfFormat/draw_base.cpp
+3
-4
ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp
ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp
+6
-7
ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp
ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp
+4
-5
ASCOfficeOdfFileW/source/OdfFormat/list.cpp
ASCOfficeOdfFileW/source/OdfFormat/list.cpp
+4
-6
ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp
ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp
+7
-9
ASCOfficeOdfFileW/source/OdfFormat/mediaitems_utils.cpp
ASCOfficeOdfFileW/source/OdfFormat/mediaitems_utils.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/number_style.cpp
ASCOfficeOdfFileW/source/OdfFormat/number_style.cpp
+19
-22
ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
+17
-17
ASCOfficeOdfFileW/source/OdfFormat/odf_chart_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_chart_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_comment_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_comment_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
...fficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
+5
-8
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_notes_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_notes_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_page_layout_context.cpp
...ficeOdfFileW/source/OdfFormat/odf_page_layout_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_rels.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_rels.cpp
+3
-6
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
+4
-5
ASCOfficeOdfFileW/source/OdfFormat/odf_table_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_table_context.cpp
+0
-2
ASCOfficeOdfFileW/source/OdfFormat/odf_text_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_text_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/office_annotation.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_annotation.cpp
+4
-6
ASCOfficeOdfFileW/source/OdfFormat/office_body.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_body.cpp
+0
-2
ASCOfficeOdfFileW/source/OdfFormat/office_chart.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_chart.cpp
+10
-13
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
+10
-12
ASCOfficeOdfFileW/source/OdfFormat/office_spreadsheet.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_spreadsheet.cpp
+2
-4
ASCOfficeOdfFileW/source/OdfFormat/office_text.cpp
ASCOfficeOdfFileW/source/OdfFormat/office_text.cpp
+0
-3
ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp
ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp
+20
-21
ASCOfficeOdfFileW/source/OdfFormat/style_page_layout_properties.cpp
...dfFileW/source/OdfFormat/style_page_layout_properties.cpp
+0
-1
ASCOfficeOdfFileW/source/OdfFormat/style_paragraph_properties.cpp
...eOdfFileW/source/OdfFormat/style_paragraph_properties.cpp
+3
-6
ASCOfficeOdfFileW/source/OdfFormat/style_section_properties.cpp
...iceOdfFileW/source/OdfFormat/style_section_properties.cpp
+3
-4
ASCOfficeOdfFileW/source/OdfFormat/styles.cpp
ASCOfficeOdfFileW/source/OdfFormat/styles.cpp
+42
-45
ASCOfficeOdfFileW/source/OdfFormat/table.cpp
ASCOfficeOdfFileW/source/OdfFormat/table.cpp
+43
-44
ASCOfficeOdfFileW/source/OdfFormat/table.h
ASCOfficeOdfFileW/source/OdfFormat/table.h
+7
-7
ASCOfficeOdfFileW/source/OdfFormat/text_elements.cpp
ASCOfficeOdfFileW/source/OdfFormat/text_elements.cpp
+10
-14
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+0
-2
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+48
-51
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
+0
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+0
-2
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
+0
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
+87
-42
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
+1
-1
No files found.
ASCOfficeOdfFileW/source/OdfFormat/abstract_xml.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "abstract_xml.h"
#include "abstract_xml.h"
#include <boost/foreach.hpp>
namespace
cpdoccore
{
namespace
cpdoccore
{
namespace
odf_writer
{
namespace
odf_writer
{
...
...
ASCOfficeOdfFileW/source/OdfFormat/calcext_elements.cpp
View file @
925bca71
...
@@ -31,8 +31,6 @@
...
@@ -31,8 +31,6 @@
*/
*/
#include "calcext_elements.h"
#include "calcext_elements.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -86,9 +84,9 @@ void calcext_conditional_formats::serialize(std::wostream & _Wostream)
...
@@ -86,9 +84,9 @@ void calcext_conditional_formats::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -115,9 +113,9 @@ void calcext_conditional_format::serialize(std::wostream & _Wostream)
...
@@ -115,9 +113,9 @@ void calcext_conditional_format::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR_OPT
(
L"calcext:target-range-address"
,
calcext_target_range_address_
);
CP_XML_ATTR_OPT
(
L"calcext:target-range-address"
,
calcext_target_range_address_
);
BOOST_REVERSE_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
content_
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -144,9 +142,9 @@ void calcext_data_bar::serialize(std::wostream & _Wostream)
...
@@ -144,9 +142,9 @@ void calcext_data_bar::serialize(std::wostream & _Wostream)
{
{
calcext_data_bar_attr_
.
serialize
(
CP_GET_XML_NODE
());
calcext_data_bar_attr_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -170,9 +168,9 @@ void calcext_color_scale::serialize(std::wostream & _Wostream)
...
@@ -170,9 +168,9 @@ void calcext_color_scale::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -198,9 +196,9 @@ void calcext_icon_set::serialize(std::wostream & _Wostream)
...
@@ -198,9 +196,9 @@ void calcext_icon_set::serialize(std::wostream & _Wostream)
{
{
calcext_icon_set_attr_
.
serialize
(
CP_GET_XML_NODE
());
calcext_icon_set_attr_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/draw_base.cpp
View file @
925bca71
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <sstream>
#include <sstream>
#include <string>
#include <string>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
...
@@ -68,11 +67,11 @@ void draw_base::add_child_element( const office_element_ptr & child_element)
...
@@ -68,11 +67,11 @@ void draw_base::add_child_element( const office_element_ptr & child_element)
{
{
content_
.
push_back
(
child_element
);
content_
.
push_back
(
child_element
);
}
}
void
draw_base
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
draw_base
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
void
draw_base
::
serialize_attlist
(
CP_ATTR_NODE
)
void
draw_base
::
serialize_attlist
(
CP_ATTR_NODE
)
...
...
ASCOfficeOdfFileW/source/OdfFormat/draw_frame.cpp
View file @
925bca71
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <sstream>
#include <sstream>
#include <string>
#include <string>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/regex.h>
#include <boost/regex.h>
...
@@ -88,9 +87,9 @@ void draw_image::serialize(std::wostream & _Wostream)
...
@@ -88,9 +87,9 @@ void draw_image::serialize(std::wostream & _Wostream)
if
(
office_binary_data_
)
office_binary_data_
->
serialize
(
CP_XML_STREAM
());
if
(
office_binary_data_
)
office_binary_data_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -136,9 +135,9 @@ void draw_chart::serialize(std::wostream & _Wostream)
...
@@ -136,9 +135,9 @@ void draw_chart::serialize(std::wostream & _Wostream)
draw_chart_attlist_
.
serialize
(
CP_GET_XML_NODE
());
draw_chart_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_xlink_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_xlink_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -167,9 +166,9 @@ void draw_g::serialize(std::wostream & _Wostream)
...
@@ -167,9 +166,9 @@ void draw_g::serialize(std::wostream & _Wostream)
{
{
common_draw_attlists_
.
serialize
(
CP_GET_XML_NODE
());
common_draw_attlists_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/draw_shapes.cpp
View file @
925bca71
...
@@ -430,16 +430,15 @@ void draw_enhanced_geometry::serialize(std::wostream & _Wostream)
...
@@ -430,16 +430,15 @@ void draw_enhanced_geometry::serialize(std::wostream & _Wostream)
CP_XML_ATTR_OPT
(
L"svg:viewBox"
,
svg_viewbox_
);
CP_XML_ATTR_OPT
(
L"svg:viewBox"
,
svg_viewbox_
);
draw_enhanced_geometry_attlist_
.
serialize
(
CP_GET_XML_NODE
());
draw_enhanced_geometry_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_equation_
)
for
(
size_t
i
=
0
;
i
<
draw_equation_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
draw_equation_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_handle_
)
for
(
size_t
i
=
0
;
i
<
draw_handle_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
draw_handle_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/list.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "list.h"
#include "list.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -80,9 +78,9 @@ void text_list_item::serialize(std::wostream & _Wostream)
...
@@ -80,9 +78,9 @@ void text_list_item::serialize(std::wostream & _Wostream)
{
{
if
(
text_number_
)
text_number_
->
serialize
(
CP_XML_STREAM
());
if
(
text_number_
)
text_number_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
parElement
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
parElement
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -129,9 +127,9 @@ void text_list_header::serialize(std::wostream & _Wostream)
...
@@ -129,9 +127,9 @@ void text_list_header::serialize(std::wostream & _Wostream)
{
{
if
(
text_number_
)
text_number_
->
serialize
(
CP_XML_STREAM
());
if
(
text_number_
)
text_number_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
parElement
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
parElement
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/mediaitems.cpp
View file @
925bca71
...
@@ -34,7 +34,6 @@
...
@@ -34,7 +34,6 @@
#include "odf_rels.h"
#include "odf_rels.h"
#include <boost/regex.h>
#include <boost/regex.h>
#include <boost/foreach.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <cpdoccore/xml/utils.h>
#include <cpdoccore/xml/utils.h>
...
@@ -85,11 +84,11 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
...
@@ -85,11 +84,11 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
std
::
wstring
output_path
;
std
::
wstring
output_path
;
BOOST_FOREACH
(
item
const
&
elm
,
items_
)
for
(
size_t
i
=
0
;
i
<
items_
.
size
();
i
++
)
{
{
if
(
elm
.
oox_ref
==
input_path
)
if
(
items_
[
i
]
.
oox_ref
==
input_path
)
{
{
output_path
=
elm
.
odf_ref
;
output_path
=
items_
[
i
]
.
odf_ref
;
break
;
break
;
}
}
}
}
...
@@ -110,12 +109,11 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
...
@@ -110,12 +109,11 @@ void _mediaitems::add_or_find(const std::wstring & oox_ref, Type type, std::wst
}
}
void
_mediaitems
::
dump_rels
(
rels
&
Rels
,
std
::
wstring
local_path
)
void
_mediaitems
::
dump_rels
(
rels
&
Rels
,
std
::
wstring
local_path
)
{
{
size_t
i
=
0
;
for
(
size_t
i
=
0
;
i
<
items_
.
size
();
i
++
)
BOOST_FOREACH
(
item
&
elm
,
items_
)
{
{
Rels
.
add
(
relationship
(
Rels
.
add
(
relationship
(
utils
::
media
::
get_rel_type
(
elm
.
type
),
utils
::
media
::
get_rel_type
(
items_
[
i
]
.
type
),
local_path
+
elm
.
odf_ref
)
local_path
+
items_
[
i
]
.
odf_ref
)
);
);
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/mediaitems_utils.cpp
View file @
925bca71
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "mediaitems_utils.h"
#include "mediaitems_utils.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
namespace
cpdoccore
{
namespace
cpdoccore
{
...
...
ASCOfficeOdfFileW/source/OdfFormat/number_style.cpp
View file @
925bca71
...
@@ -30,9 +30,6 @@
...
@@ -30,9 +30,6 @@
*
*
*/
*/
#include <boost/foreach.hpp>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
...
@@ -67,13 +64,13 @@ void number_style_base::serialize(std::wostream & strm)
...
@@ -67,13 +64,13 @@ void number_style_base::serialize(std::wostream & strm)
if
(
style_text_properties_
)
if
(
style_text_properties_
)
style_text_properties_
->
serialize
(
strm
);
style_text_properties_
->
serialize
(
strm
);
BOOST_FOREACH
(
office_element_ptr
&
elm
,
style_map_
)
for
(
size_t
i
=
0
;
i
<
style_map_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
style_map_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
content_
[
i
]
->
serialize
(
strm
);
}
}
}
}
void
number_style_base
::
serialize
(
CP_ATTR_NODE
)
void
number_style_base
::
serialize
(
CP_ATTR_NODE
)
...
@@ -166,9 +163,9 @@ void number_text::serialize(std::wostream & strm)
...
@@ -166,9 +163,9 @@ void number_text::serialize(std::wostream & strm)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -194,9 +191,9 @@ void number_embedded_text::serialize(std::wostream & strm)
...
@@ -194,9 +191,9 @@ void number_embedded_text::serialize(std::wostream & strm)
{
{
CP_XML_ATTR_OPT
(
L"number:position"
,
number_position_
);
CP_XML_ATTR_OPT
(
L"number:position"
,
number_position_
);
BOOST_FOREACH
(
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -229,9 +226,9 @@ void number_number::serialize(std::wostream & strm)
...
@@ -229,9 +226,9 @@ void number_number::serialize(std::wostream & strm)
CP_XML_ATTR_OPT
(
L"number:min-integer-digits"
,
number_min_integer_digits_
);
CP_XML_ATTR_OPT
(
L"number:min-integer-digits"
,
number_min_integer_digits_
);
CP_XML_ATTR_OPT
(
L"number:grouping"
,
number_grouping_
);
CP_XML_ATTR_OPT
(
L"number:grouping"
,
number_grouping_
);
BOOST_FOREACH
(
office_element_ptr
&
elm
,
number_embedded_text_
)
for
(
size_t
i
=
0
;
i
<
number_embedded_text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
number_embedded_text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -336,9 +333,9 @@ void number_text_content::serialize(std::wostream & strm)
...
@@ -336,9 +333,9 @@ void number_text_content::serialize(std::wostream & strm)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/object_package.cpp
View file @
925bca71
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
*
*
*/
*/
#include <boost/foreach.hpp>
#include <cpdoccore/utf8cpp/utf8.h>
#include <cpdoccore/utf8cpp/utf8.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/simple_xml_writer.h>
...
@@ -92,9 +90,10 @@ namespace odf_writer
...
@@ -92,9 +90,10 @@ namespace odf_writer
///////////////
///////////////
void
manifect_file
::
add_rels
(
rels
&
r
)
void
manifect_file
::
add_rels
(
rels
&
r
)
{
{
BOOST_FOREACH
(
relationship
&
item
,
r
.
relationships
())
std
::
vector
<
relationship
>
&
rels
=
r
.
relationships
();
for
(
size_t
i
=
0
;
i
<
rels
.
size
();
i
++
)
{
{
rels_
.
add
(
item
);
rels_
.
add
(
rels
[
i
]
);
}
}
}
}
manifect_file
::
manifect_file
(
std
::
wstring
t
)
manifect_file
::
manifect_file
(
std
::
wstring
t
)
...
@@ -188,13 +187,14 @@ namespace odf_writer
...
@@ -188,13 +187,14 @@ namespace odf_writer
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
L"Media"
;
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
L"Media"
;
NSDirectory
::
CreateDirectory
(
path
);
NSDirectory
::
CreateDirectory
(
path
);
BOOST_FOREACH
(
_mediaitems
::
item
&
item
,
mediaitems_
.
items
()
)
std
::
vector
<
_mediaitems
::
item
>
&
items
=
mediaitems_
.
items
();
for
(
size_t
i
=
0
;
i
<
items
.
size
();
i
++
)
{
{
if
(
item
.
type
==
_mediaitems
::
typeMedia
)
if
(
item
s
[
i
]
.
type
==
_mediaitems
::
typeMedia
)
{
{
std
::
wstring
file_name_out
=
RootPath
+
FILE_SEPARATOR_STR
+
item
.
odf_ref
;
std
::
wstring
file_name_out
=
RootPath
+
FILE_SEPARATOR_STR
+
item
s
[
i
]
.
odf_ref
;
NSFile
::
CFileBinary
::
Copy
(
item
.
oox_ref
,
file_name_out
);
NSFile
::
CFileBinary
::
Copy
(
item
s
[
i
]
.
oox_ref
,
file_name_out
);
}
}
}
}
...
@@ -212,15 +212,16 @@ namespace odf_writer
...
@@ -212,15 +212,16 @@ namespace odf_writer
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
L"Pictures"
;
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
L"Pictures"
;
NSDirectory
::
CreateDirectory
(
path
);
NSDirectory
::
CreateDirectory
(
path
);
BOOST_FOREACH
(
_mediaitems
::
item
&
item
,
mediaitems_
.
items
()
)
std
::
vector
<
_mediaitems
::
item
>
&
items
=
mediaitems_
.
items
();
for
(
size_t
i
=
0
;
i
<
items
.
size
();
i
++
)
{
{
if
(
item
.
type
==
_mediaitems
::
typeImage
&&
item
.
oox_ref
.
length
()
>
0
)
if
(
item
s
[
i
].
type
==
_mediaitems
::
typeImage
&&
items
[
i
]
.
oox_ref
.
length
()
>
0
)
{
{
std
::
wstring
file_name_out
=
RootPath
+
FILE_SEPARATOR_STR
+
item
.
odf_ref
;
std
::
wstring
file_name_out
=
RootPath
+
FILE_SEPARATOR_STR
+
item
s
[
i
]
.
odf_ref
;
try
try
{
{
NSFile
::
CFileBinary
::
Copy
(
item
.
oox_ref
,
file_name_out
);
NSFile
::
CFileBinary
::
Copy
(
item
s
[
i
]
.
oox_ref
,
file_name_out
);
}
catch
(...)
}
catch
(...)
{
{
}
}
...
@@ -289,13 +290,12 @@ namespace odf_writer
...
@@ -289,13 +290,12 @@ namespace odf_writer
{
{
if
(
base_
)
base_
->
write
(
RootPath
);
if
(
base_
)
base_
->
write
(
RootPath
);
long
count
=
0
;
for
(
size_t
i
=
0
;
i
<
objects_
.
size
();
i
++
)
BOOST_FOREACH
(
const
element_ptr
&
item
,
objects_
)
{
{
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
item
->
local_path
;
std
::
wstring
path
=
RootPath
+
FILE_SEPARATOR_STR
+
objects_
[
i
]
->
local_path
;
NSDirectory
::
CreateDirectory
(
path
);
NSDirectory
::
CreateDirectory
(
path
);
item
->
write
(
path
);
objects_
[
i
]
->
write
(
path
);
}
}
if
(
manifest_
)
manifest_
->
write
(
RootPath
);
if
(
manifest_
)
manifest_
->
write
(
RootPath
);
if
(
mimetype_
)
mimetype_
->
write
(
RootPath
);
if
(
mimetype_
)
mimetype_
->
write
(
RootPath
);
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_chart_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
#include "../../../ASCOfficeOdfFile/formulasconvert/formulasconvert.h"
#include "../../../ASCOfficeOdfFile/formulasconvert/formulasconvert.h"
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_comment_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <iostream>
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
View file @
925bca71
...
@@ -30,8 +30,6 @@
...
@@ -30,8 +30,6 @@
*
*
*/
*/
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
#include "office_spreadsheet.h"
#include "office_spreadsheet.h"
...
@@ -134,16 +132,15 @@ void odf_conversion_context::end_document()
...
@@ -134,16 +132,15 @@ void odf_conversion_context::end_document()
objects_
.
back
().
scripts
->
serialize
(
content_root_
->
styles
());
objects_
.
back
().
scripts
->
serialize
(
content_root_
->
styles
());
object
.
content
->
serialize
(
content_root_
->
content
());
object
.
content
->
serialize
(
content_root_
->
content
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
object
.
content_styles
)
for
(
size_t
i
=
0
;
i
<
object
.
content_styles
.
size
();
i
++
)
{
{
elm
->
serialize
(
content_root_
->
styles
());
object
.
content_styles
[
i
]
->
serialize
(
content_root_
->
styles
());
}
}
package
::
content_simple_ptr
content_style_
=
package
::
content_simple
::
create
();
package
::
content_simple_ptr
content_style_
=
package
::
content_simple
::
create
();
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
object
.
styles
)
for
(
size_t
i
=
0
;
i
<
object
.
styles
.
size
();
i
++
)
{
// мастер-пейджы, заданные заливки (градиенты, битмапы), дефолтные стили, колонтитулы, разметки, заметки,...
{
// мастер-пейджы, заданные заливки (градиенты, битмапы), дефолтные стили, колонтитулы, разметки, заметки,...
object
.
styles
[
i
]
->
serialize
(
content_style_
->
content
());
elm
->
serialize
(
content_style_
->
content
());
}
}
package
::
content_simple_ptr
content_settings_
=
package
::
content_simple
::
create
();
package
::
content_simple_ptr
content_settings_
=
package
::
content_simple
::
create
();
object
.
settings
->
serialize
(
content_settings_
->
content
());
object
.
settings
->
serialize
(
content_settings_
->
content
());
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_notes_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast.hpp>
#include <iostream>
#include <iostream>
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_page_layout_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <iostream>
#include "odf_page_layout_context.h"
#include "odf_page_layout_context.h"
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_rels.cpp
View file @
925bca71
...
@@ -30,9 +30,6 @@
...
@@ -30,9 +30,6 @@
*
*
*/
*/
#include <boost/foreach.hpp>
#include "odf_rels.h"
#include "odf_rels.h"
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -54,11 +51,11 @@ void relationship::serialize(std::wostream & _Wostream)
...
@@ -54,11 +51,11 @@ void relationship::serialize(std::wostream & _Wostream)
}
}
}
}
void
rels
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
rels
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
relationship
&
r
,
relationship_
)
for
(
size_t
i
=
0
;
i
<
relationship_
.
size
();
i
++
)
{
{
r
.
serialize
(
_Wostrea
m
);
r
elationship_
[
i
].
serialize
(
str
m
);
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
View file @
925bca71
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
#include "style_paragraph_properties.h"
#include "style_paragraph_properties.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <iostream>
namespace
cpdoccore
{
namespace
cpdoccore
{
...
@@ -56,10 +55,10 @@ void calc_paragraph_properties_content(std::vector<style_paragraph_properties*>
...
@@ -56,10 +55,10 @@ void calc_paragraph_properties_content(std::vector<style_paragraph_properties*>
{
{
if
(
result
==
NULL
)
return
;
if
(
result
==
NULL
)
return
;
BOOST_REVERSE_FOREACH
(
style_paragraph_properties
*
v
,
parProps
)
for
(
size_t
i
=
parProps
.
size
()
-
1
;
i
>=
0
;
i
--
)
{
{
if
(
v
)
if
(
parProps
[
i
]
)
result
->
apply_from
(
v
->
content_
);
result
->
apply_from
(
parProps
[
i
]
->
content_
);
}
}
}
}
...
@@ -93,7 +92,7 @@ void odf_style_context::create_style(std::wstring oox_name, style_family::type f
...
@@ -93,7 +92,7 @@ void odf_style_context::create_style(std::wstring oox_name, style_family::type f
{
{
std
::
wstring
odf_name
=
oox_name
;
std
::
wstring
odf_name
=
oox_name
;
if
(
odf_name
.
length
()
<
1
)
odf_name
=
find_free_name
(
family
);
if
(
odf_name
.
empty
())
odf_name
=
find_free_name
(
family
);
office_element_ptr
elm
;
office_element_ptr
elm
;
create_element
(
L"style"
,
L"style"
,
elm
,
odf_context_
);
create_element
(
L"style"
,
L"style"
,
elm
,
odf_context_
);
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_table_context.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <iostream>
#include "odf_conversion_context.h"
#include "odf_conversion_context.h"
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_text_context.cpp
View file @
925bca71
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <boost/regex.hpp>
#include <boost/regex.hpp>
#include <iostream>
#include <iostream>
...
...
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
View file @
925bca71
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "ods_conversion_context.h"
#include "ods_conversion_context.h"
#include "logging.h"
#include "logging.h"
#include <boost/foreach.hpp>
#include <iostream>
#include <iostream>
#include "../../../ASCOfficeOdfFile/formulasconvert/formulasconvert.h"
#include "../../../ASCOfficeOdfFile/formulasconvert/formulasconvert.h"
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_annotation.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "office_annotation.h"
#include "office_annotation.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -159,9 +157,9 @@ void office_annotation::serialize(std::wostream & _Wostream)
...
@@ -159,9 +157,9 @@ void office_annotation::serialize(std::wostream & _Wostream)
if
(
dc_creator_
)
dc_creator_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_creator_
)
dc_creator_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_date_
)
dc_date_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_date_
)
dc_date_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -210,9 +208,9 @@ void officeooo_annotation::serialize(std::wostream & _Wostream)
...
@@ -210,9 +208,9 @@ void officeooo_annotation::serialize(std::wostream & _Wostream)
if
(
dc_creator_
)
dc_creator_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_creator_
)
dc_creator_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_date_
)
dc_date_
->
serialize
(
CP_XML_STREAM
());
if
(
dc_date_
)
dc_date_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
item
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
item
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_body.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "office_body.h"
#include "office_body.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_chart.cpp
View file @
925bca71
...
@@ -33,10 +33,7 @@
...
@@ -33,10 +33,7 @@
#include "office_chart.h"
#include "office_chart.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
namespace
cpdoccore
{
namespace
cpdoccore
{
...
@@ -61,9 +58,9 @@ void office_chart::serialize(std::wostream & _Wostream)
...
@@ -61,9 +58,9 @@ void office_chart::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -101,9 +98,9 @@ void chart_chart::serialize(std::wostream & _Wostream)
...
@@ -101,9 +98,9 @@ void chart_chart::serialize(std::wostream & _Wostream)
{
{
chart_chart_attlist_
.
serialize
(
CP_GET_XML_NODE
());
chart_chart_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -271,9 +268,9 @@ void chart_plot_area::serialize(std::wostream & _Wostream)
...
@@ -271,9 +268,9 @@ void chart_plot_area::serialize(std::wostream & _Wostream)
{
{
chart_plot_area_attlist_
.
serialize
(
CP_GET_XML_NODE
());
chart_plot_area_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -349,9 +346,9 @@ void chart_axis::serialize(std::wostream & _Wostream)
...
@@ -349,9 +346,9 @@ void chart_axis::serialize(std::wostream & _Wostream)
{
{
chart_axis_attlist_
.
serialize
(
CP_GET_XML_NODE
());
chart_axis_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -427,9 +424,9 @@ void chart_series::serialize(std::wostream & _Wostream)
...
@@ -427,9 +424,9 @@ void chart_series::serialize(std::wostream & _Wostream)
{
{
chart_series_attlist_
.
serialize
(
CP_GET_XML_NODE
());
chart_series_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_settings.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "office_settings.h"
#include "office_settings.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -56,9 +54,9 @@ void office_settings::serialize(std::wostream & _Wostream)
...
@@ -56,9 +54,9 @@ void office_settings::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -88,9 +86,9 @@ void settings_config_item_set::serialize(std::wostream & _Wostream)
...
@@ -88,9 +86,9 @@ void settings_config_item_set::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR
(
L"config:name"
,
config_name_
);
CP_XML_ATTR
(
L"config:name"
,
config_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -145,9 +143,9 @@ void settings_config_item_map_indexed::serialize(std::wostream & _Wostream)
...
@@ -145,9 +143,9 @@ void settings_config_item_map_indexed::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -174,9 +172,9 @@ void settings_config_item_map_named::serialize(std::wostream & _Wostream)
...
@@ -174,9 +172,9 @@ void settings_config_item_map_named::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -203,9 +201,9 @@ void settings_config_item_map_entry::serialize(std::wostream & _Wostream)
...
@@ -203,9 +201,9 @@ void settings_config_item_map_entry::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
CP_XML_ATTR_OPT
(
L"config:name"
,
config_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_spreadsheet.cpp
View file @
925bca71
...
@@ -32,8 +32,6 @@
...
@@ -32,8 +32,6 @@
#include "office_spreadsheet.h"
#include "office_spreadsheet.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -63,9 +61,9 @@ void office_spreadsheet::serialize(std::wostream & _Wostream)
...
@@ -63,9 +61,9 @@ void office_spreadsheet::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/office_text.cpp
View file @
925bca71
...
@@ -32,10 +32,7 @@
...
@@ -32,10 +32,7 @@
#include "office_text.h"
#include "office_text.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
namespace
cpdoccore
{
namespace
cpdoccore
{
...
...
ASCOfficeOdfFileW/source/OdfFormat/paragraph_elements.cpp
View file @
925bca71
...
@@ -35,7 +35,6 @@
...
@@ -35,7 +35,6 @@
#include <ostream>
#include <ostream>
#include <string>
#include <string>
#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
...
@@ -250,9 +249,9 @@ void text_span::serialize(std::wostream & _Wostream)
...
@@ -250,9 +249,9 @@ void text_span::serialize(std::wostream & _Wostream)
{
{
CP_XML_ATTR_OPT
(
L"text:style-name"
,
text_style_name_
);
CP_XML_ATTR_OPT
(
L"text:style-name"
,
text_style_name_
);
BOOST_FOREACH
(
const
office_element_ptr
&
parElement
,
paragraph_content_
)
for
(
size_t
i
=
0
;
i
<
paragraph_content_
.
size
();
i
++
)
{
{
if
(
parElement
)
parElement
->
serialize
(
CP_XML_STREAM
());
paragraph_content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -547,9 +546,9 @@ void text_placeholder::serialize(std::wostream & _Wostream)
...
@@ -547,9 +546,9 @@ void text_placeholder::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -585,12 +584,12 @@ void text_page_number::serialize(std::wostream & _Wostream)
...
@@ -585,12 +584,12 @@ void text_page_number::serialize(std::wostream & _Wostream)
common_num_format_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_num_format_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
CP_XML_ATTR_OPT
(
L"text:page-adjust"
,
text_page_adjust_
);
CP_XML_ATTR_OPT
(
L"text:page-adjust"
,
text_page_adjust_
);
CP_XML_ATTR_OPT
(
L"text:select-page"
,
text_select_page_
);
CP_XML_ATTR_OPT
(
L"text:select-page"
,
text_select_page_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -625,9 +624,9 @@ void text_page_count::serialize(std::wostream & _Wostream)
...
@@ -625,9 +624,9 @@ void text_page_count::serialize(std::wostream & _Wostream)
{
{
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -662,9 +661,9 @@ void text_date::serialize(std::wostream & _Wostream)
...
@@ -662,9 +661,9 @@ void text_date::serialize(std::wostream & _Wostream)
{
{
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -701,9 +700,9 @@ void text_time::serialize(std::wostream & _Wostream)
...
@@ -701,9 +700,9 @@ void text_time::serialize(std::wostream & _Wostream)
CP_XML_ATTR_OPT
(
L"style:data-style-name"
,
style_data_style_name_
);
CP_XML_ATTR_OPT
(
L"style:data-style-name"
,
style_data_style_name_
);
CP_XML_ATTR_OPT
(
L"text:time-value"
,
text_time_value_
);
CP_XML_ATTR_OPT
(
L"text:time-value"
,
text_time_value_
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -740,9 +739,9 @@ void text_file_name::serialize(std::wostream & _Wostream)
...
@@ -740,9 +739,9 @@ void text_file_name::serialize(std::wostream & _Wostream)
{
{
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
common_field_fixed_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -776,9 +775,9 @@ void text_sequence::serialize(std::wostream & _Wostream)
...
@@ -776,9 +775,9 @@ void text_sequence::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -823,9 +822,9 @@ void text_sheet_name::serialize(std::wostream & _Wostream)
...
@@ -823,9 +822,9 @@ void text_sheet_name::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_
)
for
(
size_t
i
=
0
;
i
<
text_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
text_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/style_page_layout_properties.cpp
View file @
925bca71
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <iostream>
#include <iostream>
#include <boost/foreach.hpp>
#include "office_elements_create.h"
#include "office_elements_create.h"
...
...
ASCOfficeOdfFileW/source/OdfFormat/style_paragraph_properties.cpp
View file @
925bca71
...
@@ -38,9 +38,6 @@
...
@@ -38,9 +38,6 @@
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/utils.h>
#include <cpdoccore/xml/utils.h>
#include <boost/foreach.hpp>
#include "borderstyle.h"
#include "borderstyle.h"
namespace
cpdoccore
{
namespace
cpdoccore
{
...
@@ -85,9 +82,9 @@ void style_tab_stops::serialize(std::wostream & strm)
...
@@ -85,9 +82,9 @@ void style_tab_stops::serialize(std::wostream & strm)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
style_tab_stops_
)
for
(
size_t
i
=
0
;
i
<
style_tab_stops_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
style_tab_stops_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/style_section_properties.cpp
View file @
925bca71
...
@@ -36,7 +36,6 @@
...
@@ -36,7 +36,6 @@
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <iostream>
#include <iostream>
#include <boost/foreach.hpp>
#include "office_elements_create.h"
#include "office_elements_create.h"
...
@@ -91,9 +90,9 @@ void style_columns::serialize(std::wostream & strm)
...
@@ -91,9 +90,9 @@ void style_columns::serialize(std::wostream & strm)
if
(
style_column_sep_
)
style_column_sep_
->
serialize
(
CP_XML_STREAM
());
if
(
style_column_sep_
)
style_column_sep_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
style_column_
)
for
(
size_t
i
=
0
;
i
<
style_column_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
style_column_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/styles.cpp
View file @
925bca71
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <cpdoccore/xml/simple_xml_writer.h>
#include <iostream>
#include <iostream>
#include <boost/foreach.hpp>
#include "office_elements_create.h"
#include "office_elements_create.h"
...
@@ -543,17 +542,17 @@ void styles::add_child_element( const office_element_ptr & child, odf_conversion
...
@@ -543,17 +542,17 @@ void styles::add_child_element( const office_element_ptr & child, odf_conversion
}
}
void
styles
::
serialize
(
std
::
wostream
&
strm
)
//content from different element
void
styles
::
serialize
(
std
::
wostream
&
strm
)
//content from different element
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
number_styles_
)
for
(
size_t
i
=
0
;
i
<
number_styles_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
number_styles_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
style_style_
)
for
(
size_t
i
=
0
;
i
<
style_style_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
style_style_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
text_list_style_
)
for
(
size_t
i
=
0
;
i
<
text_list_style_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
text_list_style_
[
i
]
->
serialize
(
strm
);
}
}
}
}
void
templates
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
,
odf_conversion_context
*
Context
)
void
templates
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
,
odf_conversion_context
*
Context
)
...
@@ -576,9 +575,9 @@ void templates::add_child_element( const office_element_ptr & child)
...
@@ -576,9 +575,9 @@ void templates::add_child_element( const office_element_ptr & child)
}
}
void
templates
::
serialize
(
std
::
wostream
&
strm
)
void
templates
::
serialize
(
std
::
wostream
&
strm
)
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
table_templates_
)
for
(
size_t
i
=
0
;
i
<
table_templates_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
table_templates_
[
i
]
->
serialize
(
strm
);
}
}
}
}
void
draw_styles
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
,
odf_conversion_context
*
Context
)
void
draw_styles
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
,
odf_conversion_context
*
Context
)
...
@@ -632,29 +631,29 @@ void draw_styles::add_child_element( const office_element_ptr & child, odf_conve
...
@@ -632,29 +631,29 @@ void draw_styles::add_child_element( const office_element_ptr & child, odf_conve
void
draw_styles
::
serialize
(
std
::
wostream
&
strm
)
void
draw_styles
::
serialize
(
std
::
wostream
&
strm
)
{
{
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_fill_image_
)
for
(
size_t
i
=
0
;
i
<
draw_fill_image_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_fill_image_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_hatch_
)
for
(
size_t
i
=
0
;
i
<
draw_hatch_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_hatch_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_gradient_
)
for
(
size_t
i
=
0
;
i
<
draw_gradient_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_gradient_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_opacity_
)
for
(
size_t
i
=
0
;
i
<
draw_opacity_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_opacity_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_marker_
)
for
(
size_t
i
=
0
;
i
<
draw_marker_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_marker_
[
i
]
->
serialize
(
strm
);
}
}
BOOST_FOREACH
(
office_element_ptr
&
elm
,
draw_stroke_dash_
)
for
(
size_t
i
=
0
;
i
<
draw_stroke_dash_
.
size
();
i
++
)
{
{
elm
->
serialize
(
strm
);
draw_stroke_dash_
[
i
]
->
serialize
(
strm
);
}
}
}
}
// office:automatic-styles
// office:automatic-styles
...
@@ -696,11 +695,10 @@ void office_automatic_styles::serialize(std::wostream & strm)
...
@@ -696,11 +695,10 @@ void office_automatic_styles::serialize(std::wostream & strm)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
office_element_ptr
elm
,
style_page_layout_
)
for
(
size_t
i
=
0
;
i
<
style_page_layout_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
style_page_layout_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
styles_
.
serialize
(
CP_XML_STREAM
());
styles_
.
serialize
(
CP_XML_STREAM
());
}
}
}
}
...
@@ -762,11 +760,10 @@ void office_master_styles::serialize(std::wostream & strm)
...
@@ -762,11 +760,10 @@ void office_master_styles::serialize(std::wostream & strm)
if
(
draw_layer_set_
)
if
(
draw_layer_set_
)
draw_layer_set_
->
serialize
(
CP_XML_STREAM
());
draw_layer_set_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
office_element_ptr
elm
,
style_master_page_
)
for
(
size_t
i
=
0
;
i
<
style_master_page_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
style_master_page_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
if
(
style_handout_master_
)
if
(
style_handout_master_
)
style_handout_master_
->
serialize
(
CP_XML_STREAM
());
style_handout_master_
->
serialize
(
CP_XML_STREAM
());
...
...
ASCOfficeOdfFileW/source/OdfFormat/table.cpp
View file @
925bca71
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "table.h"
#include "table.h"
#include <boost/make_shared.hpp>
#include <boost/make_shared.hpp>
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
...
@@ -272,7 +271,7 @@ void table_table_columns::create_child_element(const std::wstring & Ns, const st
...
@@ -272,7 +271,7 @@ void table_table_columns::create_child_element(const std::wstring & Ns, const st
{
{
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
{
{
CP_CREATE_ELEMENT
(
table_table_column
_
);
CP_CREATE_ELEMENT
(
content
_
);
}
}
else
else
CP_NOT_APPLICABLE_ELM
();
CP_NOT_APPLICABLE_ELM
();
...
@@ -284,7 +283,7 @@ void table_table_columns::add_child_element( const office_element_ptr & child_el
...
@@ -284,7 +283,7 @@ void table_table_columns::add_child_element( const office_element_ptr & child_el
ElementType
type
=
child_element
->
get_type
();
ElementType
type
=
child_element
->
get_type
();
if
(
type
==
typeTableTableColumn
)
if
(
type
==
typeTableTableColumn
)
table_table_column
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_table_columns
::
serialize
(
std
::
wostream
&
_Wostream
)
void
table_table_columns
::
serialize
(
std
::
wostream
&
_Wostream
)
{
{
...
@@ -292,9 +291,9 @@ void table_table_columns::serialize(std::wostream & _Wostream)
...
@@ -292,9 +291,9 @@ void table_table_columns::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_column_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -309,7 +308,7 @@ void table_table_header_columns::create_child_element( const std::wstring & Ns,
...
@@ -309,7 +308,7 @@ void table_table_header_columns::create_child_element( const std::wstring & Ns,
{
{
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
{
{
CP_CREATE_ELEMENT
(
table_table_column
_
);
CP_CREATE_ELEMENT
(
content
_
);
}
}
else
else
CP_NOT_APPLICABLE_ELM
();
CP_NOT_APPLICABLE_ELM
();
...
@@ -321,7 +320,7 @@ void table_table_header_columns::add_child_element( const office_element_ptr & c
...
@@ -321,7 +320,7 @@ void table_table_header_columns::add_child_element( const office_element_ptr & c
ElementType
type
=
child_element
->
get_type
();
ElementType
type
=
child_element
->
get_type
();
if
(
type
==
typeTableTableColumn
)
if
(
type
==
typeTableTableColumn
)
table_table_column
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_table_header_columns
::
serialize
(
std
::
wostream
&
_Wostream
)
void
table_table_header_columns
::
serialize
(
std
::
wostream
&
_Wostream
)
{
{
...
@@ -329,9 +328,9 @@ void table_table_header_columns::serialize(std::wostream & _Wostream)
...
@@ -329,9 +328,9 @@ void table_table_header_columns::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_column_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -347,7 +346,7 @@ void table_columns::create_child_element( const std::wstring & Ns, const std::ws
...
@@ -347,7 +346,7 @@ void table_columns::create_child_element( const std::wstring & Ns, const std::ws
}
}
else
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
else
if
CP_CHECK_NAME
(
L"table"
,
L"table-column"
)
{
{
CP_CREATE_ELEMENT_SIMPLE
(
table_table_column
_
);
CP_CREATE_ELEMENT_SIMPLE
(
content
_
);
}
}
else
else
not_applicable_element
(
L"table-columns"
,
Ns
,
Name
);
not_applicable_element
(
L"table-columns"
,
Ns
,
Name
);
...
@@ -367,15 +366,15 @@ void table_columns::add_child_element( const office_element_ptr & child_element)
...
@@ -367,15 +366,15 @@ void table_columns::add_child_element( const office_element_ptr & child_element)
table_table_columns_
=
child_element
;
table_table_columns_
=
child_element
;
}
}
else
if
(
type
==
typeTableTableColumn
)
else
if
(
type
==
typeTableTableColumn
)
table_table_column
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_columns
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_columns
::
serialize
(
std
::
wostream
&
str
m
)
{
{
if
(
table_table_columns_
)
table_table_columns_
->
serialize
(
_Wostrea
m
);
if
(
table_table_columns_
)
table_table_columns_
->
serialize
(
str
m
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_column_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
// table-columns-no-group
// table-columns-no-group
...
@@ -521,11 +520,11 @@ void table_columns_and_groups::add_child_element( const office_element_ptr & chi
...
@@ -521,11 +520,11 @@ void table_columns_and_groups::add_child_element( const office_element_ptr & chi
not_applicable_element
(
L"table-columns-and-groups"
,
L""
,
L""
);
not_applicable_element
(
L"table-columns-and-groups"
,
L""
,
L""
);
}
}
}
}
void
table_columns_and_groups
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_columns_and_groups
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
// table-table-cell-content
// table-table-cell-content
...
@@ -539,11 +538,11 @@ void table_table_cell_content::add_child_element( const office_element_ptr & chi
...
@@ -539,11 +538,11 @@ void table_table_cell_content::add_child_element( const office_element_ptr & chi
{
{
text_content_
.
push_back
(
child_element
);
text_content_
.
push_back
(
child_element
);
}
}
void
table_table_cell_content
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_table_cell_content
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
text_content_
)
for
(
size_t
i
=
0
;
i
<
text_content_
.
size
();
i
++
)
{
{
if
(
elm
)
elm
->
serialize
(
_Wostrea
m
);
text_content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
// table:table-cell
// table:table-cell
...
@@ -635,9 +634,9 @@ void table_table_row::serialize(std::wostream & _Wostream)
...
@@ -635,9 +634,9 @@ void table_table_row::serialize(std::wostream & _Wostream)
{
{
table_table_row_attlist_
.
serialize
(
CP_GET_XML_NODE
());
table_table_row_attlist_
.
serialize
(
CP_GET_XML_NODE
());
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -650,21 +649,21 @@ const wchar_t * table_table_rows::name = L"table-rows";
...
@@ -650,21 +649,21 @@ const wchar_t * table_table_rows::name = L"table-rows";
void
table_table_rows
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
void
table_table_rows
::
create_child_element
(
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
{
CP_CREATE_ELEMENT
(
table_table_row
_
);
CP_CREATE_ELEMENT
(
content
_
);
}
}
void
table_table_rows
::
add_child_element
(
const
office_element_ptr
&
child_element
)
void
table_table_rows
::
add_child_element
(
const
office_element_ptr
&
child_element
)
{
{
table_table_row
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_table_rows
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_table_rows
::
serialize
(
std
::
wostream
&
str
m
)
{
{
CP_XML_WRITER
(
_Wostrea
m
)
CP_XML_WRITER
(
str
m
)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_row_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
()
);
content_
[
i
]
->
serialize
(
strm
);
}
}
}
}
}
}
...
@@ -679,7 +678,7 @@ void table_table_header_rows::create_child_element( const std::wstring & Ns, con
...
@@ -679,7 +678,7 @@ void table_table_header_rows::create_child_element( const std::wstring & Ns, con
{
{
if
CP_CHECK_NAME
(
L"table"
,
L"table-row"
)
if
CP_CHECK_NAME
(
L"table"
,
L"table-row"
)
{
{
CP_CREATE_ELEMENT
(
table_table_row
_
);
CP_CREATE_ELEMENT
(
content
_
);
}
}
else
else
CP_NOT_APPLICABLE_ELM
();
CP_NOT_APPLICABLE_ELM
();
...
@@ -691,7 +690,7 @@ void table_table_header_rows::add_child_element( const office_element_ptr & chil
...
@@ -691,7 +690,7 @@ void table_table_header_rows::add_child_element( const office_element_ptr & chil
ElementType
type
=
child_element
->
get_type
();
ElementType
type
=
child_element
->
get_type
();
if
(
type
==
typeTableTableRow
)
if
(
type
==
typeTableTableRow
)
table_table_row
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_table_header_rows
::
serialize
(
std
::
wostream
&
_Wostream
)
void
table_table_header_rows
::
serialize
(
std
::
wostream
&
_Wostream
)
{
{
...
@@ -699,9 +698,9 @@ void table_table_header_rows::serialize(std::wostream & _Wostream)
...
@@ -699,9 +698,9 @@ void table_table_header_rows::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_row_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
@@ -716,7 +715,7 @@ void table_rows::create_child_element(const std::wstring & Ns, const std::wstrin
...
@@ -716,7 +715,7 @@ void table_rows::create_child_element(const std::wstring & Ns, const std::wstrin
}
}
else
if
CP_CHECK_NAME
(
L"table"
,
L"table-row"
)
else
if
CP_CHECK_NAME
(
L"table"
,
L"table-row"
)
{
{
CP_CREATE_ELEMENT_SIMPLE
(
table_table_row
_
);
CP_CREATE_ELEMENT_SIMPLE
(
content
_
);
}
}
else
else
{
{
...
@@ -733,16 +732,16 @@ void table_rows::add_child_element( const office_element_ptr & child_element)
...
@@ -733,16 +732,16 @@ void table_rows::add_child_element( const office_element_ptr & child_element)
table_table_rows_
=
child_element
;
table_table_rows_
=
child_element
;
else
if
(
type
==
typeTableTableRow
)
else
if
(
type
==
typeTableTableRow
)
table_table_row
_
.
push_back
(
child_element
);
content
_
.
push_back
(
child_element
);
}
}
void
table_rows
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_rows
::
serialize
(
std
::
wostream
&
str
m
)
{
{
if
(
table_table_rows_
)
if
(
table_table_rows_
)
table_table_rows_
->
serialize
(
_Wostrea
m
);
table_table_rows_
->
serialize
(
str
m
);
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
table_table_row_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
// table-rows-no-group
// table-rows-no-group
...
@@ -851,11 +850,11 @@ void table_rows_and_groups::add_child_element( const office_element_ptr & child_
...
@@ -851,11 +850,11 @@ void table_rows_and_groups::add_child_element( const office_element_ptr & child_
content_
.
push_back
(
elm
);
content_
.
push_back
(
elm
);
}
}
}
}
void
table_rows_and_groups
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
table_rows_and_groups
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
// table:table-row-group
// table:table-row-group
...
@@ -911,9 +910,9 @@ void table_shapes::serialize(std::wostream & _Wostream)
...
@@ -911,9 +910,9 @@ void table_shapes::serialize(std::wostream & _Wostream)
{
{
CP_XML_NODE_SIMPLE
()
CP_XML_NODE_SIMPLE
()
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
content_
)
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
CP_XML_STREAM
());
content_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/OdfFormat/table.h
View file @
925bca71
...
@@ -187,7 +187,7 @@ public:
...
@@ -187,7 +187,7 @@ public:
public:
public:
office_element_ptr
table_table_columns_
;
office_element_ptr
table_table_columns_
;
office_element_ptr_array
table_table_column
_
;
office_element_ptr_array
content
_
;
};
};
...
@@ -296,7 +296,7 @@ public:
...
@@ -296,7 +296,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
office_element_ptr_array
table_table_column
_
;
office_element_ptr_array
content
_
;
};
};
...
@@ -318,7 +318,7 @@ public:
...
@@ -318,7 +318,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
office_element_ptr_array
table_table_column
_
;
office_element_ptr_array
content
_
;
};
};
...
@@ -472,7 +472,7 @@ public:
...
@@ -472,7 +472,7 @@ public:
{
{
}
}
office_element_ptr_array
table_table_row
_
;
office_element_ptr_array
content
_
;
};
};
...
@@ -494,7 +494,7 @@ public:
...
@@ -494,7 +494,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
office_element_ptr_array
table_table_row
_
;
office_element_ptr_array
content
_
;
};
};
...
@@ -509,7 +509,7 @@ public:
...
@@ -509,7 +509,7 @@ public:
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
virtual
void
serialize
(
std
::
wostream
&
_Wostream
);
office_element_ptr
table_table_rows_
;
office_element_ptr
table_table_rows_
;
office_element_ptr_array
table_table_row
_
;
office_element_ptr_array
content
_
;
};
};
...
...
ASCOfficeOdfFileW/source/OdfFormat/text_elements.cpp
View file @
925bca71
...
@@ -32,10 +32,7 @@
...
@@ -32,10 +32,7 @@
#include "text_elements.h"
#include "text_elements.h"
#include <boost/foreach.hpp>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/xmlchar.h>
#include <cpdoccore/xml/attributes.h>
#include <cpdoccore/xml/attributes.h>
#include "paragraph_elements.h"
#include "paragraph_elements.h"
...
@@ -76,11 +73,11 @@ void paragraph::add_text(const std::wstring & Text)
...
@@ -76,11 +73,11 @@ void paragraph::add_text(const std::wstring & Text)
office_element_ptr
elm
=
text_text
::
create
(
Text
)
;
office_element_ptr
elm
=
text_text
::
create
(
Text
)
;
paragraph_content_
.
push_back
(
elm
);
paragraph_content_
.
push_back
(
elm
);
}
}
void
paragraph
::
serialize
(
std
::
wostream
&
_Wostrea
m
)
void
paragraph
::
serialize
(
std
::
wostream
&
str
m
)
{
{
BOOST_FOREACH
(
const
office_element_ptr
&
elm
,
paragraph_content_
)
for
(
size_t
i
=
0
;
i
<
paragraph_content_
.
size
();
i
++
)
{
{
elm
->
serialize
(
_Wostrea
m
);
paragraph_content_
[
i
]
->
serialize
(
str
m
);
}
}
}
}
void
paragraph
::
serialize_attr
(
CP_ATTR_NODE
)
void
paragraph
::
serialize_attr
(
CP_ATTR_NODE
)
...
@@ -95,11 +92,10 @@ void paragraph_attrs::serialize(CP_ATTR_NODE)
...
@@ -95,11 +92,10 @@ void paragraph_attrs::serialize(CP_ATTR_NODE)
std
::
wstring
text_class_names_all
;
std
::
wstring
text_class_names_all
;
BOOST_FOREACH
(
const
std
::
wstring
&
elm
,
text_class_names_
)
for
(
size_t
i
=
0
;
i
<
text_class_names_
.
size
();
i
++
)
{
{
text_class_names_all
=
elm
+
std
::
wstring
(
L" "
);
text_class_names_all
=
text_class_names_
[
i
]
+
std
::
wstring
(
L" "
);
}
}
if
(
!
text_class_names_all
.
empty
())
if
(
!
text_class_names_all
.
empty
())
CP_XML_ATTR
(
L"text:class-names"
,
text_class_names_all
);
CP_XML_ATTR
(
L"text:class-names"
,
text_class_names_all
);
}
}
...
@@ -186,9 +182,9 @@ void text_list::serialize(std::wostream & _Wostream)
...
@@ -186,9 +182,9 @@ void text_list::serialize(std::wostream & _Wostream)
if
(
text_list_header_
)
text_list_header_
->
serialize
(
CP_XML_STREAM
());
if
(
text_list_header_
)
text_list_header_
->
serialize
(
CP_XML_STREAM
());
BOOST_FOREACH
(
const
office_element_ptr
&
listItem
,
text_list_items_
)
for
(
size_t
i
=
0
;
i
<
text_list_items_
.
size
();
i
++
)
{
{
listItem
->
serialize
(
CP_XML_STREAM
());
text_list_items_
[
i
]
->
serialize
(
CP_XML_STREAM
());
}
}
}
}
}
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
925bca71
...
@@ -36,8 +36,6 @@
...
@@ -36,8 +36,6 @@
#include "../utils.h"
#include "../utils.h"
#include <boost/lexical_cast.hpp>
#include "XlsxConverter.h"
#include "XlsxConverter.h"
#include "DocxConverter.h"
#include "DocxConverter.h"
#include "PptxConverter.h"
#include "PptxConverter.h"
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
925bca71
...
@@ -39,9 +39,6 @@
...
@@ -39,9 +39,6 @@
#include "VmlShapeTypes2Oox.h"
#include "VmlShapeTypes2Oox.h"
#include <boost/foreach.hpp>
#include <boost/lexical_cast.hpp>
#include "../OdfFormat/odt_conversion_context.h"
#include "../OdfFormat/odt_conversion_context.h"
#include "../OdfFormat/odf_text_context.h"
#include "../OdfFormat/odf_text_context.h"
...
@@ -187,7 +184,7 @@ void DocxConverter::convert_document()
...
@@ -187,7 +184,7 @@ void DocxConverter::convert_document()
int
last_section_start
=
0
;
int
last_section_start
=
0
;
//считаем количесво секций и запоминаем их свойства ..
//считаем количесво секций и запоминаем их свойства ..
for
(
long
i
=
0
;
i
<
document
->
m_arrItems
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
document
->
m_arrItems
.
size
();
i
++
)
{
{
if
(
document
->
m_arrItems
[
i
]
==
NULL
)
continue
;
if
(
document
->
m_arrItems
[
i
]
==
NULL
)
continue
;
...
@@ -199,18 +196,18 @@ void DocxConverter::convert_document()
...
@@ -199,18 +196,18 @@ void DocxConverter::convert_document()
{
{
if
(
para
->
m_oParagraphProperty
->
m_oSectPr
.
IsInit
()
)
if
(
para
->
m_oParagraphProperty
->
m_oSectPr
.
IsInit
()
)
{
{
sections
.
push_back
(
_section
(
para
->
m_oParagraphProperty
->
m_oSectPr
.
GetPointer
(),
last_section_start
,
i
+
1
));
sections
.
push_back
(
_section
(
para
->
m_oParagraphProperty
->
m_oSectPr
.
GetPointer
(),
last_section_start
,
(
int
)
i
+
1
));
last_section_start
=
i
+
1
;
last_section_start
=
(
int
)
i
+
1
;
}
}
}
}
}
}
}
}
sections
.
push_back
(
_section
(
document
->
m_oSectPr
.
GetPointer
(),
last_section_start
,
document
->
m_arrItems
.
size
(),
true
));
sections
.
push_back
(
_section
(
document
->
m_oSectPr
.
GetPointer
(),
last_section_start
,
(
int
)
document
->
m_arrItems
.
size
(),
true
));
//----------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------
odt_context
->
text_context
()
->
clear_params
();
odt_context
->
text_context
()
->
clear_params
();
for
(
in
t
sect
=
0
;
sect
<
sections
.
size
();
sect
++
)
for
(
size_
t
sect
=
0
;
sect
<
sections
.
size
();
sect
++
)
{
{
current_section_properties
=
&
sections
[
sect
];
current_section_properties
=
&
sections
[
sect
];
...
@@ -522,7 +519,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
...
@@ -522,7 +519,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
{
//rapcomnat12.docx - стр 185
{
//rapcomnat12.docx - стр 185
bool
empty_para
=
true
;
bool
empty_para
=
true
;
for
(
unsigned
in
t
nIndex
=
0
;
empty_para
&&
nIndex
<
oox_paragraph
->
m_arrItems
.
size
();
nIndex
++
)
for
(
size_
t
nIndex
=
0
;
empty_para
&&
nIndex
<
oox_paragraph
->
m_arrItems
.
size
();
nIndex
++
)
{
{
switch
(
oox_paragraph
->
m_arrItems
[
nIndex
]
->
getType
())
switch
(
oox_paragraph
->
m_arrItems
[
nIndex
]
->
getType
())
{
{
...
@@ -546,7 +543,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
...
@@ -546,7 +543,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
}
}
//---------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------
for
(
unsigned
in
t
nIndex
=
0
;
nIndex
<
oox_paragraph
->
m_arrItems
.
size
();
nIndex
++
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oox_paragraph
->
m_arrItems
.
size
();
nIndex
++
)
{
{
//те элементы которые тока для Paragraph - здесь - остальные в общей куче
//те элементы которые тока для Paragraph - здесь - остальные в общей куче
switch
(
oox_paragraph
->
m_arrItems
[
nIndex
]
->
getType
())
switch
(
oox_paragraph
->
m_arrItems
[
nIndex
]
->
getType
())
...
@@ -573,7 +570,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
...
@@ -573,7 +570,7 @@ void DocxConverter::convert(OOX::Logic::CParagraph *oox_paragraph)
//---------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------
//std::sort(id_change_properties.begin(), id_change_properties.end());
//std::sort(id_change_properties.begin(), id_change_properties.end());
for
(
in
t
i
=
0
;
i
<
id_change_properties
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
id_change_properties
.
size
();
i
++
)
{
{
odt_context
->
end_change
(
id_change_properties
[
i
].
second
,
id_change_properties
[
i
].
first
);
odt_context
->
end_change
(
id_change_properties
[
i
].
second
,
id_change_properties
[
i
].
first
);
}
}
...
@@ -584,7 +581,7 @@ void DocxConverter::convert(OOX::Logic::CRun *oox_run)//wordprocessing 22.1.2.87
...
@@ -584,7 +581,7 @@ void DocxConverter::convert(OOX::Logic::CRun *oox_run)//wordprocessing 22.1.2.87
//хм разобраться а нужен ли он ... частенько бывает в неправильном месте!!! - A GRUBU.docx
//хм разобраться а нужен ли он ... частенько бывает в неправильном месте!!! - A GRUBU.docx
//https://forums.asp.net/t/1951556.aspx?Facing+problem+finding+out+page+end+in+Ms+Word+Open+XML+SDK+Asp+net+c+We+can+t+get+a+lastRenderedPageBreak
//https://forums.asp.net/t/1951556.aspx?Facing+problem+finding+out+page+end+in+Ms+Word+Open+XML+SDK+Asp+net+c+We+can+t+get+a+lastRenderedPageBreak
////test for break - 2 first element ЭТОТ элемент НУЖНО вытащить отдельно !!!
////test for break - 2 first element ЭТОТ элемент НУЖНО вытащить отдельно !!!
//for(
unsigned in
t i = 0; i < (std::min) ( (size_t)2, oox_run->m_arrItems.size()); ++i)
//for(
size_
t i = 0; i < (std::min) ( (size_t)2, oox_run->m_arrItems.size()); ++i)
//{
//{
// if (oox_run->m_arrItems[i]->getType() == OOX::et_w_lastRenderedPageBreak)
// if (oox_run->m_arrItems[i]->getType() == OOX::et_w_lastRenderedPageBreak)
// {
// {
...
@@ -608,7 +605,7 @@ void DocxConverter::convert(OOX::Logic::CRun *oox_run)//wordprocessing 22.1.2.87
...
@@ -608,7 +605,7 @@ void DocxConverter::convert(OOX::Logic::CRun *oox_run)//wordprocessing 22.1.2.87
odt_context
->
start_run
(
styled
);
odt_context
->
start_run
(
styled
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_run
->
m_arrItems
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oox_run
->
m_arrItems
.
size
();
++
i
)
{
{
//те элементы которые тока для Run - здесь - остальные в общей куче
//те элементы которые тока для Run - здесь - остальные в общей куче
switch
(
oox_run
->
m_arrItems
[
i
]
->
getType
())
switch
(
oox_run
->
m_arrItems
[
i
]
->
getType
())
...
@@ -778,7 +775,7 @@ void DocxConverter::convert(OOX::Logic::CFldSimple *oox_fld)
...
@@ -778,7 +775,7 @@ void DocxConverter::convert(OOX::Logic::CFldSimple *oox_fld)
if
(
oox_fld
->
m_sInstr
.
IsInit
())
if
(
oox_fld
->
m_sInstr
.
IsInit
())
odt_context
->
set_field_instr
(
oox_fld
->
m_sInstr
.
get2
());
odt_context
->
set_field_instr
(
oox_fld
->
m_sInstr
.
get2
());
for
(
unsigned
in
t
i
=
0
;
i
<
oox_fld
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_fld
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_fld
->
m_arrItems
[
i
]);
convert
(
oox_fld
->
m_arrItems
[
i
]);
}
}
...
@@ -815,7 +812,7 @@ void DocxConverter::convert(OOX::Logic::CIns *oox_ins)
...
@@ -815,7 +812,7 @@ void DocxConverter::convert(OOX::Logic::CIns *oox_ins)
bool
start_change
=
odt_context
->
start_change
(
id
,
1
,
author
,
userId
,
date
);
bool
start_change
=
odt_context
->
start_change
(
id
,
1
,
author
,
userId
,
date
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_ins
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_ins
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_ins
->
m_arrItems
[
i
]);
convert
(
oox_ins
->
m_arrItems
[
i
]);
}
}
...
@@ -1019,7 +1016,7 @@ void DocxConverter::convert(OOX::Logic::CDel *oox_del)
...
@@ -1019,7 +1016,7 @@ void DocxConverter::convert(OOX::Logic::CDel *oox_del)
std
::
wstring
date
=
oox_del
->
m_oDate
.
IsInit
()
?
oox_del
->
m_oDate
->
GetValue
()
:
L""
;
std
::
wstring
date
=
oox_del
->
m_oDate
.
IsInit
()
?
oox_del
->
m_oDate
->
GetValue
()
:
L""
;
bool
res_change
=
odt_context
->
start_change
(
id
,
2
,
author
,
userId
,
date
);
bool
res_change
=
odt_context
->
start_change
(
id
,
2
,
author
,
userId
,
date
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_del
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_del
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_del
->
m_arrItems
[
i
]);
convert
(
oox_del
->
m_arrItems
[
i
]);
}
}
...
@@ -1030,7 +1027,7 @@ void DocxConverter::convert(OOX::Logic::CSmartTag *oox_tag)
...
@@ -1030,7 +1027,7 @@ void DocxConverter::convert(OOX::Logic::CSmartTag *oox_tag)
{
{
if
(
oox_tag
==
NULL
)
return
;
if
(
oox_tag
==
NULL
)
return
;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_tag
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_tag
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_tag
->
m_arrItems
[
i
]);
convert
(
oox_tag
->
m_arrItems
[
i
]);
}
}
...
@@ -1250,7 +1247,7 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
...
@@ -1250,7 +1247,7 @@ void DocxConverter::convert(OOX::Logic::CParagraphProperty *oox_paragraph_pr, cp
if
(
oox_paragraph_pr
->
m_oTabs
.
IsInit
())
if
(
oox_paragraph_pr
->
m_oTabs
.
IsInit
())
{
{
paragraph_properties
->
add_child_element
(
odf_context
()
->
start_tabs
());
paragraph_properties
->
add_child_element
(
odf_context
()
->
start_tabs
());
for
(
unsigned
in
t
i
=
0
;
i
<
oox_paragraph_pr
->
m_oTabs
->
m_arrTabs
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_paragraph_pr
->
m_oTabs
->
m_arrTabs
.
size
();
i
++
)
{
{
if
(
oox_paragraph_pr
->
m_oTabs
->
m_arrTabs
[
i
]
==
NULL
)
continue
;
if
(
oox_paragraph_pr
->
m_oTabs
->
m_arrTabs
[
i
]
==
NULL
)
continue
;
...
@@ -1279,14 +1276,14 @@ void DocxConverter::apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logi
...
@@ -1279,14 +1276,14 @@ void DocxConverter::apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logi
if
(
other
->
m_arrFooterReference
.
size
()
>
0
)
if
(
other
->
m_arrFooterReference
.
size
()
>
0
)
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
props
->
m_arrFooterReference
.
size
()
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
props
->
m_arrFooterReference
.
size
()
;
i
++
)
{
{
if
(
props
->
m_arrFooterReference
[
i
])
delete
props
->
m_arrFooterReference
[
i
];
if
(
props
->
m_arrFooterReference
[
i
])
delete
props
->
m_arrFooterReference
[
i
];
props
->
m_arrFooterReference
[
i
]
=
NULL
;
props
->
m_arrFooterReference
[
i
]
=
NULL
;
}
}
props
->
m_arrFooterReference
.
clear
();
props
->
m_arrFooterReference
.
clear
();
for
(
unsigned
in
t
i
=
0
;
i
<
other
->
m_arrFooterReference
.
size
()
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
other
->
m_arrFooterReference
.
size
()
;
i
++
)
{
{
ComplexTypes
::
Word
::
CHdrFtrRef
*
ref
=
new
ComplexTypes
::
Word
::
CHdrFtrRef
();
ComplexTypes
::
Word
::
CHdrFtrRef
*
ref
=
new
ComplexTypes
::
Word
::
CHdrFtrRef
();
...
@@ -1299,14 +1296,14 @@ void DocxConverter::apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logi
...
@@ -1299,14 +1296,14 @@ void DocxConverter::apply_HF_from(OOX::Logic::CSectionProperty *props, OOX::Logi
}
}
if
(
other
->
m_arrHeaderReference
.
size
()
>
0
)
if
(
other
->
m_arrHeaderReference
.
size
()
>
0
)
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
props
->
m_arrHeaderReference
.
size
()
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
props
->
m_arrHeaderReference
.
size
()
;
i
++
)
{
{
if
(
props
->
m_arrHeaderReference
[
i
])
delete
props
->
m_arrHeaderReference
[
i
];
if
(
props
->
m_arrHeaderReference
[
i
])
delete
props
->
m_arrHeaderReference
[
i
];
props
->
m_arrHeaderReference
[
i
]
=
NULL
;
props
->
m_arrHeaderReference
[
i
]
=
NULL
;
}
}
props
->
m_arrHeaderReference
.
clear
();
props
->
m_arrHeaderReference
.
clear
();
for
(
unsigned
in
t
i
=
0
;
i
<
other
->
m_arrHeaderReference
.
size
()
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
other
->
m_arrHeaderReference
.
size
()
;
i
++
)
{
{
ComplexTypes
::
Word
::
CHdrFtrRef
*
ref
=
new
ComplexTypes
::
Word
::
CHdrFtrRef
();
ComplexTypes
::
Word
::
CHdrFtrRef
*
ref
=
new
ComplexTypes
::
Word
::
CHdrFtrRef
();
...
@@ -1501,7 +1498,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
...
@@ -1501,7 +1498,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
std
::
vector
<
int
>
types
;
std
::
vector
<
int
>
types
;
for
(
unsigned
in
t
i
=
0
;
i
<
s
->
m_arrHeaderReference
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
s
->
m_arrHeaderReference
.
size
();
i
++
)
{
{
if
(
s
->
m_arrHeaderReference
[
i
]
==
NULL
)
continue
;
if
(
s
->
m_arrHeaderReference
[
i
]
==
NULL
)
continue
;
...
@@ -1529,7 +1526,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
...
@@ -1529,7 +1526,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
if
(
!
add_odd_even_pages_header
&&
present_odd_even_pages
)
odt_context
->
add_empty_header
(
1
);
if
(
!
add_odd_even_pages_header
&&
present_odd_even_pages
)
odt_context
->
add_empty_header
(
1
);
if
(
!
add_default_header
&&
(
present_odd_even_pages
||
present_title_page
))
odt_context
->
add_empty_header
(
0
);
if
(
!
add_default_header
&&
(
present_odd_even_pages
||
present_title_page
))
odt_context
->
add_empty_header
(
0
);
for
(
unsigned
in
t
i
=
0
;
i
<
s
->
m_arrFooterReference
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
s
->
m_arrFooterReference
.
size
();
i
++
)
{
{
if
(
s
->
m_arrFooterReference
[
i
]
==
NULL
)
continue
;
if
(
s
->
m_arrFooterReference
[
i
]
==
NULL
)
continue
;
...
@@ -1607,7 +1604,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
...
@@ -1607,7 +1604,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
std
::
vector
<
std
::
pair
<
double
,
double
>>
width_space
;
std
::
vector
<
std
::
pair
<
double
,
double
>>
width_space
;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_section_pr
->
m_oCols
->
m_arrColumns
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_section_pr
->
m_oCols
->
m_arrColumns
.
size
();
i
++
)
{
{
if
(
oox_section_pr
->
m_oCols
->
m_arrColumns
[
i
]
==
NULL
)
continue
;
if
(
oox_section_pr
->
m_oCols
->
m_arrColumns
[
i
]
==
NULL
)
continue
;
double
space
=
default_space_pt
;
double
space
=
default_space_pt
;
...
@@ -1620,7 +1617,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
...
@@ -1620,7 +1617,7 @@ void DocxConverter::convert(OOX::Logic::CSectionProperty *oox_section_pr, bool r
width_space
.
push_back
(
std
::
pair
<
double
,
double
>
(
w
,
space
));
width_space
.
push_back
(
std
::
pair
<
double
,
double
>
(
w
,
space
));
}
}
//for (
unsigned in
t i= oox_section_pr->m_oCols->m_arrColumns.size(); i< num_columns; i ++)
//for (
size_
t i= oox_section_pr->m_oCols->m_arrColumns.size(); i< num_columns; i ++)
//{
//{
// width_space.push_back(std::pair<double,double>(-1, default_space_pt));
// width_space.push_back(std::pair<double,double>(-1, default_space_pt));
//}
//}
...
@@ -2262,13 +2259,13 @@ void DocxConverter::convert(OOX::Logic::CAlternateContent *oox_alt_content)
...
@@ -2262,13 +2259,13 @@ void DocxConverter::convert(OOX::Logic::CAlternateContent *oox_alt_content)
{
{
if
(
oox_alt_content
==
NULL
)
return
;
if
(
oox_alt_content
==
NULL
)
return
;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_alt_content
->
m_arrChoiceItems
.
size
();
++
i
)
// правильный выбор
for
(
size_
t
i
=
0
;
i
<
oox_alt_content
->
m_arrChoiceItems
.
size
();
++
i
)
// правильный выбор
{
{
convert
(
oox_alt_content
->
m_arrChoiceItems
[
i
]);
convert
(
oox_alt_content
->
m_arrChoiceItems
[
i
]);
}
}
if
(
oox_alt_content
->
m_arrChoiceItems
.
size
()
>
0
)
return
;
//чтоб не было дубляжа
if
(
oox_alt_content
->
m_arrChoiceItems
.
size
()
>
0
)
return
;
//чтоб не было дубляжа
for
(
unsigned
in
t
i
=
0
;
i
<
oox_alt_content
->
m_arrFallbackItems
.
size
();
++
i
)
// альтернативный
for
(
size_
t
i
=
0
;
i
<
oox_alt_content
->
m_arrFallbackItems
.
size
();
++
i
)
// альтернативный
// todooo нужно сверять по инддексно что нормально сконвертилось ... или делать ВСЕ по choice ( это правильнее)
// todooo нужно сверять по инддексно что нормально сконвертилось ... или делать ВСЕ по choice ( это правильнее)
{
{
convert
(
oox_alt_content
->
m_arrFallbackItems
[
i
]);
convert
(
oox_alt_content
->
m_arrFallbackItems
[
i
]);
...
@@ -2458,7 +2455,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
...
@@ -2458,7 +2455,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
}
}
if
(
!
bSet
)
if
(
!
bSet
)
{
{
int
pos
=
oox_pic
->
m_oShape
->
m_sType
->
find
(
_T
(
"#_x0000_t"
));
int
pos
=
(
int
)
oox_pic
->
m_oShape
->
m_sType
->
find
(
_T
(
"#_x0000_t"
));
if
(
pos
>=
0
)
if
(
pos
>=
0
)
{
{
sptType
=
(
SimpleTypes
::
Vml
::
SptType
)
_wtoi
(
oox_pic
->
m_oShape
->
m_sType
->
substr
(
pos
+
9
,
oox_pic
->
m_oShape
->
m_sType
->
length
()
-
pos
-
9
).
c_str
());
sptType
=
(
SimpleTypes
::
Vml
::
SptType
)
_wtoi
(
oox_pic
->
m_oShape
->
m_sType
->
substr
(
pos
+
9
,
oox_pic
->
m_oShape
->
m_sType
->
length
()
-
pos
-
9
).
c_str
());
...
@@ -2823,13 +2820,13 @@ void DocxConverter::convert_lists_styles()
...
@@ -2823,13 +2820,13 @@ void DocxConverter::convert_lists_styles()
oox_current_child_document
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
lists_styles
);
oox_current_child_document
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
lists_styles
);
//базовые
//базовые
for
(
unsigned
in
t
i
=
0
;
i
<
lists_styles
->
m_arrAbstractNum
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
lists_styles
->
m_arrAbstractNum
.
size
();
i
++
)
{
{
convert
(
lists_styles
->
m_arrAbstractNum
[
i
]);
convert
(
lists_styles
->
m_arrAbstractNum
[
i
]);
}
}
//используемые в документе, используют базовые + могут поменяться - Override
//используемые в документе, используют базовые + могут поменяться - Override
for
(
unsigned
in
t
i
=
0
;
i
<
lists_styles
->
m_arrNum
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
lists_styles
->
m_arrNum
.
size
();
i
++
)
{
{
if
(
lists_styles
->
m_arrNum
[
i
]
==
NULL
)
continue
;
if
(
lists_styles
->
m_arrNum
[
i
]
==
NULL
)
continue
;
...
@@ -2864,7 +2861,7 @@ void DocxConverter::convert_styles()
...
@@ -2864,7 +2861,7 @@ void DocxConverter::convert_styles()
convert
(
docx_styles
->
m_oDocDefaults
.
GetPointer
());
convert
(
docx_styles
->
m_oDocDefaults
.
GetPointer
());
for
(
unsigned
in
t
i
=
0
;
i
<
docx_styles
->
m_arrStyle
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
docx_styles
->
m_arrStyle
.
size
();
i
++
)
{
{
if
(
docx_styles
->
m_arrStyle
[
i
]
==
NULL
)
continue
;
if
(
docx_styles
->
m_arrStyle
[
i
]
==
NULL
)
continue
;
...
@@ -2902,7 +2899,7 @@ void DocxConverter::convert(OOX::Logic::CHyperlink *oox_hyperlink)
...
@@ -2902,7 +2899,7 @@ void DocxConverter::convert(OOX::Logic::CHyperlink *oox_hyperlink)
odt_context
->
start_hyperlink
(
ref
);
odt_context
->
start_hyperlink
(
ref
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_hyperlink
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_hyperlink
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_hyperlink
->
m_arrItems
[
i
]);
convert
(
oox_hyperlink
->
m_arrItems
[
i
]);
}
}
...
@@ -2911,7 +2908,7 @@ void DocxConverter::convert(OOX::Logic::CHyperlink *oox_hyperlink)
...
@@ -2911,7 +2908,7 @@ void DocxConverter::convert(OOX::Logic::CHyperlink *oox_hyperlink)
else
else
{
//ссылка внутри дока
{
//ссылка внутри дока
//anchor todooo
//anchor todooo
for
(
unsigned
in
t
i
=
0
;
i
<
oox_hyperlink
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_hyperlink
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_hyperlink
->
m_arrItems
[
i
]);
convert
(
oox_hyperlink
->
m_arrItems
[
i
]);
}
}
...
@@ -3017,7 +3014,7 @@ void DocxConverter::convert(OOX::Numbering::CAbstractNum* oox_num_style)
...
@@ -3017,7 +3014,7 @@ void DocxConverter::convert(OOX::Numbering::CAbstractNum* oox_num_style)
//nullable<ComplexTypes::Word::std::wstring_ > m_oStyleLink;
//nullable<ComplexTypes::Word::std::wstring_ > m_oStyleLink;
//nullable<ComplexTypes::Word::CLongHexNumber > m_oTmpl;
//nullable<ComplexTypes::Word::CLongHexNumber > m_oTmpl;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_num_style
->
m_arrLvl
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_num_style
->
m_arrLvl
.
size
();
i
++
)
{
{
convert
(
oox_num_style
->
m_arrLvl
[
i
]);
convert
(
oox_num_style
->
m_arrLvl
[
i
]);
}
}
...
@@ -3153,7 +3150,7 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
...
@@ -3153,7 +3150,7 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
int
id
=
oox_num_lvl
->
m_oLvlPicBulletId
->
m_oVal
->
GetValue
();
int
id
=
oox_num_lvl
->
m_oLvlPicBulletId
->
m_oVal
->
GetValue
();
OOX
::
CNumbering
*
lists_styles
=
docx_document
->
GetNumbering
();
OOX
::
CNumbering
*
lists_styles
=
docx_document
->
GetNumbering
();
for
(
unsigned
in
t
i
=
0
;
(
lists_styles
)
&&
(
i
<
lists_styles
->
m_arrNumPicBullet
.
size
());
i
++
)
for
(
size_
t
i
=
0
;
(
lists_styles
)
&&
(
i
<
lists_styles
->
m_arrNumPicBullet
.
size
());
i
++
)
{
{
if
((
lists_styles
->
m_arrNumPicBullet
[
i
])
&&
(
lists_styles
->
m_arrNumPicBullet
[
i
]
->
m_oNumPicBulletId
.
GetValue
()
==
id
))
if
((
lists_styles
->
m_arrNumPicBullet
[
i
])
&&
(
lists_styles
->
m_arrNumPicBullet
[
i
]
->
m_oNumPicBulletId
.
GetValue
()
==
id
))
{
{
...
@@ -3245,7 +3242,7 @@ void DocxConverter::convert_table_style(OOX::CStyle *oox_style)
...
@@ -3245,7 +3242,7 @@ void DocxConverter::convert_table_style(OOX::CStyle *oox_style)
// convert(oox_style->m_oTrPr.GetPointer(), table_row_properties);
// convert(oox_style->m_oTrPr.GetPointer(), table_row_properties);
//}
//}
//отдельные
//отдельные
for
(
unsigned
in
t
i
=
0
;
i
<
oox_style
->
m_arrTblStylePr
.
size
()
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_style
->
m_arrTblStylePr
.
size
()
;
i
++
)
{
{
if
(
oox_style
->
m_arrTblStylePr
[
i
]
==
NULL
)
continue
;
if
(
oox_style
->
m_arrTblStylePr
[
i
]
==
NULL
)
continue
;
...
@@ -3437,7 +3434,7 @@ void DocxConverter::convert_comment(int oox_comm_id)
...
@@ -3437,7 +3434,7 @@ void DocxConverter::convert_comment(int oox_comm_id)
OOX
::
CComments
*
docx_comments
=
docx_document
->
GetComments
();
OOX
::
CComments
*
docx_comments
=
docx_document
->
GetComments
();
if
(
!
docx_comments
)
return
;
if
(
!
docx_comments
)
return
;
for
(
unsigned
in
t
comm
=
0
;
comm
<
docx_comments
->
m_arrComments
.
size
();
comm
++
)
for
(
size_
t
comm
=
0
;
comm
<
docx_comments
->
m_arrComments
.
size
();
comm
++
)
{
{
OOX
::
CComment
*
oox_comment
=
docx_comments
->
m_arrComments
[
comm
];
OOX
::
CComment
*
oox_comment
=
docx_comments
->
m_arrComments
[
comm
];
...
@@ -3452,7 +3449,7 @@ void DocxConverter::convert_comment(int oox_comm_id)
...
@@ -3452,7 +3449,7 @@ void DocxConverter::convert_comment(int oox_comm_id)
if
(
oox_comment
->
m_oDate
.
IsInit
())
odt_context
->
comment_context
()
->
set_date
(
oox_comment
->
m_oDate
->
GetValue
());
if
(
oox_comment
->
m_oDate
.
IsInit
())
odt_context
->
comment_context
()
->
set_date
(
oox_comment
->
m_oDate
->
GetValue
());
if
(
oox_comment
->
m_oInitials
.
IsInit
())
{}
if
(
oox_comment
->
m_oInitials
.
IsInit
())
{}
for
(
unsigned
in
t
i
=
0
;
i
<
oox_comment
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_comment
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_comment
->
m_arrItems
[
i
]);
convert
(
oox_comment
->
m_arrItems
[
i
]);
}
}
...
@@ -3468,7 +3465,7 @@ void DocxConverter::convert_footnote(int oox_ref_id)
...
@@ -3468,7 +3465,7 @@ void DocxConverter::convert_footnote(int oox_ref_id)
odt_context
->
start_note
(
oox_ref_id
,
1
);
odt_context
->
start_note
(
oox_ref_id
,
1
);
for
(
unsigned
in
t
n
=
0
;
n
<
footnotes
->
m_arrFootnote
.
size
();
n
++
)
for
(
size_
t
n
=
0
;
n
<
footnotes
->
m_arrFootnote
.
size
();
n
++
)
{
{
OOX
::
CFtnEdn
*
oox_note
=
footnotes
->
m_arrFootnote
[
n
];
OOX
::
CFtnEdn
*
oox_note
=
footnotes
->
m_arrFootnote
[
n
];
...
@@ -3479,7 +3476,7 @@ void DocxConverter::convert_footnote(int oox_ref_id)
...
@@ -3479,7 +3476,7 @@ void DocxConverter::convert_footnote(int oox_ref_id)
{
{
odt_context
->
start_note_content
();
odt_context
->
start_note_content
();
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
oox_note
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_note
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_note
->
m_arrItems
[
i
]);
convert
(
oox_note
->
m_arrItems
[
i
]);
}
}
...
@@ -3496,7 +3493,7 @@ void DocxConverter::convert_endnote(int oox_ref_id)
...
@@ -3496,7 +3493,7 @@ void DocxConverter::convert_endnote(int oox_ref_id)
odt_context
->
start_note
(
oox_ref_id
,
2
);
odt_context
->
start_note
(
oox_ref_id
,
2
);
for
(
unsigned
in
t
n
=
0
;
n
<
endnotes
->
m_arrEndnote
.
size
();
n
++
)
for
(
size_
t
n
=
0
;
n
<
endnotes
->
m_arrEndnote
.
size
();
n
++
)
{
{
OOX
::
CFtnEdn
*
oox_note
=
endnotes
->
m_arrEndnote
[
n
];
OOX
::
CFtnEdn
*
oox_note
=
endnotes
->
m_arrEndnote
[
n
];
...
@@ -3507,7 +3504,7 @@ void DocxConverter::convert_endnote(int oox_ref_id)
...
@@ -3507,7 +3504,7 @@ void DocxConverter::convert_endnote(int oox_ref_id)
{
{
odt_context
->
start_note_content
();
odt_context
->
start_note_content
();
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
oox_note
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_note
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
oox_note
->
m_arrItems
[
i
]);
convert
(
oox_note
->
m_arrItems
[
i
]);
}
}
...
@@ -3524,7 +3521,7 @@ void DocxConverter::convert_hdr_ftr (std::wstring sId)
...
@@ -3524,7 +3521,7 @@ void DocxConverter::convert_hdr_ftr (std::wstring sId)
oox_current_child_document
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
oox_hdr_ftr
);
oox_current_child_document
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
oox_hdr_ftr
);
for
(
unsigned
in
t
nIndex
=
0
;
nIndex
<
oox_hdr_ftr
->
m_arrItems
.
size
();
nIndex
++
)
for
(
size_
t
nIndex
=
0
;
nIndex
<
oox_hdr_ftr
->
m_arrItems
.
size
();
nIndex
++
)
{
{
convert
(
oox_hdr_ftr
->
m_arrItems
[
nIndex
]);
convert
(
oox_hdr_ftr
->
m_arrItems
[
nIndex
]);
}
}
...
@@ -3695,7 +3692,7 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
...
@@ -3695,7 +3692,7 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
odt_context
->
table_context
()
->
set_table_inside_h
(
border_inside_h
);
odt_context
->
table_context
()
->
set_table_inside_h
(
border_inside_h
);
int
count_rows
=
oox_table
->
m_nCountRow
;
int
count_rows
=
oox_table
->
m_nCountRow
;
int
count_columns
=
oox_table
->
m_oTblGrid
.
IsInit
()
?
oox_table
->
m_oTblGrid
->
m_arrGridCol
.
size
()
:
0
;
int
count_columns
=
oox_table
->
m_oTblGrid
.
IsInit
()
?
(
int
)
oox_table
->
m_oTblGrid
->
m_arrGridCol
.
size
()
:
0
;
odt_context
->
styles_context
()
->
table_styles
().
set_current_dimension
(
count_columns
,
count_rows
);
odt_context
->
styles_context
()
->
table_styles
().
set_current_dimension
(
count_columns
,
count_rows
);
odt_context
->
table_context
()
->
count_rows
(
count_rows
);
odt_context
->
table_context
()
->
count_rows
(
count_rows
);
...
@@ -3703,7 +3700,7 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
...
@@ -3703,7 +3700,7 @@ void DocxConverter::convert(OOX::Logic::CTbl *oox_table)
convert
(
oox_table
->
m_oTblGrid
.
GetPointer
());
convert
(
oox_table
->
m_oTblGrid
.
GetPointer
());
//------ строки
//------ строки
for
(
unsigned
in
t
i
=
0
;
i
<
oox_table
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_table
->
m_arrItems
.
size
();
i
++
)
{
{
switch
(
oox_table
->
m_arrItems
[
i
]
->
getType
())
switch
(
oox_table
->
m_arrItems
[
i
]
->
getType
())
{
{
...
@@ -3753,7 +3750,7 @@ void DocxConverter::convert(OOX::Logic::CTblGrid *oox_table_grid)
...
@@ -3753,7 +3750,7 @@ void DocxConverter::convert(OOX::Logic::CTblGrid *oox_table_grid)
odt_context
->
start_table_columns
();
odt_context
->
start_table_columns
();
for
(
in
t
i
=
0
;
i
<
oox_table_grid
->
m_arrGridCol
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_table_grid
->
m_arrGridCol
.
size
();
i
++
)
{
{
if
(
oox_table_grid
->
m_arrGridCol
[
i
]
==
NULL
)
continue
;
if
(
oox_table_grid
->
m_arrGridCol
[
i
]
==
NULL
)
continue
;
double
width
=
-
1
;
double
width
=
-
1
;
...
@@ -3819,7 +3816,7 @@ void DocxConverter::convert(OOX::Logic::CTr *oox_table_row)
...
@@ -3819,7 +3816,7 @@ void DocxConverter::convert(OOX::Logic::CTr *oox_table_row)
convert
(
oox_table_row
->
m_oTableRowProperties
);
convert
(
oox_table_row
->
m_oTableRowProperties
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_table_row
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_table_row
->
m_arrItems
.
size
();
i
++
)
{
{
switch
(
oox_table_row
->
m_arrItems
[
i
]
->
getType
())
switch
(
oox_table_row
->
m_arrItems
[
i
]
->
getType
())
{
{
...
@@ -3879,7 +3876,7 @@ void DocxConverter::convert(OOX::Logic::CTc *oox_table_cell)
...
@@ -3879,7 +3876,7 @@ void DocxConverter::convert(OOX::Logic::CTc *oox_table_cell)
odt_context
->
table_context
()
->
set_cell_column_span
(
oox_table_cell
->
m_oTableCellProperties
->
m_oGridSpan
->
m_oVal
->
GetValue
());
odt_context
->
table_context
()
->
set_cell_column_span
(
oox_table_cell
->
m_oTableCellProperties
->
m_oGridSpan
->
m_oVal
->
GetValue
());
}
}
for
(
unsigned
in
t
i
=
0
;
i
<
oox_table_cell
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_table_cell
->
m_arrItems
.
size
();
i
++
)
{
{
switch
(
oox_table_cell
->
m_arrItems
[
i
]
->
getType
())
switch
(
oox_table_cell
->
m_arrItems
[
i
]
->
getType
())
{
{
...
@@ -4238,7 +4235,7 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
...
@@ -4238,7 +4235,7 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
//если нет убрать, если да - добавить
//если нет убрать, если да - добавить
if
(
border_inside_h
)
if
(
border_inside_h
)
{
{
int
del_border
=
border_inside_h
->
find
(
L"none"
);
int
del_border
=
(
int
)
border_inside_h
->
find
(
L"none"
);
if
(
row
!=
1
)
if
(
row
!=
1
)
{
{
if
(
cell_properties
->
style_table_cell_properties_attlist_
.
common_border_attlist_
.
fo_border_top_
&&
del_border
>=
0
)
if
(
cell_properties
->
style_table_cell_properties_attlist_
.
common_border_attlist_
.
fo_border_top_
&&
del_border
>=
0
)
...
@@ -4258,7 +4255,7 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
...
@@ -4258,7 +4255,7 @@ bool DocxConverter::convert(OOX::Logic::CTableCellProperties *oox_table_cell_pr,
}
}
if
(
border_inside_v
)
if
(
border_inside_v
)
{
{
int
del_border
=
border_inside_v
->
find
(
L"none"
);
int
del_border
=
(
int
)
border_inside_v
->
find
(
L"none"
);
if
(
col
!=
1
)
if
(
col
!=
1
)
{
{
if
(
cell_properties
->
style_table_cell_properties_attlist_
.
common_border_attlist_
.
fo_border_left_
&&
del_border
>=
0
)
if
(
cell_properties
->
style_table_cell_properties_attlist_
.
common_border_attlist_
.
fo_border_left_
&&
del_border
>=
0
)
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.h
View file @
925bca71
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "Converter.h"
#include "Converter.h"
#include <boost/foreach.hpp>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/CPOptional.h>
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
925bca71
...
@@ -52,8 +52,6 @@
...
@@ -52,8 +52,6 @@
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Transitions/SplitTransition.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Transitions/SplitTransition.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Transitions/ZoomTransition.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Transitions/ZoomTransition.h"
#include <boost/lexical_cast.hpp>
#include "../OdfFormat/odp_conversion_context.h"
#include "../OdfFormat/odp_conversion_context.h"
#include "../OdfFormat/odf_text_context.h"
#include "../OdfFormat/odf_text_context.h"
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
View file @
925bca71
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "Converter.h"
#include "Converter.h"
#include <boost/foreach.hpp>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/CPOptional.h>
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.cpp
View file @
925bca71
...
@@ -166,7 +166,7 @@ void XlsxConverter::convert_sheets()
...
@@ -166,7 +166,7 @@ void XlsxConverter::convert_sheets()
if
(
Workbook
->
m_oBookViews
.
IsInit
())
if
(
Workbook
->
m_oBookViews
.
IsInit
())
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
Workbook
->
m_oBookViews
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
Workbook
->
m_oBookViews
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
Workbook
->
m_oBookViews
->
m_arrItems
[
i
]);
convert
(
Workbook
->
m_oBookViews
->
m_arrItems
[
i
]);
}
}
...
@@ -198,7 +198,7 @@ void XlsxConverter::convert_sheets()
...
@@ -198,7 +198,7 @@ void XlsxConverter::convert_sheets()
}
}
if
(
Workbook
->
m_oDefinedNames
.
IsInit
())
if
(
Workbook
->
m_oDefinedNames
.
IsInit
())
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
Workbook
->
m_oDefinedNames
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
Workbook
->
m_oDefinedNames
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
Workbook
->
m_oDefinedNames
->
m_arrItems
[
i
]);
convert
(
Workbook
->
m_oDefinedNames
->
m_arrItems
[
i
]);
}
}
...
@@ -243,7 +243,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -243,7 +243,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Предобработка
//Предобработка
//гиперлинки
//гиперлинки
for
(
unsigned
in
t
hyp
=
0
;
oox_sheet
->
m_oHyperlinks
.
IsInit
()
&&
hyp
<
oox_sheet
->
m_oHyperlinks
->
m_arrItems
.
size
();
hyp
++
)
for
(
size_
t
hyp
=
0
;
oox_sheet
->
m_oHyperlinks
.
IsInit
()
&&
hyp
<
oox_sheet
->
m_oHyperlinks
->
m_arrItems
.
size
();
hyp
++
)
{
{
convert
(
oox_sheet
->
m_oHyperlinks
->
m_arrItems
[
hyp
],
oox_sheet
);
convert
(
oox_sheet
->
m_oHyperlinks
->
m_arrItems
[
hyp
],
oox_sheet
);
}
}
...
@@ -258,7 +258,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -258,7 +258,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//колонки
//колонки
ods_context
->
start_columns
();
ods_context
->
start_columns
();
for
(
unsigned
in
t
col
=
0
;
oox_sheet
->
m_oCols
.
IsInit
()
&&
col
<
oox_sheet
->
m_oCols
->
m_arrItems
.
size
();
col
++
)
for
(
size_
t
col
=
0
;
oox_sheet
->
m_oCols
.
IsInit
()
&&
col
<
oox_sheet
->
m_oCols
->
m_arrItems
.
size
();
col
++
)
{
{
convert
(
oox_sheet
->
m_oCols
->
m_arrItems
[
col
]);
convert
(
oox_sheet
->
m_oCols
->
m_arrItems
[
col
]);
}
}
...
@@ -268,7 +268,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -268,7 +268,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
if
(
oox_sheet
->
m_oSheetData
.
IsInit
()
)
if
(
oox_sheet
->
m_oSheetData
.
IsInit
()
)
{
{
ods_context
->
start_rows
();
ods_context
->
start_rows
();
for
(
unsigned
in
t
row
=
0
;
row
<
oox_sheet
->
m_oSheetData
->
m_arrItems
.
size
();
row
++
)
for
(
size_
t
row
=
0
;
row
<
oox_sheet
->
m_oSheetData
->
m_arrItems
.
size
();
row
++
)
{
{
convert
(
oox_sheet
->
m_oSheetData
->
m_arrItems
[
row
]);
convert
(
oox_sheet
->
m_oSheetData
->
m_arrItems
[
row
]);
...
@@ -281,7 +281,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -281,7 +281,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
}
}
//мержи
//мержи
for
(
unsigned
in
t
mrg
=
0
;
oox_sheet
->
m_oMergeCells
.
IsInit
()
&&
mrg
<
oox_sheet
->
m_oMergeCells
->
m_arrItems
.
size
();
mrg
++
)
for
(
size_
t
mrg
=
0
;
oox_sheet
->
m_oMergeCells
.
IsInit
()
&&
mrg
<
oox_sheet
->
m_oMergeCells
->
m_arrItems
.
size
();
mrg
++
)
{
{
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
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
get
());
ods_context
->
add_merge_cells
(
oox_sheet
->
m_oMergeCells
->
m_arrItems
[
mrg
]
->
m_oRef
.
get
());
...
@@ -306,7 +306,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -306,7 +306,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
if
(
oox_sheet
->
m_arrConditionalFormatting
.
size
()
>
0
)
if
(
oox_sheet
->
m_arrConditionalFormatting
.
size
()
>
0
)
{
{
ods_context
->
start_conditional_formats
();
ods_context
->
start_conditional_formats
();
for
(
unsigned
in
t
fmt
=
0
;
fmt
<
oox_sheet
->
m_arrConditionalFormatting
.
size
();
fmt
++
)
for
(
size_
t
fmt
=
0
;
fmt
<
oox_sheet
->
m_arrConditionalFormatting
.
size
();
fmt
++
)
{
{
convert
(
oox_sheet
->
m_arrConditionalFormatting
[
fmt
]);
convert
(
oox_sheet
->
m_arrConditionalFormatting
[
fmt
]);
}
}
...
@@ -315,7 +315,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
...
@@ -315,7 +315,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CWorksheet *oox_sheet)
//выносные части таблицы
//выносные части таблицы
if
(
oox_sheet
->
m_oTableParts
.
IsInit
())
if
(
oox_sheet
->
m_oTableParts
.
IsInit
())
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
oox_sheet
->
m_oTableParts
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_sheet
->
m_oTableParts
->
m_arrItems
.
size
();
i
++
)
{
{
OOX
::
Spreadsheet
::
CTablePart
*
oox_table_part
=
oox_sheet
->
m_oTableParts
->
m_arrItems
[
i
];
OOX
::
Spreadsheet
::
CTablePart
*
oox_table_part
=
oox_sheet
->
m_oTableParts
->
m_arrItems
[
i
];
if
(
!
oox_table_part
)
continue
;
if
(
!
oox_table_part
)
continue
;
...
@@ -421,7 +421,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCommentItem * oox_comment)
...
@@ -421,7 +421,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCommentItem * oox_comment)
if
(
oox_comment
->
m_oText
.
IsInit
())
if
(
oox_comment
->
m_oText
.
IsInit
())
{
{
for
(
unsigned
in
t
i
=
0
;
i
<
oox_comment
->
m_oText
->
m_arrItems
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oox_comment
->
m_oText
->
m_arrItems
.
size
();
++
i
)
{
{
convert
(
oox_comment
->
m_oText
->
m_arrItems
[
i
]);
convert
(
oox_comment
->
m_oText
->
m_arrItems
[
i
]);
}
}
...
@@ -501,7 +501,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CRow *oox_row)
...
@@ -501,7 +501,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CRow *oox_row)
}
else
}
else
ods_context
->
current_table
().
set_row_optimal_height
(
true
);
ods_context
->
current_table
().
set_row_optimal_height
(
true
);
for
(
unsigned
in
t
cell
=
0
;
cell
<
oox_row
->
m_arrItems
.
size
();
cell
++
)
for
(
size_
t
cell
=
0
;
cell
<
oox_row
->
m_arrItems
.
size
();
cell
++
)
{
{
convert
(
oox_row
->
m_arrItems
[
cell
]);
convert
(
oox_row
->
m_arrItems
[
cell
]);
}
}
...
@@ -626,7 +626,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CRun *oox_text_run)
...
@@ -626,7 +626,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CRun *oox_text_run)
convert
(
oox_text_run
->
m_oRPr
.
GetPointer
());
convert
(
oox_text_run
->
m_oRPr
.
GetPointer
());
ods_context
->
text_context
()
->
start_span
(
oox_text_run
->
m_oRPr
.
GetPointer
()
?
true
:
false
);
ods_context
->
text_context
()
->
start_span
(
oox_text_run
->
m_oRPr
.
GetPointer
()
?
true
:
false
);
for
(
unsigned
in
t
i
=
0
;
i
<
oox_text_run
->
m_arrItems
.
size
();
++
i
)
for
(
size_
t
i
=
0
;
i
<
oox_text_run
->
m_arrItems
.
size
();
++
i
)
{
{
convert
(
oox_text_run
->
m_arrItems
[
i
]);
convert
(
oox_text_run
->
m_arrItems
[
i
]);
}
}
...
@@ -965,8 +965,8 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
...
@@ -965,8 +965,8 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
if
(
ActiveCellX
>=
0
&&
ActiveCellY
>=
0
)
if
(
ActiveCellX
>=
0
&&
ActiveCellY
>=
0
)
{
{
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionX"
,
L"int"
,
boost
::
lexical_cast
<
std
::
wstring
>
(
ActiveCellX
));
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionX"
,
L"int"
,
std
::
to_wstring
(
ActiveCellX
));
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionY"
,
L"int"
,
boost
::
lexical_cast
<
std
::
wstring
>
(
ActiveCellY
));
ods_context
->
settings_context
()
->
add_property
(
L"CursorPositionY"
,
L"int"
,
std
::
to_wstring
(
ActiveCellY
));
}
}
}
}
if
(
selection
->
m_oSqref
.
IsInit
())
if
(
selection
->
m_oSqref
.
IsInit
())
...
@@ -981,7 +981,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
...
@@ -981,7 +981,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
if
(
sheet_view
->
m_oPane
->
m_oXSplit
.
IsInit
())
if
(
sheet_view
->
m_oPane
->
m_oXSplit
.
IsInit
())
{
{
std
::
wstring
sVal
=
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
sheet_view
->
m_oPane
->
m_oXSplit
->
GetValue
());
std
::
wstring
sVal
=
std
::
to_wstring
((
int
)
sheet_view
->
m_oPane
->
m_oXSplit
->
GetValue
());
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitMode"
,
L"short"
,
L"2"
);
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitMode"
,
L"short"
,
L"2"
);
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitPosition"
,
L"int"
,
sVal
);
ods_context
->
settings_context
()
->
add_property
(
L"HorizontalSplitPosition"
,
L"int"
,
sVal
);
...
@@ -991,7 +991,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
...
@@ -991,7 +991,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CSheetViews *oox_sheet_views)
}
}
if
(
sheet_view
->
m_oPane
->
m_oYSplit
.
IsInit
())
if
(
sheet_view
->
m_oPane
->
m_oYSplit
.
IsInit
())
{
{
std
::
wstring
sVal
=
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
sheet_view
->
m_oPane
->
m_oYSplit
->
GetValue
());
std
::
wstring
sVal
=
std
::
to_wstring
((
int
)
sheet_view
->
m_oPane
->
m_oYSplit
->
GetValue
());
ods_context
->
settings_context
()
->
add_property
(
L"VerticalSplitMode"
,
L"short"
,
L"2"
);
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"VerticalSplitPosition"
,
L"int"
,
sVal
);
ods_context
->
settings_context
()
->
add_property
(
L"PositionTop"
,
L"int"
,
L"0"
);
ods_context
->
settings_context
()
->
add_property
(
L"PositionTop"
,
L"int"
,
L"0"
);
...
@@ -1198,31 +1198,31 @@ void XlsxConverter::convert_styles()
...
@@ -1198,31 +1198,31 @@ void XlsxConverter::convert_styles()
if
(
!
xlsx_styles
)
return
;
if
(
!
xlsx_styles
)
return
;
//todooo ?? стоит ли обращать на параметр Count ??
//todooo ?? стоит ли обращать на параметр Count ??
////////////форматы данных
////////////форматы данных
for
(
unsigned
in
t
i
=
0
;
xlsx_styles
->
m_oNumFmts
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oNumFmts
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
xlsx_styles
->
m_oNumFmts
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oNumFmts
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
xlsx_styles
->
m_oNumFmts
->
m_arrItems
[
i
]);
convert
(
xlsx_styles
->
m_oNumFmts
->
m_arrItems
[
i
]);
}
}
/////////////стили ячеек
/////////////стили ячеек
for
(
unsigned
in
t
i
=
0
;
xlsx_styles
->
m_oCellStyleXfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellStyleXfs
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
xlsx_styles
->
m_oCellStyleXfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellStyleXfs
->
m_arrItems
.
size
();
i
++
)
{
{
//automatical, root - noname - они тока для named
//automatical, root - noname - они тока для named
convert
(
xlsx_styles
->
m_oCellStyleXfs
->
m_arrItems
[
i
]
,
i
,
true
,
true
);
convert
(
xlsx_styles
->
m_oCellStyleXfs
->
m_arrItems
[
i
]
,
i
,
true
,
true
);
}
}
for
(
unsigned
in
t
i
=
0
;
xlsx_styles
->
m_oCellStyles
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellStyles
->
m_arrItems
.
size
();
i
++
)
//styles.xml
for
(
size_
t
i
=
0
;
xlsx_styles
->
m_oCellStyles
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellStyles
->
m_arrItems
.
size
();
i
++
)
//styles.xml
{
{
//non automatical, root - named
//non automatical, root - named
convert
(
xlsx_styles
->
m_oCellStyles
->
m_arrItems
[
i
]);
convert
(
xlsx_styles
->
m_oCellStyles
->
m_arrItems
[
i
]);
}
}
//кастомные стили ячеек
//кастомные стили ячеек
for
(
unsigned
in
t
i
=
0
;
xlsx_styles
->
m_oCellXfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellXfs
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
xlsx_styles
->
m_oCellXfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oCellXfs
->
m_arrItems
.
size
();
i
++
)
{
{
//automatical, non root
//automatical, non root
convert
(
xlsx_styles
->
m_oCellXfs
->
m_arrItems
[
i
],
i
,
true
,
false
);
convert
(
xlsx_styles
->
m_oCellXfs
->
m_arrItems
[
i
],
i
,
true
,
false
);
}
}
////////////стили условного форматирования
////////////стили условного форматирования
for
(
unsigned
in
t
i
=
0
;
xlsx_styles
->
m_oDxfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oDxfs
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
xlsx_styles
->
m_oDxfs
.
IsInit
()
&&
i
<
xlsx_styles
->
m_oDxfs
->
m_arrItems
.
size
();
i
++
)
{
{
convert
(
xlsx_styles
->
m_oDxfs
->
m_arrItems
[
i
],
i
);
convert
(
xlsx_styles
->
m_oDxfs
->
m_arrItems
[
i
],
i
);
}
}
...
@@ -1338,10 +1338,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CFill * fill, odf_writer::style_ta
...
@@ -1338,10 +1338,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CFill * fill, odf_writer::style_ta
{
{
}
}
if
(
fill
->
m_oPatternFill
.
IsInit
())
if
(
fill
->
m_oPatternFill
.
IsInit
())
{
//solid, gradient
{
//solid, gradient, none
if
(
fill
->
m_oPatternFill
->
m_oPatternType
.
IsInit
())
{}
if
(
fill
->
m_oPatternFill
->
m_oFgColor
.
IsInit
())
if
(
fill
->
m_oPatternFill
->
m_oFgColor
.
IsInit
())
{
{
convert
(
fill
->
m_oPatternFill
->
m_oFgColor
.
GetPointer
(),
convert
(
fill
->
m_oPatternFill
->
m_oFgColor
.
GetPointer
(),
...
@@ -1352,6 +1349,36 @@ void XlsxConverter::convert(OOX::Spreadsheet::CFill * fill, odf_writer::style_ta
...
@@ -1352,6 +1349,36 @@ void XlsxConverter::convert(OOX::Spreadsheet::CFill * fill, odf_writer::style_ta
convert
(
fill
->
m_oPatternFill
->
m_oBgColor
.
GetPointer
(),
convert
(
fill
->
m_oPatternFill
->
m_oBgColor
.
GetPointer
(),
cell_properties
->
style_table_cell_properties_attlist_
.
common_background_color_attlist_
.
fo_background_color_
);
cell_properties
->
style_table_cell_properties_attlist_
.
common_background_color_attlist_
.
fo_background_color_
);
}
}
else
if
(
fill
->
m_oPatternFill
->
m_oPatternType
.
IsInit
())
{
switch
(
fill
->
m_oPatternFill
->
m_oPatternType
->
GetValue
())
{
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeNone
:
cell_properties
->
style_table_cell_properties_attlist_
.
common_background_color_attlist_
.
fo_background_color_
=
odf_types
::
background_color
::
Transparent
;
break
;
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkDown
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkGray
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkGrid
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkHorizontal
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkTrellis
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkUp
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeDarkVertical
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeGray0625
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeGray125
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightDown
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightGray
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightGrid
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightHorizontal
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightTrellis
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightUp
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeLightVertical
:
case
SimpleTypes
:
:
Spreadsheet
::
patterntypeMediumGray
:
// todooo
break
;
}
}
}
}
}
}
...
@@ -1541,7 +1568,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CBorderProp *borderProp, std::wstr
...
@@ -1541,7 +1568,12 @@ void XlsxConverter::convert(OOX::Spreadsheet::CBorderProp *borderProp, std::wstr
break
;
break
;
}
}
}
}
else
return
;
else
{
border_style
=
L"none"
;
if
(
borderProp
->
m_oColor
.
IsInit
())
return
;
}
if
(
borderProp
->
m_oColor
.
IsInit
())
if
(
borderProp
->
m_oColor
.
IsInit
())
{
{
...
@@ -1549,8 +1581,9 @@ void XlsxConverter::convert(OOX::Spreadsheet::CBorderProp *borderProp, std::wstr
...
@@ -1549,8 +1581,9 @@ void XlsxConverter::convert(OOX::Spreadsheet::CBorderProp *borderProp, std::wstr
convert
(
borderProp
->
m_oColor
.
GetPointer
(),
odf_color
);
convert
(
borderProp
->
m_oColor
.
GetPointer
(),
odf_color
);
if
(
odf_color
)
if
(
odf_color
)
border_color
=
L" #"
+
odf_color
->
get_hex_value
();
border_color
=
L" #"
+
odf_color
->
get_hex_value
();
if
(
border_color
.
empty
())
border_color
=
L" #000000"
;
}
}
if
(
border_color
.
length
()
<
1
)
border_color
=
L" #000000"
;
odf_border_prop
=
border_style
+
border_color
;
odf_border_prop
=
border_style
+
border_color
;
}
}
...
@@ -1800,14 +1833,26 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCellAnchor *oox_anchor)
...
@@ -1800,14 +1833,26 @@ void XlsxConverter::convert(OOX::Spreadsheet::CCellAnchor *oox_anchor)
}
}
//////////////
//////////////
odf_context
()
->
drawing_context
()
->
start_drawing
();
if
(
oox_anchor
->
m_oPos
.
IsInit
())
if
(
oox_anchor
->
m_oPos
.
IsInit
())
{
{
_CP_OPT
(
double
)
x
,
y
;
if
(
oox_anchor
->
m_oPos
->
m_oX
.
IsInit
())
x
=
oox_anchor
->
m_oPos
->
m_oX
->
GetValue
();
if
(
oox_anchor
->
m_oPos
->
m_oY
.
IsInit
())
y
=
oox_anchor
->
m_oPos
->
m_oY
->
GetValue
();
odf_context
()
->
drawing_context
()
->
set_position
(
x
,
y
);
}
}
if
(
oox_anchor
->
m_oExt
.
IsInit
())
if
(
oox_anchor
->
m_oExt
.
IsInit
())
{
{
_CP_OPT
(
double
)
width
,
height
;
if
(
oox_anchor
->
m_oExt
->
m_oCx
.
IsInit
())
width
=
oox_anchor
->
m_oExt
->
m_oCx
->
GetValue
();
if
(
oox_anchor
->
m_oExt
->
m_oCy
.
IsInit
())
height
=
oox_anchor
->
m_oExt
->
m_oCy
->
GetValue
();
odf_context
()
->
drawing_context
()
->
set_size
(
width
,
height
);
}
}
odf_context
()
->
drawing_context
()
->
start_drawing
();
OoxConverter
::
convert
(
oox_anchor
->
m_oElement
.
GetPointer
());
OoxConverter
::
convert
(
oox_anchor
->
m_oElement
.
GetPointer
());
odf_context
()
->
drawing_context
()
->
end_drawing
();
odf_context
()
->
drawing_context
()
->
end_drawing
();
}
}
...
@@ -1819,7 +1864,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CDrawing *oox_drawing)
...
@@ -1819,7 +1864,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CDrawing *oox_drawing)
OOX
::
IFileContainer
*
old_container
=
xlsx_current_container
;
OOX
::
IFileContainer
*
old_container
=
xlsx_current_container
;
xlsx_current_container
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
oox_drawing
);
xlsx_current_container
=
dynamic_cast
<
OOX
::
IFileContainer
*>
(
oox_drawing
);
for
(
unsigned
in
t
dr
=
0
;
dr
<
oox_drawing
->
m_arrItems
.
size
();
dr
++
)
for
(
size_
t
dr
=
0
;
dr
<
oox_drawing
->
m_arrItems
.
size
();
dr
++
)
{
{
ods_context
->
start_drawings
();
ods_context
->
start_drawings
();
convert
(
oox_drawing
->
m_arrItems
[
dr
]);
convert
(
oox_drawing
->
m_arrItems
[
dr
]);
...
@@ -1848,7 +1893,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormatting *oox_cond_f
...
@@ -1848,7 +1893,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormatting *oox_cond_f
{
{
ods_context
->
current_table
().
start_conditional_format
(
oox_cond_fmt
->
m_oSqRef
.
get
());
ods_context
->
current_table
().
start_conditional_format
(
oox_cond_fmt
->
m_oSqRef
.
get
());
for
(
unsigned
in
t
i
=
0
;
i
<
oox_cond_fmt
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_cond_fmt
->
m_arrItems
.
size
();
i
++
)
convert
(
oox_cond_fmt
->
m_arrItems
[
i
]);
//rule
convert
(
oox_cond_fmt
->
m_arrItems
[
i
]);
//rule
ods_context
->
current_table
().
end_conditional_format
();
ods_context
->
current_table
().
end_conditional_format
();
...
@@ -1871,7 +1916,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormattingRule *oox_co
...
@@ -1871,7 +1916,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CConditionalFormattingRule *oox_co
if
(
oox_cond_rule
->
m_oOperator
.
IsInit
())
if
(
oox_cond_rule
->
m_oOperator
.
IsInit
())
ods_context
->
current_table
().
set_conditional_operator
(
oox_cond_rule
->
m_oOperator
->
GetValue
());
ods_context
->
current_table
().
set_conditional_operator
(
oox_cond_rule
->
m_oOperator
->
GetValue
());
for
(
unsigned
in
t
i
=
0
;
i
<
oox_cond_rule
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_cond_rule
->
m_arrItems
.
size
();
i
++
)
convert
(
oox_cond_rule
->
m_arrItems
[
i
]);
convert
(
oox_cond_rule
->
m_arrItems
[
i
]);
}
}
ods_context
->
current_table
().
end_conditional_rule
();
ods_context
->
current_table
().
end_conditional_rule
();
...
@@ -1888,14 +1933,14 @@ void XlsxConverter::convert(OOX::Spreadsheet::CDataBar *oox_cond_databar)
...
@@ -1888,14 +1933,14 @@ void XlsxConverter::convert(OOX::Spreadsheet::CDataBar *oox_cond_databar)
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_cond_databar
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_cond_databar
->
m_arrItems
.
size
();
i
++
)
convert
(
oox_cond_databar
->
m_arrItems
[
i
]);
convert
(
oox_cond_databar
->
m_arrItems
[
i
]);
}
}
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CColorScale
*
oox_cond_colorscale
)
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CColorScale
*
oox_cond_colorscale
)
{
{
if
(
!
oox_cond_colorscale
)
return
;
if
(
!
oox_cond_colorscale
)
return
;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_cond_colorscale
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_cond_colorscale
->
m_arrItems
.
size
();
i
++
)
{
{
if
(
!
oox_cond_colorscale
->
m_arrItems
[
i
])
continue
;
if
(
!
oox_cond_colorscale
->
m_arrItems
[
i
])
continue
;
...
@@ -1921,7 +1966,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CIconSet *oox_cond_iconset)
...
@@ -1921,7 +1966,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CIconSet *oox_cond_iconset)
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMaxLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
//nullable<SimpleTypes::CUnsignedDecimalNumber<>> m_oMinLength;
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
//nullable<SimpleTypes::COnOff<>> m_oShowValue;
for
(
unsigned
in
t
i
=
0
;
i
<
oox_cond_iconset
->
m_arrItems
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
oox_cond_iconset
->
m_arrItems
.
size
();
i
++
)
convert
(
oox_cond_iconset
->
m_arrItems
[
i
]);
convert
(
oox_cond_iconset
->
m_arrItems
[
i
]);
}
}
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CConditionalFormatValueObject
*
oox_cond_value
)
void
XlsxConverter
::
convert
(
OOX
::
Spreadsheet
::
CConditionalFormatValueObject
*
oox_cond_value
)
...
@@ -1970,7 +2015,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CAutofilter *oox_filter)
...
@@ -1970,7 +2015,7 @@ void XlsxConverter::convert(OOX::Spreadsheet::CAutofilter *oox_filter)
}
}
ods_context
->
add_autofilter
(
ref
);
//target
ods_context
->
add_autofilter
(
ref
);
//target
//for (
unsigned in
t i=0; i < oox_filter->m_arrItems.size(); i++)//set items todooo
//for (
size_
t i=0; i < oox_filter->m_arrItems.size(); i++)//set items todooo
//{
//{
//}
//}
}
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/XlsxConverter.h
View file @
925bca71
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#pragma once
#pragma once
#include "Converter.h"
#include "Converter.h"
#include <boost/foreach.hpp>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPSharedPtr.h>
#include <cpdoccore/CPOptional.h>
#include <cpdoccore/CPOptional.h>
...
...
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