Commit 7f8045cf authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

XlsFormat - trendlines in chart (ver 5 & 6) + правки версии 5

parent 8656d6c6
...@@ -25,8 +25,8 @@ public: ...@@ -25,8 +25,8 @@ public:
int serialize(std::wostream & _stream); int serialize(std::wostream & _stream);
//----------------------------- //-----------------------------
BIFF_BYTE pst; unsigned char pst;
Boolean<unsigned char> fAutoSplit; unsigned char fAutoSplit;
_UINT16 split; _UINT16 split;
_INT16 iSplitPos; _INT16 iSplitPos;
_INT16 pcSplitPercent; _INT16 pcSplitPercent;
......
...@@ -26,7 +26,7 @@ public: ...@@ -26,7 +26,7 @@ public:
//----------------------------- //-----------------------------
ForwardOnlyParam<_UINT32> lbPlyPos; ForwardOnlyParam<_UINT32> lbPlyPos;
std::wstring hsState; std::wstring hsState;
BIFF_BYTE dt; unsigned char dt;
ShortXLUnicodeString stName; ShortXLUnicodeString stName;
}; };
......
...@@ -31,8 +31,8 @@ public: ...@@ -31,8 +31,8 @@ public:
int serialize(std::wostream & stream); int serialize(std::wostream & stream);
FrtRefHeader frtRefHeader; FrtRefHeader frtRefHeader;
BIFF_BYTE ct; unsigned char ct;
BIFF_BYTE cp; unsigned char cp;
DXFN12 dxf; DXFN12 dxf;
......
...@@ -96,7 +96,7 @@ public: ...@@ -96,7 +96,7 @@ public:
static const ElementType type = typePls; static const ElementType type = typePls;
//----------------------------- //-----------------------------
DEVMODE rgb; DEVMODE rgb;
BIFF_LONG bin_data_id; _INT32 bin_data_id;
}; };
......
...@@ -29,7 +29,7 @@ public: ...@@ -29,7 +29,7 @@ public:
_UINT16 miyRw; _UINT16 miyRw;
BIFF_BYTE iOutLevel; unsigned char iOutLevel;
bool fCollapsed; bool fCollapsed;
bool fDyZero; bool fDyZero;
bool fUnsynced; bool fUnsynced;
......
...@@ -27,7 +27,7 @@ public: ...@@ -27,7 +27,7 @@ public:
bool fCol; bool fCol;
bool fCaseSensitive; bool fCaseSensitive;
bool fAltMethod; bool fAltMethod;
BIFF_BYTE sfp; unsigned char sfp;
BIFF_DWORD cconditions; BIFF_DWORD cconditions;
BIFF_DWORD idParent; BIFF_DWORD idParent;
......
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
bool fHidden; bool fHidden;
bool fCustom; bool fCustom;
BIFF_BYTE iCategory; unsigned char iCategory;
BuiltInStyle builtInData; BuiltInStyle builtInData;
LPWideString stName; LPWideString stName;
XFProps xfProps; XFProps xfProps;
......
...@@ -7,6 +7,9 @@ namespace XLS ...@@ -7,6 +7,9 @@ namespace XLS
Text::Text() Text::Text()
{ {
is_area = false; is_area = false;
dlp = false;
iReadingOrder = 0;
icvText = 0xff;
} }
...@@ -49,7 +52,26 @@ void Text::readFields(CFRecord& record) ...@@ -49,7 +52,26 @@ void Text::readFields(CFRecord& record)
{ {
unsigned short flags1; unsigned short flags1;
unsigned short flags2; unsigned short flags2;
record >> at >> vat >> wBkgMode >> rgbText >> x >> y >> dx >> dy >> flags1 >> icvText >> flags2 >> trot; record >> at >> vat >> wBkgMode >> rgbText >> x >> y >> dx >> dy >> flags1;
if (record.getGlobalWorkbookInfo()->Version < 0x0600)
{
int orient = GETBITS(flags1, 8, 10);
switch(orient)
{
case 0: trot = 0; break; // Text orientation: not rotated.
case 1: trot = 0xff; break; // Text orientation: vertically stacked.
case 2: trot = 90; break; // Text orientation: 90 deg counterclockwise.
case 3: trot = 270; break; // Text orientation: 90 deg clockwise.
}
}
else
{
record >> icvText >> flags2 >> trot;
//icv -> from Palette
dlp = static_cast<unsigned char>(GETBITS(flags2, 0, 3));
iReadingOrder = static_cast<unsigned char>(GETBITS(flags2, 14, 15));
}
fAutoColor = GETBIT(flags1, 0); fAutoColor = GETBIT(flags1, 0);
fShowKey = GETBIT(flags1, 1); fShowKey = GETBIT(flags1, 1);
...@@ -63,10 +85,6 @@ void Text::readFields(CFRecord& record) ...@@ -63,10 +85,6 @@ void Text::readFields(CFRecord& record)
fShowBubbleSizes = GETBIT(flags1, 13); fShowBubbleSizes = GETBIT(flags1, 13);
fShowLabel = GETBIT(flags1, 14); fShowLabel = GETBIT(flags1, 14);
dlp = static_cast<unsigned char>(GETBITS(flags2, 0, 3));
iReadingOrder = static_cast<unsigned char>(GETBITS(flags2, 14, 15));
rot = trot;
} }
int Text::serialize(std::wostream & _stream) int Text::serialize(std::wostream & _stream)
......
...@@ -25,14 +25,16 @@ public: ...@@ -25,14 +25,16 @@ public:
int serialize(std::wostream & _stream); int serialize(std::wostream & _stream);
BIFF_BYTE at; unsigned char at;
BIFF_BYTE vat; unsigned char vat;
_UINT16 wBkgMode; _UINT16 wBkgMode;
LongRGB rgbText; LongRGB rgbText;
BIFF_LONG x;
BIFF_LONG y; _INT32 x;
BIFF_LONG dx; _INT32 y;
BIFF_LONG dy; _INT32 dx;
_INT32 dy;
bool fAutoColor; bool fAutoColor;
bool fShowKey; bool fShowKey;
...@@ -47,14 +49,12 @@ public: ...@@ -47,14 +49,12 @@ public:
bool fShowLabel; bool fShowLabel;
Icv icvText; Icv icvText;
BIFF_BYTE dlp; unsigned char dlp;
BIFF_BYTE iReadingOrder; unsigned char iReadingOrder;
_UINT16 trot; _UINT16 trot;
//----------------------------- //-----------------------------
bool is_area; bool is_area;
int rot;
}; };
} // namespace XLS } // namespace XLS
......
...@@ -39,12 +39,12 @@ public: ...@@ -39,12 +39,12 @@ public:
GlobalWorkbookInfoPtr pGlobalWorkbookInfoPtr; GlobalWorkbookInfoPtr pGlobalWorkbookInfoPtr;
BIFF_BYTE hAlignment; unsigned char hAlignment;
BIFF_BYTE vAlignment; unsigned char vAlignment;
BIFF_BYTE fLockText; unsigned char fLockText;
BIFF_BYTE fJustLast; unsigned char fJustLast;
BIFF_BYTE fSecretEdit; unsigned char fSecretEdit;
_UINT16 rot; _UINT16 rot;
......
...@@ -20,10 +20,10 @@ public: ...@@ -20,10 +20,10 @@ public:
virtual void store(CFRecord& record); virtual void store(CFRecord& record);
BIFF_BYTE fDefault; unsigned char fDefault;
BIFF_BYTE fHelp; unsigned char fHelp;
BIFF_BYTE fCancel; unsigned char fCancel;
BIFF_BYTE fDismiss; unsigned char fDismiss;
_UINT16 accel1; _UINT16 accel1;
}; };
......
...@@ -77,11 +77,18 @@ void PtgArea3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool f ...@@ -77,11 +77,18 @@ void PtgArea3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool f
std::wstring range_ref = range.toString(); std::wstring range_ref = range.toString();
if (ixals == 0xffff)//current sheet if (ixals == 0xffff)
ptg_stack.push(XMLSTUFF::make3dRef(global_info->current_sheet - 1, range_ref, global_info->sheets_names, full_ref)); {
std::wstring prefix = XMLSTUFF::xti_indexes2sheet_name(itabFirst, itabLast, global_info->sheets_names);
if (!prefix.empty()) prefix += L"!";
ptg_stack.push(prefix + range_ref);
}
else else
{//external !!
ptg_stack.push(XMLSTUFF::make3dRef(ixals, range_ref, global_info->xti_parsed, full_ref)); ptg_stack.push(XMLSTUFF::make3dRef(ixals, range_ref, global_info->xti_parsed, full_ref));
} }
}
else else
{ {
std::wstring range_ref = area.toString(); std::wstring range_ref = area.toString();
......
...@@ -77,9 +77,16 @@ void PtgRef3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu ...@@ -77,9 +77,16 @@ void PtgRef3d::assemble(AssemblerStack& ptg_stack, PtgQueue& extra_data, bool fu
std::wstring range_ref = cell.toString(); std::wstring range_ref = cell.toString();
if (ixals == 0xffff) if (ixals == 0xffff)
ptg_stack.push(XMLSTUFF::make3dRef(global_info->current_sheet - 1, range_ref, global_info->sheets_names, full_ref)); {
std::wstring prefix = XMLSTUFF::xti_indexes2sheet_name(itabFirst, itabLast, global_info->sheets_names);
if (!prefix.empty()) prefix += L"!";
ptg_stack.push(prefix + range_ref);
}
else else
ptg_stack.push(XMLSTUFF::make3dRef(ixals, range_ref, global_info->xti_parsed, full_ref)); {
ptg_stack.push(XMLSTUFF::make3dRef(ixals, range_ref, global_info->xti_parsed, full_ref)); // from External !
}
} }
else else
{ {
......
...@@ -132,16 +132,16 @@ static void serialize_val_prop(std::wostream & stream, const std::wstring & name ...@@ -132,16 +132,16 @@ static void serialize_val_prop(std::wostream & stream, const std::wstring & name
{ {
CP_XML_NODE(name) CP_XML_NODE(name)
{ {
BIFF_DWORD * dword = dynamic_cast<BIFF_DWORD*>(val.get()); BIFF_DWORD* dword = dynamic_cast<BIFF_DWORD*>(val.get());
if (dword) CP_XML_ATTR(L"val", dword->value()); if (dword) CP_XML_ATTR(L"val", dword->value());
BIFF_WORD * word = dynamic_cast<BIFF_WORD*>(val.get()); BIFF_WORD* word = dynamic_cast<BIFF_WORD*>(val.get());
if (word) CP_XML_ATTR(L"val", word->value()); if (word) CP_XML_ATTR(L"val", word->value());
BIFF_BYTE *byte_ = dynamic_cast<BIFF_BYTE*>(val.get()); BIFF_BYTE* byte_ = dynamic_cast<BIFF_BYTE*>(val.get());
if (byte_) CP_XML_ATTR(L"val", byte_->value()); if (byte_) CP_XML_ATTR(L"val", byte_->value());
LPWideString * str_ = dynamic_cast<LPWideString*>(val.get()); LPWideString* str_ = dynamic_cast<LPWideString*>(val.get());
if (str_) CP_XML_ATTR(L"val", xml::utils::replace_text_to_xml(str_->value())); if (str_) CP_XML_ATTR(L"val", xml::utils::replace_text_to_xml(str_->value()));
} }
} }
......
...@@ -123,20 +123,40 @@ const bool ATTACHEDLABEL::loadContent(BinProcessor& proc) ...@@ -123,20 +123,40 @@ const bool ATTACHEDLABEL::loadContent(BinProcessor& proc)
int ATTACHEDLABEL::serialize_txPr(std::wostream & _stream) int ATTACHEDLABEL::serialize_txPr(std::wostream & _stream)
{ {
FontX *font = dynamic_cast<FontX*>(m_FontX.get()); FontX *font = dynamic_cast<FontX*>(m_FontX.get());
Text * textProps = dynamic_cast<Text*>(m_TextProperties.get());
if (font == NULL) return 0; if (font == NULL) return 0;
bool rtl = false;
if((textProps) && (textProps->iReadingOrder == (unsigned char)2)) rtl = true;
CP_XML_WRITER(_stream) CP_XML_WRITER(_stream)
{ {
CP_XML_NODE(L"c:txPr") CP_XML_NODE(L"c:txPr")
{ {
CP_XML_NODE(L"a:bodyPr"); CP_XML_NODE(L"a:bodyPr")
{
if (textProps)
{
if (textProps->trot == (_UINT16)0xff)
{
CP_XML_ATTR(L"rot", 0);
CP_XML_ATTR(L"vert", L"wordArtVert");
}
else
{
if (textProps->trot > 90) CP_XML_ATTR(L"rot", (textProps->trot - 90) * 60000);
else CP_XML_ATTR(L"rot", -textProps->trot * 60000);
CP_XML_ATTR(L"vert", L"horz");
}
}
}
CP_XML_NODE(L"a:lstStyle"); CP_XML_NODE(L"a:lstStyle");
CP_XML_NODE(L"a:p") CP_XML_NODE(L"a:p")
{ {
CP_XML_NODE(L"a:pPr") CP_XML_NODE(L"a:pPr")
{ {
serialize_rPr(CP_XML_STREAM(),font->iFont, false, true); serialize_rPr(CP_XML_STREAM(),font->iFont, rtl, true);
} }
CP_XML_NODE(L"a:endParaRPr"); CP_XML_NODE(L"a:endParaRPr");
} }
...@@ -184,8 +204,7 @@ int ATTACHEDLABEL::serialize(std::wostream & _stream, bool isPosition) ...@@ -184,8 +204,7 @@ int ATTACHEDLABEL::serialize(std::wostream & _stream, bool isPosition)
{ {
if (textProps) if (textProps)
{ {
//if (textProps->trot != 0)
{
if (textProps->trot == (_UINT16)0xff) if (textProps->trot == (_UINT16)0xff)
{ {
CP_XML_ATTR(L"rot", 0); CP_XML_ATTR(L"rot", 0);
...@@ -199,7 +218,6 @@ int ATTACHEDLABEL::serialize(std::wostream & _stream, bool isPosition) ...@@ -199,7 +218,6 @@ int ATTACHEDLABEL::serialize(std::wostream & _stream, bool isPosition)
} }
} }
} }
}
CP_XML_NODE(L"a:p") CP_XML_NODE(L"a:p")
{ {
CP_XML_NODE(L"a:pPr") CP_XML_NODE(L"a:pPr")
...@@ -291,18 +309,32 @@ int ATTACHEDLABEL::serialize_rPr (std::wostream & _stream, int iFmt, bool rtl, b ...@@ -291,18 +309,32 @@ int ATTACHEDLABEL::serialize_rPr (std::wostream & _stream, int iFmt, bool rtl, b
Text * text_props = dynamic_cast<Text*>(m_TextProperties.get()); Text * text_props = dynamic_cast<Text*>(m_TextProperties.get());
_CP_OPT(_UINT16) color; _CP_OPT(_UINT16) color;
_CP_OPT(FillInfoExt) color_ext;
if (font) if (font)
{
if (text_props)
{ {
color = font->icv; color = font->icv;
font->icv = text_props->icvText; color_ext = font->color_ext;
if ((text_props) && (!text_props->fAutoColor))
{
if (text_props->icvText != 0xff)
{
font->icv = text_props->icvText; //biff8
}
else
{
font->color_ext.enabled = true;
font->color_ext.xclrType = 2;
font->color_ext.xclrValue = (text_props->rgbText.red << 16) +
(text_props->rgbText.green << 8) + (text_props->rgbText.blue);
}
} }
font->serialize_rPr(_stream, rtl, defRPr); font->serialize_rPr(_stream, rtl, defRPr);
if (color)font->icv = *color; font->icv = *color;
font->color_ext = *color_ext;
} }
return 0; return 0;
......
...@@ -195,7 +195,7 @@ int CELL_GROUP::serialize(std::wostream & stream) ...@@ -195,7 +195,7 @@ int CELL_GROUP::serialize(std::wostream & stream)
CP_XML_ATTR(L"ht", row->miyRw / 20.); CP_XML_ATTR(L"ht", row->miyRw / 20.);
CP_XML_ATTR(L"customHeight", true); CP_XML_ATTR(L"customHeight", true);
} }
if ((row->iOutLevel.value()) && (row->iOutLevel > 0)) if (row->iOutLevel > 0)
{ {
CP_XML_ATTR(L"outlineLevel", row->iOutLevel); CP_XML_ATTR(L"outlineLevel", row->iOutLevel);
} }
...@@ -277,7 +277,7 @@ int CELL_GROUP::serialize(std::wostream & stream) ...@@ -277,7 +277,7 @@ int CELL_GROUP::serialize(std::wostream & stream)
CP_XML_ATTR(L"ht", row->miyRw / 20.); CP_XML_ATTR(L"ht", row->miyRw / 20.);
CP_XML_ATTR(L"customHeight", true); CP_XML_ATTR(L"customHeight", true);
} }
if ((row->iOutLevel.value()) && (row->iOutLevel > 0)) if (row->iOutLevel > 0)
{ {
CP_XML_ATTR(L"outlineLevel", row->iOutLevel); CP_XML_ATTR(L"outlineLevel", row->iOutLevel);
} }
......
...@@ -10,11 +10,13 @@ ...@@ -10,11 +10,13 @@
#include <Logic/Biff_records/End.h> #include <Logic/Biff_records/End.h>
#include <Logic/Biff_records/SerAuxTrend.h> #include <Logic/Biff_records/SerAuxTrend.h>
#include <Logic/Biff_records/SerAuxErrBar.h> #include <Logic/Biff_records/SerAuxErrBar.h>
#include <Logic/Biff_records/AttachedLabel.h>
#include <Logic/Biff_unions/AI.h> #include <Logic/Biff_unions/AI.h>
#include <Logic/Biff_unions/SS.h> #include <Logic/Biff_unions/SS.h>
#include <Logic/Biff_unions/ATTACHEDLABEL.h> #include <Logic/Biff_unions/ATTACHEDLABEL.h>
#include <Logic/Biff_unions/TEXTPROPS.h> #include <Logic/Biff_unions/TEXTPROPS.h>
#include <Logic/Biff_unions/CHARTFOMATS.h>
namespace XLS namespace XLS
{ {
...@@ -225,7 +227,7 @@ int SERIESFORMAT::serialize_legend(std::wostream & _stream, int idx) ...@@ -225,7 +227,7 @@ int SERIESFORMAT::serialize_legend(std::wostream & _stream, int idx)
return 0; return 0;
} }
int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext) int SERIESFORMAT::serialize_parent(std::wostream & _stream, CHARTFORMATS* chart_formats, bool ext)
{ {
if (m_SerParent == NULL) if (m_SerParent == NULL)
{ {
...@@ -233,13 +235,20 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext) ...@@ -233,13 +235,20 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext)
{ {
SERIESFORMAT * series_ext = dynamic_cast<SERIESFORMAT *>(m_SERIESFORMAT_ext.get()); SERIESFORMAT * series_ext = dynamic_cast<SERIESFORMAT *>(m_SERIESFORMAT_ext.get());
if (series_ext) if (series_ext)
return series_ext->serialize_parent(_stream, true/*, series_id, crt*/); return series_ext->serialize_parent(_stream, chart_formats, true/*, series_id, crt*/);
} }
return 0; return 0;
} }
SerParent *ser_parent = dynamic_cast<SerParent*>(m_SerParent.get()); SerParent *ser_parent = dynamic_cast<SerParent*>(m_SerParent.get());
if (ser_parent == NULL) return 0; if (ser_parent == NULL) return 0;
int id = ser_parent->series;
SS *series_ss = dynamic_cast<SS *>(m_SS.get());
AttachedLabel *att_label = dynamic_cast<AttachedLabel*>(series_ss->m_AttachedLabel.get());
ATTACHEDLABEL *AT_LABEL = dynamic_cast<ATTACHEDLABEL*>(chart_formats->find_label(4, id).get());
CP_XML_WRITER(_stream) CP_XML_WRITER(_stream)
{ {
SerAuxTrend * trendline = dynamic_cast<SerAuxTrend *>(ser_parent->m_SerAuxTrend.get()); SerAuxTrend * trendline = dynamic_cast<SerAuxTrend *>(ser_parent->m_SerAuxTrend.get());
...@@ -249,7 +258,16 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext) ...@@ -249,7 +258,16 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext)
{ {
CP_XML_NODE(L"c:trendline") CP_XML_NODE(L"c:trendline")
{ {
//<c:spPr><a:ln w="25400"><a:solidFill><a:srgbClr val="000000"/></a:solidFill><a:prstDash val="solid"/></a:ln></c:spPr> if (series_ss)
{
series_ss->serialize(CP_XML_STREAM(), CHART_TYPE_Bar);
// .. fill - - ""
}
//CP_XML_NODE(L"c:spPr")
//{
//<a:ln w="25400"><a:solidFill><a:srgbClr val="000000"/></a:solidFill><a:prstDash val="solid"/></a:ln>
//}
CP_XML_NODE(L"c:trendlineType") CP_XML_NODE(L"c:trendlineType")
{ {
switch(trendline->regt) switch(trendline->regt)
...@@ -271,6 +289,25 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext) ...@@ -271,6 +289,25 @@ int SERIESFORMAT::serialize_parent(std::wostream & _stream, bool ext)
{ {
CP_XML_ATTR (L"val" , (bool)trendline->fEquation); CP_XML_ATTR (L"val" , (bool)trendline->fEquation);
} }
if ((AT_LABEL) && ((AT_LABEL->m_FRAME) || (AT_LABEL->m_FontX)))
{
CP_XML_NODE(L"c:trendlineLbl")
{
//CP_XML_NODE(L"c:layout")
//{
//}
//CP_XML_NODE(L"c:numFmt")
//{
//}
if (AT_LABEL->m_FRAME)
AT_LABEL->m_FRAME->serialize(CP_XML_STREAM());
if (AT_LABEL->m_FontX)
AT_LABEL->serialize_txPr(CP_XML_STREAM());
}
}
} }
} }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
namespace XLS namespace XLS
{ {
class CHARTFORMATS;
// Logical representation of SERIESFORMAT union of records // Logical representation of SERIESFORMAT union of records
class SERIESFORMAT: public CompositeObject class SERIESFORMAT: public CompositeObject
...@@ -21,7 +22,7 @@ public: ...@@ -21,7 +22,7 @@ public:
static const ElementType type = typeSERIESFORMAT; static const ElementType type = typeSERIESFORMAT;
int serialize_legend(std::wostream & _stream, int idx); int serialize_legend(std::wostream & _stream, int idx);
int serialize_parent(std::wostream & _stream, bool ext = false); int serialize_parent(std::wostream & _stream, CHARTFORMATS* chart_formats, bool ext = false);
BaseObjectPtr m_SS; BaseObjectPtr m_SS;
std::vector<BaseObjectPtr> m_arPtSS; std::vector<BaseObjectPtr> m_arPtSS;
......
...@@ -289,7 +289,6 @@ int SS::serialize_default(std::wostream & _stream, int series_type, int ind ) ...@@ -289,7 +289,6 @@ int SS::serialize_default(std::wostream & _stream, int series_type, int ind )
int SS::serialize(std::wostream & _stream, int series_type, int indPt) int SS::serialize(std::wostream & _stream, int series_type, int indPt)
{ {
DataFormat *series_data_format = dynamic_cast<DataFormat *>(m_DataFormat.get()); DataFormat *series_data_format = dynamic_cast<DataFormat *>(m_DataFormat.get());
SerFmt *series_format = dynamic_cast<SerFmt *> (m_SerFmt.get()); SerFmt *series_format = dynamic_cast<SerFmt *> (m_SerFmt.get());
......
...@@ -289,6 +289,8 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts) ...@@ -289,6 +289,8 @@ void ChartSheetSubstream::recalc(CHARTFORMATS* charts)
continue; continue;
} }
iCrt = serCrt->id;
if (iCrt > parent0->m_arCRT.size() && iCrt < 0) if (iCrt > parent0->m_arCRT.size() && iCrt < 0)
continue; continue;
CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[iCrt].get()); CRT * crt = dynamic_cast<CRT*>(parent0->m_arCRT[iCrt].get());
...@@ -664,7 +666,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream) ...@@ -664,7 +666,7 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
serialize_ser(L"c:val", CP_XML_STREAM(), series_id, series->m_arAI[1], ser->sdtY, ser->cValy); serialize_ser(L"c:val", CP_XML_STREAM(), series_id, series->m_arAI[1], ser->sdtY, ser->cValy);
} }
//----------------------------------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------------------------------
series->serialize_parent(CP_XML_STREAM()); series->serialize_parent(CP_XML_STREAM(), chart_formats);
//----------------------------------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------------------------------
std::wstringstream stream_dLbls; std::wstringstream stream_dLbls;
serialize_dLbls(stream_dLbls, it->second[i], crt); serialize_dLbls(stream_dLbls, it->second[i], crt);
...@@ -860,7 +862,8 @@ int ChartSheetSubstream::serialize_dLbls (std::wostream & _stream, int id, CRT * ...@@ -860,7 +862,8 @@ int ChartSheetSubstream::serialize_dLbls (std::wostream & _stream, int id, CRT *
{ {
Text * text = NULL; Text * text = NULL;
AttachedLabel * att_label = dynamic_cast<AttachedLabel*>(series_ss->m_AttachedLabel.get()); AttachedLabel * att_label = dynamic_cast<AttachedLabel*>(series_ss->m_AttachedLabel.get());
ATTACHEDLABEL* AT_LABEL = dynamic_cast<ATTACHEDLABEL*>(chart_formats->find_label(4, id).get()); ATTACHEDLABEL * AT_LABEL = dynamic_cast<ATTACHEDLABEL*>(chart_formats->find_label(4, id).get());
if (AT_LABEL) text = dynamic_cast<Text*> (AT_LABEL->m_TextProperties.get()); if (AT_LABEL) text = dynamic_cast<Text*> (AT_LABEL->m_TextProperties.get());
if (att_label) if (att_label)
......
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