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
b41b5edb
Commit
b41b5edb
authored
Oct 11, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocxFormatRead - fix vml shape
parent
695c38c8
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
468 additions
and
337 deletions
+468
-337
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
+83
-77
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
+13
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+36
-2
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
+82
-15
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXBorderReader.h
...fficeRtfFile/RtfFormatLib/source/Reader/OOXBorderReader.h
+222
-218
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
+21
-20
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
+9
-2
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
+2
-2
No files found.
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.h
View file @
b41b5edb
...
...
@@ -33,6 +33,7 @@
#include <string>
#include <vector>
#include <map>
#include <cpdoccore/CPOptional.h>
...
...
@@ -42,6 +43,8 @@
#include "stylewrap.h"
#include "gradientstyle.h"
namespace
OOX
{
namespace
Vml
{
class
CShapeType
;
}}
namespace
cpdoccore
{
namespace
odf_writer
{
...
...
@@ -53,16 +56,16 @@ class odf_text_context;
class
odf_drawing_context
{
public:
odf_drawing_context
(
odf_conversion_context
*
odf_context
);
~
odf_drawing_context
();
odf_drawing_context
(
odf_conversion_context
*
odf_context
);
~
odf_drawing_context
();
void
set_drawings_rect
(
_CP_OPT
(
double
)
x_pt
,
_CP_OPT
(
double
)
y_pt
,
_CP_OPT
(
double
)
width_pt
,
_CP_OPT
(
double
)
height_pt
);
void
clear
();
void
set_styles_context
(
odf_style_context
*
styles_context
);
//для embedded
void
set_drawings_rect
(
_CP_OPT
(
double
)
x_pt
,
_CP_OPT
(
double
)
y_pt
,
_CP_OPT
(
double
)
width_pt
,
_CP_OPT
(
double
)
height_pt
);
void
clear
();
void
set_styles_context
(
odf_style_context
*
styles_context
);
//для embedded
void
set_header_state
(
bool
Val
);
void
set_footer_state
(
bool
Val
);
void
check_anchor
();
void
set_header_state
(
bool
Val
);
void
set_footer_state
(
bool
Val
);
void
check_anchor
();
void
set_margin_left
(
double
valPt
);
void
set_margin_right
(
double
valPt
);
...
...
@@ -75,15 +78,15 @@ public:
void
set_object_background
(
bool
Val
);
void
set_object_foreground
(
bool
Val
);
void
set_vertical_rel
(
int
from
);
void
set_vertical_pos
(
int
align
);
void
set_vertical_pos
(
double
offset_pt
);
void
set_vertical_rel
(
int
from
);
void
set_vertical_pos
(
int
align
);
void
set_vertical_pos
(
double
offset_pt
);
void
set_horizontal_rel
(
int
from
);
void
set_horizontal_pos
(
int
align
);
void
set_horizontal_pos
(
double
offset_pt
);
void
set_horizontal_rel
(
int
from
);
void
set_horizontal_pos
(
int
align
);
void
set_horizontal_pos
(
double
offset_pt
);
void
set_wrap_style
(
odf_types
::
style_wrap
::
type
style
);
void
set_wrap_style
(
odf_types
::
style_wrap
::
type
style
);
void
set_overlap
(
bool
val
);
///////////////////////////////////////////////////////////////////////////////////////////////////////////
...
...
@@ -107,18 +110,19 @@ public:
void
set_group_shift
(
double
x
,
double
y
);
void
end_group
();
void
start_shape
(
int
type
);
void
end_shape
();
void
start_shape
(
int
type
);
void
end_shape
();
bool
change_text_box_2_wordart
();
void
start_image
(
std
::
wstring
file_path
);
void
end_image
();
void
start_image
(
std
::
wstring
file_path
);
void
end_image
();
void
start_text_box
();
void
set_text_box_min_size
(
bool
val
);
void
set_text_box_min_size
(
double
w_pt
,
double
h_pt
);
void
set_text_box_parent_style
(
std
::
wstring
style_name
);
void
end_text_box
();
void
start_text_box
();
void
set_text_box_min_size
(
bool
val
);
void
set_text_box_min_size
(
double
w_pt
,
double
h_pt
);
void
set_text_box_parent_style
(
std
::
wstring
style_name
);
void
end_text_box
();
void
start_object
(
std
::
wstring
name
);
void
end_object
();
...
...
@@ -127,83 +131,83 @@ public:
office_element_ptr
&
get_root_element
();
void
start_element
(
office_element_ptr
&
elm
,
office_element_ptr
style_elm
=
office_element_ptr
());
void
end_element
();
void
start_element
(
office_element_ptr
&
elm
,
office_element_ptr
style_elm
=
office_element_ptr
());
void
end_element
();
bool
is_exist_content
();
//////////////////////////////////////////////////////////////////////////////////////
void
set_path
(
std
::
wstring
path_string
);
void
add_path_element
(
std
::
wstring
command
,
std
::
wstring
&
elm
);
void
add_modifier
(
std
::
wstring
modifier
);
void
set_path
(
std
::
wstring
path_string
);
void
add_path_element
(
std
::
wstring
command
,
std
::
wstring
&
elm
);
void
add_modifier
(
std
::
wstring
modifier
);
void
set_viewBox
(
double
W
,
double
H
);
void
set_viewBox
(
double
W
,
double
H
);
void
finalize
(
office_element_ptr
&
root_elm
);
///////////////////////////////////////////////////////////////////////////////////////
void
set_size
(
_CP_OPT
(
double
)
&
width_pt
,
_CP_OPT
(
double
)
&
height_pt
);
void
set_size
(
_CP_OPT
(
double
)
&
width_pt
,
_CP_OPT
(
double
)
&
height_pt
);
void
set_position
(
_CP_OPT
(
double
)
&
x_pt
,
_CP_OPT
(
double
)
&
y_pt
);
void
set_position_line
(
_CP_OPT
(
double
)
&
x_pt
,
_CP_OPT
(
double
)
&
y_pt
,
_CP_OPT
(
double
)
&
x1_pt
,
_CP_OPT
(
double
)
&
y1_pt
);
void
set_position
(
_CP_OPT
(
double
)
&
x_pt
,
_CP_OPT
(
double
)
&
y_pt
);
void
set_position_line
(
_CP_OPT
(
double
)
&
x_pt
,
_CP_OPT
(
double
)
&
y_pt
,
_CP_OPT
(
double
)
&
x1_pt
,
_CP_OPT
(
double
)
&
y1_pt
);
void
get_size
(
double
&
width_pt
,
double
&
height_pt
);
void
get_size
(
double
&
width_pt
,
double
&
height_pt
);
void
set_name
(
std
::
wstring
name
);
void
set_z_order
(
int
id
);
void
set_name
(
std
::
wstring
name
);
void
set_z_order
(
int
id
);
void
set_flip_H
(
bool
bVal
);
void
set_flip_V
(
bool
bVal
);
void
set_flip_H
(
bool
bVal
);
void
set_flip_V
(
bool
bVal
);
void
set_rotate
(
double
iVal
);
void
set_rotate
(
double
iVal
);
void
set_no_fill
();
void
set_type_fill
(
int
type
);
//for area - temp for objects
void
set_solid_fill
(
std
::
wstring
hexColor
);
void
set_opacity
(
double
percent
);
void
set_no_fill
();
void
set_type_fill
(
int
type
);
//for area - temp for objects
void
set_solid_fill
(
std
::
wstring
hexColor
);
void
set_opacity
(
double
percent
);
//////////////////////////////////////////////////////////////
void
start_area_properties
();
void
end_area_properties
();
void
start_line_properties
();
void
set_line_width
(
double
pt
);
void
set_line_dash_preset
(
int
style
);
void
start_line_properties
();
void
set_line_width
(
double
pt
);
void
set_line_dash_preset
(
int
style
);
void
set_line_head
(
int
type
,
int
len
,
int
width
);
void
set_line_tail
(
int
type
,
int
len
,
int
width
);
void
set_line_head
(
int
type
,
int
len
,
int
width
);
void
set_line_tail
(
int
type
,
int
len
,
int
width
);
std
::
wstring
add_marker_style
(
int
type
);
void
end_line_properties
();
void
end_line_properties
();
//void start_shadow_properties();
//void end_shadow_properties();
// пока одной функией ..
void
set_shadow
(
int
type
,
std
::
wstring
hexColor
,
_CP_OPT
(
double
)
opacity
,
double
dist_pt
,
double
dist_pt_y
=
-
1
);
void
set_shadow
(
int
type
,
std
::
wstring
hexColor
,
_CP_OPT
(
double
)
opacity
,
double
dist_pt
,
double
dist_pt_y
=
-
1
);
void
set_text
(
odf_text_context
*
text_context
);
void
set_text
(
odf_text_context
*
text_context
);
void
set_textarea_vertical_align
(
int
align
);
void
set_textarea_padding
(
double
left
,
double
top
,
double
right
,
double
bottom
);
//in cm
void
set_textarea_writing_mode
(
int
mode
);
void
set_textarea_wrap
(
bool
val
);
void
set_textarea_fontcolor
(
std
::
wstring
hexColor
);
void
set_textarea_font
(
_CP_OPT
(
std
::
wstring
)
&
latin
,
_CP_OPT
(
std
::
wstring
)
&
cs
,
_CP_OPT
(
std
::
wstring
)
&
ea
);
void
set_textarea_padding
(
double
left
,
double
top
,
double
right
,
double
bottom
);
//in cm
void
set_textarea_writing_mode
(
int
mode
);
void
set_textarea_wrap
(
bool
val
);
void
set_textarea_fontcolor
(
std
::
wstring
hexColor
);
void
set_textarea_font
(
_CP_OPT
(
std
::
wstring
)
&
latin
,
_CP_OPT
(
std
::
wstring
)
&
cs
,
_CP_OPT
(
std
::
wstring
)
&
ea
);
//////////////////////////////////////////////////////////////////////////////////////
void
start_gradient_style
();
void
set_gradient_type
(
odf_types
::
gradient_style
::
type
style
);
void
set_gradient_start
(
std
::
wstring
hexColor
,
_CP_OPT
(
double
)
&
intensiv
);
void
start_gradient_style
();
void
set_gradient_type
(
odf_types
::
gradient_style
::
type
style
);
void
set_gradient_start
(
std
::
wstring
hexColor
,
_CP_OPT
(
double
)
&
intensiv
);
void
set_gradient_end
(
std
::
wstring
hexColor
,
_CP_OPT
(
double
)
&
intensiv
);
void
set_gradient_rect
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_gradient_rect
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_gradient_center
(
double
cx
,
double
cy
);
void
set_gradient_angle
(
double
angle
);
void
end_gradient_style
();
void
set_gradient_angle
(
double
angle
);
void
end_gradient_style
();
////////////////////////////////////////////////////////////////////////////////////////
void
start_opacity_style
();
void
set_opacity_type
(
odf_types
::
gradient_style
style
);
void
set_opacity_start
(
double
val
);
void
start_opacity_style
();
void
set_opacity_type
(
odf_types
::
gradient_style
style
);
void
set_opacity_start
(
double
val
);
void
set_opacity_end
(
double
val
);
void
set_opacity_rect
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_opacity_angle
(
double
angle
);
void
end_opacity_style
();
void
set_opacity_rect
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_opacity_angle
(
double
angle
);
void
end_opacity_style
();
//////////////////////////////////////////////////////////////////////////////////////
void
start_hatch_style
();
void
set_hatch_line_color
(
std
::
wstring
hexColor
);
...
...
@@ -215,16 +219,18 @@ public:
void
set_bitmap_link
(
std
::
wstring
link
);
void
end_bitmap_style
();
//////////////////////////////////////////////////////////////////////////////////////
void
set_image_style_repeat
(
int
style
);
void
set_image_client_rect_pt
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_image_client_rect_inch
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_image_style_repeat
(
int
style
);
void
set_image_client_rect_pt
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_image_client_rect_inch
(
double
l
,
double
t
,
double
r
,
double
b
);
void
set_bitmap_tile_align
(
int
align
);
void
set_bitmap_tile_scale_x
(
double
scale_x
);
void
set_bitmap_tile_scale_y
(
double
scale_y
);
void
set_bitmap_tile_align
(
int
align
);
void
set_bitmap_tile_scale_x
(
double
scale_x
);
void
set_bitmap_tile_scale_y
(
double
scale_y
);
void
set_bitmap_tile_translate_y
(
double
y
);
void
set_bitmap_tile_translate_x
(
double
x
);
std
::
map
<
std
::
wstring
,
OOX
::
Vml
::
CShapeType
*>
m_mapVmlShapeTypes
;
private:
void
start_frame
();
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
View file @
b41b5edb
...
...
@@ -55,7 +55,19 @@ void OoxConverter::convert(OOX::Vml::CShapeType *vml_shape_type)
if
(
vml_shape_type
==
NULL
)
return
;
//custom shape
//save cash to other shape with this type
if
(
vml_shape_type
->
m_sId
.
IsInit
())
{
std
::
wstring
sId
(
vml_shape_type
->
m_sId
.
get
());
if
(
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
find
(
sId
)
==
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
end
())
{
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
insert
(
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
begin
(),
std
::
pair
<
std
::
wstring
,
OOX
::
Vml
::
CShapeType
*>
(
sId
,
vml_shape_type
));
}
}
//m_oPreferRelative//типо можно менять размер
for
(
unsigned
int
i
=
0
;
i
<
vml_shape_type
->
m_arrItems
.
size
();
i
++
)
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
b41b5edb
...
...
@@ -2042,9 +2042,12 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
else
// and oox_pic->m_oShapeRect
{
bool
bSet
=
false
;
OOX
::
Vml
::
CShapeType
*
shape_type
=
NULL
;
if
(
oox_pic
->
m_oShape
.
IsInit
())
{
OOX
::
Vml
::
SptType
sptType
=
oox_pic
->
m_oShapeType
->
m_oSpt
.
IsInit
()
?
static_cast
<
OOX
::
Vml
::
SptType
>
(
oox_pic
->
m_oShapeType
->
m_oSpt
->
GetValue
())
:
OOX
::
Vml
::
sptNotPrimitive
;
OOX
::
Vml
::
SptType
sptType
=
oox_pic
->
m_oShape
->
m_oSpt
.
IsInit
()
?
static_cast
<
OOX
::
Vml
::
SptType
>
(
oox_pic
->
m_oShape
->
m_oSpt
->
GetValue
())
:
OOX
::
Vml
::
sptNotPrimitive
;
if
(
sptType
!=
OOX
::
Vml
::
SptType
::
sptNotPrimitive
)
{
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
boost
::
lexical_cast
<
std
::
wstring
>
(
sptType
));
...
...
@@ -2065,12 +2068,43 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
odf_context
()
->
drawing_context
()
->
set_line_width
(
1.
);
bSet
=
true
;
}
if
(
oox_pic
->
m_oShape
->
m_sType
.
IsInit
())
{
std
::
wstring
type
(
oox_pic
->
m_oShape
->
m_sType
.
get
());
type
=
type
.
substr
(
1
);
//without #
std
::
map
<
std
::
wstring
,
OOX
::
Vml
::
CShapeType
*>::
iterator
it
=
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
find
(
type
);
if
(
it
!=
odf_context
()
->
drawing_context
()
->
m_mapVmlShapeTypes
.
end
())
{
shape_type
=
it
->
second
;
sptType
=
shape_type
->
m_oSpt
.
IsInit
()
?
static_cast
<
OOX
::
Vml
::
SptType
>
(
shape_type
->
m_oSpt
->
GetValue
())
:
OOX
::
Vml
::
sptNotPrimitive
;
if
(
!
bSet
&&
sptType
!=
OOX
::
Vml
::
SptType
::
sptNotPrimitive
)
{
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeType
(
sptType
));
bSet
=
true
;
}
}
if
(
!
bSet
)
{
int
pos
=
oox_pic
->
m_oShape
->
m_sType
->
Find
(
_T
(
"#_x0000_t"
));
if
(
pos
>=
0
)
{
sptType
=
(
OOX
::
Vml
::
SptType
)
_wtoi
(
oox_pic
->
m_oShape
->
m_sType
->
Mid
(
pos
+
9
,
oox_pic
->
m_oShape
->
m_sType
->
GetLength
()
-
pos
-
9
).
GetString
());
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeType
(
sptType
));
bSet
=
true
;
}
}
}
}
if
(
!
bSet
)
{
odf_context
()
->
drawing_context
()
->
set_name
(
L"Rect"
);
odf_context
()
->
drawing_context
()
->
start_shape
(
SimpleTypes
::
shapetypeRect
);
}
OoxConverter
::
convert
(
shape_type
);
OoxConverter
::
convert
(
oox_pic
->
m_oShape
.
GetPointer
());
odf_context
()
->
drawing_context
()
->
end_shape
();
}
...
...
ASCOfficeOdfFileW/win32/ASCOfficeOdfFileW.sln
View file @
b41b5edb
...
...
@@ -3,25 +3,26 @@ Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatWriterLib", "..\source\win32\OdfFormat.vcproj", "{E5A67556-44DA-4481-8F87-0A3AEDBD20DD}"
ProjectSection(ProjectDependencies) = postProject
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{609ED938-3CA8-4BED-B363-25096D4C4812} = {609ED938-3CA8-4BED-B363-25096D4C4812}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oox2OdfConverter", "..\source\win32\Oox2OdfConverter.vcproj", "{BEE01B53-244A-44E6-8947-ED9342D9247E}"
ProjectSection(ProjectDependencies) = postProject
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD} = {E5A67556-44DA-4481-8F87-0A3AEDBD20DD}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{E5A67556-44DA-4481-8F87-0A3AEDBD20DD} = {E5A67556-44DA-4481-8F87-0A3AEDBD20DD}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeOdfFileWTest", "..\ASCOfficeOdfFileWTest\ASCOfficeOdfFileWTest.vcproj", "{FBA8446A-150F-4A10-B4DA-1022048D6473}"
ProjectSection(ProjectDependencies) = postProject
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{
C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56
}
{
36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302
}
{BEE01B53-244A-44E6-8947-ED9342D9247E} = {BEE01B53-244A-44E6-8947-ED9342D9247E}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\DocxFormat\Projects\DocxFormat2005.vcproj", "{A100103A-353E-45E8-A9B8-90B87CC5C0B0}"
...
...
@@ -31,27 +32,33 @@ EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\..\ASCOfficeOdfFile\win32\formulasconvert.vcproj", "{94954A67-A853-43B1-A727-6EF2774C5A6A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
ProjectSection(ProjectDependencies) = postProject
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD} = {617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfCommon", "..\..\ASCOfficeOdfFile\win32\cpcommon.vcproj", "{609ED938-3CA8-4BED-B363-25096D4C4812}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "raster", "..\..\DesktopEditor\raster\raster_vs2005.vcproj", "{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}"
ProjectSection(ProjectDependencies) = postProject
{
BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36
}
{
37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2
}
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1} = {EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\..\DesktopEditor\cximage\CxImage\cximage_vs2005.vcproj", "{BC52A07C-A797-423D-8C4F-8678805BBB36}"
ProjectSection(ProjectDependencies) = postProject
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{818753F2-DBB9-4D3B-898A-A604309BE470} = {818753F2-DBB9-4D3B-898A-A604309BE470}
{FFDA5DA1-BB65-4695-B678-BE59B4A1355D} = {FFDA5DA1-BB65-4695-B678-BE59B4A1355D}
{9A037A69-D1DF-4505-AB2A-6CB3641C476E} = {9A037A69-D1DF-4505-AB2A-6CB3641C476E}
{40A69F40-063E-43FD-8543-455495D8733E} = {40A69F40-063E-43FD-8543-455495D8733E}
{0588563C-F05C-428C-B21A-DD74756628B3} = {0588563C-F05C-428C-B21A-DD74756628B3}
{DF861D33-9BC1-418C-82B1-581F590FE169} = {DF861D33-9BC1-418C-82B1-581F590FE169}
{764C3A2D-FB0F-428E-B1C7-62D1DD2CE239} = {764C3A2D-FB0F-428E-B1C7-62D1DD2CE239}
{43A0E60E-5C4A-4C09-A29B-7683F503BBD7} = {43A0E60E-5C4A-4C09-A29B-7683F503BBD7}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jasper", "..\..\DesktopEditor\cximage\jasper\jasper_vs2005.vcproj", "{FFDA5DA1-BB65-4695-B678-BE59B4A1355D}"
...
...
@@ -79,6 +86,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEd
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "agg2d", "..\..\DesktopEditor\agg-2.4\agg_vs2005.vcproj", "{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PPTXFormat", "..\..\ASCOfficePPTXFile\PPTXLib\PPTXFormat.vcproj", "{36636678-AE25-4BE6-9A34-2561D1BCF302}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Multithreaded|Win32 = Debug Multithreaded|Win32
...
...
@@ -719,6 +730,62 @@ Global
{F8274B05-168E-4D6E-B843-AA7510725363}.Unicode Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Unicode Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Unicode Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Multithreaded|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug Singlethreaded|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|Win32.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Multithreaded|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release Singlethreaded|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Release|x64.Build.0 = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|Win32.Build.0 = Debug|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|x64.ActiveCfg = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Debug|x64.Build.0 = Debug|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|Win32.ActiveCfg = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|Win32.Build.0 = Release|Win32
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|x64.ActiveCfg = Release|x64
{617F9069-5E37-4B80-9A3A-E77AFC4CC7AD}.Unicode Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|Win32.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Multithreaded|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|Win32.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug Singlethreaded|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|Win32.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Multithreaded|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|Win32.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release Singlethreaded|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Release|x64.Build.0 = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|Win32.Build.0 = Debug|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|x64.ActiveCfg = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Debug|x64.Build.0 = Debug|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|Win32.ActiveCfg = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|Win32.Build.0 = Release|Win32
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|x64.ActiveCfg = Release|x64
{36636678-AE25-4BE6-9A34-2561D1BCF302}.Unicode Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXBorderReader.h
View file @
b41b5edb
...
...
@@ -55,6 +55,7 @@ public:
{
if
(
m_ooxBorder
==
NULL
&&
m_ooxPageBorder
==
NULL
)
return
false
;
int
type_border
=
-
1
;
if
(
m_ooxPageBorder
)
{
if
((
m_ooxPageBorder
->
m_oColor
.
IsInit
())
&&
(
m_ooxPageBorder
->
m_oColor
->
GetValue
()
==
SimpleTypes
::
hexcolorRGB
))
...
...
@@ -70,16 +71,34 @@ public:
{
oOutputBorder
.
m_nWidth
=
RtfUtility
::
pt2Twip
(
m_ooxPageBorder
->
m_oSz
->
ToPoints
());
// = 5 * nSize / 2;//w:sz 1/8 twips (equivalent to 1/576th of an inch)
}
if
(
m_ooxPageBorder
->
m_oVal
.
IsInit
())
type_border
=
m_ooxPageBorder
->
m_oVal
->
GetValue
();
}
if
(
m_ooxBorder
)
{
if
(
m_ooxBorder
->
m_oVal
.
IsInit
())
{
type_border
=
m_ooxBorder
->
m_oVal
->
GetValue
();
}
//if (m_ooxBorder->m_oVal->GetValue() == SimpleTypes::bordervalueNone ) return true;
// // это отсутствие свойства а не бордера (Nil)
// // это отсутствие свойства а не бордера (Nil
switch
(
m_ooxBorder
->
m_oVal
->
GetValue
())
if
((
m_ooxBorder
->
m_oColor
.
IsInit
())
&&
(
m_ooxBorder
->
m_oColor
->
GetValue
()
==
SimpleTypes
::
hexcolorRGB
))
{
RtfColor
oColor
(
m_ooxBorder
->
m_oColor
->
Get_R
(),
m_ooxBorder
->
m_oColor
->
Get_G
(),
m_ooxBorder
->
m_oColor
->
Get_B
());
oOutputBorder
.
m_nColor
=
oParam
.
oRtf
->
m_oColorTable
.
AddItem
(
oColor
);
}
if
(
m_ooxBorder
->
m_oSpace
.
IsInit
())
{
oOutputBorder
.
m_nSpace
=
RtfUtility
::
pt2Twip
(
m_ooxBorder
->
m_oSpace
->
ToPoints
());
}
if
(
m_ooxBorder
->
m_oSz
.
IsInit
())
{
oOutputBorder
.
m_nWidth
=
RtfUtility
::
pt2Twip
(
m_ooxBorder
->
m_oSz
->
ToPoints
());
// = 5 * nSize / 2;//w:sz 1/8 twips (equivalent to 1/576th of an inch)
}
}
switch
(
type_border
)
{
//case SimpleTypes::bordervalueApples : return _T("apples");
//case SimpleTypes::bordervalueArchedScallops : return _T("archedScallops");
...
...
@@ -277,28 +296,13 @@ public:
//oOutputBorder.m_eType = RtfBorder::bt_brdrsh;
//oOutputBorder.m_eType = RtfBorder::bt_brdrhair;
default
:
oOutputBorder
.
m_eType
=
RtfBorder
::
bt_brdrs
;
break
;
//
default : oOutputBorder.m_eType = RtfBorder::bt_brdrs; break;
}
}
if
(
oOutputBorder
.
m_eType
!=
RtfBorder
::
bt_none
)
{
if
((
m_ooxBorder
->
m_oColor
.
IsInit
())
&&
(
m_ooxBorder
->
m_oColor
->
GetValue
()
==
SimpleTypes
::
hexcolorRGB
))
{
RtfColor
oColor
(
m_ooxBorder
->
m_oColor
->
Get_R
(),
m_ooxBorder
->
m_oColor
->
Get_G
(),
m_ooxBorder
->
m_oColor
->
Get_B
());
oOutputBorder
.
m_nColor
=
oParam
.
oRtf
->
m_oColorTable
.
AddItem
(
oColor
);
}
if
(
m_ooxBorder
->
m_oSpace
.
IsInit
())
{
oOutputBorder
.
m_nSpace
=
RtfUtility
::
pt2Twip
(
m_ooxBorder
->
m_oSpace
->
ToPoints
());
}
if
(
m_ooxBorder
->
m_oSz
.
IsInit
())
{
oOutputBorder
.
m_nWidth
=
RtfUtility
::
pt2Twip
(
m_ooxBorder
->
m_oSz
->
ToPoints
());
// = 5 * nSize / 2;//w:sz 1/8 twips (equivalent to 1/576th of an inch)
}
}
}
if
(
type_border
>=
0
&&
oOutputBorder
.
m_eType
==
PROP_DEF
)
oOutputBorder
.
m_eType
=
RtfBorder
::
bt_brdrs
;
return
true
;
}
};
ASCOfficeRtfFile/RtfFormatLib/source/RtfSection.cpp
View file @
b41b5edb
...
...
@@ -406,16 +406,17 @@ CString RtfSectionProperty::RenderToRtf(RenderParameter oRenderParameter)
RENDER_RTF_BOOL
(
m_bLandscapeFormat
,
sResult
,
_T
(
"lndscpsxn"
)
)
}
RENDER_RTF_BOOL
(
m_bTitlePage
,
sResult
,
_T
(
"titlepg"
)
)
RENDER_RTF_INT
(
m_nHeaderTop
,
sResult
,
_T
(
"headery"
)
)
RENDER_RTF_INT
(
m_nFooterBottom
,
sResult
,
_T
(
"footery"
)
)
RENDER_RTF_BOOL
(
m_bTitlePage
,
sResult
,
_T
(
"titlepg"
)
)
RENDER_RTF_INT
(
m_nHeaderTop
,
sResult
,
_T
(
"headery"
)
)
RENDER_RTF_INT
(
m_nFooterBottom
,
sResult
,
_T
(
"footery"
)
)
//Page Numbers
RENDER_RTF_INT
(
m_nPageNumberStart
,
sResult
,
_T
(
"pgnstarts"
)
)
RENDER_RTF_BOOL
(
m_bPageNumberContinuos
,
sResult
,
_T
(
"pgncont"
)
)
RENDER_RTF_BOOL
(
m_bPageNumberRestart
,
sResult
,
_T
(
"pgnrestart"
)
)
RENDER_RTF_INT
(
m_nPageNumberX
,
sResult
,
_T
(
"pgnx"
)
)
RENDER_RTF_INT
(
m_nPageNumberY
,
sResult
,
_T
(
"pgny"
)
)
RENDER_RTF_INT
(
m_nPageNumberStart
,
sResult
,
_T
(
"pgnstarts"
)
)
RENDER_RTF_BOOL
(
m_bPageNumberContinuos
,
sResult
,
_T
(
"pgncont"
)
)
RENDER_RTF_BOOL
(
m_bPageNumberRestart
,
sResult
,
_T
(
"pgnrestart"
)
)
RENDER_RTF_INT
(
m_nPageNumberX
,
sResult
,
_T
(
"pgnx"
)
)
RENDER_RTF_INT
(
m_nPageNumberY
,
sResult
,
_T
(
"pgny"
)
)
switch
(
m_ePageNumberFormat
)
{
case
pnf_pgndec
:
sResult
+=
_T
(
"
\\
pgndec"
);
break
;
...
...
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
View file @
b41b5edb
...
...
@@ -2970,9 +2970,15 @@ namespace SimpleTypes
return
0
;
int
nPos
=
sValue
.
Find
(
_T
(
","
)
);
if
(
-
1
==
nPos
)
return
0
;
if
(
-
1
==
nPos
)
{
//only x coord
sValue
.
Replace
(
_T
(
"@"
),
_T
(
""
));
m_nX
=
sValue
.
IsEmpty
()
?
0
:
_wtoi
(
sValue
);
}
else
{
CString
strX
=
sValue
.
Mid
(
0
,
nPos
);
CString
strY
=
sValue
.
Mid
(
nPos
+
1
,
nLen
-
nPos
-
1
)
;
...
...
@@ -2981,6 +2987,7 @@ namespace SimpleTypes
m_nX
=
strX
.
IsEmpty
()
?
0
:
_wtoi
(
strX
);
m_nY
=
strY
.
IsEmpty
()
?
0
:
_wtoi
(
strY
);
}
return
0
;
}
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
View file @
b41b5edb
...
...
@@ -98,7 +98,7 @@ namespace OOX
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oHrNoShade
;
SimpleTypes
::
CDouble
m_oHrPct
;
SimpleTypes
::
CHrAlign
<
SimpleTypes
::
hralignLeft
>
m_oHrAlign
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
boolean
Tru
e
>
m_oAllowInCell
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
boolean
Fals
e
>
m_oAllowInCell
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanTrue
>
m_oAllowOverlap
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oUserDrawn
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oBorderTopColor
;
...
...
@@ -2897,7 +2897,7 @@ namespace OOX
SimpleTypes
::
CDouble
m_oHrPct
;
SimpleTypes
::
CHrAlign
<
SimpleTypes
::
hralignLeft
>
m_oHrAlign
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oAllowInCell
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
boolean
False
>
m_oAllowOverlap
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
boolean
True
>
m_oAllowOverlap
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oUserDrawn
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oBorderTopColor
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oBorderLeftColor
;
...
...
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