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
92cda5bc
Commit
92cda5bc
authored
Jun 20, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #35146
parent
1a377d87
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
14 deletions
+22
-14
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
+7
-4
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
+1
-1
ASCOfficePPTXFile/Editor/PPTXWriter.h
ASCOfficePPTXFile/Editor/PPTXWriter.h
+14
-9
No files found.
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.cpp
View file @
92cda5bc
...
@@ -1209,10 +1209,14 @@ namespace NSBinPptxRW
...
@@ -1209,10 +1209,14 @@ namespace NSBinPptxRW
m_pWriter
->
WriteString
(
strRels
);
m_pWriter
->
WriteString
(
strRels
);
}
}
void
CRelsGenerator
::
EndPresentationRels
(
const
bool
&
bIsCommentsAuthors
=
false
)
void
CRelsGenerator
::
EndPresentationRels
(
const
bool
&
bIsCommentsAuthors
=
false
,
const
bool
&
bIsNotesMaster
=
false
)
{
{
std
::
wstring
strRels0
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
if
(
bIsNotesMaster
)
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster
\"
Target=
\"
notesMasters/notesMaster1.xml
\"
/>"
;
{
std
::
wstring
strRels0
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/notesMaster
\"
Target=
\"
notesMasters/notesMaster1.xml
\"
/>"
;
m_pWriter
->
WriteString
(
strRels0
);
}
std
::
wstring
strRels1
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
std
::
wstring
strRels1
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps
\"
Target=
\"
presProps.xml
\"
/>"
;
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/presProps
\"
Target=
\"
presProps.xml
\"
/>"
;
std
::
wstring
strRels2
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
std
::
wstring
strRels2
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
...
@@ -1220,7 +1224,6 @@ namespace NSBinPptxRW
...
@@ -1220,7 +1224,6 @@ namespace NSBinPptxRW
std
::
wstring
strRels3
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
std
::
wstring
strRels3
=
L"<Relationship Id=
\"
rId"
+
std
::
to_wstring
(
m_lNextRelsID
++
)
+
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps
\"
Target=
\"
viewProps.xml
\"
/>"
;
L"
\"
Type=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships/viewProps
\"
Target=
\"
viewProps.xml
\"
/>"
;
m_pWriter
->
WriteString
(
strRels0
);
m_pWriter
->
WriteString
(
strRels1
);
m_pWriter
->
WriteString
(
strRels1
);
m_pWriter
->
WriteString
(
strRels2
);
m_pWriter
->
WriteString
(
strRels2
);
m_pWriter
->
WriteString
(
strRels3
);
m_pWriter
->
WriteString
(
strRels3
);
...
...
ASCOfficePPTXFile/Editor/BinaryFileReaderWriter.h
View file @
92cda5bc
...
@@ -419,7 +419,7 @@ namespace NSBinPptxRW
...
@@ -419,7 +419,7 @@ namespace NSBinPptxRW
int
WriteRels
(
const
std
::
wstring
&
bsType
,
const
std
::
wstring
&
bsTarget
,
const
std
::
wstring
&
bsTargetMode
);
int
WriteRels
(
const
std
::
wstring
&
bsType
,
const
std
::
wstring
&
bsTarget
,
const
std
::
wstring
&
bsTargetMode
);
int
WriteHyperlink
(
const
std
::
wstring
&
strLink
,
const
bool
&
bIsActionInit
);
int
WriteHyperlink
(
const
std
::
wstring
&
strLink
,
const
bool
&
bIsActionInit
);
void
EndPresentationRels
(
const
bool
&
bIsCommentsAuthors
);
void
EndPresentationRels
(
const
bool
&
bIsCommentsAuthors
,
const
bool
&
bIsNotesMaster
=
false
);
int
GetNextId
();
int
GetNextId
();
void
CloseRels
();
void
CloseRels
();
...
...
ASCOfficePPTXFile/Editor/PPTXWriter.h
View file @
92cda5bc
...
@@ -180,10 +180,11 @@ namespace NSBinPptxRW
...
@@ -180,10 +180,11 @@ namespace NSBinPptxRW
CXmlWriter
oXmlWriter
;
CXmlWriter
oXmlWriter
;
// первым делом определим количество необходимого. если хоть одно из этих чисел - ноль, то ппту не корректный
// первым делом определим количество необходимого. если хоть одно из этих чисел - ноль, то ппту не корректный
LONG
nCountThemes
=
0
;
LONG
nCountThemes
=
0
;
LONG
nCountMasters
=
0
;
LONG
nCountMasters
=
0
;
LONG
nCountLayouts
=
0
;
LONG
nCountLayouts
=
0
;
LONG
nCountSlides
=
0
;
LONG
nCountSlides
=
0
;
bool
bNotesMasterPresent
=
false
;
pPair
=
m_mainTables
.
find
(
NSMainTables
::
Themes
);
pPair
=
m_mainTables
.
find
(
NSMainTables
::
Themes
);
if
(
m_mainTables
.
end
()
!=
pPair
)
if
(
m_mainTables
.
end
()
!=
pPair
)
...
@@ -544,6 +545,7 @@ namespace NSBinPptxRW
...
@@ -544,6 +545,7 @@ namespace NSBinPptxRW
m_oReader
.
m_pRels
->
Clear
();
m_oReader
.
m_pRels
->
Clear
();
m_oReader
.
m_pRels
->
StartNotesMaster
(
m_arSlideMasters_Theme
.
size
());
m_oReader
.
m_pRels
->
StartNotesMaster
(
m_arSlideMasters_Theme
.
size
());
bNotesMasterPresent
=
true
;
if
(
lCount
>
0
)
if
(
lCount
>
0
)
{
{
m_arNotesMasters
.
back
().
fromPPTY
(
&
m_oReader
);
m_arNotesMasters
.
back
().
fromPPTY
(
&
m_oReader
);
...
@@ -782,13 +784,16 @@ namespace NSBinPptxRW
...
@@ -782,13 +784,16 @@ namespace NSBinPptxRW
}
}
m_oReader
.
m_pRels
->
WriteSlides
(
nCountSlides
);
m_oReader
.
m_pRels
->
WriteSlides
(
nCountSlides
);
m_oReader
.
m_pRels
->
EndPresentationRels
(
m_oPresentation
.
commentAuthors
.
is_init
());
m_oPresentation
.
notesMasterIdLst
.
clear
();
m_oPresentation
.
notesMasterIdLst
.
clear
();
m_oPresentation
.
notesMasterIdLst
.
push_back
(
PPTX
::
Logic
::
XmlId
());
if
(
bNotesMasterPresent
)
m_oPresentation
.
notesMasterIdLst
[
0
].
m_name
=
_T
(
"notesMasterId"
);
{
m_oPresentation
.
notesMasterIdLst
[
0
].
rid
=
(
size_t
)
nCurrentRels
;
m_oPresentation
.
notesMasterIdLst
.
push_back
(
PPTX
::
Logic
::
XmlId
());
m_oPresentation
.
notesMasterIdLst
[
0
].
m_name
=
_T
(
"notesMasterId"
);
m_oPresentation
.
notesMasterIdLst
[
0
].
rid
=
(
size_t
)
nCurrentRels
;
++
nCurrentRels
;
}
m_oReader
.
m_pRels
->
EndPresentationRels
(
m_oPresentation
.
commentAuthors
.
is_init
(),
bNotesMasterPresent
);
m_oReader
.
m_pRels
->
CloseRels
();
m_oReader
.
m_pRels
->
CloseRels
();
oXmlWriter
.
ClearNoAttack
();
oXmlWriter
.
ClearNoAttack
();
...
...
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