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
8bf41615
Commit
8bf41615
authored
Sep 01, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x2t fix bugs
parent
2af6c6c8
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
78 additions
and
505 deletions
+78
-505
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
+10
-2
ASCOfficeOdfFile/Test/ASCOfficeOdfFileTest/ASCOfficeOdfFileTest.vcproj
...ile/Test/ASCOfficeOdfFileTest/ASCOfficeOdfFileTest.vcproj
+3
-3
ASCOfficeOdfFile/src/odf/draw_frame_docx.cpp
ASCOfficeOdfFile/src/odf/draw_frame_docx.cpp
+8
-7
ASCOfficeOdfFile/src/odf/draw_shapes.cpp
ASCOfficeOdfFile/src/odf/draw_shapes.cpp
+1
-1
ASCOfficeOdfFile/src/odf/style_table_properties.cpp
ASCOfficeOdfFile/src/odf/style_table_properties.cpp
+6
-1
ASCOfficeOdfFile/src/odf/svg_parser.cpp
ASCOfficeOdfFile/src/odf/svg_parser.cpp
+13
-7
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
+20
-475
ASCOfficeOdfFile/win32/cpodf.vcproj
ASCOfficeOdfFile/win32/cpodf.vcproj
+1
-1
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
+8
-3
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+8
-5
No files found.
ASCOfficeDocFile/DocDocxConverter/VMLShapeMapping.cpp
View file @
8bf41615
...
...
@@ -423,8 +423,11 @@ namespace DocFileFormat
}
break
;
case
lineWidth
:
{
EmuValue
eLineWidth
((
int
)
iter
->
op
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"strokeweight"
),
FormatUtils
::
DoubleToWideString
(
eLineWidth
.
ToPoints
())
+
_T
(
"pt"
));
if
(
iter
->
op
>
0
)
{
EmuValue
eLineWidth
((
int
)
iter
->
op
);
m_pXmlWriter
->
WriteAttribute
(
_T
(
"strokeweight"
),
FormatUtils
::
DoubleToWideString
(
eLineWidth
.
ToPoints
())
+
_T
(
"pt"
));
}
}
break
;
case
lineDashing
:
{
...
...
@@ -1530,6 +1533,11 @@ namespace DocFileFormat
{
appendStyleProperty
(
oStyle
,
_T
(
"mso-position-vertical-relative"
),
mapVerticalPositionRelative
(
m_pSpa
->
bx
));
}
if
(
!
m_isInlineShape
&&
!
bZIndex
)
{
appendStyleProperty
(
oStyle
,
_T
(
"z-index"
),
FormatUtils
::
IntToWideString
(
zIndex
+
0x7ffff
));
bZIndex
=
true
;
}
//if (!bPosH)
//{
...
...
ASCOfficeOdfFile/Test/ASCOfficeOdfFileTest/ASCOfficeOdfFileTest.vcproj
View file @
8bf41615
...
...
@@ -20,7 +20,7 @@
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
"$(
SolutionDir)$(
ConfigurationName)"
OutputDirectory=
"$(ConfigurationName)"
IntermediateDirectory=
"$(ConfigurationName)"
ConfigurationType=
"1"
CharacterSet=
"1"
...
...
@@ -49,7 +49,7 @@
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"2"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"
tru
e"
Detect64BitPortabilityProblems=
"
fals
e"
DebugInformationFormat=
"4"
/>
<Tool
...
...
@@ -124,7 +124,7 @@
MinimalRebuild=
"true"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"
2
"
UsePrecompiledHeader=
"
0
"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
...
...
ASCOfficeOdfFile/src/odf/draw_frame_docx.cpp
View file @
8bf41615
...
...
@@ -1162,12 +1162,12 @@ void draw_image::docx_convert(oox::docx_conversion_context & Context)
void
draw_text_box
::
docx_convert
(
oox
::
docx_conversion_context
&
Context
)
{
if
(
Context
.
get_drawing_context
().
get_current_level
()
>
1
)
{
if
(
Context
.
delayed_converting_
==
false
)
Context
.
add_delayed_element
(
Context
.
get_drawing_context
().
get_current_frame
());
return
;
}
// if (Context.get_drawing_context().get_current_level() >
1 )
//
{
//
if(Context.delayed_converting_ == false)
//
Context.add_delayed_element(Context.get_drawing_context().get_current_frame());
//
return;
//
}
//тут может быть не только текст , но и таблицы, другие объекты ...
oox
::
docx_conversion_context
::
StreamsManPtr
prev
=
Context
.
get_stream_man
();
...
...
@@ -1377,7 +1377,8 @@ void draw_g::docx_convert(oox::docx_conversion_context & Context)
}
void
draw_frame
::
docx_convert
(
oox
::
docx_conversion_context
&
Context
)
{
if
((
!
Context
.
get_paragraph_state
()
&&
!
Context
.
get_drawing_context
().
in_group
())
&&
!
Context
.
delayed_converting_
)
//if ((!Context.get_paragraph_state() && !Context.get_drawing_context().in_group()) && !Context.delayed_converting_)
if
(
Context
.
get_drawing_context
().
get_current_level
()
>
0
&&
!
Context
.
get_drawing_context
().
in_group
()
)
{
Context
.
add_delayed_element
(
this
);
return
;
...
...
ASCOfficeOdfFile/src/odf/draw_shapes.cpp
View file @
8bf41615
...
...
@@ -343,7 +343,7 @@ void draw_polyline::reset_polyline_path()
std
::
vector
<
svg_path
::
_polyline
>
o_Polyline_pt
;
std
::
vector
<
svg_path
::
_polyline
>
o_Polyline_cm
;
bool
res
=
svg_path
::
parsePolygon
(
o_Polyline_cm
,
draw_polyline_attlist_
.
draw_points_
.
get
(),
false
,
fals
e
);
bool
res
=
svg_path
::
parsePolygon
(
o_Polyline_cm
,
draw_polyline_attlist_
.
draw_points_
.
get
(),
false
,
tru
e
);
_CP_OPT
(
double
)
start_x
,
start_y
;
...
...
ASCOfficeOdfFile/src/odf/style_table_properties.cpp
View file @
8bf41615
...
...
@@ -144,6 +144,11 @@ void table_format_properties::docx_convert(oox::docx_conversion_context & Contex
if
(
common_horizontal_margin_attlist_
.
fo_margin_left_
->
get_length
()
==
common_horizontal_margin_attlist_
.
fo_margin_right_
->
get_length
())
w_val
=
L"center"
;
}
if
(
w_val
!=
L"center"
&&
common_horizontal_margin_attlist_
.
fo_margin_left_
)
{
odf_types
::
length
indent
=
common_horizontal_margin_attlist_
.
fo_margin_left_
->
get_length
();
_tblPr
<<
L"<w:tblInd w:w=
\"
"
<<
indent
.
get_value_unit
(
odf_types
::
length
::
pt
)
*
20
<<
"
\"
w:type=
\"
dxa
\"
/>"
;
}
}
else
w_val
=
boost
::
lexical_cast
<
std
::
wstring
>
(
*
table_align_
);
...
...
@@ -151,7 +156,7 @@ void table_format_properties::docx_convert(oox::docx_conversion_context & Contex
_tblPr
<<
L"<w:jc w:val=
\"
"
<<
w_val
<<
"
\"
/>"
;
}
if
(
table_align_
&&
table_align_
->
get_type
()
==
table_align
::
Center
)
if
(
table_align_
&&
table_align_
->
get_type
()
==
table_align
::
Center
)
{
// TODO ()
}
...
...
ASCOfficeOdfFile/src/odf/svg_parser.cpp
View file @
8bf41615
...
...
@@ -220,13 +220,16 @@ namespace svg_path
bIsClosed
=
true
;
// update current point - we're back at the start
if
(
aCurrPoly
.
points
.
size
()
>
0
&&
!
bWrongPositionAfterZ
)
if
(
aCurrPoly
.
points
.
size
()
>
0
&&
!
bWrongPositionAfterZ
)
{
const
_point
aFirst
(
aCurrPoly
.
points
[
0
]);
nLastX
=
aFirst
.
x
.
get
();
nLastY
=
aFirst
.
y
.
get
();
}
aCurrPoly
.
command
=
L"a:close"
;
aCurrPoly
.
command
=
L"a:close"
;
Polyline
.
push_back
(
aCurrPoly
);
}
break
;
case
'm'
:
case
'M'
:
...
...
@@ -751,13 +754,9 @@ namespace svg_path
}
}
if
((
aCurrPoly
.
points
.
size
()
>
0
||
bIsClosed
)
&&
!
aCurrPoly
.
command
.
empty
())
if
((
aCurrPoly
.
points
.
size
()
>
0
||
!
bIsClosed
)
&&
!
aCurrPoly
.
command
.
empty
())
{
// end-process last poly
if
(
bIsClosed
)
//{
// closeWithGeometryChange(aCurrPoly);
//}
Polyline
.
push_back
(
aCurrPoly
);
}
...
...
@@ -798,6 +797,13 @@ namespace svg_path
Polyline
.
push_back
(
Polyline
[
0
]);
Polyline
.
back
().
command
=
L"a:lnTo"
;
}
if
(
closed
)
{
aCurrPoly
.
points
.
clear
();
aCurrPoly
.
command
=
L"a:close"
;
Polyline
.
push_back
(
aCurrPoly
);
}
return
true
;
}
...
...
ASCOfficeOdfFile/win32/ASCOfficeOdfFile.sln
View file @
8bf41615
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFile/win32/cpodf.vcproj
View file @
8bf41615
...
...
@@ -51,7 +51,7 @@
UsePrecompiledHeader=
"0"
PrecompiledHeaderThrough=
""
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"
tru
e"
Detect64BitPortabilityProblems=
"
fals
e"
DebugInformationFormat=
"4"
DisableSpecificWarnings=
"4311;4267;4996;4172"
/>
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
View file @
8bf41615
...
...
@@ -1098,11 +1098,16 @@ void odf_drawing_context::add_path_element(std::wstring command, std::wstring &
{
if
(
command
!=
impl_
->
current_drawing_state_
.
path_last_command_
)
{
impl_
->
current_drawing_state_
.
path_
+=
command
+
L" "
;
impl_
->
current_drawing_state_
.
path_
+=
command
;
if
(
!
strE
.
empty
())
impl_
->
current_drawing_state_
.
path_
+=
L" "
;
impl_
->
current_drawing_state_
.
path_last_command_
=
command
;
}
impl_
->
current_drawing_state_
.
path_
+=
strE
+
L" "
;
if
(
command
!=
L"N"
)
impl_
->
current_drawing_state_
.
path_
+=
strE
+
L" "
;
else
impl_
->
current_drawing_state_
.
path_
+=
strE
;
}
void
odf_drawing_context
::
add_modifier
(
std
::
wstring
modifier
)
{
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
8bf41615
...
...
@@ -609,10 +609,6 @@ void OoxConverter::convert(OOX::Drawing::CCustomGeometry2D *oox_cust_geom)
{
convert
(
oox_cust_geom
->
m_oPthLst
.
m_arrPath
[
i
]);
}
for
(
unsigned
int
i
=
0
;
i
<
oox_cust_geom
->
m_oPthLst
.
m_arrPath
.
size
();
i
++
)
{
convert
(
oox_cust_geom
->
m_oPthLst
.
m_arrPath
[
i
]);
}
}
void
OoxConverter
::
convert
(
OOX
::
Drawing
::
CLineProperties
*
oox_line_prop
,
CString
*
change_sheme_color
)
{
...
...
@@ -699,6 +695,10 @@ void OoxConverter::convert(OOX::Drawing::CPath2D *oox_geom_path)
{
convert
(
oox_geom_path
->
m_arrItems
[
i
]);
}
std
::
wstring
path_elm
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"N"
),
path_elm
);
}
//-----------------------------------------------------------------------------------------------------------------
void
OoxConverter
::
convert
(
OOX
::
Drawing
::
CEffectList
*
oox_effect_list
,
CString
*
change_sheme_color
)
...
...
@@ -1096,6 +1096,7 @@ void OoxConverter::convert(OOX::Drawing::CPath2DMoveTo *oox_geom_path)
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oPt
.
m_oY
.
GetValue
()));
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"M"
),
path_elm
);
}
void
OoxConverter
::
convert
(
OOX
::
Drawing
::
CPath2DArcTo
*
oox_geom_path
)
{
if
(
!
oox_geom_path
)
return
;
...
...
@@ -1113,6 +1114,7 @@ void OoxConverter::convert(OOX::Drawing::CPath2DQuadBezierTo *oox_geom_path)
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oCtrl
.
m_oY
.
GetValue
()))
+
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oEnd
.
m_oX
.
GetValue
()))
+
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oEnd
.
m_oY
.
GetValue
()))
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"S"
),
path_elm
);
}
...
...
@@ -1126,6 +1128,7 @@ void OoxConverter::convert(OOX::Drawing::CPath2DCubicBezierTo *oox_geom_path)
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oCtrl2
.
m_oY
.
GetValue
()))
+
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oEnd
.
m_oX
.
GetValue
()))
+
std
::
wstring
(
L" "
)
+
boost
::
lexical_cast
<
std
::
wstring
>
((
int
)
pt2emu
(
oox_geom_path
->
m_oEnd
.
m_oY
.
GetValue
()))
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"C"
),
path_elm
);
}
void
OoxConverter
::
convert
(
OOX
::
Drawing
::
CPath2DClose
*
oox_geom_path
)
...
...
@@ -1133,7 +1136,7 @@ void OoxConverter::convert(OOX::Drawing::CPath2DClose *oox_geom_path)
if
(
!
oox_geom_path
)
return
;
std
::
wstring
path_elm
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"
N
"
),
path_elm
);
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"
Z
"
),
path_elm
);
}
void
OoxConverter
::
convert
(
OOX
::
Drawing
::
CTextBodyProperties
*
oox_bodyPr
)
{
...
...
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