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

(2.0.0.163): ASCOfficeDocxFile2

(1.0.0.110): XlsxSerializerCom
Serialize полной структуры chart, с помощью генератора кода из xsd
переход на один StringWriter из xmlutils
при записи c_oSerCellTypes::RefRowCol индексы начинаются от 0.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@55323 954022d7-b5bf-4e40-9824-e11837661b57
parent 06b3b7dc
......@@ -538,14 +538,6 @@
>
</File>
</Filter>
<Filter
Name="Foreign"
>
<File
RelativePath=".\Foreign\StringWriter.h"
>
</File>
</Filter>
<Filter
Name="BinWiter"
>
......@@ -561,6 +553,22 @@
RelativePath=".\BinWriter\BinWriters.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\ChartFromToBinary.cpp"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\ChartFromToBinary.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CommonWriter.cpp"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Reader\CommonWriter.h"
>
</File>
<File
RelativePath=".\BinWriter\StreamUtils.h"
>
......@@ -581,7 +589,11 @@
Name="Reader"
>
<File
RelativePath="..\..\TeamlabOffice\trunk\XlsxSerializerCom\Writer\BinaryReader.h"
RelativePath="..\XlsxSerializerCom\Writer\BinaryCommonReader.h"
>
</File>
<File
RelativePath="..\XlsxSerializerCom\Writer\BinaryReader.h"
>
</File>
<File
......
......@@ -3,7 +3,6 @@
#define BINREADER_COMMON
#include "FileDownloader.h"
#include "../Foreign/StringWriter.h"
bool IsUnicodeSymbol( WCHAR symbol )
{
......
......@@ -10,9 +10,9 @@ namespace Writers
class ContentTypesWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
CStringWriter m_oAdditional;
XmlUtils::CStringWriter m_oAdditional;
public:
ContentTypesWriter(CString sDir):m_sDir(sDir)
{
......
......@@ -5,7 +5,7 @@ namespace Writers
{
class DocumentRelsWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
int m_nRid;
CAtlArray<CString> m_aRels;
......
......@@ -5,7 +5,7 @@ namespace Writers
{
class DocumentWriter : public ContentWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
HeaderFooterWriter& m_oHeaderFooterWriter;
public:
CString m_sDir;
......
......@@ -6,8 +6,8 @@ namespace Writers
class ContentWriter
{
public:
CStringWriter m_oContent;
CStringWriter m_oSecPr;
XmlUtils::CStringWriter m_oContent;
XmlUtils::CStringWriter m_oSecPr;
};
class HdrFtrItem
{
......
......@@ -5,7 +5,7 @@ namespace Writers
{
class MediaWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
CString m_sMediaDir;
public:
......
......@@ -9,12 +9,12 @@ namespace Writers
class NumberingWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
ContentTypesWriter& m_oContentTypesWriter;
public:
CStringWriter m_oANum;
CStringWriter m_oNumList;
XmlUtils::CStringWriter m_oANum;
XmlUtils::CStringWriter m_oNumList;
public:
NumberingWriter(CString sDir, ContentTypesWriter& oContentTypesWriter):m_sDir(sDir),m_oContentTypesWriter(oContentTypesWriter)
{
......
#pragma once
using namespace BinDocxRW;
namespace BinDocxRW {
class SectPr
{
......@@ -221,7 +221,7 @@ public:
return bBold || bItalic || bUnderline || bStrikeout || bFontAscii || bFontHAnsi || bFontAE || bFontCS || bFontSize || bColor || bVertAlign || bHighLight ||
bRStyle || bSpacing || bDStrikeout || bCaps || bSmallCaps || bPosition || bFontHint || bBoldCs || bItalicCs || bFontSizeCs || bCs || bRtl || bLang || bLangBidi || bLangEA;
}
void Write(CStringWriter* pCStringWriter)
void Write(XmlUtils::CStringWriter* pCStringWriter)
{
pCStringWriter->WriteString(CString(_T("<w:rPr>")));
if(bRStyle)
......@@ -488,7 +488,7 @@ public:
bsemiHidden = false;
bunhideWhenUsed = false;
}
void Write(CStringWriter* pCStringWriter)
void Write(XmlUtils::CStringWriter* pCStringWriter)
{
CString sType;
switch(byteType)
......@@ -589,7 +589,7 @@ public:
class tblStylePr
{
public:
CStringWriter Writer;
XmlUtils::CStringWriter Writer;
BYTE Type;
bool bType;
public:
......@@ -649,7 +649,7 @@ public:
bHeight = false;
bPaddings = false;
}
void Write(CStringWriter* pCStringWriter)
void Write(XmlUtils::CStringWriter* pCStringWriter)
{
if(bType)
{
......@@ -721,7 +721,7 @@ public:
bW = false;
bWDocx = false;
}
void Write(CStringWriter& pCStringWriter ,CString& sName)
void Write(XmlUtils::CStringWriter& pCStringWriter ,CString& sName)
{
pCStringWriter.WriteString(Write(sName));
}
......@@ -772,7 +772,7 @@ public:
bSize = false;
bValue = false;
}
void Write(CString sName, CStringWriter* pCStringWriter, bool bCell)
void Write(CString sName, XmlUtils::CStringWriter* pCStringWriter, bool bCell)
{
if(bValue && border_Single == Value)
{
......@@ -843,7 +843,7 @@ public:
{
return !(bLeft || bTop || bRight || bBottom || bInsideV || bInsideH || bBetween);
}
void Write(CStringWriter* pCStringWriter, bool bCell)
void Write(XmlUtils::CStringWriter* pCStringWriter, bool bCell)
{
if(bLeft)
oLeft.Write(_T("w:left"), pCStringWriter, bCell);
......@@ -884,8 +884,8 @@ public:
long Restart;
long Start;
BYTE Suff;
CStringWriter ParaPr;
CStringWriter TextPr;
XmlUtils::CStringWriter ParaPr;
XmlUtils::CStringWriter TextPr;
CString PStyle;
bool bFormat;
......@@ -916,7 +916,7 @@ public:
delete Text[i];
}
}
void Write(CStringWriter& oWriter, int index)
void Write(XmlUtils::CStringWriter& oWriter, int index)
{
CString sILvl;sILvl.Format(_T("<w:lvl w:ilvl=\"%d\">"), index);
oWriter.WriteString(sILvl);
......@@ -1024,7 +1024,7 @@ public:
delete Lvls[i];
}
}
void Write(CStringWriter& oWriterANum)
void Write(XmlUtils::CStringWriter& oWriterANum)
{
if(bId)
{
......@@ -1065,7 +1065,7 @@ public:
bAId = false;
bId = false;
}
void Write(CStringWriter& oWriterNumList)
void Write(XmlUtils::CStringWriter& oWriterNumList)
{
if(bAId && bId)
{
......@@ -1086,7 +1086,7 @@ public:
sName = name;
bGridAfter = false;
}
void Write(CStringWriter& writer)
void Write(XmlUtils::CStringWriter& writer)
{
if(bGridAfter && nGridAfter > 0)
{
......@@ -1104,7 +1104,7 @@ public:
CString href;
CString anchor;
CString tooltip;
CStringWriter writer;
XmlUtils::CStringWriter writer;
static WriteHyperlink* Parse(CString fld)
{
WriteHyperlink* res = NULL;
......@@ -1178,7 +1178,7 @@ public:
}
return res;
}
void Write(CStringWriter& wr)
void Write(XmlUtils::CStringWriter& wr)
{
if(false == rId.IsEmpty())
{
......@@ -2010,7 +2010,7 @@ public: CFramePr()
{
return !(bDropCap || bH || bHAnchor || bHRule || bHSpace || bLines || bVAnchor || bVSpace || bW || bWrap || bX || bXAlign || bY || bYAlign);
}
void Write(CStringWriter& oStringWriter)
void Write(XmlUtils::CStringWriter& oStringWriter)
{
oStringWriter.WriteString(CString(_T("<w:framePr")));
if(bDropCap)
......@@ -2152,7 +2152,7 @@ public:
bool History;
CString sDocLocation;
CString sTgtFrame;
CStringWriter writer;
XmlUtils::CStringWriter writer;
bool bHistory;
public:
......@@ -2160,7 +2160,7 @@ public:
{
bHistory = false;
}
void Write(CStringWriter& wr)
void Write(XmlUtils::CStringWriter& wr)
{
if(false == rId.IsEmpty())
{
......@@ -2182,4 +2182,5 @@ public:
wr.WriteString(CString(_T("</w:hyperlink>")));
}
}
};
\ No newline at end of file
};
}
\ No newline at end of file
This diff is collapsed.
......@@ -10,7 +10,7 @@ namespace Writers
class SettingWriter
{
CString m_sDir;
CStringWriter m_oSettingWriter;
XmlUtils::CStringWriter m_oSettingWriter;
HeaderFooterWriter& m_oHeaderFooterWriter;
public:
SettingWriter(CString sDir, HeaderFooterWriter& oHeaderFooterWriter):m_sDir(sDir),m_oHeaderFooterWriter(oHeaderFooterWriter)
......
......@@ -13,12 +13,12 @@ namespace Writers
class StylesWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
public:
CStringWriter m_Styles;
CStringWriter m_rPrDefault;
CStringWriter m_pPrDefault;
XmlUtils::CStringWriter m_Styles;
XmlUtils::CStringWriter m_rPrDefault;
XmlUtils::CStringWriter m_pPrDefault;
int m_nVersion;
StylesWriter(CString sDir, int nVersion):m_sDir(sDir),m_nVersion(nVersion)
{
......
......@@ -8,7 +8,7 @@ namespace Writers
class FontTableWriter
{
CStringWriter m_oWriter;
XmlUtils::CStringWriter m_oWriter;
CString m_sDir;
ASCGraphics::IASCFontManager* m_pFontManager;
public:
......
......@@ -445,7 +445,8 @@ const int g_nFormatVersion = 4;
WrapTight = 21,
WrapTopAndBottom = 22,
Chart = 23,
ChartImg = 24
ChartImg = 24,
Chart2 = 25
};}
namespace c_oSerEffectExtent{enum c_oSerEffectExtent
{
......
......@@ -4412,12 +4412,9 @@ namespace BinDocxRW
if (pFile.IsInit() && OOX::FileTypes::Chart == pFile->type())
{
OOX::Spreadsheet::CChartSpace* pChartFile = static_cast<OOX::Spreadsheet::CChartSpace*>(pFile.operator ->());
if(pChartFile->m_oChart.IsInit() && pChartFile->m_oChart->isValid())
{
int nCurPos = m_oBcw.WriteItemStart(c_oSerRunType::pptxDrawing);
WriteDrawing(*pChartDrawing, NULL, pChartFile);
m_oBcw.WriteItemEnd(nCurPos);
}
int nCurPos = m_oBcw.WriteItemStart(c_oSerRunType::pptxDrawing);
WriteDrawing(*pChartDrawing, NULL, pChartFile);
m_oBcw.WriteItemEnd(nCurPos);
}
}
}
......@@ -4478,12 +4475,12 @@ namespace BinDocxRW
//chart
if(NULL != pChart)
{
m_oBcw.m_oStream.WriteByte(c_oSerImageType2::Chart);
m_oBcw.m_oStream.WriteByte(c_oSerImageType2::Chart2);
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Variable);
BinXlsxRW::BinaryChartWriter oBinaryChartWriter(m_oBcw.m_oStream, m_pOfficeDrawingConverter);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
oBinaryChartWriter.Write(*pChart);
BinXlsxRW::BinaryChartWriter oBinaryChartWriter(m_oBcw.m_oStream, m_pOfficeDrawingConverter);
oBinaryChartWriter.WriteCT_ChartSpace(pChart->m_oChartSpace);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
......@@ -4649,12 +4646,12 @@ namespace BinDocxRW
//chart
if(NULL != pChart)
{
m_oBcw.m_oStream.WriteByte(c_oSerImageType2::Chart);
m_oBcw.m_oStream.WriteByte(c_oSerImageType2::Chart2);
m_oBcw.m_oStream.WriteByte(c_oSerPropLenType::Variable);
BinXlsxRW::BinaryChartWriter oBinaryChartWriter(m_oBcw.m_oStream, m_pOfficeDrawingConverter);
int nCurPos = m_oBcw.WriteItemWithLengthStart();
oBinaryChartWriter.Write(*pChart);
BinXlsxRW::BinaryChartWriter oBinaryChartWriter(m_oBcw.m_oStream, m_pOfficeDrawingConverter);
oBinaryChartWriter.WriteCT_ChartSpace(pChart->m_oChartSpace);
m_oBcw.WriteItemWithLengthEnd(nCurPos);
}
}
......
......@@ -2,7 +2,6 @@
#include "FontProcessor.h"
#include "../../Common/ASCUtils.h"
#include "Foreign/StringWriter.h"
using SimpleTypes::EPitch;
......@@ -90,7 +89,7 @@ namespace DocWrapper {
#endif
}
void FontProcessor::addToFontMap(OOX::CFont& font) {
CStringWriter parw;
XmlUtils::CStringWriter parw;
parw.WriteString(CString(_T("<FontProperties>")));
if(font.m_oCharset.IsInit())
{
......
......@@ -348,7 +348,7 @@ public:
pDrawingConverter->SetAdditionalParam(L"SourceFileDir", var);
RELEASESYSSTRING(var.bstrVal);
BinaryFileReader oBinaryFileReader(sFileInDir, oBufferedStream, *m_pCurFileWriter);
BinDocxRW::BinaryFileReader oBinaryFileReader(sFileInDir, oBufferedStream, *m_pCurFileWriter);
oBinaryFileReader.ReadFile();
if(NULL != pDrawingConverter)
......@@ -397,8 +397,8 @@ public:
long nLength = oBufferedStream.ReadLong();
Writers::ContentWriter oTempContentWriter;
Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter, NULL);
int res = oBinary_DocumentTableReader.Read1(nLength, &Binary_DocumentTableReader::ReadDocumentContent, &oBinary_DocumentTableReader, NULL);
BinDocxRW::Binary_DocumentTableReader oBinary_DocumentTableReader(oBufferedStream, *m_pCurFileWriter, oTempContentWriter, NULL);
int res = oBinary_DocumentTableReader.Read1(nLength, &BinDocxRW::Binary_DocumentTableReader::ReadDocumentContent, &oBinary_DocumentTableReader, NULL);
(*bsXml) = oTempContentWriter.m_oContent.GetData().AllocSysString();
......
#pragma once
#include "../../Common/DocxFormat/Source/DocxFormat/File.h"
static wchar_t g_wc_amp = wchar_t('&');
static wchar_t g_wc_apos = wchar_t('\'');
static wchar_t g_wc_lt = wchar_t('<');
static wchar_t g_wc_qt = wchar_t('>');
static wchar_t g_wc_quot = wchar_t('\"');
static _bstr_t g_bstr_amp = L"&amp;";
static _bstr_t g_bstr_apos = L"&apos;";
static _bstr_t g_bstr_lt = L"&lt;";
static _bstr_t g_bstr_qt = L"&gt;";
static _bstr_t g_bstr_quot = L"\"";
static _bstr_t g_bstr_mdash = L"&mdash;";
namespace NSCommon
{
class CStringWriter
{
private:
wchar_t* m_pData;
size_t m_lSize;
wchar_t* m_pDataCur;
size_t m_lSizeCur;
public:
CStringWriter()
{
m_pData = NULL;
m_lSize = 0;
m_pDataCur = m_pData;
m_lSizeCur = m_lSize;
}
~CStringWriter()
{
RELEASEMEM(m_pData);
}
__forceinline void AddSize(size_t nSize, const size_t nSizeMin = 1000)
{
if (NULL == m_pData)
{
m_lSize = max(nSize, nSizeMin);
m_pData = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
m_lSizeCur = 0;
m_pDataCur = m_pData;
return;
}
if ((m_lSizeCur + nSize) > m_lSize)
{
while ((m_lSizeCur + nSize) > m_lSize)
{
m_lSize *= 2;
}
wchar_t* pRealloc = (wchar_t*)realloc(m_pData, m_lSize * sizeof(wchar_t));
if (NULL != pRealloc)
{
//
m_pData = pRealloc;
m_pDataCur = m_pData + m_lSizeCur;
}
else
{
wchar_t* pMalloc = (wchar_t*)malloc(m_lSize * sizeof(wchar_t));
memcpy(pMalloc, m_pData, m_lSizeCur * sizeof(wchar_t));
free(m_pData);
m_pData = pMalloc;
m_pDataCur = m_pData + m_lSizeCur;
}
}
}
public:
inline void WriteString(wchar_t* pString, size_t& nLen)
{
AddSize(nLen);
//memcpy(m_pDataCur, pString, nLen * sizeof(wchar_t));
memcpy(m_pDataCur, pString, nLen << 1);
m_pDataCur += nLen;
m_lSizeCur += nLen;
}
//inline void WriteString(_bstr_t& bsString)
//{
// size_t nLen = bsString.length();
// WriteString(bsString.GetBSTR(), nLen);
//}
inline void WriteString(CString& sString)
{
size_t nLen = (size_t)sString.GetLength();
#ifdef _UNICODE
WriteString(sString.GetBuffer(), nLen);
#else
CStringW str = (CStringW)sString;
WriteString(str.GetBuffer(), nLen);
#endif
}
inline size_t GetCurSize()
{
return m_lSizeCur;
}
inline void Write(CStringWriter& oWriter)
{
WriteString(oWriter.m_pData, oWriter.m_lSizeCur);
}
inline void Clear()
{
RELEASEMEM(m_pData);
m_pData = NULL;
m_lSize = 0;
m_pDataCur = m_pData;
m_lSizeCur = 0;
}
inline void ClearNoAttack()
{
m_pDataCur = m_pData;
m_lSizeCur = 0;
}
CString GetData()
{
CString str(m_pData, (int)m_lSizeCur);
return str;
}
};
}
\ No newline at end of file
......@@ -2,6 +2,6 @@
//2
//0
//0
//162
#define INTVER 2,0,0,162
#define STRVER "2,0,0,162\0"
//163
#define INTVER 2,0,0,163
#define STRVER "2,0,0,163\0"
......@@ -1087,6 +1087,14 @@
RelativePath="..\Source\XlsxFormat\Chart\FromTo.h"
>
</File>
<File
RelativePath="..\Source\XlsxFormat\Chart\ChartSerialize.cpp"
>
</File>
<File
RelativePath="..\Source\XlsxFormat\Chart\ChartSerialize.h"
>
</File>
<File
RelativePath="..\Source\XlsxFormat\Chart\Layout.h"
>
......
......@@ -52,6 +52,15 @@ namespace OOX
while( !wsName.IsNull() )\
{
#define WritingElement_ReadAttributes_Start_No_NS(Reader) \
if ( Reader.GetAttributesCount() <= 0 )\
return;\
if ( !Reader.MoveToFirstAttribute() )\
return;\
CString wsName = XmlUtils::GetNameNoNS(Reader.GetName());\
while( !wsName.IsEmpty() )\
{
#define WritingElement_ReadAttributes_Read_if(Reader, AttrName, Value) \
if ( AttrName == wsName )\
Value = Reader.##GetText();
......
......@@ -3092,7 +3092,7 @@ namespace XmlUtils
return oResult.GetData();
}
void WriteElement(CStringWriter& oResult)
void WriteElement(XmlUtils::CStringWriter& oResult)
{
/*
oResult.WriteString(CString(_T("<")));
......
......@@ -24,7 +24,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
This diff is collapsed.
This diff is collapsed.
......@@ -30,9 +30,9 @@ namespace OOX
sXml.Format(_T("<mc:AlternateContent xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"><mc:Choice Requires=\"c14\" xmlns:c14=\"http://schemas.microsoft.com/office/drawing/2007/8/2/chart\"><c14:style val=\"%d\"/></mc:Choice><mc:Fallback><c:style val=\"%d\"/></mc:Fallback></mc:AlternateContent>"), 100 + nStyle, nStyle);
return sXml;
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(toXML());
writer.WriteString(toXML());
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -20,7 +20,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -90,7 +90,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
......@@ -20,7 +20,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -90,7 +90,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -135,7 +135,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -178,26 +178,26 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oIndex.IsInit() && m_oIndex->m_oVal.IsInit() && (m_oDelete.IsInit() || m_oTxPr.IsInit()))
{
writer.WriteStringC(_T("<c:legendEntry>"));
writer.WriteString(_T("<c:legendEntry>"));
if(m_oIndex.IsInit())
{
CString sXml;
sXml.Format(_T("<c:idx val=\"%d\"/>"), m_oIndex->m_oVal->GetValue());
writer.WriteStringC(sXml);
writer.WriteString(sXml);
}
if(m_oDelete.IsInit())
{
CString sXml;
sXml.Format(_T("<c:delete val=\"%s\"/>"), m_oDelete->m_oVal.ToString2(SimpleTypes::onofftostring1));
writer.WriteStringC(sXml);
writer.WriteString(sXml);
}
if(m_oTxPr.IsInit() && m_oTxPr->m_oXml.IsInit())
writer.WriteStringC(m_oTxPr->m_oXml.get2());
writer.WriteStringC(_T("</c:legendEntry>"));
writer.WriteString(m_oTxPr->m_oXml.get2());
writer.WriteString(_T("</c:legendEntry>"));
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -243,9 +243,9 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(CString(_T("<c:legend>")));
writer.WriteString(CString(_T("<c:legend>")));
CString sLegendPos = _T("r");
if(m_oLegendPos.IsInit() && m_oLegendPos->m_oVal.IsInit())
sLegendPos = m_oLegendPos->m_oVal->ToString();
......@@ -254,16 +254,16 @@ namespace OOX
{
m_arrItems[i]->toXML(writer);
}
writer.WriteStringC(sLegendPosXml);
writer.WriteStringC(CString(_T("<c:layout/>")));
writer.WriteString(sLegendPosXml);
writer.WriteString(CString(_T("<c:layout/>")));
CString sOverlay = _T("0");
if(m_oOverlay.IsInit())
sOverlay = m_oOverlay->m_oVal.ToString2(SimpleTypes::onofftostring1);
CString sOverlayXml;sOverlayXml.Format(_T("<c:overlay val=\"%s\"/>"), sOverlay);
writer.WriteStringC(sOverlayXml);
writer.WriteString(sOverlayXml);
if(m_oTxPr.IsInit())
m_oTxPr->toXML(writer);
writer.WriteStringC(CString(_T("</c:legend>")));
writer.WriteString(CString(_T("</c:legend>")));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -22,7 +22,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
void toXML2(CString& sDelete, CString& sMajorGrid, CString& sAxTitle, CString& sTxPr) const
......@@ -38,15 +38,15 @@ namespace OOX
sMajorGrid = _T("<c:majorGridlines/>");
if(m_oTitle.IsInit())
{
CStringWriter temp;
XmlUtils::CStringWriter temp;
m_oTitle->toXML(temp);
sAxTitle = temp.GetCString();
sAxTitle = temp.GetData();
}
//CStringWriter temp;
//if(m_oNumFmt.IsInit())
// m_oNumFmt->toXML2(temp, CString(_T("c:numFmt")));
//sAxNumFmt = temp.GetCString();
//sAxNumFmt = temp.GetData();
if(m_oTxPr.IsInit() && m_oTxPr->m_oXml.IsInit())
{
sTxPr = m_oTxPr->m_oXml.get();
......@@ -115,7 +115,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
void toXML2(bool bScatter, bool bLine, CString& sBarDir, CString& sGrouping, CString& sSeries, CString& sDataLabels, CString& sOverlap, CString& sCatAxDelete, CString& sCatAxMajorGrid, CString& sCatAxTitle, CString& sCatTxPr, CString& sValAxDelete, CString& sValAxMajorGrid, CString& sValAxTitle, CString& sValTxPr) const
......
......@@ -20,14 +20,14 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<a:t"));
writer.WriteString(_T("<a:t"));
if(-1 != m_sText.Find(' ') || -1 != m_sText.Find('\n'))
writer.WriteStringC(_T(" xml:space=\"preserve\""));
writer.WriteStringC(_T(">"));
writer.WriteStringC(XmlUtils::EncodeXmlString(m_sText));
writer.WriteStringC(_T("</a:t>"));
writer.WriteString(_T(" xml:space=\"preserve\""));
writer.WriteString(_T(">"));
writer.WriteString(XmlUtils::EncodeXmlString(m_sText));
writer.WriteString(_T("</a:t>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -98,7 +98,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -142,7 +142,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -183,10 +183,10 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oXml.IsInit())
writer.WriteStringC(m_oXml.get());
writer.WriteString(m_oXml.get());
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -219,12 +219,12 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<c:tx>"));
writer.WriteString(_T("<c:tx>"));
if(m_oRich.IsInit())
m_oRich->toXML(writer);
writer.WriteStringC(_T("</c:tx>"));
writer.WriteString(_T("</c:tx>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -271,15 +271,15 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<c:title>"));
writer.WriteString(_T("<c:title>"));
if(m_oTx.IsInit())
m_oTx->toXML(writer);
writer.WriteStringC(_T("<c:layout/><c:overlay val=\"0\"/>"));
writer.WriteString(_T("<c:layout/><c:overlay val=\"0\"/>"));
if(m_oTxPr.IsInit())
m_oTxPr->toXML(writer);
writer.WriteStringC(_T("</c:title>"));
writer.WriteString(_T("</c:title>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -56,15 +56,15 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(CString("<authors>"));
writer.WriteString(CString("<authors>"));
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
{
CString sAuthor;sAuthor.Format(_T("<author>%s</author>"), XmlUtils::EncodeXmlString(*m_arrItems[i]));
writer.WriteStringC(sAuthor);
writer.WriteString(sAuthor);
}
writer.WriteStringC(CString("</authors>"));
writer.WriteString(CString("</authors>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -109,27 +109,27 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oRef.IsInit() && m_oAuthorId.IsInit() && m_oText.IsInit())
{
writer.WriteStringC(CString("<comment"));
writer.WriteString(CString("<comment"));
if(m_oRef.IsInit())
{
CString sRef;sRef.Format(_T(" ref=\"%s\""), XmlUtils::EncodeXmlString(m_oRef->GetValue()));
writer.WriteStringC(sRef);
writer.WriteString(sRef);
}
if(m_oAuthorId.IsInit())
{
CString sAuthorId;sAuthorId.Format(_T(" authorId=\"%d\""), m_oAuthorId->GetValue());
writer.WriteStringC(sAuthorId);
writer.WriteString(sAuthorId);
}
writer.WriteStringC(CString(">"));
writer.WriteString(CString(">"));
writer.WriteStringC(CString("<text>"));
writer.WriteString(CString("<text>"));
m_oText->toXML2(writer);
writer.WriteStringC(CString("</text>"));
writer.WriteStringC(CString("</comment>"));
writer.WriteString(CString("</text>"));
writer.WriteString(CString("</comment>"));
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -187,14 +187,14 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(CString("<commentList>"));
writer.WriteString(CString("<commentList>"));
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
{
m_arrItems[i]->toXML(writer);
}
writer.WriteStringC(CString("</commentList>"));
writer.WriteString(CString("</commentList>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -273,15 +273,15 @@ namespace OOX
}
virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const
{
CStringWriter sXml;
sXml.WriteStringC(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><comments xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">"));
XmlUtils::CStringWriter sXml;
sXml.WriteString(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><comments xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">"));
if(m_oAuthors.IsInit())
m_oAuthors->toXML(sXml);
if(m_oCommentList.IsInit())
m_oCommentList->toXML(sXml);
sXml.WriteStringC(_T("</comments>"));
sXml.WriteString(_T("</comments>"));
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetCString() );
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetData() );
oContent.Registration( type().OverrideType(), oDirectory, oPath.GetFilename() );
IFileContainer::Write(oPath, oDirectory, oContent);
}
......@@ -326,12 +326,12 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oId.IsInit())
{
CString sVal;sVal.Format(_T("<legacyDrawing r:id=\"%s\"/>"), m_oId->GetValue());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
}
......@@ -421,8 +421,8 @@ namespace OOX
{
if(NULL != m_mapComments && m_mapComments->GetCount() > 0)
{
CStringWriter sXml;
sXml.WriteStringC(_T("<xml xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\"><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout><v:shapetype id=\"_x0000_t202\" coordsize=\"21600,21600\" o:spt=\"202\" path=\"m,l,21600r21600,l21600,xe\"><v:stroke joinstyle=\"miter\"/><v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/></v:shapetype>"));
XmlUtils::CStringWriter sXml;
sXml.WriteString(_T("<xml xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\"><o:shapelayout v:ext=\"edit\"><o:idmap v:ext=\"edit\" data=\"1\"/></o:shapelayout><v:shapetype id=\"_x0000_t202\" coordsize=\"21600,21600\" o:spt=\"202\" path=\"m,l,21600r21600,l21600,xe\"><v:stroke joinstyle=\"miter\"/><v:path gradientshapeok=\"t\" o:connecttype=\"rect\"/></v:shapetype>"));
int nIndex = 1025;
POSITION pos = m_mapComments->GetStartPosition();
while ( NULL != pos )
......@@ -473,13 +473,13 @@ namespace OOX
if(comment->m_sGfxdata.IsInit())
sGfxdata.Format(_T("o:gfxdata=\"%s\""), comment->m_sGfxdata.get2());
CString sShape;sShape.Format(_T("<v:shape id=\"_x0000_s%d\" type=\"#_x0000_t202\" style='position:absolute;%sz-index:4;visibility:hidden' %s fillcolor=\"#ffffe1\" o:insetmode=\"auto\"><v:fill color2=\"#ffffe1\"/><v:shadow on=\"t\" color=\"black\" obscured=\"t\"/><v:path o:connecttype=\"none\"/><v:textbox style='mso-direction-alt:auto'><div style='text-align:left'></div></v:textbox>%s</v:shape>"), nIndex, sStyle, sGfxdata, sClientData);
sXml.WriteStringC(sShape);
sXml.WriteString(sShape);
nIndex++;
}
}
sXml.WriteStringC(_T("</xml>"));
sXml.WriteString(_T("</xml>"));
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetCString() );
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetData() );
oContent.AddDefault( oPath.GetFilename() );
IFileContainer::Write(oPath, oDirectory, oContent);
}
......
......@@ -29,7 +29,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(isValid())
{
......@@ -39,7 +39,7 @@ namespace OOX
{
sStart.Format(_T("<xdr:twoCellAnchor editAs=\"%s\">"), m_oAnchorType.ToString());
sEnd = _T("</xdr:twoCellAnchor>");
writer.WriteStringC(sStart);
writer.WriteString(sStart);
if(m_oFrom.IsInit())
m_oFrom->toXML2(writer, _T("xdr:from"));
if(m_oTo.IsInit())
......@@ -49,7 +49,7 @@ namespace OOX
{
sStart.Append(_T("<xdr:oneCellAnchor>"));
sEnd = _T("</xdr:oneCellAnchor>");
writer.WriteStringC(sStart);
writer.WriteString(sStart);
if(m_oFrom.IsInit())
m_oFrom->toXML2(writer, _T("xdr:from"));
if(m_oExt.IsInit())
......@@ -59,7 +59,7 @@ namespace OOX
{
sStart.Append(_T("<xdr:absoluteAnchor>"));
sEnd = _T("</xdr:absoluteAnchor>");
writer.WriteStringC(sStart);
writer.WriteString(sStart);
if(m_oPos.IsInit())
m_oPos->toXML(writer);
if(m_oExt.IsInit())
......@@ -68,10 +68,10 @@ namespace OOX
else
return;
if(m_oXml.IsInit())
writer.WriteStringC(m_oXml.get());
writer.WriteString(m_oXml.get());
if(m_oGraphicFrame.IsInit())
m_oGraphicFrame->toXML(writer);
writer.WriteStringC(sEnd);
writer.WriteString(sEnd);
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
......@@ -27,12 +27,12 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oId.IsInit())
{
CString sVal;sVal.Format(_T("<drawing r:id=\"%s\"/>"), m_oId->GetValue());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
}
......@@ -128,13 +128,13 @@ namespace OOX
}
virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const
{
CStringWriter sXml;
sXml.WriteStringC(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><xdr:wsDr xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">"));
XmlUtils::CStringWriter sXml;
sXml.WriteString(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><xdr:wsDr xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\" xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\">"));
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
m_arrItems[i]->toXML(sXml);
sXml.WriteStringC(_T("</xdr:wsDr>"));
sXml.WriteString(_T("</xdr:wsDr>"));
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetCString() );
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetData() );
oContent.Registration( type().OverrideType(), oDirectory, oPath.GetFilename() );
IFileContainer::Write(oPath, oDirectory, oContent);
}
......
......@@ -24,35 +24,35 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void toXML2(CStringWriter& writer, CString sName) const
virtual void toXML2(XmlUtils::CStringWriter& writer, CString sName) const
{
CString sStart;sStart.Format(_T("<%s>"), sName);
writer.WriteStringC(sStart);
writer.WriteString(sStart);
if(m_oCol.IsInit())
{
CString sVal;sVal.Format(_T("<xdr:col>%d</xdr:col>"), m_oCol->GetValue());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
if(m_oColOff.IsInit())
{
CString sVal;sVal.Format(_T("<xdr:colOff>%I64d</xdr:colOff>"), m_oColOff->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
if(m_oRow.IsInit())
{
CString sVal;sVal.Format(_T("<xdr:row>%d</xdr:row>"), m_oRow->GetValue());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
if(m_oRowOff.IsInit())
{
CString sVal;sVal.Format(_T("<xdr:rowOff>%I64d</xdr:rowOff>"), m_oRowOff->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
CString sEnd;sEnd.Format(_T("</%s>"), sName);
writer.WriteStringC(sEnd);
writer.WriteString(sEnd);
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......@@ -108,20 +108,20 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<xdr:ext"));
writer.WriteString(_T("<xdr:ext"));
if(m_oCx.IsInit())
{
CString sVal;sVal.Format(_T(" cx=\"%I64d\""), m_oCx->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
if(m_oCy.IsInit())
{
CString sVal;sVal.Format(_T(" cy=\"%I64d\""), m_oCy->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
writer.WriteStringC(_T("/>"));
writer.WriteString(_T("/>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -24,7 +24,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -69,7 +69,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -117,7 +117,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -165,12 +165,12 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
CString sRes;
if(m_oChartGraphic.IsInit() && m_oChartGraphic->m_oGraphicData.IsInit() && m_oChartGraphic->m_oGraphicData->m_oChart.IsInit() && m_oChartGraphic->m_oGraphicData->m_oChart->m_oRId.IsInit())
sRes.Format(_T("<xdr:graphicFrame macro=\"\"><xdr:nvGraphicFramePr><xdr:cNvPr id=\"1\" name=\"diagram\"/><xdr:cNvGraphicFramePr/></xdr:nvGraphicFramePr><xdr:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"0\" cy=\"0\"/></xdr:xfrm><a:graphic><a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/chart\"><c:chart xmlns:c=\"http://schemas.openxmlformats.org/drawingml/2006/chart\" xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:id=\"%s\"/></a:graphicData></a:graphic></xdr:graphicFrame><xdr:clientData/>"), m_oChartGraphic->m_oGraphicData->m_oChart->m_oRId->ToString());
writer.WriteStringC(sRes);
writer.WriteString(sRes);
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -24,7 +24,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -69,7 +69,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -117,12 +117,12 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
if(m_oBlipFill.IsInit() && m_oBlipFill->m_oBlip.IsInit() && m_oBlipFill->m_oBlip->m_oEmbed.IsInit())
{
CString sRes;sRes.Format(_T("<xdr:pic><xdr:nvPicPr><xdr:cNvPr id=\"1\" name=\"image\"/><xdr:cNvPicPr><a:picLocks noChangeAspect=\"1\"/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip xmlns:r=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\" r:embed=\"%s\" cstate=\"print\"><a:extLst><a:ext uri=\"{28A0092B-C50C-407E-A947-70E740481C1C}\"><a14:useLocalDpi xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" val=\"0\"/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/>"), m_oBlipFill->m_oBlip->m_oEmbed->GetValue());
writer.WriteStringC(sRes);
writer.WriteString(sRes);
}
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
......@@ -26,20 +26,20 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<xdr:pos"));
writer.WriteString(_T("<xdr:pos"));
if(m_oX.IsInit())
{
CString sVal;sVal.Format(_T(" x=\"%I64d\""), m_oX->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
if(m_oY.IsInit())
{
CString sVal;sVal.Format(_T(" y=\"%I64d\""), m_oY->ToEmu());
writer.WriteStringC(sVal);
writer.WriteString(sVal);
}
writer.WriteStringC(_T("/>"));
writer.WriteString(_T("/>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -27,7 +27,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......@@ -76,7 +76,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
......@@ -28,14 +28,14 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<r>"));
writer.WriteString(_T("<r>"));
if(m_oRPr.IsInit())
m_oRPr->toXML(writer);
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
m_arrItems[i]->toXML(writer);
writer.WriteStringC(_T("</r>"));
writer.WriteString(_T("</r>"));
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
......
......@@ -65,26 +65,26 @@ namespace OOX
}
virtual void write(const CPath& oPath, const CPath& oDirectory, CContentTypes& oContent) const
{
CStringWriter sXml;
sXml.WriteStringC(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><sst xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\""));
XmlUtils::CStringWriter sXml;
sXml.WriteString(_T("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><sst xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\""));
if(m_oCount.IsInit())
{
CString sVal;sVal.Format(_T(" count=\"%d\""), m_oCount->GetValue());
sXml.WriteStringC(sVal);
sXml.WriteString(sVal);
}
if(m_oUniqueCount.IsInit())
{
CString sVal;sVal.Format(_T(" uniqueCount=\"%d\""), m_oUniqueCount->GetValue());
sXml.WriteStringC(sVal);
sXml.WriteString(sVal);
}
sXml.WriteStringC(_T(">"));
sXml.WriteString(_T(">"));
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
m_arrItems[i]->toXML(sXml);
sXml.WriteStringC(_T("</sst>"));
sXml.WriteString(_T("</sst>"));
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetCString() );
CDirectory::SaveToFile( oPath.GetPath(), sXml.GetData() );
oContent.Registration( type().OverrideType(), oDirectory, oPath.GetFilename() );
}
virtual const OOX::FileType type() const
......
......@@ -29,14 +29,14 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
writer.WriteStringC(_T("<si>"));
writer.WriteString(_T("<si>"));
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
m_arrItems[i]->toXML(writer);
writer.WriteStringC(_T("</si>"));
writer.WriteString(_T("</si>"));
}
virtual void toXML2(CStringWriter& writer) const
virtual void toXML2(XmlUtils::CStringWriter& writer) const
{
for(int i = 0, length = m_arrItems.GetSize(); i < length; ++i)
m_arrItems[i]->toXML(writer);
......
......@@ -26,7 +26,7 @@ namespace OOX
{
return _T("");
}
virtual void toXML(CStringWriter& writer) const
virtual void toXML(XmlUtils::CStringWriter& writer) const
{
}
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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