mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 01:11:43 +08:00
DocFormatReader - восстановление тестового примера
This commit is contained in:
committed by
Alexander Trofimov
parent
af2582b854
commit
1a05729019
30
ASCOfficeDocFile/DocFormatTest/DocFormatTest.cpp
Normal file
30
ASCOfficeDocFile/DocFormatTest/DocFormatTest.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
// DocFormatTest.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
#include "../../../../ASCOfficeDocFile/DocFormatLib/DocFormatLib.h"
|
||||
|
||||
#include "../../../../ASCOfficeDocFile/win32/ASCOfficeCriticalSection.h"
|
||||
|
||||
#include <string>
|
||||
#include <tchar.h>
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
std::wstring sSrcDoc = _T("d:\\test\\_doc\\PZ.doc");
|
||||
std::wstring sResBackDocx = _T("d:\\test\\_doc\\PZ.doc-my.docx");
|
||||
|
||||
std::wstring sTemp = _T("d:\\home/lena/Documents/temp");
|
||||
|
||||
std::wstring sXMLOptions = _T("");
|
||||
|
||||
// doc->docx
|
||||
COfficeDocFile docFile;
|
||||
docFile.put_TempDirectory(sTemp);
|
||||
|
||||
HRESULT hRes = docFile.LoadFromFile( sSrcDoc, sResBackDocx, NULL);
|
||||
|
||||
if (hRes != S_OK)return 2;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user