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
7fa8727e
Commit
7fa8727e
authored
Apr 20, 2016
by
ElenaSubbotina
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TxtFormat - восстановление тестового примера vs ms
parent
ecbb00a1
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
851 additions
and
24 deletions
+851
-24
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
+36
-0
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
+354
-0
ASCOfficeTxtFile/TxtXmlFormatLib/Source/TxtXmlFile.cpp
ASCOfficeTxtFile/TxtXmlFormatLib/Source/TxtXmlFile.cpp
+0
-7
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.sln
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.sln
+18
-15
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.vcproj
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.vcproj
+16
-0
ASCOfficeTxtFile/Win32/TxtFile.cpp
ASCOfficeTxtFile/Win32/TxtFile.cpp
+5
-1
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.cpp
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.cpp
+61
-0
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.vcproj
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.vcproj
+360
-0
ASCOfficeTxtFile/Win32/XmlFile.cpp
ASCOfficeTxtFile/Win32/XmlFile.cpp
+1
-1
No files found.
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.cpp
0 → 100644
View file @
7fa8727e
// PptFormatTest.cpp : Defines the entry point for the console application.
//
#include "../../PPTFormatLib/PPTFormatLib.h"
#include "../../../OfficeUtils/src/OfficeUtils.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
if
(
argc
<
3
)
return
3
;
std
::
wstring
sSrcPpt
=
argv
[
1
];
std
::
wstring
sDstPptx
=
argv
[
2
];
std
::
wstring
outputDir
=
FileSystem
::
Directory
::
GetFolderPath
(
sDstPptx
);
std
::
wstring
dstTempPath
=
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
);
if
(
hRes
!=
S_OK
)
return
2
;
COfficeUtils
oCOfficeUtils
(
NULL
);
if
(
S_OK
!=
oCOfficeUtils
.
CompressFileOrDirectory
(
dstTempPath
.
c_str
(),
sDstPptx
,
-
1
))
return
1
;
FileSystem
::
Directory
::
DeleteDirectory
(
dstTempPath
);
FileSystem
::
Directory
::
DeleteDirectory
(
tempPath
);
return
0
;
}
ASCOfficePPTFile/Win32/PptFormatTest/PptFormatTest.vcproj
0 → 100644
View file @
7fa8727e
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8,00"
Name=
"PptFormatTest"
ProjectGUID=
"{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
RootNamespace=
"PptFormatTest"
Keyword=
"Win32Proj"
>
<Platforms>
<Platform
Name=
"Win32"
/>
<Platform
Name=
"x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
"$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory=
"$(ConfigurationName)"
ConfigurationType=
"1"
UseOfATL=
"0"
CharacterSet=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
"..\..\..\..\..\Common\OfficeDrawing;"..\..\..\..\..\DesktopEditor\freetype-2.5.2\include";..\..\..\..\..\Common\OfficeDrawing\Shapes"
PreprocessorDefinitions=
"_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"4"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
"LIBCMTD.lib;libcmt.lib"
IgnoreEmbeddedIDL=
"true"
GenerateDebugInformation=
"true"
SubSystem=
"1"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Debug|x64"
OutputDirectory=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=
"$(PlatformName)\$(ConfigurationName)"
ConfigurationType=
"1"
UseOfATL=
"0"
CharacterSet=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
""..\..\..\..\..\DesktopEditor\freetype-2.5.2\include""
PreprocessorDefinitions=
"_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"3"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
""
IgnoreEmbeddedIDL=
"true"
GenerateDebugInformation=
"true"
SubSystem=
"1"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
OutputDirectory=
"$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory=
"$(ConfigurationName)"
ConfigurationType=
"1"
CharacterSet=
"1"
WholeProgramOptimization=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
"..\..\..\..\..\Common\OfficeDrawing;"..\..\..\..\..\DesktopEditor\freetype-2.5.2\include";..\..\..\..\..\Common\OfficeDrawing\Shapes"
PreprocessorDefinitions=
"NDEBUG;_CONSOLE;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;AVS_PPT_FILE;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;LIBXML_READER_ENABLED;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
"LIBCMTD.lib;libcmt.lib"
GenerateDebugInformation=
"true"
SubSystem=
"1"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|x64"
OutputDirectory=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=
"$(PlatformName)\$(ConfigurationName)"
ConfigurationType=
"1"
CharacterSet=
"1"
WholeProgramOptimization=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""..\..\..\..\..\DesktopEditor\freetype-2.5.2\include""
PreprocessorDefinitions=
"NDEBUG;_CONSOLE;_USE_MATH_DEFINES;PPTX_DEF;PPT_DEF;ENABLE_PPT_TO_PPTX_CONVERT;PPT_FORMAT;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_;BUILD_CONFIG_FULL_VERSION;_PRESENTATION_WRITER_;_SVG_CONVERT_TO_IMAGE_;DONT_WRITE_EMBEDDED_FONTS"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
"libcmt.lib"
GenerateDebugInformation=
"true"
SubSystem=
"1"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
"..\..\..\build\bin\icu\win_32\icuuc.lib"
>
</File>
<File
RelativePath=
".\PptFormatTest.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
ASCOfficeTxtFile/TxtXmlFormatLib/Source/TxtXmlFile.cpp
View file @
7fa8727e
...
...
@@ -14,13 +14,6 @@ namespace NSBinPptxRW
class
CDrawingConverter
;
}
//#if defined (_WIN32) || defined (_WIN64)
// namespace BinDocxRW
// {
// int g_nCurFormatVersion = 0; //extern from ...Serializer
// }
//#endif
#include "../../../OfficeUtils/src/OfficeUtils.h"
#include "../../../Common/OfficeDefines.h"
...
...
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.sln
View file @
7fa8727e
...
...
@@ -19,11 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DocxFormat", "..\..\Common\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libxml2", "..\..\Common\DocxFormat\Source\XML\libxml2\win_build\libxml2.vcproj", "{21663823-DE45-479B-91D0-B4FEF4916EF0}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ASCOfficeUtilsLib", "..\..\ASCOfficeUtils\ASCOfficeUtilsLib\Win\ASCOfficeUtilsLib.vcproj", "{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TxtFormatLib", "..\TxtXmlFormatLib\Win32\TxtXmlFormatLib.vcproj", "{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}"
ProjectSection(ProjectDependencies) = postProject
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6} = {3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
EndProjectSection
EndProject
...
...
@@ -34,10 +31,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "font_engine", "..\..\Deskto
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "..\..\DesktopEditor\freetype-2.5.2\builds\windows\vc2005\freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TxtFormatTest", "..\..\Test\Applications\DocxFormatTests\TxtFormatTest\win32\TxtFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OfficeUtilsLib", "..\..\OfficeUtils\win32\OfficeUtilsLib.vcproj", "{F8274B05-168E-4D6E-B843-AA7510725363}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TxtFormatTest", "TxtFormatTest\TxtFormatTest.vcproj", "{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
ProjectSection(ProjectDependencies) = postProject
{DACBE6CA-E089-47D1-8CE7-C7DB59C15417} = {DACBE6CA-E089-47D1-8CE7-C7DB59C15417}
{F8274B05-168E-4D6E-B843-AA7510725363} = {F8274B05-168E-4D6E-B843-AA7510725363}
{21663823-DE45-479B-91D0-B4FEF4916EF0} = {21663823-DE45-479B-91D0-B4FEF4916EF0}
{A100103A-353E-45E8-A9B8-90B87CC5C0B0} = {A100103A-353E-45E8-A9B8-90B87CC5C0B0}
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B} = {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}
{C739151F-5384-41DF-A1A6-F089E2C1AD56} = {C739151F-5384-41DF-A1A6-F089E2C1AD56}
{DACBE6CA-E089-47D1-8CE7-C7DB59C15417} = {DACBE6CA-E089-47D1-8CE7-C7DB59C15417}
EndProjectSection
EndProject
Global
...
...
@@ -72,14 +75,6 @@ Global
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|Win32.Build.0 = Release|Win32
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.ActiveCfg = Release|x64
{21663823-DE45-479B-91D0-B4FEF4916EF0}.Release|x64.Build.0 = Release|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.ActiveCfg = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|Win32.Build.0 = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.ActiveCfg = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Debug|x64.Build.0 = Debug|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.ActiveCfg = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|Win32.Build.0 = Release|Win32
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.ActiveCfg = Release|x64
{3F3CB5A1-BB01-49C1-9342-4A69E30F9EF6}.Release|x64.Build.0 = Release|x64
{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}.Debug|Win32.ActiveCfg = Debug|Win32
{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}.Debug|Win32.Build.0 = Debug|Win32
{DACBE6CA-E089-47D1-8CE7-C7DB59C15417}.Debug|x64.ActiveCfg = Debug|Win32
...
...
@@ -104,10 +99,18 @@ Global
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|Win32.Build.0 = Release|Win32
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.ActiveCfg = Release|x64
{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release|x64.Build.0 = Release|x64
{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|x64.ActiveCfg = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Debug|x64.Build.0 = Debug|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.ActiveCfg = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|Win32.Build.0 = Release|Win32
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.ActiveCfg = Release|x64
{F8274B05-168E-4D6E-B843-AA7510725363}.Release|x64.Build.0 = Release|x64
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|Win32.ActiveCfg = Debug|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|Win32.Build.0 = Debug|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|x64.ActiveCfg = Debug|
Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|x64.Build.0 = Debug|
Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|x64.ActiveCfg = Debug|
x64
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Debug|x64.Build.0 = Debug|
x64
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Release|Win32.ActiveCfg = Release|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Release|Win32.Build.0 = Release|Win32
{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}.Release|x64.ActiveCfg = Release|x64
...
...
ASCOfficeTxtFile/Win32/ASCOfficeTxtFile2005.vcproj
View file @
7fa8727e
...
...
@@ -773,6 +773,18 @@
RelativePath=
".\TxtFile.cpp"
>
</File>
<File
RelativePath=
"..\..\UnicodeConverter\UnicodeConverter.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
>
<Tool
Name=
"VCCLCompilerTool"
UsePrecompiledHeader=
"0"
/>
</FileConfiguration>
</File>
<File
RelativePath=
".\XmlFile.cpp"
>
...
...
@@ -814,6 +826,10 @@
>
</File>
</Filter>
<File
RelativePath=
"..\..\build\bin\icu\win_32\icuuc.lib"
>
</File>
</Files>
<Globals>
</Globals>
...
...
ASCOfficeTxtFile/Win32/TxtFile.cpp
View file @
7fa8727e
...
...
@@ -3,8 +3,12 @@
#include "../TxtXmlFormatLib/Source/TxtXmlFile.h"
#include "../../
ASCOfficeUtils/ASCOfficeUtilsLib
/OfficeUtils.h"
#include "../../
OfficeUtils/src
/OfficeUtils.h"
namespace
BinDocxRW
{
int
g_nCurFormatVersion
=
0
;
//extern from ...DocxSerializer
}
CTxtFile
::
CTxtFile
()
{
...
...
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.cpp
0 → 100644
View file @
7fa8727e
#include "../../TxtXmlFormatLib/source/TxtXmlFile.h"
#include "../../../OfficeUtils/src/OfficeUtils.h"
#include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
#include <algorithm>
#include <string>
namespace
BinDocxRW
{
int
g_nCurFormatVersion
=
0
;
//extern from ...DocxSerializer
}
int
_tmain
(
int
argc
,
_TCHAR
*
argv
[])
{
if
(
argc
<
3
)
return
0
;
std
::
wstring
sXMLOptions
=
_T
(
"<Options><TXTOptions><Encoding>2</Encoding></TXTOptions></Options>"
);
std
::
wstring
srcFileName
=
argv
[
1
];
std
::
wstring
dstFileName
=
argv
[
2
];
std
::
wstring
outputDir
=
FileSystem
::
Directory
::
GetFolderPath
(
dstFileName
);
std
::
wstring
dstTempPath
=
FileSystem
::
Directory
::
CreateDirectoryWithUniqueName
(
outputDir
);
int
n1
=
srcFileName
.
rfind
(
_T
(
'.'
));
int
n2
=
dstFileName
.
rfind
(
_T
(
'.'
));
std
::
wstring
ext_1
=
n1
>=
0
?
srcFileName
.
substr
(
n1
+
1
,
srcFileName
.
length
()
-
n1
)
:
_T
(
""
);
//ext_1.MakeLower();
std
::
wstring
ext_2
=
n2
>=
0
?
dstFileName
.
substr
(
n2
+
1
,
dstFileName
.
length
()
-
n2
)
:
_T
(
""
);
//ext_2.MakeLower();
std
::
transform
(
ext_1
.
begin
(),
ext_1
.
end
(),
ext_1
.
begin
(),
::
tolower
);
CTxtXmlFile
txtFile
;
COfficeUtils
oCOfficeUtils
(
NULL
);
if
(
ext_1
==
_T
(
"txt"
))
{
// txt->docx
if
(
S_OK
!=
txtFile
.
txt_LoadFromFile
(
srcFileName
,
dstTempPath
,
L""
/*sXMLOptions*/
))
return
2
;
if
(
S_OK
!=
oCOfficeUtils
.
CompressFileOrDirectory
(
dstTempPath
.
c_str
(),
dstFileName
.
c_str
(),
-
1
))
return
S_FALSE
;
}
if
(
ext_2
==
_T
(
"txt"
))
{
// docx->txt
if
(
S_OK
!=
oCOfficeUtils
.
ExtractToDirectory
(
srcFileName
.
c_str
(),
dstTempPath
.
c_str
(),
NULL
,
0
))
return
S_FALSE
;
if
(
S_OK
!=
txtFile
.
txt_SaveToFile
(
dstFileName
,
dstTempPath
,
sXMLOptions
))
return
3
;
}
FileSystem
::
Directory
::
DeleteDirectory
(
dstTempPath
);
return
0
;
}
ASCOfficeTxtFile/Win32/TxtFormatTest/TxtFormatTest.vcproj
0 → 100644
View file @
7fa8727e
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8,00"
Name=
"TxtFormatTest"
ProjectGUID=
"{0F49D5D1-A8D3-4F97-8BC1-E2F65BB00C10}"
RootNamespace=
"TxtFormatTest"
Keyword=
"Win32Proj"
>
<Platforms>
<Platform
Name=
"Win32"
/>
<Platform
Name=
"x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name=
"Debug|Win32"
OutputDirectory=
"$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory=
"$(ConfigurationName)"
ConfigurationType=
"1"
UseOfATL=
"0"
CharacterSet=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"4"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
"LIBCMTD.lib"
IgnoreEmbeddedIDL=
"true"
GenerateDebugInformation=
"true"
SubSystem=
"1"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Debug|x64"
OutputDirectory=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=
"$(PlatformName)\$(ConfigurationName)"
ConfigurationType=
"1"
UseOfATL=
"0"
CharacterSet=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
Optimization=
"0"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
"WIN32;_DEBUG;_CONSOLE;USE_ATL_CSTRINGS;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED;USE_LITE_READER;_USE_XMLLITE_READER_"
MinimalRebuild=
"false"
BasicRuntimeChecks=
"3"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
IgnoreDefaultLibraryNames=
"LIBCMTD.lib"
IgnoreEmbeddedIDL=
"true"
GenerateDebugInformation=
"true"
SubSystem=
"1"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|Win32"
OutputDirectory=
"$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory=
"$(ConfigurationName)"
ConfigurationType=
"1"
CharacterSet=
"1"
WholeProgramOptimization=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;LIBXML_READER_ENABLED;"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
GenerateDebugInformation=
"true"
SubSystem=
"1"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"1"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release|x64"
OutputDirectory=
"$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory=
"$(PlatformName)\$(ConfigurationName)"
ConfigurationType=
"1"
CharacterSet=
"1"
WholeProgramOptimization=
"1"
>
<Tool
Name=
"VCPreBuildEventTool"
/>
<Tool
Name=
"VCCustomBuildTool"
/>
<Tool
Name=
"VCXMLDataGeneratorTool"
/>
<Tool
Name=
"VCWebServiceProxyGeneratorTool"
/>
<Tool
Name=
"VCMIDLTool"
TargetEnvironment=
"3"
/>
<Tool
Name=
"VCCLCompilerTool"
AdditionalIncludeDirectories=
""
PreprocessorDefinitions=
"WIN32;NDEBUG;_CONSOLE;_USE_XMLLITE_READER_;USE_LITE_READER;USE_AVSOFFICESTUDIO_XMLUTILS;LIBXML_READER_ENABLED;"
RuntimeLibrary=
"2"
UsePrecompiledHeader=
"0"
WarningLevel=
"3"
Detect64BitPortabilityProblems=
"true"
DebugInformationFormat=
"3"
/>
<Tool
Name=
"VCManagedResourceCompilerTool"
/>
<Tool
Name=
"VCResourceCompilerTool"
/>
<Tool
Name=
"VCPreLinkEventTool"
/>
<Tool
Name=
"VCLinkerTool"
AdditionalDependencies=
"Urlmon.lib"
LinkIncremental=
"1"
GenerateDebugInformation=
"true"
SubSystem=
"1"
OptimizeReferences=
"2"
EnableCOMDATFolding=
"2"
TargetMachine=
"17"
/>
<Tool
Name=
"VCALinkTool"
/>
<Tool
Name=
"VCManifestTool"
/>
<Tool
Name=
"VCXDCMakeTool"
/>
<Tool
Name=
"VCBscMakeTool"
/>
<Tool
Name=
"VCFxCopTool"
/>
<Tool
Name=
"VCAppVerifierTool"
/>
<Tool
Name=
"VCWebDeploymentTool"
/>
<Tool
Name=
"VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath=
"..\..\..\build\bin\icu\win_32\icuuc.lib"
>
</File>
<File
RelativePath=
"..\..\..\Common\DocxFormat\Source\XML\libxml2\libxml2.cpp"
>
</File>
<File
RelativePath=
".\TxtFormatTest.cpp"
>
</File>
<File
RelativePath=
"..\..\..\UnicodeConverter\UnicodeConverter.cpp"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
ASCOfficeTxtFile/Win32/XmlFile.cpp
View file @
7fa8727e
...
...
@@ -3,7 +3,7 @@
#include "../TxtXmlFormatLib/Source/TxtXmlFile.h"
#include "../../
ASCOfficeUtils/ASCOfficeUtilsLib
/OfficeUtils.h"
#include "../../
OfficeUtils/src
/OfficeUtils.h"
CXmlFile
::
CXmlFile
()
{
...
...
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