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
0a183f35
Commit
0a183f35
authored
Feb 01, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug #33886
parent
ac6cc1ec
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
54 additions
and
27 deletions
+54
-27
ASCOfficeOdfFile/OdfFileTest/OdfFile.sln
ASCOfficeOdfFile/OdfFileTest/OdfFile.sln
+5
-1
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.cpp
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.cpp
+16
-11
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
+27
-3
ASCOfficeOdfFile/src/docx/mediaitems.cpp
ASCOfficeOdfFile/src/docx/mediaitems.cpp
+1
-1
ASCOfficeOdfFile/src/docx/pptx_drawing.cpp
ASCOfficeOdfFile/src/docx/pptx_drawing.cpp
+1
-0
ASCOfficeOdfFile/src/docx/pptx_slide_context.cpp
ASCOfficeOdfFile/src/docx/pptx_slide_context.cpp
+0
-2
ASCOfficeOdfFile/src/docx/pptx_table_context.cpp
ASCOfficeOdfFile/src/docx/pptx_table_context.cpp
+1
-1
ASCOfficeOdfFile/src/odf/draw_frame_pptx.cpp
ASCOfficeOdfFile/src/odf/draw_frame_pptx.cpp
+3
-8
No files found.
ASCOfficeOdfFile/OdfFileTest/OdfFile.sln
View file @
0a183f35
...
...
@@ -2,6 +2,9 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xml_wrapper", "..\win32\cpxml.vcproj", "{41BED424-4EAF-4053-8A5F-1E2A387D53D1}"
ProjectSection(ProjectDependencies) = postProject
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormatReaderLib", "..\win32\cpodf.vcproj", "{50E20601-4A8D-4AFB-8870-63828D328429}"
ProjectSection(ProjectDependencies) = postProject
...
...
@@ -21,7 +24,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFormulasConvert", "..\wi
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileReaderTest", "OdfFileTest.vcproj", "{C2882DDD-07E6-4314-AD4B-48F43F38D722}"
ProjectSection(ProjectDependencies) = postProject
{41BED424-4EAF-4053-8A5F-1E2A387D53D1} = {41BED424-4EAF-4053-8A5F-1E2A387D53D1}
{50E20601-4A8D-4AFB-8870-63828D328429} = {50E20601-4A8D-4AFB-8870-63828D328429}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
{94954A67-A853-43B1-A727-6EF2774C5A6A} = {94954A67-A853-43B1-A727-6EF2774C5A6A}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{9CAA294E-58C3-4CEB-ABA0-CB9786CA5540} = {9CAA294E-58C3-4CEB-ABA0-CB9786CA5540}
...
...
@@ -30,7 +35,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OdfFileReaderTest", "OdfFil
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{BC52A07C-A797-423D-8C4F-8678805BBB36} = {BC52A07C-A797-423D-8C4F-8678805BBB36}
{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2} = {37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "..\..\DesktopEditor\graphics\graphics_vs2005.vcproj", "{37CA072A-5BDE-498B-B3A7-5E404F5F9BF2}"
...
...
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.cpp
View file @
0a183f35
...
...
@@ -31,18 +31,23 @@
*/
// OdfFileTest.cpp
#include "../../../OfficeUtils/src/OfficeUtils.h"
#include <stdio.h>
#include <tchar.h>
#include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
#include "../../src/ConvertOO2OOX.h"
#include "../../OfficeUtils/src/OfficeUtils.h"
#include "../../DesktopEditor/common/Directory.h"
#include "../src/ConvertOO2OOX.h"
#if defined(_WIN64)
#pragma comment(lib, "../../
../
build/bin/icu/win_64/icuuc.lib")
#pragma comment(lib, "../../build/bin/icu/win_64/icuuc.lib")
#elif defined (_WIN32)
#pragma comment(lib, "../../
../
build/bin/icu/win_32/icuuc.lib")
#pragma comment(lib, "../../build/bin/icu/win_32/icuuc.lib")
#endif
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
if
(
argc
<
2
)
return
1
;
...
...
@@ -50,12 +55,12 @@ int _tmain(int argc, _TCHAR* argv[])
HRESULT
hr
=
S_OK
;
//////////////////////////////////////////////////////////////////////////
std
::
wstring
srcFileName
=
argv
[
1
];
std
::
wstring
dstPath
=
argc
>
2
?
argv
[
2
]
:
s
SrcDoc
+
L"-my.doc
x"
;
//xlsx pptx
std
::
wstring
dstPath
=
argc
>
2
?
argv
[
2
]
:
s
rcFileName
+
L"-my.ppt
x"
;
//xlsx pptx
std
::
wstring
outputDir
=
FileSystem
::
Directory
::
GetFolderPath
(
dstPath
);
std
::
wstring
outputDir
=
NS
Directory
::
GetFolderPath
(
dstPath
);
std
::
wstring
srcTempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
dstTempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
srcTempPath
=
NS
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
std
::
wstring
dstTempPath
=
NS
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
// распаковываем исходник во временную директорию
COfficeUtils
oCOfficeUtils
(
NULL
);
...
...
@@ -64,14 +69,14 @@ int _tmain(int argc, _TCHAR* argv[])
hr
=
ConvertOO2OOX
(
srcTempPath
,
dstTempPath
,
L"C:
\\
Windows
\\
Fonts"
,
false
,
NULL
);
FileSystem
::
Directory
::
DeleteDirectory
(
srcTempPath
);
NS
Directory
::
DeleteDirectory
(
srcTempPath
);
if
(
hr
!=
S_OK
)
return
hr
;
if
(
S_OK
!=
oCOfficeUtils
.
CompressFileOrDirectory
(
dstTempPath
.
c_str
(),
dstPath
.
c_str
(),
-
1
))
return
hr
;
FileSystem
::
Directory
::
DeleteDirectory
(
dstTempPath
);
NS
Directory
::
DeleteDirectory
(
dstTempPath
);
////////////////////////////////////////////////////////////////////////
return
0
;
...
...
ASCOfficeOdfFile/OdfFileTest/OdfFileTest.vcproj
View file @
0a183f35
...
...
@@ -43,11 +43,11 @@
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE"
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE
;_UNICODE;UNICODE
"
MinimalRebuild=
"true"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"
2
"
UsePrecompiledHeader=
"
0
"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"false"
DebugInformationFormat=
"4"
...
...
@@ -63,7 +63,7 @@
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"gdi32.lib"
AdditionalDependencies=
"gdi32.lib
Rpcrt4.lib
"
LinkIncremental=
"2"
GenerateDebugInformation=
"true"
SubSystem=
"1"
...
...
@@ -369,6 +369,30 @@
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\DesktopEditor\xml\src\xmldom.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
UsePrecompiledHeader=
"0"
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\DesktopEditor\xml\src\xmllight.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
UsePrecompiledHeader=
"0"
/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
...
...
ASCOfficeOdfFile/src/docx/mediaitems.cpp
View file @
0a183f35
...
...
@@ -58,7 +58,7 @@ bool is_internal(const std::wstring & uri, const std::wstring & packetRoot)
std
::
wstring
resultPath
=
packetRoot
+
FILE_SEPARATOR_STR
+
mediaPath
;
return
NSDirecto
ry
::
Exists
(
resultPath
)
||
NSDirectory
::
Exists
(
mediaPath
);
return
NSFile
::
CFileBina
ry
::
Exists
(
resultPath
)
||
NSDirectory
::
Exists
(
mediaPath
);
}
mediaitems
::
item
::
item
(
std
::
wstring
const
&
_href
,
...
...
ASCOfficeOdfFile/src/docx/pptx_drawing.cpp
View file @
0a183f35
...
...
@@ -236,6 +236,7 @@ void pptx_serialize_table(std::wostream & strm, _pptx_drawing & val)
if
(
strTableContent
)
{
std
::
wstring
ttt
=
strTableContent
.
get
();
CP_XML_STREAM
()
<<
strTableContent
.
get
();
}
}
...
...
ASCOfficeOdfFile/src/docx/pptx_slide_context.cpp
View file @
0a183f35
...
...
@@ -433,8 +433,6 @@ void pptx_slide_context::end_shape()
void
pptx_slide_context
::
end_table
()
{
impl_
->
objects_
.
push_back
(
impl_
->
object_description_
);
default_set
();
}
bool
pptx_slide_context
::
empty
()
const
...
...
ASCOfficeOdfFile/src/docx/pptx_table_context.cpp
View file @
0a183f35
...
...
@@ -376,7 +376,7 @@ void oox_serialize_tcPr(std::wostream & strm, std::vector<const odf_reader::styl
if
(
fill
.
bitmap
)
{
bool
isMediaInternal
=
fals
e
;
bool
isMediaInternal
=
tru
e
;
std
::
wstring
ref
;
fill
.
bitmap
->
rId
=
Context
.
get_slide_context
().
get_mediaitems
().
add_or_find
(
fill
.
bitmap
->
xlink_href_
,
oox
::
typeImage
,
isMediaInternal
,
ref
);
Context
.
get_slide_context
().
add_rels
(
isMediaInternal
,
fill
.
bitmap
->
rId
,
ref
,
oox
::
typeImage
);
...
...
ASCOfficeOdfFile/src/odf/draw_frame_pptx.cpp
View file @
0a183f35
...
...
@@ -71,14 +71,9 @@ namespace odf_reader {
void
draw_g
::
pptx_convert
(
oox
::
pptx_conversion_context
&
Context
)
{
int
i
=
0
;
int
size
=
content_
.
size
();
while
(
true
)
{
if
(
i
>=
size
)
break
;
office_element_ptr
const
&
elm
=
content_
[
i
];
elm
->
pptx_convert
(
Context
);
i
++
;
for
(
size_t
i
=
0
;
i
<
content_
.
size
();
i
++
)
{
content_
[
i
]
->
pptx_convert
(
Context
);
}
}
void
draw_frame
::
pptx_convert_placeHolder
(
oox
::
pptx_conversion_context
&
Context
)
...
...
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