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
af0bf700
Commit
af0bf700
authored
Apr 12, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatReader - правка багов по результатам тестирования
parent
ba915264
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
175 additions
and
103 deletions
+175
-103
ASCOfficeOdfFile/src/docx/docx_conversion_context.cpp
ASCOfficeOdfFile/src/docx/docx_conversion_context.cpp
+7
-4
ASCOfficeOdfFile/src/docx/docx_table_context.cpp
ASCOfficeOdfFile/src/docx/docx_table_context.cpp
+2
-0
ASCOfficeOdfFile/src/docx/oox_chart_context.cpp
ASCOfficeOdfFile/src/docx/oox_chart_context.cpp
+12
-4
ASCOfficeOdfFile/src/docx/oox_chart_context.h
ASCOfficeOdfFile/src/docx/oox_chart_context.h
+4
-1
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
+66
-41
ASCOfficeOdfFile/src/docx/oox_chart_series.h
ASCOfficeOdfFile/src/docx/oox_chart_series.h
+6
-2
ASCOfficeOdfFile/src/docx/oox_chart_values.h
ASCOfficeOdfFile/src/docx/oox_chart_values.h
+11
-13
ASCOfficeOdfFile/src/docx/oox_types_chart.cpp
ASCOfficeOdfFile/src/docx/oox_types_chart.cpp
+10
-0
ASCOfficeOdfFile/src/docx/oox_types_chart.h
ASCOfficeOdfFile/src/docx/oox_types_chart.h
+4
-3
ASCOfficeOdfFile/src/odf/chart_build_oox.cpp
ASCOfficeOdfFile/src/odf/chart_build_oox.cpp
+16
-8
ASCOfficeOdfFile/src/odf/chart_build_oox.h
ASCOfficeOdfFile/src/odf/chart_build_oox.h
+4
-2
ASCOfficeOdfFile/src/odf/chart_objects.h
ASCOfficeOdfFile/src/odf/chart_objects.h
+20
-20
ASCOfficeOdfFile/src/odf/office_body.cpp
ASCOfficeOdfFile/src/odf/office_body.cpp
+1
-1
ASCOfficeOdfFile/src/odf/style_chart_properties.cpp
ASCOfficeOdfFile/src/odf/style_chart_properties.cpp
+7
-2
ASCOfficeOdfFile/src/odf/text_elements.cpp
ASCOfficeOdfFile/src/odf/text_elements.cpp
+5
-2
No files found.
ASCOfficeOdfFile/src/docx/docx_conversion_context.cpp
View file @
af0bf700
...
@@ -719,7 +719,8 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
...
@@ -719,7 +719,8 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
CP_XML_WRITER
(
strm
)
CP_XML_WRITER
(
strm
)
{
{
if
(
get_section_context
().
dump_
.
empty
()
==
false
&&
(
!
ParentId
.
empty
()
||
get_section_context
().
get
().
is_dump_
))
if
(
get_section_context
().
dump_
.
empty
()
==
false
&&
(
!
ParentId
.
empty
()
||
get_section_context
().
get
().
is_dump_
)
&&
!
get_table_context
().
in_table
())
{
//
{
//
CP_XML_NODE
(
L"w:pPr"
)
CP_XML_NODE
(
L"w:pPr"
)
{
{
...
@@ -733,10 +734,12 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
...
@@ -733,10 +734,12 @@ void docx_conversion_context::docx_serialize_paragraph_style(std::wostream & str
if
(
!
paragraph_style
.
str
().
empty
()
||
!
ParentId
.
empty
())
if
(
!
paragraph_style
.
str
().
empty
()
||
!
ParentId
.
empty
())
{
{
CP_XML_NODE
(
L"w:pPr"
)
CP_XML_NODE
(
L"w:pPr"
)
{
if
(
!
get_table_context
().
in_table
()
)
{
{
CP_XML_STREAM
()
<<
get_section_context
().
dump_
;
CP_XML_STREAM
()
<<
get_section_context
().
dump_
;
get_section_context
().
dump_
.
clear
();
get_section_context
().
dump_
.
clear
();
}
if
(
!
ParentId
.
empty
())
if
(
!
ParentId
.
empty
())
{
{
CP_XML_NODE
(
L"w:pStyle"
)
CP_XML_NODE
(
L"w:pStyle"
)
...
...
ASCOfficeOdfFile/src/docx/docx_table_context.cpp
View file @
af0bf700
...
@@ -30,6 +30,8 @@ void docx_table_state::start_column(unsigned int repeated, const std::wstring &
...
@@ -30,6 +30,8 @@ void docx_table_state::start_column(unsigned int repeated, const std::wstring &
std
::
wstring
docx_table_state
::
get_default_cell_style_col
(
unsigned
int
column
)
std
::
wstring
docx_table_state
::
get_default_cell_style_col
(
unsigned
int
column
)
{
{
if
(
columnsDefaultCellStyleName_
.
size
()
<=
column
)
return
L""
;
return
columnsDefaultCellStyleName_
.
at
(
column
);
return
columnsDefaultCellStyleName_
.
at
(
column
);
}
}
...
...
ASCOfficeOdfFile/src/docx/oox_chart_context.cpp
View file @
af0bf700
...
@@ -32,13 +32,12 @@ oox_chart_context_ptr oox_chart_context::create(std::wstring const & name)
...
@@ -32,13 +32,12 @@ oox_chart_context_ptr oox_chart_context::create(std::wstring const & name)
{
{
return
boost
::
make_shared
<
oox_chart_context
>
(
name
);
return
boost
::
make_shared
<
oox_chart_context
>
(
name
);
}
}
oox_chart_context
::
oox_chart_context
()
oox_chart_context
::
oox_chart_context
()
:
impl_
(
new
oox_chart_context
::
Impl
())
:
impl_
(
new
oox_chart_context
::
Impl
())
{
{
}
}
oox_chart_context
::
oox_chart_context
(
std
::
wstring
const
&
name
)
oox_chart_context
::
oox_chart_context
(
std
::
wstring
const
&
name
)
:
impl_
(
new
oox_chart_context
::
Impl
(
name
))
:
impl_
(
new
oox_chart_context
::
Impl
(
name
))
{
{
}
}
std
::
wostream
&
oox_chart_context
::
chartData
()
std
::
wostream
&
oox_chart_context
::
chartData
()
{
{
...
@@ -89,6 +88,15 @@ bool oox_chart_context::empty() const
...
@@ -89,6 +88,15 @@ bool oox_chart_context::empty() const
return
false
;
//impl_->empty();
return
false
;
//impl_->empty();
}
}
void
oox_chart_context
::
set_cache_only
(
bool
val
)
{
for
(
int
i
=
0
;
i
<
plot_area_
.
charts_
.
size
();
i
++
)
{
plot_area_
.
charts_
[
i
]
->
set_cache_only
(
val
);
}
}
}
}
}
}
...
...
ASCOfficeOdfFile/src/docx/oox_chart_context.h
View file @
af0bf700
...
@@ -30,6 +30,7 @@ public:
...
@@ -30,6 +30,7 @@ public:
bool
empty
()
const
;
bool
empty
()
const
;
void
write_to
(
std
::
wostream
&
strm
);
void
write_to
(
std
::
wostream
&
strm
);
static
oox_chart_context_ptr
create
(
std
::
wstring
const
&
name
);
static
oox_chart_context_ptr
create
(
std
::
wstring
const
&
name
);
static
oox_chart_context_ptr
create
();
static
oox_chart_context_ptr
create
();
...
@@ -83,6 +84,8 @@ public:
...
@@ -83,6 +84,8 @@ public:
plot_area_
.
properties_
=
prop
;
plot_area_
.
properties_
=
prop
;
plot_area_
.
fill_
=
fill
;
plot_area_
.
fill_
=
fill
;
}
}
void
set_cache_only
(
bool
val
);
private:
private:
class
Impl
;
class
Impl
;
_CP_SCOPED_PTR
(
Impl
)
impl_
;
_CP_SCOPED_PTR
(
Impl
)
impl_
;
...
...
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
View file @
af0bf700
...
@@ -72,6 +72,11 @@ void oox_chart_series::setFormula(int ind, std::wstring &value)
...
@@ -72,6 +72,11 @@ void oox_chart_series::setFormula(int ind, std::wstring &value)
}
}
}
}
void
oox_chart_series
::
set_cache_only
(
bool
val
)
{
bLocalTable_
=
val
;
}
void
oox_chart_series
::
parse_properties
()
void
oox_chart_series
::
parse_properties
()
{
{
_CP_OPT
(
int
)
iSymbolType
;
_CP_OPT
(
int
)
iSymbolType
;
...
@@ -100,13 +105,13 @@ void oox_chart_series::setValues(int ind, std::vector<std::wstring> & values)
...
@@ -100,13 +105,13 @@ void oox_chart_series::setValues(int ind, std::vector<std::wstring> & values)
boost
::
algorithm
::
trim
(
v
);
boost
::
algorithm
::
trim
(
v
);
if
(
ind
==
4
)
if
(
ind
==
4
)
{
{
values_
[
ind
].
strRef_
.
str_ca
sh
.
push_back
(
v
);
values_
[
ind
].
strRef_
.
str_ca
che
.
push_back
(
v
);
values_
[
ind
].
strRef_
.
str_ca
sh
_count
++
;
values_
[
ind
].
strRef_
.
str_ca
che
_count
++
;
}
}
else
else
{
{
values_
[
ind
].
numRef_
.
num_ca
sh
.
push_back
(
v
);
values_
[
ind
].
numRef_
.
num_ca
che
.
push_back
(
v
);
values_
[
ind
].
numRef_
.
num_ca
sh
_count
++
;
values_
[
ind
].
numRef_
.
num_ca
che
_count
++
;
}
}
}
}
}
}
...
@@ -136,7 +141,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
...
@@ -136,7 +141,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
{
{
CP_XML_NODE
(
values_
[
i
].
type
)
CP_XML_NODE
(
values_
[
i
].
type
)
{
{
if
(
values_
[
i
].
numRef_
.
present
)
if
(
values_
[
i
].
numRef_
.
present
&&
!
bLocalTable_
)
{
{
CP_XML_NODE
(
L"c:numRef"
)
CP_XML_NODE
(
L"c:numRef"
)
{
{
...
@@ -145,7 +150,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
...
@@ -145,7 +150,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
CP_XML_CONTENT
(
values_
[
i
].
numRef_
.
formula
);
CP_XML_CONTENT
(
values_
[
i
].
numRef_
.
formula
);
}
}
if
(
values_
[
i
].
numRef_
.
num_ca
sh
_count
>
0
)
if
(
values_
[
i
].
numRef_
.
num_ca
che
_count
>
0
)
{
{
CP_XML_NODE
(
L"c:numCache"
)
//
CP_XML_NODE
(
L"c:numCache"
)
//
{
{
...
@@ -155,10 +160,10 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
...
@@ -155,10 +160,10 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
}
}
CP_XML_NODE
(
L"c:ptCount"
)
CP_XML_NODE
(
L"c:ptCount"
)
{
{
CP_XML_ATTR
(
L"val"
,
values_
[
i
].
numRef_
.
num_ca
sh
_count
);
CP_XML_ATTR
(
L"val"
,
values_
[
i
].
numRef_
.
num_ca
che
_count
);
}
}
int
j
=
0
;
int
j
=
0
;
BOOST_FOREACH
(
std
::
wstring
&
v
,
values_
[
i
].
numRef_
.
num_ca
sh
)
BOOST_FOREACH
(
std
::
wstring
&
v
,
values_
[
i
].
numRef_
.
num_ca
che
)
{
{
CP_XML_NODE
(
L"c:pt"
)
CP_XML_NODE
(
L"c:pt"
)
{
{
...
@@ -177,39 +182,59 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
...
@@ -177,39 +182,59 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
}
}
}
}
}
}
//if (values_[i].strRef_.present)
else
if
(
values_
[
i
].
numRef_
.
num_cache_count
>
0
)
//{
{
// CP_XML_NODE(L"c:strRef")
CP_XML_NODE
(
L"c:numLit"
)
// {
{
// CP_XML_NODE(L"c:f")
CP_XML_NODE
(
L"c:formatCode"
)
// {
{
// CP_XML_CONTENT(values_[i].strRef_.formula);
CP_XML_CONTENT
(
L"General"
);
//????
// }
}
//
CP_XML_NODE
(
L"c:ptCount"
)
// if (values_[i].strRef_.str_cash_count>0)
{
// {
CP_XML_ATTR
(
L"val"
,
values_
[
i
].
numRef_
.
num_cache_count
);
// CP_XML_NODE(L"c:strCache")//
}
// {
int
j
=
0
;
// CP_XML_NODE(L"c:ptCount")
BOOST_FOREACH
(
std
::
wstring
&
v
,
values_
[
i
].
numRef_
.
num_cache
)
// {
{
// CP_XML_ATTR(L"val", values_[i].strRef_.str_cash_count);
if
(
v
==
L"NaN"
)
continue
;
// }
CP_XML_NODE
(
L"c:pt"
)
// int j=0;
{
// BOOST_FOREACH(std::wstring & v, values_[i].strRef_.str_cash)
CP_XML_ATTR
(
L"idx"
,
j
++
);
// {
double
val
=
0
;
// CP_XML_NODE(L"c:pt")
// {
try
{
val
=
boost
::
lexical_cast
<
double
>
(
v
);}
// CP_XML_ATTR(L"idx", j++);
catch
(...){}
// CP_XML_NODE(L"c:v")
CP_XML_NODE
(
L"c:v"
)
// {
{
// CP_XML_CONTENT(v);
CP_XML_CONTENT
(
val
);
// }
}
// }
}
// }
}
// }
}
// }
}
// }
else
if
(
values_
[
i
].
strRef_
.
str_cache_count
>
0
)
//}
{
CP_XML_NODE
(
L"c:strLit"
)
{
CP_XML_NODE
(
L"c:ptCount"
)
{
CP_XML_ATTR
(
L"val"
,
values_
[
i
].
strRef_
.
str_cache_count
);
}
int
j
=
0
;
BOOST_FOREACH
(
std
::
wstring
&
v
,
values_
[
i
].
strRef_
.
str_cache
)
{
CP_XML_NODE
(
L"c:pt"
)
{
CP_XML_ATTR
(
L"idx"
,
j
++
);
CP_XML_NODE
(
L"c:v"
)
{
CP_XML_CONTENT
(
v
);
}
}
}
}
}
}
}
}
}
}
}
...
...
ASCOfficeOdfFile/src/docx/oox_chart_series.h
View file @
af0bf700
...
@@ -24,7 +24,8 @@ public:
...
@@ -24,7 +24,8 @@ public:
values_
[
3
].
type
=
L"c:bubbleSize"
;
// !!!!
values_
[
3
].
type
=
L"c:bubbleSize"
;
// !!!!
values_
[
4
].
type
=
L"c:cat"
;
//
values_
[
4
].
type
=
L"c:cat"
;
//
iSymbolMarkerType_
=
0
;
iSymbolMarkerType_
=
0
;
bLocalTable_
=
false
;
}
}
~
oox_chart_series
(){}
~
oox_chart_series
(){}
...
@@ -43,7 +44,10 @@ public:
...
@@ -43,7 +44,10 @@ public:
void
setValues
(
int
ind
,
std
::
vector
<
std
::
wstring
>
&
values
);
void
setValues
(
int
ind
,
std
::
vector
<
std
::
wstring
>
&
values
);
void
parse_properties
();
void
parse_properties
();
void
set_cache_only
(
bool
val
);
int
iSymbolMarkerType_
;
int
iSymbolMarkerType_
;
bool
bLocalTable_
;
odf_reader
::
chart
::
series
content_
;
odf_reader
::
chart
::
series
content_
;
...
...
ASCOfficeOdfFile/src/docx/oox_chart_values.h
View file @
af0bf700
...
@@ -32,8 +32,8 @@ struct _oox_strRef
...
@@ -32,8 +32,8 @@ struct _oox_strRef
bool
present
;
bool
present
;
std
::
wstring
formula
;
std
::
wstring
formula
;
int
str_cash
_count
;
int
str_cache
_count
;
std
::
vector
<
std
::
wstring
>
str_cash
;
std
::
vector
<
std
::
wstring
>
str_cache
;
};
};
struct
_oox_numRef
struct
_oox_numRef
...
@@ -42,8 +42,8 @@ struct _oox_numRef
...
@@ -42,8 +42,8 @@ struct _oox_numRef
std
::
wstring
formula
;
std
::
wstring
formula
;
std
::
wstring
formatCode
;
std
::
wstring
formatCode
;
int
num_cash
_count
;
int
num_cache
_count
;
std
::
vector
<
std
::
wstring
>
num_cash
;
std
::
vector
<
std
::
wstring
>
num_cache
;
};
};
//extLst (Chart Extensibility) 21.2.2.64
//extLst (Chart Extensibility) 21.2.2.64
...
@@ -55,13 +55,12 @@ struct _oox_chart_values
...
@@ -55,13 +55,12 @@ struct _oox_chart_values
public:
public:
_oox_chart_values
()
_oox_chart_values
()
{
{
numLit_
.
present
=
false
;
numRef_
.
present
=
false
;
numRef_
.
present
=
false
;
numRef_
.
formatCode
=
L"General"
;
numRef_
.
formatCode
=
L"General"
;
numRef_
.
num_ca
sh
_count
=
0
;
numRef_
.
num_ca
che
_count
=
0
;
strRef_
.
present
=
false
;
strRef_
.
present
=
false
;
strRef_
.
str_ca
sh
_count
=
0
;
strRef_
.
str_ca
che
_count
=
0
;
present
=
false
;
present
=
false
;
}
}
...
@@ -69,7 +68,6 @@ public:
...
@@ -69,7 +68,6 @@ public:
bool
present
;
bool
present
;
std
::
wstring
type
;
std
::
wstring
type
;
_oox_numLit
numLit_
;
_oox_numRef
numRef_
;
_oox_numRef
numRef_
;
_oox_strRef
strRef_
;
_oox_strRef
strRef_
;
...
...
ASCOfficeOdfFile/src/docx/oox_types_chart.cpp
View file @
af0bf700
...
@@ -10,10 +10,20 @@
...
@@ -10,10 +10,20 @@
namespace
cpdoccore
{
namespace
cpdoccore
{
namespace
oox
{
namespace
oox
{
void
oox_chart
::
set_cache_only
(
bool
val
)
{
for
(
int
i
=
0
;
i
<
series_
.
size
();
i
++
)
{
series_
[
i
]
->
set_cache_only
(
val
);
}
}
void
oox_chart
::
set_formula_series
(
int
ind
,
std
::
wstring
val
)
void
oox_chart
::
set_formula_series
(
int
ind
,
std
::
wstring
val
)
{
{
oox_series_ptr
&
current_ptr
=
series_
.
back
();
oox_series_ptr
&
current_ptr
=
series_
.
back
();
current_ptr
->
setFormula
(
ind
,
val
);
current_ptr
->
setFormula
(
ind
,
val
);
}
}
void
oox_chart
::
set_name
(
std
::
wstring
val
)
void
oox_chart
::
set_name
(
std
::
wstring
val
)
{
{
...
...
ASCOfficeOdfFile/src/docx/oox_types_chart.h
View file @
af0bf700
...
@@ -33,9 +33,10 @@ public:
...
@@ -33,9 +33,10 @@ public:
virtual
void
add_series
(
int
id
){}
virtual
void
add_series
(
int
id
){}
void
set_formula_series
(
int
ind
,
std
::
wstring
val
);
void
set_cache_only
(
bool
val
);
void
set_values_series
(
int
ind
,
std
::
vector
<
std
::
wstring
>
&
val
);
void
set_formula_series
(
int
ind
,
std
::
wstring
val
);
void
set_name
(
std
::
wstring
val
);
void
set_values_series
(
int
ind
,
std
::
vector
<
std
::
wstring
>
&
val
);
void
set_name
(
std
::
wstring
val
);
//void set_showBubbleSize(bool Val){data_labels_.set_showBubbleSize(Val);}
//void set_showBubbleSize(bool Val){data_labels_.set_showBubbleSize(Val);}
//void set_showCatName(bool Val){data_labels_.set_showCatName(Val);}
//void set_showCatName(bool Val){data_labels_.set_showCatName(Val);}
...
...
ASCOfficeOdfFile/src/odf/chart_build_oox.cpp
View file @
af0bf700
...
@@ -160,6 +160,8 @@ void chart_build::docx_convert(oox::docx_conversion_context & Context)
...
@@ -160,6 +160,8 @@ void chart_build::docx_convert(oox::docx_conversion_context & Context)
oox_convert
(
chart
);
oox_convert
(
chart
);
chart
.
set_cache_only
(
true
);
Context
.
end_chart
();
Context
.
end_chart
();
}
}
else
if
(
object_type_
==
2
&&
office_text_
)
else
if
(
object_type_
==
2
&&
office_text_
)
...
@@ -197,6 +199,7 @@ void chart_build::pptx_convert(oox::pptx_conversion_context & Context)
...
@@ -197,6 +199,7 @@ void chart_build::pptx_convert(oox::pptx_conversion_context & Context)
oox_convert
(
chart
);
oox_convert
(
chart
);
chart
.
set_cache_only
(
true
);
Context
.
end_chart
();
Context
.
end_chart
();
}
}
else
if
(
object_type_
==
2
&&
office_text_
)
else
if
(
object_type_
==
2
&&
office_text_
)
...
@@ -208,14 +211,14 @@ void chart_build::pptx_convert(oox::pptx_conversion_context & Context)
...
@@ -208,14 +211,14 @@ void chart_build::pptx_convert(oox::pptx_conversion_context & Context)
office_math_
->
pptx_convert
(
Context
);
office_math_
->
pptx_convert
(
Context
);
}
}
}
}
void
chart_build
::
calc_ca
sh
_series
(
std
::
wstring
adress
,
std
::
vector
<
std
::
wstring
>
&
cash
)
void
chart_build
::
calc_ca
che
_series
(
std
::
wstring
adress
,
std
::
vector
<
std
::
wstring
>
&
cash
)
{
{
formulasconvert
::
odf2oox_converter
converter
;
formulasconvert
::
odf2oox_converter
converter
;
std
::
wstring
ref_1
,
ref_2
,
table
;
std
::
wstring
ref_1
,
ref_2
,
table
;
size_t
col_1
=
0
,
row_1
=
0
,
col_2
=
0
,
row_2
=
0
;
size_t
col_1
=
0
,
row_1
=
0
,
col_2
=
0
,
row_2
=
0
;
if
(
!
converter
.
find_first_last_ref
(
adress
,
table
,
ref_1
,
ref_2
))
return
;
if
(
!
converter
.
find_first_last_ref
(
adress
,
table
,
ref_1
,
ref_2
))
return
;
//if ((res = table.find(L"local-table"))<0)return;
//if ((res = table.find(L"local-table"))<0)return;
oox
::
getCellAddressInv
(
ref_1
,
col_1
,
row_1
);
oox
::
getCellAddressInv
(
ref_1
,
col_1
,
row_1
);
...
@@ -275,13 +278,13 @@ void chart_build::oox_convert(oox::oox_chart_context & chart)
...
@@ -275,13 +278,13 @@ void chart_build::oox_convert(oox::oox_chart_context & chart)
// - = todooo
// - = todooo
std
::
vector
<
std
::
wstring
>
cell_cash
;
std
::
vector
<
std
::
wstring
>
cell_cash
;
calc_ca
sh
_series
(
s
.
cell_range_address_
,
cell_cash
);
calc_ca
che
_series
(
s
.
cell_range_address_
,
cell_cash
);
if
(
domain_cell_range_adress_
.
length
()
>
0
)
if
(
domain_cell_range_adress_
.
length
()
>
0
)
{
{
std
::
vector
<
std
::
wstring
>
domain_cash
;
std
::
vector
<
std
::
wstring
>
domain_cash
;
calc_ca
sh
_series
(
domain_cell_range_adress_
,
domain_cash
);
calc_ca
che
_series
(
domain_cell_range_adress_
,
domain_cash
);
if
(
last_set_type
==
chart_bubble
)
if
(
last_set_type
==
chart_bubble
)
{
{
...
@@ -309,7 +312,7 @@ void chart_build::oox_convert(oox::oox_chart_context & chart)
...
@@ -309,7 +312,7 @@ void chart_build::oox_convert(oox::oox_chart_context & chart)
if
(
categories_
.
size
()
>
0
)
//
if
(
categories_
.
size
()
>
0
)
//
{
{
std
::
vector
<
std
::
wstring
>
cat_cash
;
std
::
vector
<
std
::
wstring
>
cat_cash
;
calc_ca
sh
_series
(
categories_
[
0
],
cat_cash
);
calc_ca
che
_series
(
categories_
[
0
],
cat_cash
);
current
->
set_formula_series
(
4
,
categories_
[
0
]);
current
->
set_formula_series
(
4
,
categories_
[
0
]);
current
->
set_values_series
(
4
,
cat_cash
);
current
->
set_values_series
(
4
,
cat_cash
);
...
@@ -429,6 +432,11 @@ void process_build_chart::visit(const office_document_content& val)
...
@@ -429,6 +432,11 @@ void process_build_chart::visit(const office_document_content& val)
if
(
val
.
office_body_
)
if
(
val
.
office_body_
)
val
.
office_body_
->
accept
(
*
this
);
val
.
office_body_
->
accept
(
*
this
);
}
}
void
process_build_chart
::
visit
(
office_document_content
&
val
)
{
if
(
val
.
office_body_
)
val
.
office_body_
->
accept
(
*
this
);
}
void
process_build_chart
::
visit
(
office_body
&
val
)
void
process_build_chart
::
visit
(
office_body
&
val
)
{
{
if
(
val
.
content_
)
if
(
val
.
content_
)
...
...
ASCOfficeOdfFile/src/odf/chart_build_oox.h
View file @
af0bf700
...
@@ -109,7 +109,7 @@ public:
...
@@ -109,7 +109,7 @@ public:
void
add_point
(
unsigned
int
rep
,
std
::
wstring
const
&
styleName
);
void
add_point
(
unsigned
int
rep
,
std
::
wstring
const
&
styleName
);
void
calc_ca
sh
_series
(
std
::
wstring
adress
,
std
::
vector
<
std
::
wstring
>
&
cash
);
void
calc_ca
che
_series
(
std
::
wstring
adress
,
std
::
vector
<
std
::
wstring
>
&
cash
);
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
void
xlsx_convert
(
oox
::
xlsx_conversion_context
&
Context
);
void
docx_convert
(
oox
::
docx_conversion_context
&
Context
);
void
docx_convert
(
oox
::
docx_conversion_context
&
Context
);
...
@@ -174,6 +174,7 @@ public:
...
@@ -174,6 +174,7 @@ public:
class
process_build_chart
:
public
base_visitor
,
class
process_build_chart
:
public
base_visitor
,
public
const_visitor
<
office_document_content
>
,
public
const_visitor
<
office_document_content
>
,
public
visitor
<
office_document_content
>
,
public
visitor
<
office_body
>
,
public
visitor
<
office_body
>
,
public
visitor
<
office_chart
>
,
public
visitor
<
office_chart
>
,
...
@@ -246,6 +247,7 @@ private:
...
@@ -246,6 +247,7 @@ private:
public:
public:
virtual
void
visit
(
const
office_document_content
&
val
);
virtual
void
visit
(
const
office_document_content
&
val
);
virtual
void
visit
(
office_document_content
&
val
);
virtual
void
visit
(
office_body
&
val
);
virtual
void
visit
(
office_body
&
val
);
virtual
void
visit
(
office_chart
&
val
);
virtual
void
visit
(
office_chart
&
val
);
...
...
ASCOfficeOdfFile/src/odf/chart_objects.h
View file @
af0bf700
...
@@ -52,7 +52,7 @@ namespace chart {
...
@@ -52,7 +52,7 @@ namespace chart {
std
::
vector
<
_property
>
line_properties_
;
std
::
vector
<
_property
>
line_properties_
;
simple
equation_properties_
;
simple
equation_properties_
;
treadline
(){
bEquation
=
false
;
bREquation
=
false
;}
treadline
(){
bEquation
=
false
;
bREquation
=
false
;}
};
};
struct
plot_area
:
public
simple
struct
plot_area
:
public
simple
...
...
ASCOfficeOdfFile/src/odf/office_body.cpp
View file @
af0bf700
...
@@ -99,7 +99,7 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
...
@@ -99,7 +99,7 @@ void office_body::docx_convert(oox::docx_conversion_context & Context)
Context
.
get_headers_footers
().
set_enable_write
(
true
);
Context
.
get_headers_footers
().
set_enable_write
(
true
);
if
(
!
Context
.
get_section_context
().
dump_
.
empty
())
if
(
!
Context
.
get_section_context
().
dump_
.
empty
()
&&
!
Context
.
get_table_context
().
in_table
()
)
{
{
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
Context
.
get_section_context
().
dump_
.
clear
();
Context
.
get_section_context
().
dump_
.
clear
();
...
...
ASCOfficeOdfFile/src/odf/style_chart_properties.cpp
View file @
af0bf700
...
@@ -76,9 +76,14 @@ void style_chart_properties::add_attributes( const xml::attributes_wc_ptr & Attr
...
@@ -76,9 +76,14 @@ void style_chart_properties::add_attributes( const xml::attributes_wc_ptr & Attr
CP_APPLY_ATTR
(
L"chart:error-lower-limit"
,
dVal
);
if
(
dVal
)
content_
.
push_back
(
_property
(
L"error-lower-limit"
,
dVal
.
get
()));
CP_APPLY_ATTR
(
L"chart:error-lower-limit"
,
dVal
);
if
(
dVal
)
content_
.
push_back
(
_property
(
L"error-lower-limit"
,
dVal
.
get
()));
CP_APPLY_ATTR
(
L"chart:error-upper-limit"
,
dVal
);
if
(
dVal
)
content_
.
push_back
(
_property
(
L"error-upper-limit"
,
dVal
.
get
()));
CP_APPLY_ATTR
(
L"chart:error-upper-limit"
,
dVal
);
if
(
dVal
)
content_
.
push_back
(
_property
(
L"error-upper-limit"
,
dVal
.
get
()));
CP_APPLY_ATTR
(
L"chart:axis-position"
,
strVal
);
if
(
strVal
)
content_
.
push_back
(
_property
(
L"axis-position"
,
*
strVal
));
CP_APPLY_ATTR
(
L"chart:tick-mark-position"
,
strVal
);
if
(
strVal
)
content_
.
push_back
(
_property
(
L"tick-mark-position"
,
*
strVal
));
CP_APPLY_ATTR
(
L"chart:interpolation"
,
strVal
);
CP_APPLY_ATTR
(
L"chart:interpolation"
,
strVal
);
if
(
i
Val
)
content_
.
push_back
(
_property
(
L"interpolation"
,
chart_interpolation
(
chart_interpolation
::
parse
(
strVal
.
get
())).
get_type
()));
if
(
str
Val
)
content_
.
push_back
(
_property
(
L"interpolation"
,
chart_interpolation
(
chart_interpolation
::
parse
(
strVal
.
get
())).
get_type
()));
CP_APPLY_ATTR
(
L"chart:solid-type"
,
strVal
);
CP_APPLY_ATTR
(
L"chart:solid-type"
,
strVal
);
if
(
strVal
)
content_
.
push_back
(
_property
(
L"solid-type"
,
chart_solid_type
(
chart_solid_type
::
parse
(
strVal
.
get
())).
get_type
()));
if
(
strVal
)
content_
.
push_back
(
_property
(
L"solid-type"
,
chart_solid_type
(
chart_solid_type
::
parse
(
strVal
.
get
())).
get_type
()));
...
...
ASCOfficeOdfFile/src/odf/text_elements.cpp
View file @
af0bf700
...
@@ -156,15 +156,18 @@ int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_co
...
@@ -156,15 +156,18 @@ int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_co
const
std
::
wstring
id
=
Context
.
styles_map_
.
get
(
styleInst
->
name
(),
styleInst
->
type
()
);
const
std
::
wstring
id
=
Context
.
styles_map_
.
get
(
styleInst
->
name
(),
styleInst
->
type
()
);
std
::
wostream
&
_Wostream
=
Context
.
output_stream
();
std
::
wostream
&
_Wostream
=
Context
.
output_stream
();
_Wostream
<<
L"<w:pPr>"
;
_Wostream
<<
L"<w:pPr>"
;
if
(
!
Context
.
get_table_context
().
in_table
())
{
_Wostream
<<
Context
.
get_section_context
().
dump_
;
_Wostream
<<
Context
.
get_section_context
().
dump_
;
Context
.
get_section_context
().
dump_
.
clear
();
Context
.
get_section_context
().
dump_
.
clear
();
}
_Wostream
<<
L"<w:pStyle w:val=
\"
"
<<
id
<<
L"
\"
/>"
;
_Wostream
<<
L"<w:pStyle w:val=
\"
"
<<
id
<<
L"
\"
/>"
;
Context
.
docx_serialize_list_properties
(
_Wostream
);
Context
.
docx_serialize_list_properties
(
_Wostream
);
_Wostream
<<
L"</w:pPr>"
;
_Wostream
<<
L"</w:pPr>"
;
return
2
;
return
2
;
}
}
}
}
else
if
(
!
Context
.
get_section_context
().
dump_
.
empty
())
else
if
(
!
Context
.
get_section_context
().
dump_
.
empty
()
&&
!
Context
.
get_table_context
().
in_table
()
)
{
{
Context
.
output_stream
()
<<
L"<w:pPr>"
;
Context
.
output_stream
()
<<
L"<w:pPr>"
;
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
...
@@ -173,7 +176,7 @@ int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_co
...
@@ -173,7 +176,7 @@ int process_paragraph_attr(const paragraph_attrs & Attr, oox::docx_conversion_co
}
}
return
3
;
return
3
;
}
}
else
if
(
!
Context
.
get_section_context
().
dump_
.
empty
())
else
if
(
!
Context
.
get_section_context
().
dump_
.
empty
()
&&
!
Context
.
get_table_context
().
in_table
()
)
{
{
Context
.
output_stream
()
<<
L"<w:pPr>"
;
Context
.
output_stream
()
<<
L"<w:pPr>"
;
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
Context
.
output_stream
()
<<
Context
.
get_section_context
().
dump_
;
...
...
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