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
362cad18
Commit
362cad18
authored
May 25, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfReader - поправлены составные/разрывные диапазоны в диаграммах Book 50.ods
parent
23ed051a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
7 deletions
+41
-7
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
+30
-6
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
+11
-1
No files found.
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
View file @
362cad18
...
...
@@ -233,6 +233,20 @@ std::wstring replace_vertical_formater(boost::wsmatch const & what)
else
if
(
what
[
3
].
matched
)
return
what
[
3
].
str
();
}
std
::
wstring
replace_space_PROBEL
(
boost
::
wsmatch
const
&
what
)
{
if
(
what
[
1
].
matched
)
{
std
::
wstring
inner
=
what
[
1
].
str
();
boost
::
algorithm
::
replace_all
(
inner
,
L" "
,
L"PROBEL"
);
return
inner
;
}
else
if
(
what
[
2
].
matched
)
return
what
[
2
].
str
();
else
if
(
what
[
3
].
matched
)
return
what
[
3
].
str
();
}
std
::
wstring
replace_space_formater
(
boost
::
wsmatch
const
&
what
)
{
if
(
what
[
1
].
matched
)
...
...
@@ -332,16 +346,24 @@ std::wstring odf2oox_converter::Impl::convert_chart_distance(const std::wstring&
if
(
is_forbidden
(
expr
))
return
L"NULLFORMULA()"
;
//
std::wstring workstr = expr;
std
::
wstring
workstr
=
expr
;
//replace_space(workstr);
//return workstr;
boost
::
wregex
complexRef
(
L"('(?!
\\
s
\\
'){0,1}.*?')"
);
// boost::wregex complexRef(L"(\\'(.*?)\\')"); // ïîèñê òîãî ÷òî â àïîñòðîôàõ è çàìåíà òàì ïðîáåëîâ íà PROBEL
workstr
=
boost
::
regex_replace
(
expr
,
complexRef
,
&
replace_space_PROBEL
,
boost
::
match_default
|
boost
::
format_all
);
//ðàñïàðñèòü ïî äèàïàçîíàì - îäô-ïðîáåë, èê-ýëü-çàïÿòàÿ
std
::
vector
<
std
::
wstring
>
distance_inp
;
std
::
vector
<
std
::
wstring
>
distance_out
;
boost
::
algorithm
::
split
(
distance_inp
,
exp
r
,
boost
::
algorithm
::
is_any_of
(
L" "
),
boost
::
algorithm
::
token_compress_on
);
boost
::
algorithm
::
split
(
distance_inp
,
workst
r
,
boost
::
algorithm
::
is_any_of
(
L" "
),
boost
::
algorithm
::
token_compress_on
);
BOOST_FOREACH
(
std
::
wstring
&
d
,
distance_inp
)
{
...
...
@@ -367,21 +389,23 @@ std::wstring odf2oox_converter::Impl::convert_chart_distance(const std::wstring&
int
res1
=
sheet
.
find
(
L"-"
);
int
res2
=
sheet
.
find
(
L"'"
);
if
(
res1
>=
0
&&
!
(
res2
==
0
))
if
(
res1
>=
0
&&
!
(
res2
==
0
))
{
sheet
=
L"'"
+
sheet
+
L"'"
;
}
distance_out
.
push_back
(
sheet
+
L"!"
+
cells_out
.
substr
(
0
,
cells_out
.
size
()
-
1
));
distance_out
.
push_back
(
sheet
+
L"!"
+
cells_out
.
substr
(
0
,
cells_out
.
size
()
-
1
));
}
std
::
wstring
result
;
BOOST_FOREACH
(
std
::
wstring
&
d
,
distance_out
)
BOOST_FOREACH
(
std
::
wstring
&
d
,
distance_out
)
{
result
.
append
(
d
);
result
.
append
(
L","
);
}
return
result
.
substr
(
0
,
result
.
size
()
-
1
);
boost
::
algorithm
::
replace_all
(
result
,
L"PROBEL"
,
L" "
);
return
result
.
substr
(
0
,
result
.
size
()
-
1
);
// ìèíóñ ïîñëåäíÿÿ ëèøíÿÿ çàïÿòàÿ
}
odf2oox_converter
::
odf2oox_converter
()
:
impl_
(
new
odf2oox_converter
::
Impl
)
{
...
...
ASCOfficeOdfFile/src/docx/oox_chart_series.cpp
View file @
362cad18
...
...
@@ -356,8 +356,18 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
if
(
data_labels_
)
data_labels_
->
oox_serialize
(
_Wostream
);
int
indPoint
=
0
;
bool
bEmpty_dPt
=
true
;
for
(
int
i
=
0
;
i
<
content_
.
points_
.
size
();
i
++
)
{
if
(
content_
.
points_
[
i
].
graphic_properties_
.
size
()
>
0
||
content_
.
points_
[
i
].
fill_
.
type
>=
0
)
{
bEmpty_dPt
=
false
;
}
}
int
indPoint
=
0
;
for
(
int
i
=
0
;
!
bEmpty_dPt
&&
i
<
content_
.
points_
.
size
();
i
++
)
{
for
(
int
j
=
0
;
j
<
content_
.
points_
[
i
].
repeated_
;
j
++
)
{
...
...
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