XlsxSerializer - исправлено местоположение vmlDrawing в структуре папок (перемещены в подпапку Drawing)

This commit is contained in:
ElenaSubbotina
2016-05-31 16:38:00 +03:00
parent a57a0e6042
commit e913c918c0
3 changed files with 15 additions and 4 deletions

View File

@ -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; //<2F><><EFBFBD><EFBFBD><EFBFBD> id (_x0000_s1025) <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>

View File

@ -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

View File

@ -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);