Commit e5e99cc2 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

DocFile

PPTFile
RtfFile

x64 win build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62002 954022d7-b5bf-4e40-9824-e11837661b57
parent db893510
...@@ -2982,9 +2982,12 @@ Redist/Repairing.exe svn_mime_002dtype=application%2Foctet-stream ...@@ -2982,9 +2982,12 @@ Redist/Repairing.exe svn_mime_002dtype=application%2Foctet-stream
Redist/VersionControl.exe svn_mime_002dtype=application%2Foctet-stream Redist/VersionControl.exe svn_mime_002dtype=application%2Foctet-stream
Redist/XlsxSerializerCom.dll svn_mime_002dtype=application%2Foctet-stream Redist/XlsxSerializerCom.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64 svnc_tsvn_003alogminsize=5 Redist/x64 svnc_tsvn_003alogminsize=5
Redist/x64/ASCOfficeDocFile.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64/ASCOfficeDocxFile2.dll svn_mime_002dtype=application%2Foctet-stream Redist/x64/ASCOfficeDocxFile2.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64/ASCOfficeOdfFile.dll svn_mime_002dtype=application%2Foctet-stream Redist/x64/ASCOfficeOdfFile.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64/ASCOfficeOdfFileW.dll svn_mime_002dtype=application%2Foctet-stream Redist/x64/ASCOfficeOdfFileW.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64/ASCOfficePPTFile.dll svn_mime_002dtype=application%2Foctet-stream
Redist/x64/ASCOfficeRtfFile.dll svn_mime_002dtype=application%2Foctet-stream
RedistOpenSource/ASCOfficeDocxFile2.dll svn_mime_002dtype=application%2Foctet-stream RedistOpenSource/ASCOfficeDocxFile2.dll svn_mime_002dtype=application%2Foctet-stream
RedistOpenSource/ASCOfficePDFWriter.dll svn_mime_002dtype=application%2Foctet-stream RedistOpenSource/ASCOfficePDFWriter.dll svn_mime_002dtype=application%2Foctet-stream
RedistOpenSource/ASCOfficePPTXFile.dll svn_mime_002dtype=application%2Foctet-stream RedistOpenSource/ASCOfficePPTXFile.dll svn_mime_002dtype=application%2Foctet-stream
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#include "resource.h" #include "resource.h"
#define COMPONENT_NAME "OfficeDocFile" #define COMPONENT_NAME "OfficeDocFile"
#include "../../Common/FileInfo.h" #include "../../Common/FileInfo.h"
#include "version.h" #include "../version.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// //
......
...@@ -225,7 +225,7 @@ ...@@ -225,7 +225,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)version.h" CommandLine="$(SolutionDir)..\..\Redist\VersionControl.exe $(SolutionDir)..\version.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
...@@ -325,7 +325,7 @@ ...@@ -325,7 +325,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)version.h" CommandLine="$(SolutionDir)..\..\Redist\VersionControl.exe $(SolutionDir)..\version.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
......
...@@ -158,12 +158,13 @@ public: ...@@ -158,12 +158,13 @@ public:
std::list<std::string> GetAllStreams( const std::string& storageName ); std::list<std::string> GetAllStreams( const std::string& storageName );
Storage( const Storage& );
Storage& operator=( const Storage& );
private: private:
StorageIO* io; StorageIO* io;
// no copy or assign // no copy or assign
Storage( const Storage& );
Storage& operator=( const Storage& );
}; };
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//1 //1
//226 //228
#define INTVER 1,0,1,226 #define INTVER 1,0,1,228
#define STRVER "1,0,1,226\0" #define STRVER "1,0,1,228\0"
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//2 //2
//0 //0
//1 //1
//313 //314
#define INTVER 2,0,1,313 #define INTVER 2,0,1,314
#define STRVER "2,0,1,313\0" #define STRVER "2,0,1,314\0"
#pragma once #pragma once
#include "../../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h" #include "../../../Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.h"
#include "PPTDocumentInfo.h" #include "PPTDocumentInfo.h"
......
#pragma once #pragma once
#include "../../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.h" #include "../../../ASCPresentationEditor/OfficeDrawing/TextAttributesEx.h"
#include "SlidePersist.h" #include "SlidePersist.h"
#include <zlib.h> #include <zlib.h>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#include "PPTFileDefines.h" #include "PPTFileDefines.h"
#include "../Reader/ReadStructures.h" #include "../Reader/ReadStructures.h"
#include "../../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/Enums.h" #include "../../../ASCPresentationEditor/OfficeDrawing/Shapes/BaseShape/PPTShape/Enums.h"
using namespace NSPresentationEditor; using namespace NSPresentationEditor;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <map> #include <map>
#include "../../Reader/Records.h" #include "../../Reader/Records.h"
#include "../../../../../ASCPresentationEditor/OfficeDrawing/Document.h" #include "../../../../ASCPresentationEditor/OfficeDrawing/Document.h"
#ifdef _DEBUG #ifdef _DEBUG
#define _DEBUG_LOG // _DEBUG_LOG #define _DEBUG_LOG // _DEBUG_LOG
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "TextSpecInfoAtom.h" #include "TextSpecInfoAtom.h"
#include "TextRulerAtom.h" #include "TextRulerAtom.h"
#include "TextInteractiveInfoAtom.h" #include "TextInteractiveInfoAtom.h"
#include "../../../../ASCPresentationEditor/OfficeDrawing/Interactive.h" #include "../../../ASCPresentationEditor/OfficeDrawing/Interactive.h"
class CTextFullSettings class CTextFullSettings
{ {
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// //
#include "resource.h" #include "resource.h"
#define COMPONENT_NAME "OfficePPTFile" #define COMPONENT_NAME "OfficePPTFile"
#include "../../../Common/FileInfo.h" #include "../../Common/FileInfo.h"
#include "version.h" #include "../version.h"
#define APSTUDIO_READONLY_SYMBOLS #define APSTUDIO_READONLY_SYMBOLS
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
......
This diff is collapsed.
...@@ -226,7 +226,7 @@ ...@@ -226,7 +226,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="..\..\..\Redist\VersionControl.exe $(ProjectDir)version.h" CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)..\version.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
...@@ -315,7 +315,7 @@ ...@@ -315,7 +315,7 @@
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
Description="Performing registration" Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\..\..\Redist&quot;&#x0D;&#x0A;" CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\..\Redist&quot;&#x0D;&#x0A;"
/> />
</Configuration> </Configuration>
<Configuration <Configuration
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
CommandLine="..\..\..\Redist\VersionControl.exe $(ProjectDir)version.h" CommandLine="..\..\Redist\VersionControl.exe $(ProjectDir)..\version.h"
/> />
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
<Tool <Tool
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
Description="Performing registration" Description="Performing registration"
CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(ProjectDir)..\..\..\Redist\x64&quot;&#x0D;&#x0A;" CommandLine="regsvr32 /s /c &quot;$(TargetPath)&quot;&#x0D;&#x0A;copy &quot;$(TargetPath)&quot; &quot;$(SolutionDir)..\..\Redist\x64&quot;&#x0D;&#x0A;"
/> />
</Configuration> </Configuration>
</Configurations> </Configurations>
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
#pragma once #pragma once
#include "resource.h" // main symbols #include "resource.h" // main symbols
#include "../../../Common/OfficeFileTemplate.h" #include "../../Common/OfficeFileTemplate.h"
#include "../../../Common/ATLDefine.h" #include "../../Common/ATLDefine.h"
#include "../../../Common/ASCUtils.h" #include "../../Common/ASCUtils.h"
#include "../../../Common/VideoFileErrorDescription.h" #include "../../Common/VideoFileErrorDescription.h"
#include "../PPTFormatLib/PPTFormatLib.h" #include "../PPTFormatLib/PPTFormatLib.h"
......
...@@ -56,5 +56,5 @@ using namespace ATL; ...@@ -56,5 +56,5 @@ using namespace ATL;
#endif #endif
#include "../../../Common/ASCATLError.h" #include "../../Common/ASCATLError.h"
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//1 //1
//257 //264
#define INTVER 1,0,1,257 #define INTVER 1,0,1,264
#define STRVER "1,0,1,257\0" #define STRVER "1,0,1,264\0"
...@@ -81,12 +81,11 @@ ...@@ -81,12 +81,11 @@
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Debug|x64"
OutputDirectory="$(SolutionDir)$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
...@@ -102,11 +101,15 @@ ...@@ -102,11 +101,15 @@
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" Optimization="0"
RuntimeLibrary="2" PreprocessorDefinitions="_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
...@@ -141,11 +144,12 @@ ...@@ -141,11 +144,12 @@
/> />
</Configuration> </Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4" ConfigurationType="4"
CharacterSet="1" CharacterSet="1"
WholeProgramOptimization="1"
> >
<Tool <Tool
Name="VCPreBuildEventTool" Name="VCPreBuildEventTool"
...@@ -161,15 +165,11 @@ ...@@ -161,15 +165,11 @@
/> />
<Tool <Tool
Name="VCMIDLTool" Name="VCMIDLTool"
TargetEnvironment="3"
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" PreprocessorDefinitions="WIN32;NDEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED"
PreprocessorDefinitions="_DEBUG;_LIB;USE_LITE_READER;_USE_XMLLITE_READER_;_USE_LIBXML2_READER_;LIBXML_READER_ENABLED" RuntimeLibrary="2"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
WarningLevel="3" WarningLevel="3"
Detect64BitPortabilityProblems="true" Detect64BitPortabilityProblems="true"
...@@ -816,10 +816,6 @@ ...@@ -816,10 +816,6 @@
RelativePath="..\..\..\Common\DocxFormat\Source\XML\stringcommon.cpp" RelativePath="..\..\..\Common\DocxFormat\Source\XML\stringcommon.cpp"
> >
</File> </File>
<File
RelativePath="..\source\test_h_any.cpp"
>
</File>
</Files> </Files>
<Globals> <Globals>
</Globals> </Globals>
......
...@@ -32,7 +32,9 @@ CString RtfPicture::GenerateWMF(RenderParameter oRenderParameter) ...@@ -32,7 +32,9 @@ CString RtfPicture::GenerateWMF(RenderParameter oRenderParameter)
// //
RtfWriter * poWriter = static_cast<RtfWriter*>( oRenderParameter.poWriter ); RtfWriter * poWriter = static_cast<RtfWriter*>( oRenderParameter.poWriter );
//IUnknown* piTempPict = NULL; IUnknown* piTempPict = NULL;
//todooo ???
//if( true == LoadPicture( &piTempPict, m_sPicFilename ) ) //if( true == LoadPicture( &piTempPict, m_sPicFilename ) )
//{ //{
// CString sTempFile = Utils::CreateTempFile( poWriter->m_sTempFolder ); // CString sTempFile = Utils::CreateTempFile( poWriter->m_sTempFolder );
...@@ -40,11 +42,9 @@ CString RtfPicture::GenerateWMF(RenderParameter oRenderParameter) ...@@ -40,11 +42,9 @@ CString RtfPicture::GenerateWMF(RenderParameter oRenderParameter)
// { // {
// m_aTempFiles.push_back( sTempFile ); // m_aTempFiles.push_back( sTempFile );
// sResult.Append( RtfInternalEncoder::Encode( sTempFile ) ); // sResult.Append( RtfInternalEncoder::Encode( sTempFile ) );
// //RtfUtility::ReadDataFromFile( sTempFile, sResult );
// } // }
// //Utils::RemoveDirOrFile( sTempFile );
//} //}
//RELEASEINTERFACE( piTempPict ); RELEASEINTERFACE( piTempPict );
sResult.Append(_T("}")); sResult.Append(_T("}"));
return sResult; return sResult;
...@@ -82,9 +82,7 @@ CString RtfPicture::RenderToRtf(RenderParameter oRenderParameter) ...@@ -82,9 +82,7 @@ CString RtfPicture::RenderToRtf(RenderParameter oRenderParameter)
} }
sResult.Append( _T(" ")); sResult.Append( _T(" "));
//m_aTempFiles.push_back( m_sPicFilename );
sResult.Append( RtfInternalEncoder::Encode( m_sPicFilename ) ); sResult.Append( RtfInternalEncoder::Encode( m_sPicFilename ) );
//RtfUtility::ReadDataFromFile( m_sPicFilename, sResult );
sResult.Append(_T("}")); sResult.Append(_T("}"));
return sResult; return sResult;
......
...@@ -80,34 +80,6 @@ namespace Strings ...@@ -80,34 +80,6 @@ namespace Strings
return d; return d;
} }
//static BOOL ToBinary(const CString& strValue, BYTE*& pData, int& nSizeAllocated, int& nSizeArray)
//{
// pData = NULL;
// nSizeArray = 0;
// nSizeAllocated = Base64::Base64DecodeGetRequiredLength(strValue.GetLength());
// if (nSizeAllocated < 1)
// return FALSE;
//
// pData = new BYTE[nSizeAllocated];
// if (!pData)
// return FALSE;
// nSizeArray = nSizeAllocated;
// CT2A convert(strValue);
// if (!Base64::Base64Decode(convert, strValue.GetLength(), pData, &nSizeArray))
// {
// delete[] pData;
// pData = NULL;
// nSizeArray = 0;
// nSizeAllocated = 0;
// return FALSE;
// }
// return TRUE;
//}
static CString FromInteger(int Value, int Base = 10) static CString FromInteger(int Value, int Base = 10)
{ {
...@@ -132,113 +104,7 @@ namespace Strings ...@@ -132,113 +104,7 @@ namespace Strings
return _T("false"); return _T("false");
} }
//static CStringA FromBinary(const BYTE* pData, long lSize)
//{
// if ((NULL == pData) || (0 == lSize))
// return "";
// CStringA sResult;
// int nStrSize = Base64::Base64EncodeGetRequiredLength(lSize);
// LPSTR pStrData = sResult.GetBuffer(nStrSize + 1);
// BOOL bSuccess = Base64::Base64Encode(pData, lSize, pStrData, &nStrSize);
//
// pStrData[nStrSize] = '\0';
// sResult.ReleaseBuffer();
// return sResult;
//}
//static CString FromVariant(VARIANT val)
//{
// CString sVal = _T("");
// switch (VT_TYPEMASK & val.vt)
// {
// case VT_EMPTY:
// break;
// case VT_NULL:
// sVal = _T("");
// break;
// case VT_I2:
// sVal.Format(_T("%d"), val.iVal);
// break;
// case VT_I4:
// sVal.Format(_T("%d"), val.lVal);
// break;
// case VT_R4:
// sVal.Format(_T("%f"), val.fltVal);
// break;
// case VT_R8:
// sVal.Format(_T("%f"), val.dblVal);
// break;
// case VT_DATE:
// sVal.Format(_T("%f"), val.date);
// break;
// case VT_BSTR:
// sVal = val.bstrVal;
// break;
// case VT_BOOL:
// sVal = (VARIANT_TRUE == val.boolVal) ? _T("1") : _T("0");
// break;
// case VT_VARIANT:
// sVal = _T("");
// break;
// case VT_UNKNOWN:
// sVal = _T("");
// // IDispatch ,
// break;
// case VT_I1:
// sVal.Format(_T("%d"), val.cVal);
// break;
// case VT_UI1:
// sVal.Format(_T("%d"), val.bVal);
// break;
// case VT_UI2:
// sVal.Format(_T("%d"), val.uiVal);
// break;
// case VT_UI4:
// sVal.Format(_T("%d"), val.ulVal);
// break;
// case VT_I8:
// sVal.Format(_T("%d"), val.llVal);
// break;
// case VT_UI8:
// sVal.Format(_T("%d"), val.ullVal);
// break;
// case VT_INT:
// sVal.Format(_T("%d"), val.intVal);
// break;
// case VT_UINT:
// sVal.Format(_T("%d"), val.uintVal);
// break;
// case VT_DECIMAL:
// case VT_CY:
// case VT_SAFEARRAY:
// case VT_VOID:
// case VT_HRESULT:
// case VT_CARRAY:
// case VT_USERDEFINED:
// case VT_LPSTR:
// case VT_LPWSTR:
// case VT_RECORD:
// case VT_INT_PTR:
// case VT_UINT_PTR:
// case VT_FILETIME:
// case VT_BLOB:
// case VT_STREAM:
// case VT_STORAGE:
// case VT_STREAMED_OBJECT:
// case VT_STORED_OBJECT:
// case VT_BLOB_OBJECT:
// case VT_CF:
// case VT_CLSID:
// case VT_VERSIONED_STREAM:
// case VT_BSTR_BLOB:
// sVal = _T("");
// break;
// }
// return sVal;
//}
} }
class Convert class Convert
...@@ -272,6 +138,7 @@ public: ...@@ -272,6 +138,7 @@ public:
} }
static bool MultybyteToUnicode(CStringA sInputStr, CStringW& sOutputStr, int nCodepage) static bool MultybyteToUnicode(CStringA sInputStr, CStringW& sOutputStr, int nCodepage)
{ {
//todooo
sOutputStr = _T(""); sOutputStr = _T("");
int nBufSize = MultiByteToWideChar(nCodepage, 0, sInputStr, -1, NULL, NULL); int nBufSize = MultiByteToWideChar(nCodepage, 0, sInputStr, -1, NULL, NULL);
LPWSTR p = new WCHAR[ nBufSize + 1 ]; LPWSTR p = new WCHAR[ nBufSize + 1 ];
...@@ -288,6 +155,7 @@ public: ...@@ -288,6 +155,7 @@ public:
} }
static CStringW Utf8ToUnicode(CStringA sInputStr)//todo static CStringW Utf8ToUnicode(CStringA sInputStr)//todo
{ {
//todooo
CStringW sResult; CStringW sResult;
int nBufSize = MultiByteToWideChar(CP_UTF8, 0, sInputStr, -1, NULL, NULL); int nBufSize = MultiByteToWideChar(CP_UTF8, 0, sInputStr, -1, NULL, NULL);
LPWSTR p = new WCHAR[ nBufSize + 1 ]; LPWSTR p = new WCHAR[ nBufSize + 1 ];
...@@ -299,6 +167,7 @@ public: ...@@ -299,6 +167,7 @@ public:
} }
static CStringA UnicodeToUtf8(CStringW sInputStr)//todo static CStringA UnicodeToUtf8(CStringW sInputStr)//todo
{ {
//todooo
CStringA sResult; CStringA sResult;
int nBufSize = WideCharToMultiByte(CP_UTF8, 0, sInputStr, -1, NULL, NULL, NULL, NULL); int nBufSize = WideCharToMultiByte(CP_UTF8, 0, sInputStr, -1, NULL, NULL, NULL, NULL);
LPSTR p = new CHAR[ nBufSize + 1 ]; LPSTR p = new CHAR[ nBufSize + 1 ];
...@@ -421,17 +290,19 @@ public: ...@@ -421,17 +290,19 @@ public:
{ {
if( NULL == pbData ) if( NULL == pbData )
return; return;
HANDLE hFile = ::CreateFile( sFilename, GENERIC_WRITE, 0, 0, CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL, 0);
CFile file;
if (file.CreateFileW(sFilename) != S_OK) return;
DWORD dwBytesWritten; DWORD dwBytesWritten;
::WriteFile(hFile,pbData ,nLength, &dwBytesWritten, NULL); file.WriteFile(pbData ,nLength);
CloseHandle( hFile ); file.CloseFile();
} }
static void WriteDataToFile(CString& sFilename, CString& sData) static void WriteDataToFile(CString& sFilename, CString& sData)
{ {
HANDLE hFile = ::CreateFile( sFilename, GENERIC_WRITE, 0, 0, CREATE_ALWAYS,FILE_ATTRIBUTE_NORMAL, 0); CFile file;
DWORD dwBytesWritten; if (file.CreateFileW(sFilename) != S_OK) return;
TCHAR * buf = sData.GetBuffer(); TCHAR * buf = sData.GetBuffer();
int nLengthText = sData.GetLength(); int nLengthText = sData.GetLength();
...@@ -444,10 +315,11 @@ public: ...@@ -444,10 +315,11 @@ public:
nByte |= ToByte( buf[2 * i + 1] ); nByte |= ToByte( buf[2 * i + 1] );
buf2[i] = nByte; buf2[i] = nByte;
} }
::WriteFile(hFile,buf2 ,nLengthData, &dwBytesWritten, NULL); file.WriteFile(buf2 ,nLengthData);
sData.ReleaseBuffer(); sData.ReleaseBuffer();
delete[] buf2; delete[] buf2;
CloseHandle( hFile ); file.CloseFile();
} }
static void WriteDataToBinary( CString sData, BYTE** ppData, long& nSize) static void WriteDataToBinary( CString sData, BYTE** ppData, long& nSize)
{ {
......
...@@ -21,27 +21,21 @@ public: ...@@ -21,27 +21,21 @@ public:
{ {
if( false == m_sFileXml.IsEmpty() ) if( false == m_sFileXml.IsEmpty() )
{ {
HANDLE hFile = ::CreateFile(sFolder + _T("\\word\\numbering.xml"), CFile file;
GENERIC_WRITE,
0,
0,
CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
0);
//ATLASSERT( INVALID_HANDLE_VALUE != hFile );
if( INVALID_HANDLE_VALUE != hFile ) if (file.CreateFileW(sFolder + FILE_SEPARATOR_STR + _T("word") + FILE_SEPARATOR_STR + _T("numbering.xml")) != S_OK) return false;
{
m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"), _T("numbering.xml") ); m_oWriter.m_oDocRels.AddRelationship( _T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering"), _T("numbering.xml") );
m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"), _T("/word/numbering.xml") ); m_oWriter.m_oContentTypes.AddContent( _T("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"), _T("/word/numbering.xml") );
DWORD dwBytesWritten; DWORD dwBytesWritten;
CString sXml = CreateXml(); CString sXml = CreateXml();
CStringA sXmlUTF = Convert::UnicodeToUtf8( sXml ); CStringA sXmlUTF = Convert::UnicodeToUtf8( sXml );
::WriteFile(hFile, sXmlUTF, sXmlUTF.GetLength(), &dwBytesWritten, NULL);
CloseHandle( hFile ); file.WriteFile(sXmlUTF.GetBuffer(), sXmlUTF.GetLength());
return true; file.CloseFile();
} return true;
} }
return false; return false;
} }
......
This diff is collapsed.
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//1 //1
//42 //45
#define INTVER 1,0,0,42 #define INTVER 1,0,1,45
#define STRVER "1,0,0,42\0" #define STRVER "1,0,1,45\0"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment