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
f074d125
Commit
f074d125
authored
Apr 03, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatWriter - odp
parent
30f07d3a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
38 deletions
+45
-38
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
+8
-0
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+28
-29
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
+5
-5
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+1
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
+2
-2
X2tConverter/build/Qt/X2tConverter.pri
X2tConverter/build/Qt/X2tConverter.pri
+1
-1
No files found.
ASCOfficeDocFile/DocFormatTest/DocFormatTest.vcproj
View file @
f074d125
...
...
@@ -385,6 +385,10 @@
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\FontProcessor.cpp"
>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\BinReader\Readers.cpp"
>
</File>
<File
RelativePath=
"..\..\ASCOfficeDocxFile2\DocWrapper\XlsxSerializer.cpp"
>
...
...
@@ -434,6 +438,10 @@
RelativePath=
"..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
</File>
<File
RelativePath=
"..\..\Common\OfficeFileFormatChecker2.cpp"
>
</File>
<File
RelativePath=
"..\..\UnicodeConverter\UnicodeConverter.cpp"
>
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
f074d125
...
...
@@ -115,6 +115,10 @@ void OoxConverter::convert(PPTX::Logic::Table *oox_table)
{
if
(
oox_table
==
NULL
)
return
;
odf_context
()
->
drawing_context
()
->
start_shape
(
0
);
//frame
odf_context
()
->
drawing_context
()
->
end_shape
();
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
Xfrm
*
oox_xfrm
)
{
...
...
@@ -322,8 +326,6 @@ void OoxConverter::convert(PPTX::Logic::SpPr *oox_spPr, PPTX::Logic::ShapeStyle*
{
if
(
oox_spPr
==
NULL
)
return
;
bool
use_line_from_style
=
false
;
convert
(
oox_spPr
->
xfrm
.
GetPointer
());
PPTX
::
Logic
::
PrstGeom
*
prstGeom
=
&
oox_spPr
->
Geometry
.
as
<
PPTX
::
Logic
::
PrstGeom
>
();
...
...
@@ -334,7 +336,10 @@ void OoxConverter::convert(PPTX::Logic::SpPr *oox_spPr, PPTX::Logic::ShapeStyle*
odf_context
()
->
drawing_context
()
->
start_area_properties
();
{
convert
(
&
oox_spPr
->
Fill
,
oox_sp_style
);
if
(
oox_spPr
->
Fill
.
is_init
())
convert
(
&
oox_spPr
->
Fill
);
else
if
(
oox_sp_style
)
convert
(
&
oox_sp_style
->
fillRef
,
1
);
}
odf_context
()
->
drawing_context
()
->
end_area_properties
();
...
...
@@ -364,29 +369,22 @@ void OoxConverter::convert(PPTX::Logic::SpPr *oox_spPr, PPTX::Logic::ShapeStyle*
//-----------------------------------------------------------------------------------------------------------------------------
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
UniFill
*
oox_fill
,
PPTX
::
Logic
::
ShapeStyle
*
oox_sp_style
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
UniFill
*
oox_fill
,
DWORD
nARGB
)
{
if
(
oox_fill
==
NULL
)
return
;
bool
use_fill_from_style
=
false
;
PPTX
::
Logic
::
NoFill
*
noFill
=
&
oox_fill
->
as
<
PPTX
::
Logic
::
NoFill
>
();
PPTX
::
Logic
::
BlipFill
*
blipFill
=
&
oox_fill
->
as
<
PPTX
::
Logic
::
BlipFill
>
();
PPTX
::
Logic
::
GradFill
*
gradFill
=
&
oox_fill
->
as
<
PPTX
::
Logic
::
GradFill
>
();
PPTX
::
Logic
::
SolidFill
*
solidFill
=
&
oox_fill
->
as
<
PPTX
::
Logic
::
SolidFill
>
();
PPTX
::
Logic
::
PattFill
*
pattFill
=
&
oox_fill
->
as
<
PPTX
::
Logic
::
PattFill
>
();
if
(
solidFill
)
convert
(
solidFill
);
if
(
solidFill
)
convert
(
solidFill
,
nARGB
);
else
if
(
blipFill
)
convert
(
blipFill
);
else
if
(
gradFill
)
convert
(
gradFill
);
else
if
(
pattFill
)
convert
(
pattFill
);
else
if
(
gradFill
)
convert
(
gradFill
,
nARGB
);
else
if
(
pattFill
)
convert
(
pattFill
,
nARGB
);
else
if
(
noFill
)
odf_context
()
->
drawing_context
()
->
set_no_fill
();
else
use_fill_from_style
=
true
;
if
(
use_fill_from_style
&&
oox_sp_style
)
{
convert
(
&
oox_sp_style
->
fillRef
,
1
);
}
}
int
OoxConverter
::
convert
(
PPTX
::
Logic
::
PrstTxWarp
*
oox_text_preset
)
...
...
@@ -550,7 +548,7 @@ void OoxConverter::convert(PPTX::Logic::BlipFill *oox_bitmap_fill)
}
odf_context
()
->
drawing_context
()
->
end_bitmap_style
();
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
GradFill
*
oox_grad_fill
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
GradFill
*
oox_grad_fill
,
DWORD
nARGB
)
{
if
(
!
oox_grad_fill
)
return
;
...
...
@@ -586,8 +584,8 @@ void OoxConverter::convert(PPTX::Logic::GradFill *oox_grad_fill)
std
::
wstring
hexColorStart
,
hexColorEnd
;
_CP_OPT
(
double
)
opacityStart
,
opacityEnd
;
convert
(
&
oox_grad_fill
->
GsLst
[
0
].
color
,
hexColorEnd
,
opacityEnd
);
convert
(
&
oox_grad_fill
->
GsLst
[
oox_grad_fill
->
GsLst
.
size
()
-
1
].
color
,
hexColorStart
,
opacityStart
);
convert
(
&
oox_grad_fill
->
GsLst
[
0
].
color
,
hexColorEnd
,
opacityEnd
,
nARGB
);
convert
(
&
oox_grad_fill
->
GsLst
[
oox_grad_fill
->
GsLst
.
size
()
-
1
].
color
,
hexColorStart
,
opacityStart
,
nARGB
);
odf_context
()
->
drawing_context
()
->
set_gradient_start
(
hexColorStart
,
opacityStart
);
odf_context
()
->
drawing_context
()
->
set_gradient_end
(
hexColorEnd
,
opacityEnd
);
...
...
@@ -628,33 +626,31 @@ void OoxConverter::convert(PPTX::Logic::GradFill *oox_grad_fill)
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
UniColor
*
color
,
std
::
wstring
&
hexString
,
_CP_OPT
(
double
)
&
opacity
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
UniColor
*
color
,
std
::
wstring
&
hexString
,
_CP_OPT
(
double
)
&
opacity
,
DWORD
nARGB
)
{
if
(
!
color
)
return
;
DWORD
argb
=
0
;
smart_ptr
<
PPTX
::
Logic
::
ClrMap
>
clrMap
(
oox_clrMap
());
clrMap
.
AddRef
();
smart_ptr
<
PPTX
::
Theme
>
theme
(
oox_theme
());
theme
.
AddRef
();
argb
=
color
->
GetRGBColor
(
theme
,
clrMap
);
nARGB
=
color
->
GetRGBColor
(
theme
,
clrMap
,
nARGB
);
hexString
=
XmlUtils
::
IntToString
(
argb
&
0x00FFFFFF
,
L"#%06X"
);
hexString
=
XmlUtils
::
IntToString
(
nARGB
&
0x00FFFFFF
,
L"#%06X"
);
if
((
argb
>>
24
)
!=
0xff
)
if
((
nARGB
>>
24
)
!=
0xff
)
{
opacity
=
((
argb
>>
24
)
/
255.
)
*
100.
;
opacity
=
((
nARGB
>>
24
)
/
255.
)
*
100.
;
}
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
SolidFill
*
oox_fill
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
SolidFill
*
oox_fill
,
DWORD
nARGB
)
{
if
(
!
oox_fill
)
return
;
std
::
wstring
hexString
;
_CP_OPT
(
double
)
opacity
;
convert
(
&
oox_fill
->
Color
,
hexString
,
opacity
);
convert
(
&
oox_fill
->
Color
,
hexString
,
opacity
,
nARGB
);
odf_context
()
->
drawing_context
()
->
set_solid_fill
(
hexString
);
...
...
@@ -663,7 +659,7 @@ void OoxConverter::convert(PPTX::Logic::SolidFill *oox_fill)
odf_context
()
->
drawing_context
()
->
set_opacity
(
*
opacity
);
}
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
PattFill
*
oox_fill
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
PattFill
*
oox_fill
,
DWORD
nARGB
)
{
if
(
!
oox_fill
)
return
;
}
...
...
@@ -1191,6 +1187,7 @@ void OoxConverter::convert(PPTX::Logic::StyleRef *style_ref, int type)
PPTX
::
Logic
::
UniFill
*
fill
=
NULL
;
if
(
index
<
1000
)
{
index
-=
1
;
if
((
index
>=
0
)
||
(
index
<
theme
->
themeElements
.
fmtScheme
.
fillStyleLst
.
size
()))
{
fill
=
&
theme
->
themeElements
.
fmtScheme
.
fillStyleLst
[
index
];
...
...
@@ -1204,10 +1201,12 @@ void OoxConverter::convert(PPTX::Logic::StyleRef *style_ref, int type)
fill
=
&
theme
->
themeElements
.
fmtScheme
.
bgFillStyleLst
[
index
];
}
}
convert
(
fill
);
convert
(
fill
,
style_ref
->
Color
.
GetARGB
());
}
else
if
(
type
==
2
)
{
//index -= 1;
if
((
index
>=
0
)
||
(
index
<
theme
->
themeElements
.
fmtScheme
.
lnStyleLst
.
size
()))
{
convert
(
&
theme
->
themeElements
.
fmtScheme
.
lnStyleLst
[
index
]);
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
View file @
f074d125
...
...
@@ -367,9 +367,9 @@ public:
void
convert
(
PPTX
::
Logic
::
PrstGeom
*
oox_geom
);
void
convert
(
PPTX
::
Logic
::
CustGeom
*
oox_geom
);
void
convert
(
PPTX
::
Logic
::
BlipFill
*
oox_fill
);
void
convert
(
PPTX
::
Logic
::
GradFill
*
oox_fill
);
void
convert
(
PPTX
::
Logic
::
SolidFill
*
oox_fill
);
void
convert
(
PPTX
::
Logic
::
PattFill
*
oox_fill
);
void
convert
(
PPTX
::
Logic
::
GradFill
*
oox_fill
,
DWORD
ARGB
=
0
);
void
convert
(
PPTX
::
Logic
::
SolidFill
*
oox_fill
,
DWORD
ARGB
=
0
);
void
convert
(
PPTX
::
Logic
::
PattFill
*
oox_fill
,
DWORD
ARGB
=
0
);
void
convert
(
PPTX
::
Logic
::
EffectLst
*
oox_effect_lst
);
void
convert
(
PPTX
::
Logic
::
Ln
*
oox_line
);
void
convert
(
PPTX
::
Logic
::
FontRef
*
oox_fontRef
);
...
...
@@ -377,8 +377,8 @@ public:
void
convert
(
PPTX
::
Logic
::
Path2D
*
oox_path2D
);
void
convert
(
PPTX
::
Logic
::
PathBase
*
oox_path
);
void
convert
(
PPTX
::
Logic
::
BodyPr
*
oox_bodyPr
);
void
convert
(
PPTX
::
Logic
::
UniFill
*
oox_fill
,
PPTX
::
Logic
::
ShapeStyle
*
oox_style
=
NULL
);
void
convert
(
PPTX
::
Logic
::
UniColor
*
color
,
std
::
wstring
&
hexString
,
_CP_OPT
(
double
)
&
opacity
);
void
convert
(
PPTX
::
Logic
::
UniFill
*
oox_fill
,
DWORD
ARGB
=
0
);
void
convert
(
PPTX
::
Logic
::
UniColor
*
color
,
std
::
wstring
&
hexString
,
_CP_OPT
(
double
)
&
opacity
,
DWORD
ARGB
=
0
);
void
convert
(
PPTX
::
Logic
::
NvSpPr
*
oox_nvSpPr
);
void
convert
(
PPTX
::
Logic
::
CNvPr
*
oox_cnvPr
);
void
convert
(
PPTX
::
Logic
::
CNvSpPr
*
oox_cnvSpPr
);
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
f074d125
...
...
@@ -314,7 +314,7 @@ void PptxConverter::convert(PPTX::Logic::Bg *oox_background)
odp_context
->
drawing_context
()
->
set_background_state
(
true
);
if
(
oox_background
->
bgPr
.
IsInit
())
{
convert
(
&
oox_background
->
bgPr
->
Fill
);
OoxConverter
::
convert
(
&
oox_background
->
bgPr
->
Fill
);
//EffectProperties EffectList;
//nullable_bool shadeToTitle;
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Pic.cpp
View file @
f074d125
...
...
@@ -41,8 +41,8 @@
#include "Media/MediaFile.h"
#include "Media/WavAudioFile.h"
#include "../../Common/DocxFormat/Source/DocxFormat/Media/OleObject.h"
#include "../../Common/DocxFormat/Source/MathEquation/MathEquation.h"
#include "../../
../
Common/DocxFormat/Source/DocxFormat/Media/OleObject.h"
#include "../../
../
Common/DocxFormat/Source/MathEquation/MathEquation.h"
#include "../../../ASCOfficeDocxFile2/BinWriter/BinEquationWriter.h"
#include "../../../ASCOfficeDocxFile2/BinWriter/BinWriters.h"
...
...
X2tConverter/build/Qt/X2tConverter.pri
View file @
f074d125
...
...
@@ -7,7 +7,7 @@
QT -= core
QT -= gui
VERSION = 2.
0.4.448
VERSION = 2.
4.448.000
DEFINES += INTVER=$$VERSION
TARGET = x2t
...
...
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