Commit 7fab3826 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@59523 954022d7-b5bf-4e40-9824-e11837661b57
parent a9fb2ecc
......@@ -40,8 +40,10 @@ namespace Writers
}
m_oWriter.WriteString(s_dr_End);
CFile oFile;
oFile.CreateFile(m_sDir + _T("\\word\\_rels\\") + sFileName);
OOX::CPath fileName = m_sDir + _T("\\word\\_rels\\") + sFileName;
CFile oFile;
oFile.CreateFile(fileName.GetFilename());
oFile.WriteStringUTF8(m_oWriter.GetData());
oFile.CloseFile();
}
......@@ -62,4 +64,4 @@ namespace Writers
}
};
}
#endif // #ifndef DOCUMENT_RELS_WRITER
\ No newline at end of file
#endif // #ifndef DOCUMENT_RELS_WRITER
......@@ -5944,8 +5944,9 @@ int Binary_HdrFtrTableReader::ReadHdrFtrItem(BYTE type, long length, void* poRes
Binary_DocumentTableReader oBinary_DocumentTableReader(m_oBufferedStream, m_oFileWriter, poHdrFtrItem->Header, m_pComments);
res = Read1(length, &Binary_HdrFtrTableReader::ReadHdrFtrItemContent, this, &oBinary_DocumentTableReader);
CString sRelsPath = m_oFileWriter.m_oDocumentWriter.m_sDir + _T("\\word\\_rels\\") + poHdrFtrItem->m_sFilename + _T(".rels");
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(sRelsPath);
OOX::CPath fileRelsPath = m_oFileWriter.m_oDocumentWriter.m_sDir + _T("\\word\\_rels\\") + poHdrFtrItem->m_sFilename + _T(".rels");
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(fileRelsPath.GetFilename());
}
}
else
......@@ -6133,9 +6134,10 @@ public: BinaryFileReader(CString& sFileInDir, NSBinPptxRW::CBinaryFileReader& oB
}
}
res = Binary_DocumentTableReader(m_oBufferedStream, m_oFileWriter, m_oFileWriter.m_oDocumentWriter, &oBinary_CommentsTableReader.m_oComments).Read();
CString sRelsPath = m_oFileWriter.m_oDocumentWriter.m_sDir + _T("\\word\\_rels\\document.xml.rels");
CComments& oComments = oBinary_CommentsTableReader.m_oComments;
OOX::CPath fileRelsPath = m_oFileWriter.m_oDocumentWriter.m_sDir + _T("\\word\\_rels\\document.xml.rels");
CComments& oComments = oBinary_CommentsTableReader.m_oComments;
Writers::CommentsWriter& oCommentsWriter = m_oFileWriter.m_oCommentsWriter;
CString sContent = oComments.writeContent();
CString sContentEx = oComments.writeContentExt();// writeContentExt writeContent
......@@ -6157,7 +6159,7 @@ public: BinaryFileReader(CString& sFileInDir, NSBinPptxRW::CBinaryFileReader& oB
m_oFileWriter.m_pDrawingConverter->WriteRels(CString(_T("http://schemas.microsoft.com/office/2011/relationships/people")), CString(_T("people.xml")), CString(), &rId);
}
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(sRelsPath);
m_oFileWriter.m_pDrawingConverter->SaveDstContentRels(fileRelsPath.GetFilename());
if(c_oSerConstants::ReadOk != res)
return res;
}
......
......@@ -3129,14 +3129,17 @@ HRESULT CDrawingConverter::SaveThemeXml(LONG lStart, LONG lLength, const CString
m_pXmlWriter->SaveToFile(strThemePath);
OOX::CPath filename = strThemePath;
CString strTemp = filename.GetDirectory() + _T("\\_rels\\");
CString strTemp = filename.GetDirectory() + _T("\\_rels\\");
CString strFileName = filename.GetFilename();
if (strFileName == _T(""))
strTemp += _T(".rels");
else
strTemp += (strFileName + _T(".rels"));
SaveDstContentRels(strTemp);
filename = strTemp;
SaveDstContentRels(filename.GetFilename());
m_pXmlWriter->ClearNoAttack();
......
......@@ -756,8 +756,13 @@ namespace NSBinPptxRW
<Relationship Id=\"rId2\" Type=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\" Target=\"docProps/app.xml\"/>\
</Relationships>");
FileSystem::Directory::CreateDirectory (m_strDstFolder + _T("\\_rels"));
oFile.CreateFile(m_strDstFolder + _T("\\_rels\\.rels"));
OOX::CPath filePath = m_strDstFolder + _T("\\_rels");
FileSystem::Directory::CreateDirectory (filePath.GetFilename());
filePath = m_strDstFolder + _T("\\_rels\\.rels");
oFile.CreateFile(filePath.GetFilename());
oFile.WriteStringUTF8(strRELS);
oFile.CloseFile();
......
......@@ -111,8 +111,13 @@ namespace PPTX
private:
const OOX::CPath createFileName(const OOX::CPath& filename) const
{
CString strTemp = filename.GetDirectory() + _T("\\_rels\\");
if (filename.GetFilename() == _T(""))
CString strTemp = filename.GetDirectory();
#ifdef _WIN32
strTemp += _T("\\_rels\\");
#else
strTemp += _T("/_rels/");
#endif
if (filename.GetFilename() == _T(""))
strTemp += _T(".rels");
else
strTemp += (filename.GetFilename() + _T(".rels"));
......
......@@ -24,7 +24,6 @@ namespace NSSystemPath
_tsplitpath( strFileName.c_str(), tDrive, tFolder, NULL, NULL );
sRes.append(tDrive);
sRes.append(tFolder);
return sRes;
#elif LINUX
BYTE* pUtf8 = NULL;
LONG lLen = 0;
......@@ -34,6 +33,7 @@ namespace NSSystemPath
delete [] pUtf8;
#elif MAC
#endif
return sRes;
}
static std::wstring GetFileName(const std::wstring& strFileName)
{
......
......@@ -2,13 +2,14 @@
#define SERIALIZER_COMMON
#ifdef _WIN32
#include <atlbase.h>
#include <atlstr.h>
#include <atlbase.h>
#include <atlstr.h>
#else
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#include "../../Common/DocxFormat/Source/Base/ASCString.h"
#endif
#include "../../DesktopEditor/common/File.h"
#include <string>
#include <vector>
......@@ -49,4 +50,4 @@ namespace SerializeCommon
void ReadFileType(CString& sXMLOptions, BYTE& result, UINT& nCodePage, WCHAR& wcDelimiter);
}
#endif //SERIALIZER_COMMON
\ No newline at end of file
#endif //SERIALIZER_COMMON
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