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

для ошибок компиляции "cannot pass objects of non-trivially-copyable type through '...'"

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@58889 954022d7-b5bf-4e40-9824-e11837661b57
parent bae49492
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
case 4: sType = _T("oddPage");break; case 4: sType = _T("oddPage");break;
default: sType = _T("nextPage");break; default: sType = _T("nextPage");break;
} }
sRes.AppendFormat(_T("<w:type w:val=\"%s\"/>"), sType); sRes.AppendFormat(_T("<w:type w:val=\"%s\"/>"), (const TCHAR *) sType);
} }
if(orientation_Portrait == cOrientation) if(orientation_Portrait == cOrientation)
sRes.AppendFormat(_T("<w:pgSz w:w=\"%d\" w:h=\"%d\"/>"), nWidth, nHeight); sRes.AppendFormat(_T("<w:pgSz w:w=\"%d\" w:h=\"%d\"/>"), nWidth, nHeight);
...@@ -238,17 +238,17 @@ public: ...@@ -238,17 +238,17 @@ public:
{ {
sShd.Append(_T("<w:shd w:val=\"clear\" w:color=\"auto\"")); sShd.Append(_T("<w:shd w:val=\"clear\" w:color=\"auto\""));
if(bColor) if(bColor)
sShd.AppendFormat(_T(" w:fill=\"%s\""), Color.ToString()); sShd.AppendFormat(_T(" w:fill=\"%s\""), (const TCHAR *) Color.ToString());
if(bThemeColor && ThemeColor.IsNoEmpty()) if(bThemeColor && ThemeColor.IsNoEmpty())
{ {
if(ThemeColor.Auto && !bColor) if(ThemeColor.Auto && !bColor)
sShd.Append(_T(" w:fill=\"auto\"")); sShd.Append(_T(" w:fill=\"auto\""));
if(ThemeColor.bColor) if(ThemeColor.bColor)
sShd.AppendFormat(_T(" w:themeFill=\"%s\""), ThemeColor.ToStringColor()); sShd.AppendFormat(_T(" w:themeFill=\"%s\""), (const TCHAR *) ThemeColor.ToStringColor());
if(ThemeColor.bTint) if(ThemeColor.bTint)
sShd.AppendFormat(_T(" w:themeFillTint=\"%s\""), ThemeColor.ToStringTint()); sShd.AppendFormat(_T(" w:themeFillTint=\"%s\""), (const TCHAR *) ThemeColor.ToStringTint());
if(ThemeColor.bShade) if(ThemeColor.bShade)
sShd.AppendFormat(_T(" w:themeFillShade=\"%s\""), ThemeColor.ToStringShade()); sShd.AppendFormat(_T(" w:themeFillShade=\"%s\""), (const TCHAR *) ThemeColor.ToStringShade());
} }
sShd.Append(_T("/>")); sShd.Append(_T("/>"));
} }
...@@ -406,22 +406,22 @@ public: ...@@ -406,22 +406,22 @@ public:
CString sFont = _T("<w:rFonts"); CString sFont = _T("<w:rFonts");
if(bFontAscii) if(bFontAscii)
{ {
sFont.AppendFormat(_T(" w:ascii=\"%s\""), FontAscii); sFont.AppendFormat(_T(" w:ascii=\"%s\""), (const TCHAR *) FontAscii);
m_mapFonts[FontAscii] = 1; m_mapFonts[FontAscii] = 1;
} }
if(bFontHAnsi) if(bFontHAnsi)
{ {
sFont.AppendFormat(_T(" w:hAnsi=\"%s\""), FontHAnsi); sFont.AppendFormat(_T(" w:hAnsi=\"%s\""), (const TCHAR *) FontHAnsi);
m_mapFonts[FontHAnsi] = 1; m_mapFonts[FontHAnsi] = 1;
} }
if(bFontCS) if(bFontCS)
{ {
sFont.AppendFormat(_T(" w:cs=\"%s\""), FontCS); sFont.AppendFormat(_T(" w:cs=\"%s\""), (const TCHAR *) FontCS);
m_mapFonts[FontCS] = 1; m_mapFonts[FontCS] = 1;
} }
if(bFontAE) if(bFontAE)
{ {
sFont.AppendFormat(_T(" w:eastAsia=\"%s\""), FontAE); sFont.AppendFormat(_T(" w:eastAsia=\"%s\""), (const TCHAR *) FontAE);
m_mapFonts[FontAE] = 1; m_mapFonts[FontAE] = 1;
} }
switch(FontHint) switch(FontHint)
...@@ -500,17 +500,17 @@ public: ...@@ -500,17 +500,17 @@ public:
{ {
CString sColor(_T("<w:color")); CString sColor(_T("<w:color"));
if(bColor) if(bColor)
sColor.AppendFormat(_T(" w:val=\"%s\""), Color.ToString()); sColor.AppendFormat(_T(" w:val=\"%s\""), (const TCHAR *) Color.ToString());
if(bThemeColor && ThemeColor.IsNoEmpty()) if(bThemeColor && ThemeColor.IsNoEmpty())
{ {
if(ThemeColor.Auto && !bColor) if(ThemeColor.Auto && !bColor)
sColor.Append(_T(" w:val=\"auto\"")); sColor.Append(_T(" w:val=\"auto\""));
if(ThemeColor.bColor) if(ThemeColor.bColor)
sColor.AppendFormat(_T(" w:themeColor=\"%s\""), ThemeColor.ToStringColor()); sColor.AppendFormat(_T(" w:themeColor=\"%s\""), (const TCHAR *) ThemeColor.ToStringColor());
if(ThemeColor.bTint) if(ThemeColor.bTint)
sColor.AppendFormat(_T(" w:themeTint=\"%s\""), ThemeColor.ToStringTint()); sColor.AppendFormat(_T(" w:themeTint=\"%s\""), (const TCHAR *) ThemeColor.ToStringTint());
if(ThemeColor.bShade) if(ThemeColor.bShade)
sColor.AppendFormat(_T(" w:themeShade=\"%s\""), ThemeColor.ToStringShade()); sColor.AppendFormat(_T(" w:themeShade=\"%s\""), (const TCHAR *) ThemeColor.ToStringShade());
} }
sColor.Append(_T("/>")); sColor.Append(_T("/>"));
pCStringWriter->WriteString(sColor); pCStringWriter->WriteString(sColor);
...@@ -793,7 +793,7 @@ public: ...@@ -793,7 +793,7 @@ public:
bType = false; bType = false;
} }
}; };
class Paddings class PaddingsToWrite
{ {
public: public:
double Left; double Left;
...@@ -805,7 +805,7 @@ public: ...@@ -805,7 +805,7 @@ public:
bool bTop; bool bTop;
bool bRight; bool bRight;
bool bBottom; bool bBottom;
public: Paddings() public: PaddingsToWrite()
{ {
bLeft = false; bLeft = false;
bTop = false; bTop = false;
...@@ -822,7 +822,7 @@ public: ...@@ -822,7 +822,7 @@ public:
double Y; double Y;
double Width; double Width;
double Height; double Height;
Paddings Paddings; PaddingsToWrite Paddings;
int m_nDocPr; int m_nDocPr;
bool bMediaId; bool bMediaId;
...@@ -1189,7 +1189,7 @@ public: ...@@ -1189,7 +1189,7 @@ public:
docLvlText* item = Text[i]; docLvlText* item = Text[i];
if(item->bText) if(item->bText)
{ {
sText.AppendFormat(_T("%s"), item->Text); sText.AppendFormat(_T("%s"), (const TCHAR *) item->Text);
} }
else if(item->bNumber) else if(item->bNumber)
{ {
...@@ -1407,11 +1407,11 @@ public: ...@@ -1407,11 +1407,11 @@ public:
CString sCorrect_tooltip = XmlUtils::EncodeXmlString(tooltip); CString sCorrect_tooltip = XmlUtils::EncodeXmlString(tooltip);
CString sCorrect_anchor = XmlUtils::EncodeXmlString(anchor); CString sCorrect_anchor = XmlUtils::EncodeXmlString(anchor);
CString sStart; CString sStart;
sStart.Format(_T("<w:hyperlink r:id=\"%s\""), sCorrect_rId); sStart.Format(_T("<w:hyperlink r:id=\"%s\""), (const TCHAR *) sCorrect_rId);
if(false == tooltip.IsEmpty()) if(false == tooltip.IsEmpty())
sStart.AppendFormat(_T(" w:tooltip=\"%s\""), sCorrect_tooltip); sStart.AppendFormat(_T(" w:tooltip=\"%s\""), (const TCHAR *) sCorrect_tooltip);
if(false == anchor.IsEmpty()) if(false == anchor.IsEmpty())
sStart.AppendFormat(_T(" w:anchor=\"%s\""), sCorrect_anchor); sStart.AppendFormat(_T(" w:anchor=\"%s\""), (const TCHAR *) sCorrect_anchor);
sStart.Append(_T(" w:history=\"1\">")); sStart.Append(_T(" w:history=\"1\">"));
wr.WriteString(sStart); wr.WriteString(sStart);
wr.Write(writer); wr.Write(writer);
...@@ -1510,7 +1510,7 @@ public: ...@@ -1510,7 +1510,7 @@ public:
pComment->IdFormat = pComment->m_oFormatIdCounter.getNextId(); pComment->IdFormat = pComment->m_oFormatIdCounter.getNextId();
} }
sRes.Append(sBefore); sRes.Append(sBefore);
sRes.AppendFormat(_T("<%s w:id=\"%d\"/>"), sRef, pComment->IdFormat); sRes.AppendFormat(_T("<%s w:id=\"%d\"/>"), (const TCHAR *) sRef, pComment->IdFormat);
sRes.Append(sAfter); sRes.Append(sAfter);
return sRes; return sRes;
} }
...@@ -1528,7 +1528,7 @@ public: ...@@ -1528,7 +1528,7 @@ public:
pComment->m_sParaId = sId; pComment->m_sParaId = sId;
} }
CString sFormat = _T("<w:p w14:paraId=\"%s\" w14:textId=\"%s\"><w:pPr><w:spacing w:line=\"240\" w:after=\"0\" w:lineRule=\"auto\" w:before=\"0\"/><w:ind w:firstLine=\"0\" w:left=\"0\" w:right=\"0\"/><w:jc w:val=\"left\"/></w:pPr><w:r><w:rPr><w:rFonts w:eastAsia=\"Arial\" w:ascii=\"Arial\" w:hAnsi=\"Arial\" w:cs=\"Arial\"/><w:sz w:val=\"22\"/></w:rPr><w:t xml:space=\"preserve\">%s</w:t></w:r></w:p>"); CString sFormat = _T("<w:p w14:paraId=\"%s\" w14:textId=\"%s\"><w:pPr><w:spacing w:line=\"240\" w:after=\"0\" w:lineRule=\"auto\" w:before=\"0\"/><w:ind w:firstLine=\"0\" w:left=\"0\" w:right=\"0\"/><w:jc w:val=\"left\"/></w:pPr><w:r><w:rPr><w:rFonts w:eastAsia=\"Arial\" w:ascii=\"Arial\" w:hAnsi=\"Arial\" w:cs=\"Arial\"/><w:sz w:val=\"22\"/></w:rPr><w:t xml:space=\"preserve\">%s</w:t></w:r></w:p>");
sRes.AppendFormat(sFormat, sId, sId, sPart); sRes.AppendFormat((const TCHAR *) sFormat, (const TCHAR *) sId, (const TCHAR *) sId, (const TCHAR *) sPart);
return bFirst; return bFirst;
} }
static CString writeContent(CComment* pComment) static CString writeContent(CComment* pComment)
...@@ -1544,7 +1544,7 @@ public: ...@@ -1544,7 +1544,7 @@ public:
if(false == pComment->UserName.IsEmpty()) if(false == pComment->UserName.IsEmpty())
{ {
CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName); CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName);
sRes.AppendFormat(_T(" w:author=\"%s\""), sUserName); sRes.AppendFormat(_T(" w:author=\"%s\""), (const TCHAR *) sUserName);
// initials // initials
int nTokenPos = 0; int nTokenPos = 0;
CString strToken = pComment->UserName.Tokenize(_T(" "), nTokenPos); CString strToken = pComment->UserName.Tokenize(_T(" "), nTokenPos);
...@@ -1559,12 +1559,12 @@ public: ...@@ -1559,12 +1559,12 @@ public:
if(false == pComment->Date.IsEmpty()) if(false == pComment->Date.IsEmpty())
{ {
CString sDate = XmlUtils::EncodeXmlString(pComment->Date); CString sDate = XmlUtils::EncodeXmlString(pComment->Date);
sRes.AppendFormat(_T(" w:date=\"%s\""), sDate); sRes.AppendFormat(_T(" w:date=\"%s\""), (const TCHAR *) sDate);
} }
if(false == sInitials.IsEmpty()) if(false == sInitials.IsEmpty())
{ {
sInitials = XmlUtils::EncodeXmlString(sInitials); sInitials = XmlUtils::EncodeXmlString(sInitials);
sRes.AppendFormat(_T(" w:initials=\"%s\""), sInitials); sRes.AppendFormat(_T(" w:initials=\"%s\""), (const TCHAR *) sInitials);
} }
sRes.Append(_T(">")); sRes.Append(_T(">"));
if(false == pComment->Text.IsEmpty()) if(false == pComment->Text.IsEmpty())
...@@ -1596,9 +1596,9 @@ public: ...@@ -1596,9 +1596,9 @@ public:
if(pComment->bSolved && pComment->Solved) if(pComment->bSolved && pComment->Solved)
sDone = _T("1"); sDone = _T("1");
if(!pComment->m_sParaIdParent.IsEmpty()) if(!pComment->m_sParaIdParent.IsEmpty())
sRes.AppendFormat(_T("<w15:commentEx w15:paraId=\"%s\" w15:paraIdParent=\"%s\" w15:done=\"%s\"/>"), pComment->m_sParaId, pComment->m_sParaIdParent, sDone); sRes.AppendFormat(_T("<w15:commentEx w15:paraId=\"%s\" w15:paraIdParent=\"%s\" w15:done=\"%s\"/>"), (const TCHAR *) pComment->m_sParaId, (const TCHAR *) pComment->m_sParaIdParent, (const TCHAR *) sDone);
else else
sRes.AppendFormat(_T("<w15:commentEx w15:paraId=\"%s\" w15:done=\"%s\"/>"), pComment->m_sParaId, sDone); sRes.AppendFormat(_T("<w15:commentEx w15:paraId=\"%s\" w15:done=\"%s\"/>"), (const TCHAR *) pComment->m_sParaId, (const TCHAR *) sDone);
// paraIdParent // paraIdParent
for(int i = 0, length = pComment->replies.size(); i < length; i++) for(int i = 0, length = pComment->replies.size(); i < length; i++)
pComment->replies[i]->m_sParaIdParent = pComment->m_sParaId; pComment->replies[i]->m_sParaIdParent = pComment->m_sParaId;
...@@ -1612,7 +1612,7 @@ public: ...@@ -1612,7 +1612,7 @@ public:
{ {
CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName); CString sUserName = XmlUtils::EncodeXmlString(pComment->UserName);
CString sUserId = XmlUtils::EncodeXmlString(pComment->UserId); CString sUserId = XmlUtils::EncodeXmlString(pComment->UserId);
sRes.AppendFormat(_T("<w15:person w15:author=\"%s\"><w15:presenceInfo w15:providerId=\"Teamlab\" w15:userId=\"%s\"/></w15:person>"), sUserName, sUserId); sRes.AppendFormat(_T("<w15:person w15:author=\"%s\"><w15:presenceInfo w15:providerId=\"Teamlab\" w15:userId=\"%s\"/></w15:person>"), (const TCHAR *) sUserName, (const TCHAR *) sUserId);
} }
return sRes; return sRes;
} }
...@@ -1918,7 +1918,7 @@ public: ...@@ -1918,7 +1918,7 @@ public:
if(false == bChart) if(false == bChart)
sXml.AppendFormat(_T("<wp:inline xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:docPr id=\"%d\" name=\"\"/></wp:inline>"), emuWidth, emuHeight, m_nDocPr); sXml.AppendFormat(_T("<wp:inline xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:docPr id=\"%d\" name=\"\"/></wp:inline>"), emuWidth, emuHeight, m_nDocPr);
else else
sXml.AppendFormat(_T("<w:drawing><wp:inline distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:effectExtent l=\"0\" t=\"0\" r=\"0\" b=\"0\"/><wp:docPr id=\"%d\" name=\"Chart %d\"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><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></wp:inline></w:drawing>"), emuWidth, emuHeight, m_nDocPr, m_nDocPr, sChartRels); sXml.AppendFormat(_T("<w:drawing><wp:inline distT=\"0\" distB=\"0\" distL=\"0\" distR=\"0\"><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:effectExtent l=\"0\" t=\"0\" r=\"0\" b=\"0\"/><wp:docPr id=\"%d\" name=\"Chart %d\"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><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></wp:inline></w:drawing>"), emuWidth, emuHeight, m_nDocPr, m_nDocPr, (const TCHAR *) sChartRels);
} }
} }
else else
...@@ -1993,7 +1993,7 @@ public: ...@@ -1993,7 +1993,7 @@ public:
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionHPosOffset); __int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionHPosOffset);
sContent.Format(_T("<wp:posOffset>%I64d</wp:posOffset>"), emuPosOffset); sContent.Format(_T("<wp:posOffset>%I64d</wp:posOffset>"), emuPosOffset);
} }
sXml.AppendFormat(_T("<wp:positionH relativeFrom=\"%s\">%s</wp:positionH>"), sRelativeFrom, sContent); sXml.AppendFormat(_T("<wp:positionH relativeFrom=\"%s\">%s</wp:positionH>"), (const TCHAR *) sRelativeFrom, (const TCHAR *) sContent);
} }
if(bPositionVRelativeFrom && (bPositionVAlign || bPositionVPosOffset)) if(bPositionVRelativeFrom && (bPositionVAlign || bPositionVPosOffset))
{ {
...@@ -2026,7 +2026,7 @@ public: ...@@ -2026,7 +2026,7 @@ public:
__int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionVPosOffset); __int64 emuPosOffset = (__int64)(g_dKoef_mm_to_emu * PositionVPosOffset);
sContent.Format(_T("<wp:posOffset>%I64d</wp:posOffset>"), emuPosOffset); sContent.Format(_T("<wp:posOffset>%I64d</wp:posOffset>"), emuPosOffset);
} }
sXml.AppendFormat(_T("<wp:positionV relativeFrom=\"%s\">%s</wp:positionV>"), sRelativeFrom, sContent); sXml.AppendFormat(_T("<wp:positionV relativeFrom=\"%s\">%s</wp:positionV>"), (const TCHAR *) sRelativeFrom, (const TCHAR *) sContent);
} }
__int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width); __int64 emuWidth = (__int64)(g_dKoef_mm_to_emu * Width);
__int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height); __int64 emuHeight = (__int64)(g_dKoef_mm_to_emu * Height);
...@@ -2053,9 +2053,9 @@ public: ...@@ -2053,9 +2053,9 @@ public:
if(DrawingPropertyWrap.bStart || DrawingPropertyWrap.Points.size() > 0) if(DrawingPropertyWrap.bStart || DrawingPropertyWrap.Points.size() > 0)
{ {
if(c_oSerImageType2::WrapSquare == DrawingPropertyWrap.WrappingType || c_oSerImageType2::WrapThrough == DrawingPropertyWrap.WrappingType || c_oSerImageType2::WrapTight == DrawingPropertyWrap.WrappingType) if(c_oSerImageType2::WrapSquare == DrawingPropertyWrap.WrappingType || c_oSerImageType2::WrapThrough == DrawingPropertyWrap.WrappingType || c_oSerImageType2::WrapTight == DrawingPropertyWrap.WrappingType)
sXml.AppendFormat(_T("<wp:%s wrapText=\"bothSides\">"), sTagName); sXml.AppendFormat(_T("<wp:%s wrapText=\"bothSides\">"), (const TCHAR *) sTagName);
else else
sXml.AppendFormat(_T("<wp:%s>"), sTagName); sXml.AppendFormat(_T("<wp:%s>"), (const TCHAR *) sTagName);
int nEdited = 0; int nEdited = 0;
if(DrawingPropertyWrap.bEdited && DrawingPropertyWrap.Edited) if(DrawingPropertyWrap.bEdited && DrawingPropertyWrap.Edited)
...@@ -2078,21 +2078,21 @@ public: ...@@ -2078,21 +2078,21 @@ public:
} }
} }
sXml.Append(_T("</wp:wrapPolygon>")); sXml.Append(_T("</wp:wrapPolygon>"));
sXml.AppendFormat(_T("</wp:%s>"), sTagName); sXml.AppendFormat(_T("</wp:%s>"), (const TCHAR *) sTagName);
} }
else else
{ {
if(c_oSerImageType2::WrapSquare == DrawingPropertyWrap.WrappingType) if(c_oSerImageType2::WrapSquare == DrawingPropertyWrap.WrappingType)
sXml.AppendFormat(_T("<wp:%s wrapText=\"bothSides\"/>"), sTagName); sXml.AppendFormat(_T("<wp:%s wrapText=\"bothSides\"/>"), (const TCHAR *) sTagName);
else else
sXml.AppendFormat(_T("<wp:%s/>"), sTagName); sXml.AppendFormat(_T("<wp:%s/>"), (const TCHAR *) sTagName);
} }
} }
else else
sXml.Append(_T("<wp:wrapNone/>")); sXml.Append(_T("<wp:wrapNone/>"));
if(bChart) if(bChart)
sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"Chart %d\"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><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>"), m_nDocPr, m_nDocPr, sChartRels); sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"Chart %d\"/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><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>"), m_nDocPr, m_nDocPr, (const TCHAR *) sChartRels);
else else
sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"\"/>"), m_nDocPr); sXml.AppendFormat(_T("<wp:docPr id=\"%d\" name=\"\"/>"), m_nDocPr);
...@@ -2369,11 +2369,11 @@ public: ...@@ -2369,11 +2369,11 @@ public:
CString sCorrect_tooltip = XmlUtils::EncodeXmlString(sTooltip); CString sCorrect_tooltip = XmlUtils::EncodeXmlString(sTooltip);
CString sCorrect_anchor = XmlUtils::EncodeXmlString(sAnchor); CString sCorrect_anchor = XmlUtils::EncodeXmlString(sAnchor);
CString sStart; CString sStart;
sStart.Format(_T("<w:hyperlink r:id=\"%s\""), sCorrect_rId); sStart.Format(_T("<w:hyperlink r:id=\"%s\""), (const TCHAR *) sCorrect_rId);
if(false == sTooltip.IsEmpty()) if(false == sTooltip.IsEmpty())
sStart.AppendFormat(_T(" w:tooltip=\"%s\""), sCorrect_tooltip); sStart.AppendFormat(_T(" w:tooltip=\"%s\""), (const TCHAR *) sCorrect_tooltip);
if(false == sAnchor.IsEmpty()) if(false == sAnchor.IsEmpty())
sStart.AppendFormat(_T(" w:anchor=\"%s\""), sCorrect_anchor); sStart.AppendFormat(_T(" w:anchor=\"%s\""), (const TCHAR *) sCorrect_anchor);
sStart.Append(_T(" w:history=\"1\">")); sStart.Append(_T(" w:history=\"1\">"));
wr.WriteString(sStart); wr.WriteString(sStart);
wr.Write(writer); wr.Write(writer);
......
...@@ -1372,7 +1372,7 @@ public: ...@@ -1372,7 +1372,7 @@ public:
} }
else if( c_oSer_tblpPrType::Paddings == type ) else if( c_oSer_tblpPrType::Paddings == type )
{ {
Paddings oPaddings; PaddingsToWrite oPaddings;
res = Read2(length, &Binary_tblPrReader::ReadPaddings, this, &oPaddings); res = Read2(length, &Binary_tblPrReader::ReadPaddings, this, &oPaddings);
if(oPaddings.bLeft) if(oPaddings.bLeft)
{ {
...@@ -1709,14 +1709,14 @@ public: ...@@ -1709,14 +1709,14 @@ public:
res = c_oSerConstants::ReadUnknown; res = c_oSerConstants::ReadUnknown;
return res; return res;
}; };
int ReadPaddingsOut(long length, Paddings* oPaddings) int ReadPaddingsOut(long length, PaddingsToWrite* oPaddings)
{ {
return Read2(length, &Binary_tblPrReader::ReadPaddings, this, oPaddings); return Read2(length, &Binary_tblPrReader::ReadPaddings, this, oPaddings);
} }
int ReadPaddings(BYTE type, long length, void* poResult) int ReadPaddings(BYTE type, long length, void* poResult)
{ {
int res = c_oSerConstants::ReadOk; int res = c_oSerConstants::ReadOk;
Paddings* oPaddings = static_cast<Paddings*>(poResult); PaddingsToWrite* oPaddings = static_cast<PaddingsToWrite*>(poResult);
if (c_oSerPaddingType::left == type) if (c_oSerPaddingType::left == type)
{ {
oPaddings->bLeft = true; oPaddings->bLeft = true;
......
...@@ -3253,7 +3253,7 @@ namespace BinXlsxRW { ...@@ -3253,7 +3253,7 @@ namespace BinXlsxRW {
if(TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF)) if(TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
{ {
CFile oFile; CFile oFile;
oFile.CreateFileW(sFileDst); oFile.CreateFile(sFileDst);
oFile.WriteStringUTF8(WriteFileHeader(nBinBufferLen)); oFile.WriteStringUTF8(WriteFileHeader(nBinBufferLen));
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen); oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
oFile.CloseFile(); oFile.CloseFile();
...@@ -3400,7 +3400,7 @@ namespace BinXlsxRW { ...@@ -3400,7 +3400,7 @@ namespace BinXlsxRW {
if(TRUE == Base64::Base64Encode(pData, nLength, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF)) if(TRUE == Base64::Base64Encode(pData, nLength, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
{ {
CFile oFile; CFile oFile;
oFile.CreateFileW(sFileOutput); oFile.CreateFile(sFileOutput);
oFile.WriteStringUTF8(WriteDefaultFileHeader(nLength)); oFile.WriteStringUTF8(WriteDefaultFileHeader(nLength));
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen); oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
oFile.CloseFile(); oFile.CloseFile();
...@@ -3585,7 +3585,7 @@ namespace BinXlsxRW { ...@@ -3585,7 +3585,7 @@ namespace BinXlsxRW {
if (TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF)) if (TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
{ {
CFile oFile; CFile oFile;
oFile.CreateFileW(sFileOutput); oFile.CreateFile(sFileOutput);
oFile.WriteStringUTF8(WriteDefaultFileHeader(nBinBufferLen)); oFile.WriteStringUTF8(WriteDefaultFileHeader(nBinBufferLen));
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen); oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
oFile.CloseFile(); oFile.CloseFile();
...@@ -3642,7 +3642,7 @@ namespace BinXlsxRW { ...@@ -3642,7 +3642,7 @@ namespace BinXlsxRW {
if(TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF)) if(TRUE == Base64::Base64Encode(pbBinBuffer, nBinBufferLen, (LPSTR)pbBase64Buffer, &nBase64BufferLen, Base64::B64_BASE64_FLAG_NOCRLF))
{ {
CFile oFile; CFile oFile;
oFile.CreateFileW(sFileOutput); oFile.CreateFile(sFileOutput);
oFile.WriteStringUTF8(WriteDefaultFileHeader(nBinBufferLen)); oFile.WriteStringUTF8(WriteDefaultFileHeader(nBinBufferLen));
oFile.WriteFile(pbBase64Buffer, nBase64BufferLen); oFile.WriteFile(pbBase64Buffer, nBase64BufferLen);
oFile.CloseFile(); oFile.CloseFile();
......
...@@ -2402,7 +2402,7 @@ namespace BinXlsxRW { ...@@ -2402,7 +2402,7 @@ namespace BinXlsxRW {
if(S_OK == hRes && NULL != bstrXml) if(S_OK == hRes && NULL != bstrXml)
{ {
pCellAnchor->m_oXml.Init(); pCellAnchor->m_oXml.Init();
pCellAnchor->m_oXml->AppendFormat(_T("%s<xdr:clientData/>"), *bstrXml); pCellAnchor->m_oXml->AppendFormat(_T("%s<xdr:clientData/>"), (const TCHAR *) bstrXml);
} }
RELEASEOBJECT(bstrXml); RELEASEOBJECT(bstrXml);
} }
...@@ -2556,7 +2556,7 @@ namespace BinXlsxRW { ...@@ -2556,7 +2556,7 @@ namespace BinXlsxRW {
else else
sRId = pPair->second; sRId = pPair->second;
pCellAnchor->m_oXml.Init(); pCellAnchor->m_oXml.Init();
pCellAnchor->m_oXml->AppendFormat(_T("<xdr:pic><xdr:nvPicPr><xdr:cNvPr id=\"1\" name=\"Image 1\"></xdr:cNvPr><xdr:cNvPicPr><a:picLocks noChangeAspect=\"1\"></a:picLocks></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip r:embed=\"%s\"></a:blip><a:stretch></a:stretch></xdr:blipFill><xdr:spPr><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/>"), sRId); pCellAnchor->m_oXml->AppendFormat(_T("<xdr:pic><xdr:nvPicPr><xdr:cNvPr id=\"1\" name=\"Image 1\"></xdr:cNvPr><xdr:cNvPicPr><a:picLocks noChangeAspect=\"1\"></a:picLocks></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip r:embed=\"%s\"></a:blip><a:stretch></a:stretch></xdr:blipFill><xdr:spPr><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/>"), (const TCHAR *) sRId);
} }
} }
else else
...@@ -2703,7 +2703,7 @@ namespace BinXlsxRW { ...@@ -2703,7 +2703,7 @@ namespace BinXlsxRW {
{ {
double dValue = m_oBufferedStream.GetDoubleReal(); double dValue = m_oBufferedStream.GetDoubleReal();
pCell->m_oValue.Init(); pCell->m_oValue.Init();
pCell->m_oValue->m_sText.AppendFormat(_T("%s"), OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(dValue)); pCell->m_oValue->m_sText.AppendFormat(_T("%s"), (const TCHAR *) OOX::Spreadsheet::SpreadsheetCommon::WriteDouble(dValue));
} }
else else
res = c_oSerConstants::ReadUnknown; res = c_oSerConstants::ReadUnknown;
......
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