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

linux build

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59074 954022d7-b5bf-4e40-9824-e11837661b57
parent e930e852
......@@ -2,8 +2,14 @@
#define ASC_OFFICE_PPTX_FILE
//todo
#include <atlbase.h>
#include <atlstr.h>
#ifdef _WIN32
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../DesktopEditor/common/ASCVariant.h"
#include "../../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include "../Common/DocxFormat/Source/Base/Base.h"
#include "PPTXFormat/PPTXEvent.h"
......@@ -44,17 +50,18 @@ public:
CPPTXFile(load_from_resource fCallbackResource, extract_to_directory fCallbackExtract, compress_from_directory fCallbackCompress, progress_operation fCallbackProgress, void* pCallbackArg);
~CPPTXFile();
public:
HRESULT LoadFromFile(BSTR sSrcFileName, BSTR sDstPath, BSTR sXMLOptions);
public:
HRESULT SaveToFile(BSTR sDstFileName, BSTR sSrcPath, BSTR sXMLOptions);
public:
#ifdef WIN32
STDMETHOD(get_TempDirectory)(BSTR* pVal);
STDMETHOD(put_TempDirectory)(BSTR newVal);
public:
STDMETHOD(GetDVDXml)(BSTR* pbstrPTTXml);
STDMETHOD(GetBluRayXml)(BSTR* pbstrDVDXml);
public:
STDMETHOD(get_DrawingXml)(BSTR* pVal);
STDMETHOD(SetAdditionalParam)(BSTR ParamName, VARIANT ParamValue);
STDMETHOD(GetAdditionalParam)(BSTR ParamName, VARIANT* ParamValue);
......@@ -67,8 +74,30 @@ public:
STDMETHOD(OpenFileToPPTY)(BSTR bsInput, BSTR bsOutput);
STDMETHOD(OpenDirectoryToPPTY)(BSTR bsInput, BSTR bsOutput);
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput);
#else
HRESULT get_TempDirectory(BSTR* pVal);
HRESULT put_TempDirectory(BSTR newVal);
HRESULT GetDVDXml(BSTR* pbstrPTTXml);
HRESULT GetBluRayXml(BSTR* pbstrDVDXml);
HRESULT get_DrawingXml(BSTR* pVal);
HRESULT SetAdditionalParam(BSTR ParamName, VARIANT ParamValue);
HRESULT GetAdditionalParam(BSTR ParamName, VARIANT* ParamValue);
virtual bool Progress(long ID, long Percent);
// to PPTY
HRESULT SetMediaDir(BSTR bsMediaDir);
HRESULT SetFontDir(BSTR bsFontDir);
HRESULT SetThemesDir(BSTR bsDir);
HRESULT SetUseSystemFonts(VARIANT_BOOL useSystemFonts);
HRESULT OpenFileToPPTY(BSTR bsInput, BSTR bsOutput);
HRESULT OpenDirectoryToPPTY(BSTR bsInput, BSTR bsOutput);
HRESULT ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput);
#endif
private:
INT32 RemoveDirOrFile(CString sPath, bool bIsRemoveHead = true);
int RemoveDirOrFile(CString sPath, bool bIsRemoveHead = true);
};
#endif //ASC_OFFICE_PPTX_FILE
\ No newline at end of file
#endif //ASC_OFFICE_PPTX_FILE
......@@ -3,10 +3,10 @@
#include "PPTXFormat/PPTXEvent.h"
#ifdef _WIN32
#include <shellapi.h>
#include <shlobj.h>
#include <shlwapi.h>
#pragma comment( lib, "shell32.lib" ) // shell32.lib
#include <shellapi.h>
#include <shlobj.h>
#include <shlwapi.h>
#pragma comment( lib, "shell32.lib" ) // shell32.lib
#else
#endif
......@@ -346,7 +346,7 @@ HRESULT CPPTXFile::ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput)
return hRes;
}
INT32 CPPTXFile::RemoveDirOrFile(CString sPath, bool bIsRemoveHead)
int CPPTXFile::RemoveDirOrFile(CString sPath, bool bIsRemoveHead)
{
DWORD dwFileAttrib = ::GetFileAttributes( sPath );
if( dwFileAttrib != INVALID_FILE_ATTRIBUTES )
......
......@@ -105,13 +105,13 @@ namespace PPTX2EditorAdvanced
_notesMasters.push_back(noteMaster);
// theme
size_t pPointerTh = (size_t)(noteMaster->Theme.operator ->());
size_t pPointerTh = (size_t)(noteMaster->theme_.operator ->());
std::map<size_t, LONG>::const_iterator pSearchTh = pCommon->themes.find(pPointerTh);
if (pSearchTh == pCommon->themes.end())
{
LONG lCountTh = (LONG)_themes.size();
pCommon->themes [pPointerTh] = lCountTh;
_themes.push_back(noteMaster->Theme);
_themes.push_back(noteMaster->theme_);
}
}
......@@ -377,8 +377,11 @@ namespace PPTX2EditorAdvanced
if (TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
{
CFile oFile;
oFile.CreateFileW(strDstFile);
#ifdef WIN32
oFile.CreateFileW(strDstFile);
#else
oFile.CreateFile(strDstFile);
#endif
CString strPrefix = _T("");
strPrefix.Format(_T("PPTY;v1;%d;"), nBinBufferLen);
CStringA sW = (CStringA)strPrefix;
......
......@@ -61,8 +61,10 @@ namespace NSBinPptxRW
CDirectory::CreateDirectory(m_strDstFolder);
CDirectory::CreateDirectory(m_strDstFolder, _T("docProps"));
CString strPPT = m_strDstFolder + _T("\\ppt");
CDirectory::CreateDirectory(strPPT);
CString strPPT = m_strDstFolder + _T("\\ppt");
CDirectory::CreateDirectory(strPPT);
CDirectory::CreateDirectory(strPPT, _T("media"));
m_oImageManager.Clear();
......@@ -111,7 +113,7 @@ namespace NSBinPptxRW
BYTE* pDstBuffer = new BYTE[dstLenTemp];
int dstLen = dstLenTemp;
Base64Decode((LPCSTR)pBuffer, len, pDstBuffer, &dstLen);
Base64::Base64Decode((LPCSTR)pBuffer, len, pDstBuffer, &dstLen);
m_oReader.m_strContentTypes = _T("");
m_oReader.Init(pDstBuffer, 0, dstLen);
......@@ -385,9 +387,12 @@ namespace NSBinPptxRW
CString strFolder = m_strDstFolder + _T("\\ppt\\slides");
CString strFolderRels = strFolder + _T("\\_rels");
CDirectory::CreateDirectory(strFolder);
#ifdef WIN32
CDirectory::CreateDirectory(strFolder);
CDirectory::CreateDirectory(strFolderRels);
#else
????
#endif
m_oReader.Seek(pPair->second);
m_oReader.Skip(4);
......
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