Commit 2c30e668 authored by ElenaSubbotina's avatar ElenaSubbotina

XlsxSerializer - исправлено местоположение vmlDrawing в структуре папок...

XlsxSerializer - исправлено местоположение vmlDrawing в структуре папок (перемещены в подпапку Drawing)
parent acd58437
......@@ -20,9 +20,10 @@ namespace OOX
class CVmlDrawing : public OOX::WritingElementWithChilds<OOX::WritingElement>, public OOX::FileGlobalEnumerated, public OOX::IFileContainer
{
public:
CVmlDrawing()
CVmlDrawing(bool bSpreadsheet_ = false)
{
m_mapComments = NULL;
bSpreadsheet = bSpreadsheet_;
m_mapComments = NULL;
}
CVmlDrawing(const CPath& oRootPath, const CPath& oPath)
{
......@@ -350,7 +351,8 @@ namespace OOX
}
virtual const OOX::FileType type() const
{
return OOX::FileTypes::VmlDrawing;
if (bSpreadsheet) return OOX::Spreadsheet::FileTypes::VmlDrawing;
else return OOX::FileTypes::VmlDrawing;
}
virtual const CPath DefaultDirectory() const
{
......@@ -370,6 +372,8 @@ namespace OOX
{
}
bool bSpreadsheet;
public:
std::map<CString, OOX::Spreadsheet::CCommentItem*>* m_mapComments;
std::map<CString, int> m_mapShapes; // id (_x0000_s1025)
......
......@@ -66,6 +66,10 @@ namespace OOX
const FileType ExternalLinkPath(L"", L"",
_T(""),
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/externalLinkPath"));
const FileType VmlDrawing(L"../drawings", L"vmlDrawing.vml",
_T(""),
_T("http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing"), true, true);
} // namespace FileTypes
}
} // namespace OOX
......
......@@ -1928,7 +1928,10 @@ namespace BinXlsxRW {
oBinaryCommentReader.Read(length, poResult);
if(m_pCurWorksheet->m_mapComments.size() > 0)
{
OOX::CVmlDrawing* pVmlDrawing = new OOX::CVmlDrawing();
OOX::CPath pathDrawingsDir = m_sDestinationDir + FILE_SEPARATOR_STR + _T("xl") + FILE_SEPARATOR_STR + _T("drawings");
OOX::CSystemUtility::CreateDirectories(pathDrawingsDir.GetPath());
OOX::CVmlDrawing* pVmlDrawing = new OOX::CVmlDrawing(true);
pVmlDrawing->m_mapComments = &m_pCurWorksheet->m_mapComments;
NSCommon::smart_ptr<OOX::File> pVmlDrawingFile(pVmlDrawing);
......
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