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

git-svn-id:...

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59564 954022d7-b5bf-4e40-9824-e11837661b57
parent 00f72815
...@@ -26,7 +26,7 @@ CPPTXFile::CPPTXFile(load_from_resource fCallbackResource, extract_to_directory ...@@ -26,7 +26,7 @@ CPPTXFile::CPPTXFile(load_from_resource fCallbackResource, extract_to_directory
m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\"); m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\");
#else #else
m_strTempDir = FileSystem::Directory::GetTempPath(); m_strTempDir = FileSystem::Directory::GetTempPath();
m_strTempDir = FileSystem::Directory::GetLongPathNameW(m_strTempDir) + CString("_PPTX\\"); m_strTempDir = FileSystem::Directory::GetLongPathNameW(m_strTempDir) + CString("_PPTX/");
#endif #endif
// //
m_strFontDirectory = _T(""); m_strFontDirectory = _T("");
......
...@@ -262,8 +262,8 @@ namespace NSBinPptxRW ...@@ -262,8 +262,8 @@ namespace NSBinPptxRW
pPair = m_mainTables.find(NSMainTables::Themes); pPair = m_mainTables.find(NSMainTables::Themes);
if (m_mainTables.end() != pPair) if (m_mainTables.end() != pPair)
{ {
OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\theme"); OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("theme");
OOX::CPath pathFolderRels = pathFolder.GetPath() + _T("\\_rels"); OOX::CPath pathFolderRels = pathFolder.GetPath() + FILE_SEPARATOR_STR + _T("_rels");
FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolder.GetPath());
FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath());
...@@ -306,8 +306,8 @@ namespace NSBinPptxRW ...@@ -306,8 +306,8 @@ namespace NSBinPptxRW
pPair = m_mainTables.find(NSMainTables::SlideMasters); pPair = m_mainTables.find(NSMainTables::SlideMasters);
if (m_mainTables.end() != pPair) if (m_mainTables.end() != pPair)
{ {
OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slideMasters"); OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slideMasters");
OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolder.GetPath());
FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath());
...@@ -361,8 +361,8 @@ namespace NSBinPptxRW ...@@ -361,8 +361,8 @@ namespace NSBinPptxRW
pPair = m_mainTables.find(NSMainTables::SlideLayouts); pPair = m_mainTables.find(NSMainTables::SlideLayouts);
if (m_mainTables.end() != pPair) if (m_mainTables.end() != pPair)
{ {
OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slideLayouts"); OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR+ _T("ppt") + FILE_SEPARATOR_STR + _T("slideLayouts");
OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolder.GetPath());
FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath());
...@@ -399,8 +399,8 @@ namespace NSBinPptxRW ...@@ -399,8 +399,8 @@ namespace NSBinPptxRW
pPair = m_mainTables.find(NSMainTables::Slides); pPair = m_mainTables.find(NSMainTables::Slides);
if (m_mainTables.end() != pPair) if (m_mainTables.end() != pPair)
{ {
OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slides"); OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slides");
OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
FileSystem::Directory::CreateDirectory (pathFolder.GetPath()); FileSystem::Directory::CreateDirectory (pathFolder.GetPath());
FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath()); FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath());
...@@ -419,19 +419,19 @@ namespace NSBinPptxRW ...@@ -419,19 +419,19 @@ namespace NSBinPptxRW
if (m_arSlides[i].comments.is_init()) if (m_arSlides[i].comments.is_init())
{ {
m_oReader.m_pRels->WriteSlideComments(nComment); m_oReader.m_pRels->WriteSlideComments(nComment);
if (1 == nComment) OOX::CPath pathFolderCommentDir = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("comments");
if (1 == nComment)
{ {
OOX::CPath pathFolderCommentDir = m_strDstFolder + _T("\\ppt\\comments");
FileSystem::Directory::CreateDirectory (pathFolderCommentDir.GetPath()); FileSystem::Directory::CreateDirectory (pathFolderCommentDir.GetPath());
} }
CString strCommentFile = _T(""); CString strCommentFile = _T("");
strCommentFile.Format(_T("\\ppt\\comments\\comment%d.xml"), nComment); strCommentFile.Format(_T("comment%d.xml"), nComment);
oXmlWriter.ClearNoAttack(); oXmlWriter.ClearNoAttack();
m_arSlides[i].comments->toXmlWriter(&oXmlWriter); m_arSlides[i].comments->toXmlWriter(&oXmlWriter);
OOX::CPath pathComment = m_strDstFolder + strCommentFile; OOX::CPath pathComment = pathFolderCommentDir + strCommentFile;
oXmlWriter.SaveToFile(pathComment.GetPath()); oXmlWriter.SaveToFile(pathComment.GetPath());
++nComment; ++nComment;
...@@ -491,8 +491,8 @@ namespace NSBinPptxRW ...@@ -491,8 +491,8 @@ namespace NSBinPptxRW
CreateDefaultNotesMasters((int)m_arThemes.size() + 1); CreateDefaultNotesMasters((int)m_arThemes.size() + 1);
CreateDefaultNote(); CreateDefaultNote();
OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\notesSlides"); OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("notesSlides");
OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels");
FileSystem::Directory::CreateDirectory (pathFolder.GetPath()); FileSystem::Directory::CreateDirectory (pathFolder.GetPath());
FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath()); FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath());
......
...@@ -291,17 +291,17 @@ namespace CDirectory ...@@ -291,17 +291,17 @@ namespace CDirectory
} }
static BOOL OpenFile(CString strFolderPath, CString strFileName, CFile* pFile) static BOOL OpenFile(CString strFolderPath, CString strFileName, CFile* pFile)
{ {
CString strFile = strFolderPath + '\\' + strFileName; CString strFile = strFolderPath + FILE_SEPARATOR_CHAR + strFileName;
return (S_OK == pFile->OpenFile(strFile)); return (S_OK == pFile->OpenFile(strFile));
} }
static BOOL CreateFile(CString strFolderPath, CString strFileName, CFile* pFile) static BOOL CreateFile(CString strFolderPath, CString strFileName, CFile* pFile)
{ {
CString strFile = strFolderPath + '\\' + strFileName; CString strFile = strFolderPath + FILE_SEPARATOR_CHAR + strFileName;
return (S_OK == pFile->CreateFile(strFile)); return (S_OK == pFile->CreateFile(strFile));
} }
static BOOL CreateDirectory(CString strFolderPathRoot, CString strFolderName) static BOOL CreateDirectory(CString strFolderPathRoot, CString strFolderName)
{ {
CString strFolder = strFolderPathRoot + '\\' + strFolderName; CString strFolder = strFolderPathRoot + FILE_SEPARATOR_CHAR + strFolderName;
return ::CreateDirectory(strFolder, NULL); return ::CreateDirectory(strFolder, NULL);
} }
static BOOL CreateDirectory(CString strFolderPath) static BOOL CreateDirectory(CString strFolderPath)
......
...@@ -85,7 +85,7 @@ namespace FileSystem { ...@@ -85,7 +85,7 @@ namespace FileSystem {
bool Directory::CreateDirectory (String strFolderPathRoot, String strFolderName) bool Directory::CreateDirectory (String strFolderPathRoot, String strFolderName)
{ {
String strFolder = strFolderPathRoot; String strFolder = strFolderPathRoot;
strFolder += _T("/"); strFolder += FILE_SEPARATOR_STR ;
strFolder += strFolderName; strFolder += strFolderName;
return CreateDirectory(strFolder); return CreateDirectory(strFolder);
} }
......
...@@ -2415,10 +2415,10 @@ namespace BinXlsxRW { ...@@ -2415,10 +2415,10 @@ namespace BinXlsxRW {
if(c_oSer_DrawingType::Chart2 == type) if(c_oSer_DrawingType::Chart2 == type)
{ {
// rels // rels
OOX::CPath pathChartsDir = m_sDestinationDir + _T("\\xl\\charts"); OOX::CPath pathChartsDir = m_sDestinationDir + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("charts");
OOX::CSystemUtility::CreateDirectories(pathChartsDir.GetPath()); OOX::CSystemUtility::CreateDirectories(pathChartsDir.GetPath());
OOX::CPath pathChartsRelsDir = pathChartsDir.GetPath() + _T("\\_rels"); OOX::CPath pathChartsRelsDir = pathChartsDir + FILE_SEPARATOR_STR + _T("_rels");
OOX::CSystemUtility::CreateDirectories(pathChartsRelsDir.GetPath()); OOX::CSystemUtility::CreateDirectories(pathChartsRelsDir.GetPath());
m_pOfficeDrawingConverter->SetDstContentRels(); m_pOfficeDrawingConverter->SetDstContentRels();
...@@ -2430,7 +2430,7 @@ namespace BinXlsxRW { ...@@ -2430,7 +2430,7 @@ namespace BinXlsxRW {
pChartFile->m_bDoNotAddRels = true; pChartFile->m_bDoNotAddRels = true;
m_pCurDrawing->Add(pChartFile); m_pCurDrawing->Add(pChartFile);
OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + _T("\\") + pChartFile->m_sFilename + _T(".rels"); OOX::CPath pathChartsRels = pathChartsRelsDir.GetPath() + FILE_SEPARATOR_STR + pChartFile->m_sFilename + _T(".rels");
m_pOfficeDrawingConverter->SaveDstContentRels(pathChartsRels.GetPath()); m_pOfficeDrawingConverter->SaveDstContentRels(pathChartsRels.GetPath());
long rId; long rId;
......
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