diff --git a/ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp b/ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp index 2cc0bf844b..fc5f8e21da 100644 --- a/ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp +++ b/ASCOfficePPTXFile/ASCOfficePPTXFileRealization.cpp @@ -26,7 +26,7 @@ CPPTXFile::CPPTXFile(load_from_resource fCallbackResource, extract_to_directory m_strTempDir = CStringW(buffer) + CStringW("_PPTX\\"); #else m_strTempDir = FileSystem::Directory::GetTempPath(); - m_strTempDir = FileSystem::Directory::GetLongPathNameW(m_strTempDir) + CString("_PPTX\\"); + m_strTempDir = FileSystem::Directory::GetLongPathNameW(m_strTempDir) + CString("_PPTX/"); #endif // m_strFontDirectory = _T(""); diff --git a/ASCOfficePPTXFile/Editor/PPTXWriter.h b/ASCOfficePPTXFile/Editor/PPTXWriter.h index 12308a0a53..4e3286e8ad 100644 --- a/ASCOfficePPTXFile/Editor/PPTXWriter.h +++ b/ASCOfficePPTXFile/Editor/PPTXWriter.h @@ -262,8 +262,8 @@ namespace NSBinPptxRW pPair = m_mainTables.find(NSMainTables::Themes); if (m_mainTables.end() != pPair) { - OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\theme"); - OOX::CPath pathFolderRels = pathFolder.GetPath() + _T("\\_rels"); + OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("theme"); + OOX::CPath pathFolderRels = pathFolder.GetPath() + FILE_SEPARATOR_STR + _T("_rels"); FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); @@ -306,8 +306,8 @@ namespace NSBinPptxRW pPair = m_mainTables.find(NSMainTables::SlideMasters); if (m_mainTables.end() != pPair) { - OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slideMasters"); - OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); + OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slideMasters"); + OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels"); FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); @@ -361,8 +361,8 @@ namespace NSBinPptxRW pPair = m_mainTables.find(NSMainTables::SlideLayouts); if (m_mainTables.end() != pPair) { - OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slideLayouts"); - OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); + OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR+ _T("ppt") + FILE_SEPARATOR_STR + _T("slideLayouts"); + OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels"); FileSystem::Directory::CreateDirectory(pathFolder.GetPath()); FileSystem::Directory::CreateDirectory(pathFolderRels.GetPath()); @@ -399,8 +399,8 @@ namespace NSBinPptxRW pPair = m_mainTables.find(NSMainTables::Slides); if (m_mainTables.end() != pPair) { - OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\slides"); - OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); + OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("slides"); + OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels"); FileSystem::Directory::CreateDirectory (pathFolder.GetPath()); FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath()); @@ -419,19 +419,19 @@ namespace NSBinPptxRW if (m_arSlides[i].comments.is_init()) { - m_oReader.m_pRels->WriteSlideComments(nComment); - if (1 == nComment) + m_oReader.m_pRels->WriteSlideComments(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()); } CString strCommentFile = _T(""); - strCommentFile.Format(_T("\\ppt\\comments\\comment%d.xml"), nComment); + strCommentFile.Format(_T("comment%d.xml"), nComment); oXmlWriter.ClearNoAttack(); m_arSlides[i].comments->toXmlWriter(&oXmlWriter); - OOX::CPath pathComment = m_strDstFolder + strCommentFile; + OOX::CPath pathComment = pathFolderCommentDir + strCommentFile; oXmlWriter.SaveToFile(pathComment.GetPath()); ++nComment; @@ -491,8 +491,8 @@ namespace NSBinPptxRW CreateDefaultNotesMasters((int)m_arThemes.size() + 1); CreateDefaultNote(); - OOX::CPath pathFolder = m_strDstFolder + _T("\\ppt\\notesSlides"); - OOX::CPath pathFolderRels = pathFolder + _T("\\_rels"); + OOX::CPath pathFolder = m_strDstFolder + FILE_SEPARATOR_STR + _T("ppt") + FILE_SEPARATOR_STR + _T("notesSlides"); + OOX::CPath pathFolderRels = pathFolder + FILE_SEPARATOR_STR + _T("_rels"); FileSystem::Directory::CreateDirectory (pathFolder.GetPath()); FileSystem::Directory::CreateDirectory (pathFolderRels.GetPath()); diff --git a/Common/DocxFormat/Source/SystemUtility/File.h b/Common/DocxFormat/Source/SystemUtility/File.h index e390296c7d..71696f3513 100644 --- a/Common/DocxFormat/Source/SystemUtility/File.h +++ b/Common/DocxFormat/Source/SystemUtility/File.h @@ -291,17 +291,17 @@ namespace CDirectory } 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)); } 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)); } static BOOL CreateDirectory(CString strFolderPathRoot, CString strFolderName) { - CString strFolder = strFolderPathRoot + '\\' + strFolderName; + CString strFolder = strFolderPathRoot + FILE_SEPARATOR_CHAR + strFolderName; return ::CreateDirectory(strFolder, NULL); } static BOOL CreateDirectory(CString strFolderPath) diff --git a/Common/DocxFormat/Source/SystemUtility/FileSystem/DirectoryPosix.cpp b/Common/DocxFormat/Source/SystemUtility/FileSystem/DirectoryPosix.cpp index 0ef946efb6..5a6d44696b 100644 --- a/Common/DocxFormat/Source/SystemUtility/FileSystem/DirectoryPosix.cpp +++ b/Common/DocxFormat/Source/SystemUtility/FileSystem/DirectoryPosix.cpp @@ -85,7 +85,7 @@ namespace FileSystem { bool Directory::CreateDirectory (String strFolderPathRoot, String strFolderName) { String strFolder = strFolderPathRoot; - strFolder += _T("/"); + strFolder += FILE_SEPARATOR_STR ; strFolder += strFolderName; return CreateDirectory(strFolder); } diff --git a/XlsxSerializerCom/Writer/BinaryReader.h b/XlsxSerializerCom/Writer/BinaryReader.h index e27e0d2441..c404581f4f 100644 --- a/XlsxSerializerCom/Writer/BinaryReader.h +++ b/XlsxSerializerCom/Writer/BinaryReader.h @@ -2415,10 +2415,10 @@ namespace BinXlsxRW { if(c_oSer_DrawingType::Chart2 == type) { //создаем папку для 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::CPath pathChartsRelsDir = pathChartsDir.GetPath() + _T("\\_rels"); + OOX::CPath pathChartsRelsDir = pathChartsDir + FILE_SEPARATOR_STR + _T("_rels"); OOX::CSystemUtility::CreateDirectories(pathChartsRelsDir.GetPath()); m_pOfficeDrawingConverter->SetDstContentRels(); @@ -2430,7 +2430,7 @@ namespace BinXlsxRW { pChartFile->m_bDoNotAddRels = true; 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()); long rId;