Commit e89c705f authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

(1.0.0.111): XlsxSerializerCom

(1.0.0.229): ASCOfficePPTXFile
Чтение/запись ClrMap в chart

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55474 954022d7-b5bf-4e40-9824-e11837661b57
parent 749281d8
...@@ -3164,6 +3164,14 @@ xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\""); ...@@ -3164,6 +3164,14 @@ xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\"");
pWritingElem = (PPTX::WrapperWritingElement*)pSpPr; pWritingElem = (PPTX::WrapperWritingElement*)pSpPr;
break; break;
} }
case XMLWRITER_RECORD_TYPE_CLRMAPOVR:
{
PPTX::Logic::ClrMap* pClrMap = new PPTX::Logic::ClrMap();
*pClrMap = oNode;
pWritingElem = (PPTX::WrapperWritingElement*)pClrMap;
break;
}
default: default:
break; break;
} }
...@@ -3211,6 +3219,14 @@ HRESULT CAVSOfficeDrawingConverter::GetRecordXml(SAFEARRAY* pBinaryObj, LONG lSt ...@@ -3211,6 +3219,14 @@ HRESULT CAVSOfficeDrawingConverter::GetRecordXml(SAFEARRAY* pBinaryObj, LONG lSt
pWritingElem->fromPPTY(&m_oReader); pWritingElem->fromPPTY(&m_oReader);
break; break;
} }
case XMLWRITER_RECORD_TYPE_CLRMAPOVR:
{
PPTX::Logic::ClrMap* pClrMap = new PPTX::Logic::ClrMap();
pClrMap->m_name = _T("a:clrMapOvr");
pWritingElem = (PPTX::WrapperWritingElement*)(pClrMap);
pWritingElem->fromPPTY(&m_oReader);
break;
}
default: default:
break; break;
} }
......
...@@ -233,4 +233,5 @@ static CString SchemeClr_GetStringCode(const BYTE& val) ...@@ -233,4 +233,5 @@ static CString SchemeClr_GetStringCode(const BYTE& val)
#define XMLWRITER_DOC_TYPE_XLSX 2 #define XMLWRITER_DOC_TYPE_XLSX 2
#define XMLWRITER_DOC_TYPE_CHART 3 #define XMLWRITER_DOC_TYPE_CHART 3
#define XMLWRITER_RECORD_TYPE_SPPR 0 #define XMLWRITER_RECORD_TYPE_SPPR 0
\ No newline at end of file #define XMLWRITER_RECORD_TYPE_CLRMAPOVR 1
\ No newline at end of file
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#endif #endif
#endif #endif
#include "../../../../../Common/Base64.h" #include "../../Common/Base64.h"
#include "ImageManager.h" #include "ImageManager.h"
#include "./XmlWriter.h" #include "./XmlWriter.h"
#include "../PPTXFormat/FileContainer.h" #include "../PPTXFormat/FileContainer.h"
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//228 //229
#define INTVER 1,0,0,228 #define INTVER 1,0,0,229
#define STRVER "1,0,0,228\0" #define STRVER "1,0,0,229\0"
...@@ -847,13 +847,22 @@ namespace BinXlsxRW{ ...@@ -847,13 +847,22 @@ namespace BinXlsxRW{
res = Read1(length, &BinaryChartReader::ReadCT_Style1, this, pNewElem); res = Read1(length, &BinaryChartReader::ReadCT_Style1, this, pNewElem);
poVal->m_style = pNewElem; poVal->m_style = pNewElem;
} }
//else if(c_oserct_chartspaceCLRMAPOVR == type) else if(c_oserct_chartspaceCLRMAPOVR == type)
//{ {
// CString* pNewElem = new CString; CString* pNewElem = new CString;
// //todo if(length > 0)
// *pNewElem = m_oBufferedStream.ReadString2(length); {
// poVal->m_clrMapOvr = pNewElem; BSTR bstrXml = NULL;
//} HRESULT hRes = m_pOfficeDrawingConverter->GetRecordXml(m_pArray, m_oBufferedStream.GetPosition(), length, XMLWRITER_RECORD_TYPE_CLRMAPOVR, XMLWRITER_DOC_TYPE_CHART, &bstrXml);
if (S_OK == hRes && NULL != bstrXml)
{
*pNewElem = bstrXml;
SysFreeString(bstrXml);
}
m_oBufferedStream.Skip(length);
}
poVal->m_clrMapOvr = pNewElem;
}
else if(c_oserct_chartspacePIVOTSOURCE == type) else if(c_oserct_chartspacePIVOTSOURCE == type)
{ {
CT_PivotSource* pNewElem = new CT_PivotSource; CT_PivotSource* pNewElem = new CT_PivotSource;
...@@ -6461,13 +6470,18 @@ namespace BinXlsxRW{ ...@@ -6461,13 +6470,18 @@ namespace BinXlsxRW{
WriteCT_Style1(*oVal.m_style); WriteCT_Style1(*oVal.m_style);
m_oBcw.WriteItemEnd(nCurPos); m_oBcw.WriteItemEnd(nCurPos);
} }
//if(NULL != oVal.m_clrMapOvr) if(NULL != oVal.m_clrMapOvr)
//{ {
// int nCurPos = m_oBcw.WriteItemStart(c_oserct_chartspaceCLRMAPOVR); int nCurPos = m_oBcw.WriteItemStart(c_oserct_chartspaceCLRMAPOVR);
// //todo LPSAFEARRAY pBinaryObj = NULL;
// m_oBcw.m_oStream.WriteString3(*oVal.m_clrMapOvr); BSTR bstrXml = (*oVal.m_clrMapOvr).AllocSysString();
// m_oBcw.WriteItemEnd(nCurPos); HRESULT hRes = m_pOfficeDrawingConverter->GetRecordBinary(XMLWRITER_RECORD_TYPE_CLRMAPOVR, bstrXml, &pBinaryObj);
//} SysFreeString(bstrXml);
if(S_OK == hRes && NULL != pBinaryObj && pBinaryObj->rgsabound[0].cElements > 0)
m_oBcw.m_oStream.WritePointer((BYTE*)pBinaryObj->pvData, pBinaryObj->rgsabound[0].cElements);
RELEASEARRAY(pBinaryObj);
m_oBcw.WriteItemEnd(nCurPos);
}
if(NULL != oVal.m_pivotSource) if(NULL != oVal.m_pivotSource)
{ {
int nCurPos = m_oBcw.WriteItemStart(c_oserct_chartspacePIVOTSOURCE); int nCurPos = m_oBcw.WriteItemStart(c_oserct_chartspacePIVOTSOURCE);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//1 //1
//0 //0
//0 //0
//110 //111
#define INTVER 1,0,0,110 #define INTVER 1,0,0,111
#define STRVER "1,0,0,110\0" #define STRVER "1,0,0,111\0"
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