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
b4d29854
Commit
b4d29854
authored
Nov 17, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #36251
parent
9723c379
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+28
-13
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
b4d29854
...
...
@@ -2057,11 +2057,12 @@ void DocxConverter::convert(OOX::Logic::CRunProperty *oox_run_pr, odf_writer::st
convert
(
oox_run_pr
->
m_oColor
.
GetPointer
(),
text_properties
->
content_
.
fo_color_
);
}
text_properties
->
content_
.
style_text_underline_type_
=
odf_types
::
line_type
(
odf_types
::
line_type
::
None
);
//text_properties->content_.style_text_underline_type_= odf_types::line_type(odf_types::line_type::None); //нельзя..если будет выше наследуемого то подчеркивания не будет
if
(
oox_run_pr
->
m_oU
.
IsInit
())
{
text_properties
->
content_
.
style_text_underline_style_
=
odf_types
::
line_style
(
odf_types
::
line_style
::
Solid
);
text_properties
->
content_
.
style_text_underline_type_
=
odf_types
::
line_type
(
odf_types
::
line_type
::
Single
);
text_properties
->
content_
.
style_text_underline_width_
=
odf_types
::
line_width
(
odf_types
::
line_width
::
Auto
);
_CP_OPT
(
odf_types
::
color
)
color
;
convert
(
oox_run_pr
->
m_oU
->
m_oColor
.
GetPointer
(),
oox_run_pr
->
m_oU
->
m_oThemeColor
.
GetPointer
(),
...
...
@@ -3187,9 +3188,9 @@ void DocxConverter::convert_table_style(OOX::CStyle *oox_style)
{
if
(
oox_style
==
NULL
)
return
;
std
::
wstring
oox_name
=
oox_style
->
m_sStyleId
.
IsInit
()
?
*
oox_style
->
m_sStyleId
:
L""
;
std
::
wstring
oox_name
_id
=
oox_style
->
m_sStyleId
.
IsInit
()
?
*
oox_style
->
m_sStyleId
:
L""
;
odt_context
->
styles_context
()
->
table_styles
().
start_style
(
oox_name
);
odt_context
->
styles_context
()
->
table_styles
().
start_style
(
oox_name
_id
);
//общие
if
(
oox_style
->
m_oTblPr
.
IsInit
())
...
...
@@ -3303,17 +3304,21 @@ void DocxConverter::convert(OOX::CStyle *oox_style)
return
;
}
std
::
wstring
oox_name
=
oox_style
->
m_sStyleId
.
IsInit
()
?
*
oox_style
->
m_sStyleId
:
L""
;
odt_context
->
styles_context
()
->
create_style
(
oox_name
,
family
,
false
,
true
,
-
1
);
std
::
wstring
oox_name_id
=
oox_style
->
m_sStyleId
.
IsInit
()
?
*
oox_style
->
m_sStyleId
:
L""
;
odt_context
->
styles_context
()
->
create_style
(
oox_name_id
,
family
,
false
,
true
,
-
1
);
std
::
wstring
style_name
;
if
(
oox_style
->
m_oName
.
IsInit
()
&&
oox_style
->
m_oName
->
m_sVal
.
IsInit
())
odt_context
->
styles_context
()
->
last_state
()
->
set_display_name
(
*
oox_style
->
m_oName
->
m_sVal
);
{
style_name
=
*
oox_style
->
m_oName
->
m_sVal
;
odt_context
->
styles_context
()
->
last_state
()
->
set_display_name
(
style_name
);
}
odf_writer
::
style_text_properties
*
text_properties
=
NULL
;
if
(
oox_style
->
m_oRunPr
.
IsInit
())
{
odf_writer
::
style_text_properties
*
text_properties
=
odt_context
->
styles_context
()
->
last_state
()
->
get_text_properties
();
text_properties
=
odt_context
->
styles_context
()
->
last_state
()
->
get_text_properties
();
if
(
oox_style
->
m_oDefault
.
IsInit
()
&&
oox_style
->
m_oDefault
->
ToBool
())
{
...
...
@@ -3330,14 +3335,14 @@ void DocxConverter::convert(OOX::CStyle *oox_style)
}
if
(
oox_style
->
m_oParPr
.
IsInit
())
{
odf_writer
::
style_paragraph_properties
*
paragraph_properties
=
odt_context
->
styles_context
()
->
last_state
()
->
get_paragraph_properties
();
odf_writer
::
style_paragraph_properties
*
paragraph_properties
=
odt_context
->
styles_context
()
->
last_state
()
->
get_paragraph_properties
();
if
(
oox_style
->
m_oDefault
.
IsInit
()
&&
oox_style
->
m_oDefault
->
ToBool
())
{
//основан на дефолтовом - накатить
odf_writer
::
odf_style_state_ptr
def_style_state
;
if
(
odt_context
->
styles_context
()
->
find_odf_default_style_state
(
odf_types
::
style_family
::
Paragraph
,
def_style_state
)
&&
def_style_state
)
{
odf_writer
::
style_paragraph_properties
*
props
=
def_style_state
->
get_paragraph_properties
();
odf_writer
::
style_paragraph_properties
*
props
=
def_style_state
->
get_paragraph_properties
();
paragraph_properties
->
apply_from
(
props
);
}
}
...
...
@@ -3367,9 +3372,19 @@ void DocxConverter::convert(OOX::CStyle *oox_style)
if
(
oox_style
->
m_oBasedOn
.
IsInit
()
&&
oox_style
->
m_oBasedOn
->
m_sVal
.
IsInit
())
odt_context
->
styles_context
()
->
last_state
()
->
set_parent_style_name
(
*
oox_style
->
m_oBasedOn
->
m_sVal
);
//nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue>> m_oQFormat;
//nullable<ComplexTypes::Word::std::wstring_> m_oAliases;
//nullable<ComplexTypes::Word::COnOff2<SimpleTypes::onoffTrue>> m_oQFormat;
//nullable<ComplexTypes::Word::std::wstring_> m_oAliases;
//-------------------------------------------------------------------------------------------------------------------------
if
(
style_name
==
L"Hyperlink"
)
{
odt_context
->
styles_context
()
->
create_style
(
L"Internet_20_link"
,
family
,
false
,
true
,
-
1
);
//odt_context->styles_context()->last_state()->set_parent_style_name(oox_name_id);
odt_context
->
styles_context
()
->
last_state
()
->
set_display_name
(
L"Internet link"
);
odf_writer
::
style_text_properties
*
hyperlink_text_props
=
odt_context
->
styles_context
()
->
last_state
()
->
get_text_properties
();
hyperlink_text_props
->
apply_from
(
text_properties
);
}
}
void
DocxConverter
::
convert
(
OOX
::
Logic
::
CCommentRangeStart
*
oox_comm_start
)
...
...
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