Commit b01b2acc authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

.. правка багов

parent 00395e41
......@@ -111,9 +111,11 @@ namespace DocFileFormat
{
if ( this->_isTableStyleNeeded )
{
wstring id = StyleSheetMapping::MakeStyleId( _styles->Styles->at( FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize ) ) );
int ind = FormatUtils::BytesToInt16( iter->Arguments, 0, iter->argumentsSize );
if( id != wstring( _T( "TableNormal" ) ) )
std::wstring id = ind < _styles->Styles->size() ? StyleSheetMapping::MakeStyleId( _styles->Styles->at( ind ) ) : L"";
if( id != std::wstring( _T( "TableNormal" )) && !id.empty() )
{
appendValueElement( _tblPr, _T( "tblStyle" ), id.c_str(), true );
}
......
......@@ -165,6 +165,7 @@ void oox_chart_series::oox_serialize_common(std::wostream & _Wostream)
int j=0;
BOOST_FOREACH(std::wstring & v, values_[i].numRef_.num_cache)
{
if (v == L"NaN") continue;
CP_XML_NODE(L"c:pt")
{
CP_XML_ATTR(L"idx", j++);
......
......@@ -1134,6 +1134,8 @@ namespace NSOfficeDrawing
fillShapeOriginX=410,
fillShapeOriginY=411,
fillShadeType=412,
fillColorExt=414,
fillBackColorExt=418,
fRecolorFillAsPicture=441,
fUseShapeAnchor=442,
fFilled=443,
......
......@@ -173,14 +173,14 @@ const bool AXES::loadContent(BinProcessor& proc)
if(proc.optional<PlotArea>())
{
//m_PlotArea = elements_.back();
elements_.pop_back(); //no data
proc.mandatory<FRAME>();
if (proc.mandatory<FRAME>())
{
m_PlotArea_FRAME = elements_.back();
elements_.pop_back();
}
}
return res;
}
......
......@@ -80,7 +80,7 @@ int FRAME::serialize(std::wostream & _stream)
AreaFormat * area = dynamic_cast<AreaFormat*>(m_AreaFormat.get());
LineFormat * line = dynamic_cast<LineFormat*>(m_LineFormat.get());
bool bArea = m_GELFRAME ? true : false;
bool bArea = (m_GELFRAME && (area) && (area->fAuto == false)) ? true : false;
if (!bArea && (area) && (area->fAuto == false)) bArea = true;
bool bLine = false;
......@@ -94,7 +94,7 @@ int FRAME::serialize(std::wostream & _stream)
{
if (bArea)
{
if (m_GELFRAME)
if (m_GELFRAME && area->fls > 1)
m_GELFRAME->serialize(CP_XML_STREAM());
else if (m_AreaFormat) m_AreaFormat->serialize(CP_XML_STREAM());
}
......
......@@ -666,32 +666,47 @@ int ChartSheetSubstream::serialize_plot_area (std::wostream & _stream)
AXISPARENT* parent0 = dynamic_cast<AXISPARENT*>(chart_formats->m_arAXISPARENT[0].get());
if (parent0 == NULL) return 0;
ShtProps *sht_props = dynamic_cast<ShtProps*>(chart_formats->m_ShtProps.get());
std::wstringstream stream_legend_entries;
CP_XML_WRITER(_stream)
{
CP_XML_NODE(L"c:plotArea")
{
FRAME *PlotAreaFRAME = NULL;
Pos *PlotAreaPos = NULL;
for (int i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
{
AXISPARENT* parent = dynamic_cast<AXISPARENT*> (chart_formats->m_arAXISPARENT[i].get());
AxisParent* ax_parent = dynamic_cast<AxisParent*> (parent->m_AxisParent.get());
AXES* axes = dynamic_cast<AXES*> (parent->m_AXES.get());
AxisParent* ax_parent = dynamic_cast<AxisParent*> (parent0->m_AxisParent.get());
AXES* axes = dynamic_cast<AXES*> (parent0->m_AXES.get());
if (((bool)ax_parent->iax == false) && axes) //primary axes
{
PlotAreaFRAME = dynamic_cast<FRAME*> (axes->m_PlotArea_FRAME.get());
PlotAreaPos = dynamic_cast<Pos*> (parent->m_Pos.get());
PlotAreaPos = dynamic_cast<Pos*> (parent0->m_Pos.get());
if (PlotAreaFRAME && PlotAreaPos)
{
PlotAreaPos->m_Frame = PlotAreaFRAME->m_Frame;
}
}
ShtProps *sht_props = dynamic_cast<ShtProps*>(chart_formats->m_ShtProps.get());
std::wstringstream stream_legend_entries;
CP_XML_WRITER(_stream)
{
CP_XML_NODE(L"c:plotArea")
{
for (int i = 0; i < chart_formats->m_arAXISPARENT.size(); i++)
{
AXISPARENT* parent = dynamic_cast<AXISPARENT*> (chart_formats->m_arAXISPARENT[i].get());
ax_parent = dynamic_cast<AxisParent*> (parent->m_AxisParent.get());
axes = dynamic_cast<AXES*> (parent->m_AXES.get());
//if (((bool)ax_parent->iax == false) && axes) //primary axes
//{
// PlotAreaFRAME = dynamic_cast<FRAME*> (axes->m_PlotArea_FRAME.get());
// PlotAreaPos = dynamic_cast<Pos*> (parent->m_Pos.get());
//
// if (PlotAreaFRAME && PlotAreaPos)
// {
// PlotAreaPos->m_Frame = PlotAreaFRAME->m_Frame;
// }
//}
}
if (PlotAreaPos && (sht_props) && (sht_props->fAlwaysAutoPlotArea != false))
......
......@@ -1072,6 +1072,7 @@ void XlsConverter::convert_fill_style(std::vector<ODRAW::OfficeArtFOPTEPtr> & pr
}
}break;
case NSOfficeDrawing::fillColor:
case NSOfficeDrawing::fillColorExt:
{
ODRAW::fillColor * fill = (ODRAW::fillColor *)(props[i].get());
ODRAW::OfficeArtCOLORREF color(fill->op);
......@@ -1095,6 +1096,7 @@ void XlsConverter::convert_fill_style(std::vector<ODRAW::OfficeArtFOPTEPtr> & pr
xlsx_context->get_drawing_context().set_fill_opacity(fixed_point->dVal);
}break;
case NSOfficeDrawing::fillBackColor:
case NSOfficeDrawing::fillBackColorExt:
{
ODRAW::fillColor * fill = (ODRAW::fillColor *)(props[i].get());
ODRAW::OfficeArtCOLORREF color(fill->op);
......@@ -1180,7 +1182,6 @@ void XlsConverter::convert_fill_style(std::vector<ODRAW::OfficeArtFOPTEPtr> & pr
xlsx_context->get_drawing_context().set_fill_type(0);
}
}break;
}
}
}
......
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