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
08f9771a
Commit
08f9771a
authored
Sep 22, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
bc4abd5b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
49 deletions
+28
-49
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.h
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.h
+16
-7
ASCOfficePPTFile/Win32/ASCOfficePPTFile.sln
ASCOfficePPTFile/Win32/ASCOfficePPTFile.sln
+0
-31
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
+12
-11
No files found.
ASCOfficePPTFile/PPTFormatLib/Reader/PPTFileReader.h
View file @
08f9771a
...
@@ -37,7 +37,9 @@
...
@@ -37,7 +37,9 @@
#include "PPTDocumentInfo.h"
#include "PPTDocumentInfo.h"
#define CURRENT_USER_STREAM "Current User"
#define CURRENT_USER_STREAM "Current User"
#define DOCUMENT_STREAM "PowerPoint Document"
#define DOCUMENT_STREAM "PowerPoint Document"
#define PICTURE_STREAM "Pictures"
#define PICTURE_STREAM "Pictures"
#define HEADER_STREAM "Header"
#define HEADER_STREAM "Header"
...
@@ -58,21 +60,26 @@ public:
...
@@ -58,21 +60,26 @@ public:
m_bDualStorage
=
false
;
m_bDualStorage
=
false
;
POLE
::
Stream
*
pStm
=
new
POLE
::
Stream
(
m_pPowerPointStg
,
CURRENT_USER_STREAM
);
POLE
::
Stream
*
pStm
=
new
POLE
::
Stream
(
m_pPowerPointStg
,
CURRENT_USER_STREAM
);
if
(
pStm
==
NULL
)
return
;
if
(
ReadCurrentUser
(
pStm
))
if
(
ReadCurrentUser
(
pStm
)
)
m_bIsPPTFile
=
TRUE
;
{
m_bIsPPTFile
=
TRUE
;
}
else
else
{
{
RELEASEOBJECT
(
pStm
);
RELEASEOBJECT
(
pStm
);
std
::
string
stream_name
=
std
::
string
(
PP97_DUALSTORAGE
)
+
std
::
string
(
"/"
)
+
std
::
string
(
CURRENT_USER_STREAM
);
std
::
string
stream_name
=
std
::
string
(
PP97_DUALSTORAGE
)
+
std
::
string
(
"/"
)
+
std
::
string
(
CURRENT_USER_STREAM
);
pStm
=
new
POLE
::
Stream
(
m_pPowerPointStg
,
stream_name
);
pStm
=
new
POLE
::
Stream
(
m_pPowerPointStg
,
stream_name
);
if
(
pStm
==
NULL
)
return
;
if
(
pStm
==
NULL
)
return
;
m_bDualStorage
=
true
;
m_bDualStorage
=
true
;
if
(
ReadCurrentUser
(
pStm
))
if
(
ReadCurrentUser
(
pStm
))
m_bIsPPTFile
=
TRUE
;
{
m_bIsPPTFile
=
TRUE
;
}
}
}
RELEASEOBJECT
(
pStm
);
RELEASEOBJECT
(
pStm
);
...
@@ -126,6 +133,8 @@ protected:
...
@@ -126,6 +133,8 @@ protected:
bool
ReadCurrentUser
(
POLE
::
Stream
*
pStm
)
bool
ReadCurrentUser
(
POLE
::
Stream
*
pStm
)
{
{
if
(
!
pStm
)
return
false
;
SRecordHeader
oHeader
;
SRecordHeader
oHeader
;
bool
isPP
=
false
;
bool
isPP
=
false
;
...
...
ASCOfficePPTFile/Win32/ASCOfficePPTFile.sln
View file @
08f9771a
...
@@ -83,15 +83,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor
...
@@ -83,15 +83,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig", "..\..\DesktopEditor
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jbig2", "..\..\DesktopEditor\raster\JBig2\win32\jbig2.vcproj", "{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}"
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficePPTFile", "ASCOfficePPTFile.vcproj", "{C1E5043D-4844-4893-980D-BD79CDCD05C1}"
ProjectSection(ProjectDependencies) = postProject
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{7B27E40E-F70A-4A74-A77C-0944D7931D15} = {7B27E40E-F70A-4A74-A77C-0944D7931D15}
{36636678-AE25-4BE6-9A34-2561D1BCF302} = {36636678-AE25-4BE6-9A34-2561D1BCF302}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PptFormatTest", "PptFormatTest\PptFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PptFormatTest", "PptFormatTest\PptFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
...
@@ -538,28 +529,6 @@ Global
...
@@ -538,28 +529,6 @@ Global
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|Win32.Build.0 = Release|Win32
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|x64.ActiveCfg = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|x64.Build.0 = Release|x64
{EE1B576A-07C5-4ACC-920F-81C41DD0C8C1}.Unicode Release|x64.Build.0 = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Debug|Win32.ActiveCfg = Debug|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Debug|Win32.Build.0 = Debug|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Debug|x64.ActiveCfg = Debug|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Debug|x64.Build.0 = Debug|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Release|Win32.ActiveCfg = Release|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Release|Win32.Build.0 = Release|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Release|x64.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Release|x64.Build.0 = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseASC|Win32.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseASC|x64.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseASC|x64.Build.0 = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseOpenSource|Win32.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseOpenSource|x64.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.ReleaseOpenSource|x64.Build.0 = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Debug|Win32.ActiveCfg = Debug|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Debug|Win32.Build.0 = Debug|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Debug|x64.ActiveCfg = Debug|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Debug|x64.Build.0 = Debug|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Release|Win32.ActiveCfg = Release|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Release|Win32.Build.0 = Release|Win32
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Release|x64.ActiveCfg = Release|x64
{C1E5043D-4844-4893-980D-BD79CDCD05C1}.Unicode Release|x64.Build.0 = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.ActiveCfg = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|Win32.Build.0 = Debug|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.ActiveCfg = Debug|x64
...
...
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
View file @
08f9771a
...
@@ -47,21 +47,22 @@ int _tmain(int argc, _TCHAR* argv[])
...
@@ -47,21 +47,22 @@ int _tmain(int argc, _TCHAR* argv[])
std
::
wstring
dstTempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
dstTempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
tempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
tempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
// Ppt->Pptx
COfficePPTFile
pptFile
;
pptFile
.
put_TempDirectory
(
tempPath
);
HRESULT
hRes
=
pptFile
.
LoadFromFile
(
sSrcPpt
,
dstTempPath
);
COfficePPTFile
pptFile
;
if
(
hRes
!=
S_OK
)
return
2
;
COfficeUtils
oCOfficeUtils
(
NULL
);
pptFile
.
put_TempDirectory
(
tempPath
);
if
(
S_OK
!=
oCOfficeUtils
.
CompressFileOrDirectory
(
dstTempPath
.
c_str
(),
sDstPptx
,
-
1
))
return
1
;
HRESULT
hRes
=
pptFile
.
LoadFromFile
(
sSrcPpt
,
dstTempPath
)
;
if
(
hRes
==
S_OK
)
{
COfficeUtils
oCOfficeUtils
(
NULL
);
hRes
=
oCOfficeUtils
.
CompressFileOrDirectory
(
dstTempPath
.
c_str
(),
sDstPptx
,
-
1
);
}
FileSystem
::
Directory
::
DeleteDirectory
(
dstTempPath
);
FileSystem
::
Directory
::
DeleteDirectory
(
dstTempPath
);
FileSystem
::
Directory
::
DeleteDirectory
(
tempPath
);
FileSystem
::
Directory
::
DeleteDirectory
(
tempPath
);
return
0
;
return
hRes
;
}
}
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