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
b06681bd
Commit
b06681bd
authored
Nov 25, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatReader - fix mac build, ...
parent
ab441215
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
10 deletions
+35
-10
ASCOfficeOdfFile/src/docx/xlsx_table_metrics.cpp
ASCOfficeOdfFile/src/docx/xlsx_table_metrics.cpp
+3
-3
ASCOfficeOdfFile/src/odf/office_text.cpp
ASCOfficeOdfFile/src/odf/office_text.cpp
+17
-0
ASCOfficeOdfFile/src/odf/office_text.h
ASCOfficeOdfFile/src/odf/office_text.h
+4
-1
ASCOfficeOdfFile/src/odf/text_elements.cpp
ASCOfficeOdfFile/src/odf/text_elements.cpp
+8
-3
ASCOfficeOdfFile/src/odf/text_elements.h
ASCOfficeOdfFile/src/odf/text_elements.h
+2
-2
X2tConverter/build/Qt/X2tConverter.pro
X2tConverter/build/Qt/X2tConverter.pro
+1
-1
No files found.
ASCOfficeOdfFile/src/docx/xlsx_table_metrics.cpp
View file @
b06681bd
...
...
@@ -223,7 +223,7 @@ public:
const
std
::
pair
<
int
,
double
>
c
=
cols_
.
search
(
x_pt
);
const
std
::
pair
<
int
,
double
>
r
=
rows_
.
search
(
y_pt
);
xlsx_table_position
res
=
{
c
.
first
,
c
.
second
,
r
.
first
,
r
.
second
};
xlsx_table_position
res
=
{
(
size_t
)
c
.
first
,
c
.
second
,
(
size_t
)
r
.
first
,
r
.
second
};
return
res
;
}
...
...
@@ -236,7 +236,7 @@ public:
r
=
rows_
.
search
(
offset_row
,
y_pt
);
xlsx_table_position
res
=
{
c
.
first
,
c
.
second
,
r
.
first
,
r
.
second
};
xlsx_table_position
res
=
{
(
size_t
)
c
.
first
,
c
.
second
,
(
size_t
)
r
.
first
,
r
.
second
};
return
res
;
}
...
...
@@ -246,7 +246,7 @@ public:
std
::
pair
<
int
,
double
>
r
=
rows_
.
search
(
last_row
,
0
);
xlsx_table_position
res
=
{
c
.
first
,
c
.
second
,
r
.
first
,
r
.
second
};
xlsx_table_position
res
=
{
(
size_t
)
c
.
first
,
c
.
second
,
(
size_t
)
r
.
first
,
r
.
second
};
return
res
;
}
...
...
ASCOfficeOdfFile/src/odf/office_text.cpp
View file @
b06681bd
...
...
@@ -147,6 +147,14 @@ void office_text::pptx_convert(oox::pptx_conversion_context & Context)
const
wchar_t
*
office_change_info
::
ns
=
L"office"
;
const
wchar_t
*
office_change_info
::
name
=
L"change-info"
;
void
office_change_info
::
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{
int
count
=
Attributes
->
size
();
CP_APPLY_ATTR
(
L"office:chg-author"
,
office_chg_author_
);
CP_APPLY_ATTR
(
L"office:chg-date-time"
,
office_chg_date_time_
);
}
void
office_change_info
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
if
CP_CHECK_NAME
(
L"dc"
,
L"date"
)
...
...
@@ -165,14 +173,23 @@ void office_change_info::docx_convert(oox::docx_conversion_context & Context)
{
std
::
wstring
date
;
std
::
wstring
author
;
if
(
dc_date_
)
{
date
=
xml
::
utils
::
replace_text_to_xml
(
dynamic_cast
<
dc_date
*
>
(
dc_date_
.
get
())
->
content_
);
}
else
if
(
office_chg_date_time_
)
{
date
=
*
office_chg_date_time_
;
}
if
(
dc_creator_
)
{
author
=
xml
::
utils
::
replace_text_to_xml
(
dynamic_cast
<
dc_creator
*
>
(
dc_creator_
.
get
())
->
content_
);
}
else
if
(
office_chg_author_
)
{
author
=
*
office_chg_author_
;
}
Context
.
get_text_tracked_context
().
set_user_info
(
author
,
date
);
}
...
...
ASCOfficeOdfFile/src/odf/office_text.h
View file @
b06681bd
...
...
@@ -88,11 +88,14 @@ public:
virtual
void
docx_convert
(
oox
::
docx_conversion_context
&
Context
)
;
private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
{}
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
)
;
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
office_element_ptr
dc_date_
;
office_element_ptr
dc_creator_
;
_CP_OPT
(
std
::
wstring
)
office_chg_author_
;
_CP_OPT
(
std
::
wstring
)
office_chg_date_time_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
office_change_info
)
...
...
ASCOfficeOdfFile/src/odf/text_elements.cpp
View file @
b06681bd
...
...
@@ -1031,14 +1031,19 @@ void text_changed_region::add_attributes( const xml::attributes_wc_ptr & Attribu
void
text_changed_region
::
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
)
{
CP_CREATE_ELEMENT
(
elem
ent_
);
CP_CREATE_ELEMENT
(
cont
ent_
);
}
void
text_changed_region
::
docx_convert
(
oox
::
docx_conversion_context
&
Context
)
{
if
(
!
element_
||
!
text_id_
)
return
;
if
(
content_
.
empty
()
||
!
text_id_
)
return
;
Context
.
get_text_tracked_context
().
start_change
(
*
text_id_
);
element_
->
docx_convert
(
Context
);
for
(
int
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
docx_convert
(
Context
);
}
Context
.
get_text_tracked_context
().
end_change
();
}
...
...
ASCOfficeOdfFile/src/odf/text_elements.h
View file @
b06681bd
...
...
@@ -545,8 +545,8 @@ private:
virtual
void
add_attributes
(
const
xml
::
attributes_wc_ptr
&
Attributes
);
virtual
void
add_child_element
(
xml
::
sax
*
Reader
,
const
std
::
wstring
&
Ns
,
const
std
::
wstring
&
Name
);
_CP_OPT
(
std
::
wstring
)
text_id_
;
//== xml:id
office_element_ptr
element_
;
_CP_OPT
(
std
::
wstring
)
text_id_
;
//== xml:id
office_element_ptr
_array
content_
;
};
CP_REGISTER_OFFICE_ELEMENT2
(
text_changed_region
);
...
...
X2tConverter/build/Qt/X2tConverter.pro
View file @
b06681bd
...
...
@@ -32,5 +32,5 @@ core_linux_32 {
DESTDIR
=
$$
DESTDIR
/
linux_32
}
core_mac
{
DESTDIR
=
$$
DESTDIR
/
mac
DESTDIR
=
$$
DESTDIR
/
mac
_64
}
\ No newline at end of file
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