Commit 077bd7e0 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

не передавался путь к внешним темам, при конвертации pptt->pptx

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64305 954022d7-b5bf-4e40-9824-e11837661b57
parent 1487eb3f
......@@ -74,7 +74,7 @@ public:
STDMETHOD(SetUseSystemFonts)(VARIANT_BOOL useSystemFonts);
STDMETHOD(OpenFileToPPTY)(BSTR bsInput, BSTR bsOutput);
STDMETHOD(OpenDirectoryToPPTY)(BSTR bsInput, BSTR bsOutput);
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput);
STDMETHOD(ConvertPPTYToPPTX)(BSTR bsInput, BSTR bsOutput, BSTR bsThemesFolder);
#else
HRESULT get_TempDirectory(BSTR* pVal);
HRESULT put_TempDirectory(BSTR newVal);
......@@ -95,7 +95,7 @@ public:
HRESULT SetUseSystemFonts(VARIANT_BOOL useSystemFonts);
HRESULT OpenFileToPPTY(BSTR bsInput, BSTR bsOutput);
HRESULT OpenDirectoryToPPTY(BSTR bsInput, BSTR bsOutput);
HRESULT ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput);
HRESULT ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput, BSTR bsThemesFolder);
#endif
};
#endif //ASC_OFFICE_PPTX_FILE
......@@ -344,7 +344,7 @@ HRESULT CPPTXFile::OpenDirectoryToPPTY(BSTR bsInput, BSTR bsOutput)
return S_OK;
}
HRESULT CPPTXFile::ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput)//bsOutput
HRESULT CPPTXFile::ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput, BSTR bsThemesFolder)//bsOutput
{
OOX::CPath pathLocalTempDirectory;
......@@ -374,7 +374,7 @@ HRESULT CPPTXFile::ConvertPPTYToPPTX(BSTR bsInput, BSTR bsOutput)//bsOutput
CString strBsInput = bsInput;
CString srcFolder = FileSystem::Directory::GetFolderPath(strBsInput);
oWriter.OpenPPTY(pSrcBuffer, lFileSize, srcFolder);
oWriter.OpenPPTY(pSrcBuffer, lFileSize, srcFolder, bsThemesFolder);
RELEASEARRAYOBJECTS(pSrcBuffer);
HRESULT hRes = S_OK;
......
......@@ -434,6 +434,7 @@ namespace NSBinPptxRW
//CRelsGenerator m_oRels;
CString m_strFolder;
CString m_strFolderThemes;
CString m_strFolderExternalThemes;
_INT32 m_lChartNumber;
CString m_strContentTypes;
......
......@@ -83,7 +83,7 @@ namespace NSBinPptxRW
m_oReader.m_strFolderThemes = pathTheme.GetPath();
}
void OpenPPTY(BYTE* pBuffer, int len, CString srcFolder)
void OpenPPTY(BYTE* pBuffer, int len, CString srcFolder, CString strThemesFolder)
{
int start_pos = 0;
......@@ -130,6 +130,7 @@ namespace NSBinPptxRW
m_oReader.m_strContentTypes = _T("");
m_oReader.Init(pDstBuffer, 0, dstLen);
m_oReader.m_strFolder = srcFolder;
m_oReader.m_strFolderExternalThemes = strThemesFolder;
for (LONG i = 0; i < 30/*main tables max*/; ++i)
{
......
......@@ -346,7 +346,7 @@ namespace PPTX
{
if (0 == strUrl.Find(_T("theme")))
{
strUrl = pReader->m_strFolderThemes + FILE_SEPARATOR_STR + strUrl;
strUrl = pReader->m_strFolderExternalThemes + FILE_SEPARATOR_STR + strUrl;
}
else
{
......
......@@ -331,7 +331,7 @@ namespace PPTX
{
if (0 == strUrl.Find(_T("theme")))
{
strUrl = pReader->m_strFolderThemes + FILE_SEPARATOR_STR + strUrl;
strUrl = pReader->m_strFolderExternalThemes + FILE_SEPARATOR_STR + strUrl;
}
else
{
......
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