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
47ffdae8
Commit
47ffdae8
authored
Jun 02, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PptxFormat - partly fix 35054
parent
fd587008
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
145 additions
and
4 deletions
+145
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
+124
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
+1
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
+1
-1
XlsxSerializerCom/Reader/BinaryWriter.h
XlsxSerializerCom/Reader/BinaryWriter.h
+0
-1
No files found.
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
View file @
47ffdae8
...
...
@@ -187,8 +187,25 @@ namespace PPTX
break
;
}
case
BULLET_TYPE_BULLET_BLIP
:
// TODO:
break
;
{
pReader
->
Skip
(
5
);
// len + type + start attr
Logic
::
BuBlip
*
pBuBlip
=
new
Logic
::
BuBlip
();
pBuBlip
->
blip
.
fromPPTY
(
pReader
);
if
(
pBuBlip
->
blip
.
embed
.
IsInit
())
{
m_Bullet
.
reset
(
pBuBlip
);
}
else
{
//??? сбой ???
delete
pBuBlip
;
Logic
::
BuChar
*
pBuChar
=
new
Logic
::
BuChar
();
pBuChar
->
Char
=
wchar_t
(
L
'\
x2022
'
);
m_Bullet
.
reset
(
pBuChar
);
}
}
break
;
default:
m_Bullet
.
reset
(
new
Logic
::
BuNone
());
break
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
View file @
47ffdae8
...
...
@@ -257,5 +257,129 @@ namespace PPTX
pWriter
->
EndRecord
();
}
void
Blip
::
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
)
{
LONG
_s2
=
pReader
->
GetPos
();
LONG
_e2
=
_s2
+
pReader
->
GetLong
()
+
4
;
pReader
->
Skip
(
1
);
while
(
true
)
{
BYTE
_at
=
pReader
->
GetUChar_TypeNode
();
if
(
NSBinPptxRW
::
g_nodeAttributeEnd
==
_at
)
break
;
if
(
_at
==
0
)
pReader
->
Skip
(
1
);
}
while
(
pReader
->
GetPos
()
<
_e2
)
{
BYTE
_t
=
pReader
->
GetUChar
();
switch
(
_t
)
{
case
0
:
case
1
:
{
// id. embed / link
pReader
->
Skip
(
4
);
break
;
}
case
10
:
case
11
:
{
// id. embed / link
pReader
->
GetString2
();
break
;
}
case
2
:
{
pReader
->
Skip
(
4
);
ULONG
count_effects
=
pReader
->
GetULong
();
for
(
ULONG
_eff
=
0
;
_eff
<
count_effects
;
++
_eff
)
{
pReader
->
Skip
(
1
);
// type
ULONG
rec_len
=
pReader
->
GetULong
();
if
(
0
==
rec_len
)
continue
;
BYTE
rec
=
pReader
->
GetUChar
();
if
(
rec
==
EFFECT_TYPE_ALPHAMODFIX
)
{
// alpha!!!
LONG
_e22
=
pReader
->
GetPos
()
+
pReader
->
GetLong
()
+
4
;
pReader
->
Skip
(
1
);
// startattr
PPTX
::
Logic
::
AlphaModFix
*
pEffect
=
new
PPTX
::
Logic
::
AlphaModFix
();
while
(
true
)
{
BYTE
_at
=
pReader
->
GetUChar_TypeNode
();
if
(
NSBinPptxRW
::
g_nodeAttributeEnd
==
_at
)
break
;
if
(
_at
==
0
)
pEffect
->
amt
=
pReader
->
GetLong
();
}
Effects
.
push_back
(
UniEffect
());
Effects
[
0
].
InitPointer
(
pEffect
);
pReader
->
Seek
(
_e22
);
}
else
{
pReader
->
SkipRecord
();
}
}
break
;
}
case
3
:
{
pReader
->
Skip
(
6
);
// len + start attributes + type
std
::
wstring
strImagePath
=
pReader
->
GetString2
();
if
(
0
!=
strImagePath
.
find
(
_T
(
"http:"
))
&&
0
!=
strImagePath
.
find
(
_T
(
"https:"
))
&&
0
!=
strImagePath
.
find
(
_T
(
"ftp:"
))
&&
0
!=
strImagePath
.
find
(
_T
(
"file:"
)))
{
if
(
0
==
strImagePath
.
find
(
_T
(
"theme"
)))
{
strImagePath
=
pReader
->
m_strFolderExternalThemes
+
FILE_SEPARATOR_STR
+
strImagePath
;
}
else
{
strImagePath
=
pReader
->
m_strFolder
+
FILE_SEPARATOR_STR
+
_T
(
"media"
)
+
FILE_SEPARATOR_STR
+
strImagePath
;
}
OOX
::
CPath
pathUrl
=
strImagePath
;
strImagePath
=
pathUrl
.
GetPath
();
}
smart_ptr
<
OOX
::
File
>
additionalFile
;
NSBinPptxRW
::
_relsGeneratorInfo
oRelsGeneratorInfo
=
pReader
->
m_pRels
->
WriteImage
(
strImagePath
,
additionalFile
,
L""
,
L""
);
if
(
oRelsGeneratorInfo
.
nImageRId
>
0
)
{
embed
=
new
OOX
::
RId
((
size_t
)
oRelsGeneratorInfo
.
nImageRId
);
}
pReader
->
Skip
(
1
);
// end attribute
break
;
}
default:
{
pReader
->
SkipRecord
();
break
;
}
}
}
pReader
->
Seek
(
_e2
);
}
}
// namespace Logic
}
// namespace PPTX
\ No newline at end of file
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
View file @
47ffdae8
...
...
@@ -91,6 +91,7 @@ namespace PPTX
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
;
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
;
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
);
virtual
std
::
wstring
GetFullPicName
(
OOX
::
IFileContainer
*
pRels
=
NULL
)
const
;
virtual
std
::
wstring
GetFullOleName
(
const
OOX
::
RId
&
pRId
,
OOX
::
IFileContainer
*
pRels
=
NULL
)
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
View file @
47ffdae8
...
...
@@ -447,7 +447,7 @@ namespace PPTX
if
(
!
blip
.
is_init
())
blip
=
new
PPTX
::
Logic
::
Blip
();
if
(
oRelsGeneratorInfo
.
nImageRId
>
=
0
)
if
(
oRelsGeneratorInfo
.
nImageRId
>
0
)
{
blip
->
embed
=
new
OOX
::
RId
((
size_t
)
oRelsGeneratorInfo
.
nImageRId
);
}
...
...
XlsxSerializerCom/Reader/BinaryWriter.h
View file @
47ffdae8
...
...
@@ -2717,7 +2717,6 @@ namespace BinXlsxRW
if
(
pFile
.
IsInit
()
&&
(
OOX
::
FileTypes
::
Image
==
pFile
->
type
()))
{
pImageFileCache
=
static_cast
<
OOX
::
Image
*>
(
pFile
.
operator
->
());
break
;
}
}
}
...
...
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