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
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("");
......
......@@ -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());
......
......@@ -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)
......
......@@ -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);
}
......
......@@ -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;
......
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