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
3ff5233e
Commit
3ff5233e
authored
Jul 17, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/hotfix/v4.4.2' into develop
parents
a88ad0c2
4c7ab6e6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
214 deletions
+93
-214
ASCOfficeOdfFile/formulasconvert/formulasconvert.h
ASCOfficeOdfFile/formulasconvert/formulasconvert.h
+3
-2
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
+1
-3
ASCOfficeOdfFile/formulasconvert/formulasconvert_oox.cpp
ASCOfficeOdfFile/formulasconvert/formulasconvert_oox.cpp
+84
-204
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
+5
-5
No files found.
ASCOfficeOdfFile/formulasconvert/formulasconvert.h
View file @
3ff5233e
...
...
@@ -87,9 +87,10 @@ public:
std
::
wstring
convert_conditional_formula
(
std
::
wstring
const
&
expr
);
// Лист1!$A$1 -> $Лист1.$A$1
std
::
wstring
convert_named_ref
(
std
::
wstring
const
&
expr
);
std
::
wstring
convert_named_ref
(
std
::
wstring
const
&
expr
);
std
::
wstring
convert_named_formula
(
std
::
wstring
const
&
expr
);
std
::
wstring
find_base_cell
(
std
::
wstring
const
&
expr
);
std
::
wstring
get_base_cell_formula
(
std
::
wstring
const
&
expr
);
//Sheet2!C3:C19 -> Sheet2.C3:Sheet2.C19
std
::
wstring
convert_chart_distance
(
std
::
wstring
const
&
expr
);
...
...
ASCOfficeOdfFile/formulasconvert/formulasconvert_odf.cpp
View file @
3ff5233e
...
...
@@ -57,6 +57,7 @@ namespace formulasconvert {
static
std
::
wstring
replace_named_ref_formater1
(
boost
::
wsmatch
const
&
what
);
static
std
::
wstring
replace_cell_range_formater
(
boost
::
wsmatch
const
&
what
);
void
replace_named_formula
(
std
::
wstring
&
expr
,
bool
w
=
true
);
void
replace_named_ref
(
std
::
wstring
&
expr
,
bool
w
=
true
);
bool
find_first_ref
(
std
::
wstring
const
&
expr
,
std
::
wstring
&
table
,
std
::
wstring
&
ref
);
bool
find_first_last_ref
(
std
::
wstring
const
&
expr
,
std
::
wstring
&
table
,
std
::
wstring
&
ref_first
,
std
::
wstring
&
ref_last
);
...
...
@@ -263,15 +264,12 @@ namespace formulasconvert {
return
what
[
2
].
str
();
else
if
(
what
[
3
].
matched
)
return
what
[
3
].
str
();
//else if (what[4].matched)
// return what[4].str();
else
return
L""
;
}
// TODO
// заменить точки с запятой во всех вхождениях кроме находящихся в кавычках --*и в фигурных скобках*--
// TODO: проверить как сохраняются кавычки в строке
void
odf2oox_converter
::
Impl
::
replace_semicolons
(
std
::
wstring
&
expr
)
{
const
std
::
wstring
res
=
boost
::
regex_replace
(
...
...
ASCOfficeOdfFile/formulasconvert/formulasconvert_oox.cpp
View file @
3ff5233e
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFileW/source/OdfFormat/ods_table_context.cpp
View file @
3ff5233e
...
...
@@ -138,7 +138,8 @@ void ods_table_context::add_defined_range(const std::wstring & name, const std::
std
::
wstring
odf_range
=
formulas_converter
.
convert_named_ref
(
cell_range
);
//todo - разделить конвертацию диапазонов/рэнжей на c [] и без
XmlUtils
::
replace_all
(
odf_range
,
L"["
,
L""
);
XmlUtils
::
replace_all
(
odf_range
,
L"]"
,
L""
);
std
::
wstring
odf_base_cell
=
formulas_converter
.
find_base_cell
(
cell_range
);
std
::
wstring
odf_base_cell
=
formulas_converter
.
get_base_cell_formula
(
cell_range
);
named_range
->
table_name_
=
name
;
named_range
->
table_cell_range_address_
=
odf_range
;
...
...
@@ -181,8 +182,8 @@ void ods_table_context::add_defined_expression(const std::wstring & name, const
formulasconvert
::
oox2odf_converter
formulas_converter
;
std
::
wstring
odf_value
=
formulas_converter
.
convert_named_
ref
(
value
);
std
::
wstring
odf_base_cell
=
formulas_converter
.
find_base_cell
(
value
);
std
::
wstring
odf_value
=
formulas_converter
.
convert_named_
formula
(
value
);
std
::
wstring
odf_base_cell
=
formulas_converter
.
get_base_cell_formula
(
value
);
named_expression
->
table_name_
=
name
;
named_expression
->
table_expression_
=
odf_value
;
...
...
@@ -215,10 +216,9 @@ void ods_table_context::add_defined_expression(const std::wstring & name, const
table_defined_expressions_
.
root
->
add_child_element
(
elm
);
}
if
(
odf_base_cell
.
length
()
>
0
)
if
(
!
odf_base_cell
.
empty
()
)
named_expression
->
table_base_cell_address_
=
odf_base_cell
;
table_defined_expressions_
.
elements
.
push_back
(
elm
);
}
...
...
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