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
92e02257
Commit
92e02257
authored
Feb 03, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #33918
parent
903245e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
4 deletions
+76
-4
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
+73
-2
ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
+3
-2
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
View file @
92e02257
...
...
@@ -305,9 +305,80 @@ void OoxConverter::convert(PPTX::Logic::PathBase *oox_path)
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
BlipFill
*
oox_fill
)
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
BlipFill
*
oox_
bitmap_
fill
)
{
if
(
!
oox_fill
)
return
;
if
(
oox_bitmap_fill
==
NULL
)
return
;
odf_context
()
->
drawing_context
()
->
start_bitmap_style
();
{
double
Width
=
0
,
Height
=
0
;
if
(
oox_bitmap_fill
->
blip
.
IsInit
())
{
std
::
wstring
sID
,
pathImage
;
if
(
oox_bitmap_fill
->
blip
->
embed
.
IsInit
())
{
sID
=
oox_bitmap_fill
->
blip
->
embed
->
get
();
pathImage
=
find_link_by_id
(
sID
,
1
);
if
(
!
pathImage
.
empty
())
{
odf_context
()
->
drawing_context
()
->
set_bitmap_link
(
pathImage
);
_graphics_utils_
::
GetResolution
(
pathImage
.
c_str
(),
Width
,
Height
);
}
}
else
if
(
oox_bitmap_fill
->
blip
->
link
.
IsInit
())
{
sID
=
pathImage
=
oox_bitmap_fill
->
blip
->
link
->
get
();
odf_context
()
->
drawing_context
()
->
set_bitmap_link
(
pathImage
);
//...
}
//for (size_t i = 0 ; i < oox_bitmap_fill->blip->m_arrEffects.size(); i++)
//{
// convert(oox_bitmap_fill->blip->m_arrEffects[i]);
//}
}
if
(
oox_bitmap_fill
->
srcRect
.
IsInit
()
&&
Width
>
0
&&
Height
>
0
)
//часть изображения
{
odf_context
()
->
drawing_context
()
->
set_image_client_rect_inch
(
(
oox_bitmap_fill
->
srcRect
->
l
.
IsInit
()
?
XmlUtils
::
GetInteger
(
oox_bitmap_fill
->
srcRect
->
l
.
get
())
:
0
)
/
100.
*
Width
/
currentSystemDPI
,
(
oox_bitmap_fill
->
srcRect
->
t
.
IsInit
()
?
XmlUtils
::
GetInteger
(
oox_bitmap_fill
->
srcRect
->
t
.
get
())
:
0
)
/
100.
*
Height
/
currentSystemDPI
,
(
oox_bitmap_fill
->
srcRect
->
r
.
IsInit
()
?
XmlUtils
::
GetInteger
(
oox_bitmap_fill
->
srcRect
->
r
.
get
())
:
0
)
/
100.
*
Width
/
currentSystemDPI
,
(
oox_bitmap_fill
->
srcRect
->
b
.
IsInit
()
?
XmlUtils
::
GetInteger
(
oox_bitmap_fill
->
srcRect
->
b
.
get
())
:
0
)
/
100.
*
Height
/
currentSystemDPI
);
}
if
(
oox_bitmap_fill
->
tile
.
IsInit
())
{
odf_context
()
->
drawing_context
()
->
set_image_style_repeat
(
2
);
if
(
oox_bitmap_fill
->
tile
->
algn
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_bitmap_tile_align
(
oox_bitmap_fill
->
tile
->
algn
->
GetBYTECode
());
if
(
oox_bitmap_fill
->
tile
->
flip
.
IsInit
())
{}
if
(
oox_bitmap_fill
->
tile
->
sx
.
IsInit
()
&&
Width
>
0
)
{
odf_context
()
->
drawing_context
()
->
set_bitmap_tile_scale_x
(
*
oox_bitmap_fill
->
tile
->
sx
/
100.
*
Width
);
}
if
(
oox_bitmap_fill
->
tile
->
sy
.
IsInit
()
&&
Height
>
0
)
{
odf_context
()
->
drawing_context
()
->
set_bitmap_tile_scale_y
(
*
oox_bitmap_fill
->
tile
->
sy
/
100.
*
Height
);
}
if
(
oox_bitmap_fill
->
tile
->
tx
.
IsInit
()
&&
Width
>
0
)
{
odf_context
()
->
drawing_context
()
->
set_bitmap_tile_translate_x
(
*
oox_bitmap_fill
->
tile
->
tx
*
100.
/
Width
);
}
if
(
oox_bitmap_fill
->
tile
->
ty
.
IsInit
()
&&
Height
>
0
)
{
odf_context
()
->
drawing_context
()
->
set_bitmap_tile_translate_y
(
*
oox_bitmap_fill
->
tile
->
ty
*
100.
/
Height
);
}
}
if
(
oox_bitmap_fill
->
stretch
.
IsInit
())
{
odf_context
()
->
drawing_context
()
->
set_image_style_repeat
(
1
);
if
(
oox_bitmap_fill
->
stretch
->
fillRect
.
IsInit
()){}
//заполнение неполного объема
}
}
odf_context
()
->
drawing_context
()
->
end_bitmap_style
();
}
void
OoxConverter
::
convert
(
PPTX
::
Logic
::
GradFill
*
oox_grad_fill
)
{
...
...
ASCOfficePPTXFile/PPTXFormat/FileContainer.cpp
View file @
92e02257
...
...
@@ -158,8 +158,9 @@ namespace PPTX
std
::
map
<
std
::
wstring
,
smart_ptr
<
OOX
::
File
>>::
const_iterator
pPair
=
map
.
find
(
normPath
);
if
(
bIsSlide
&&
(
pRelation
->
Type
()
==
OOX
::
Presentation
::
FileTypes
::
Slide
))
{
if
(
bIsSlide
&&
(
pRelation
->
Type
()
==
OOX
::
FileTypes
::
HyperLink
))
{
// + external audio, video ...
normPath
=
pRelation
->
Target
();
long
percent
=
Event
->
GetPercent
();
smart_ptr
<
OOX
::
File
>
file
=
smart_ptr
<
OOX
::
File
>
(
new
OOX
::
HyperLink
(
pRelation
->
Target
()));
...
...
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