Commit 69d98238 authored by ElenaSubbotina's avatar ElenaSubbotina

x2t - fix users files

parent fb10c56b
......@@ -77,9 +77,14 @@ namespace DocFileFormat
{
//this PAPX is for a table
//cp = writeTable( cp, tai.iTap );
int start_table_cp = cp;
Table table( this, cp, ( ( tai.iTap > 0 ) ? ( 1 ) : ( 0 ) ) );
table.Convert( this );
cp = table.GetCPEnd();
if (cp == start_table_cp)
cp++;
}
else
{
......
......@@ -111,6 +111,8 @@ int Legend::serialize(std::wostream & _stream, int size)
dy = dy * size;
}
}
CP_XML_NODE(L"c:layout");
CP_XML_NODE(L"c:overlay") {CP_XML_ATTR(L"val", 0);}
}
else
{
......
......@@ -79,8 +79,8 @@ int Pos::serialize(std::wostream & _stream)
{
Frame* Frame_ = dynamic_cast<Frame*>(m_Frame.get());
bAutoPosition = !Frame_->fAutoPosition;
bAutoSize = !Frame_->fAutoSize;
bAutoPosition = Frame_->fAutoPosition;
bAutoSize = Frame_->fAutoSize;
}
double x = x1 / 4000.;
double y = y1 / 4000.;
......@@ -103,8 +103,8 @@ int Pos::serialize(std::wostream & _stream)
{
CP_XML_NODE(L"c:layoutTarget"){CP_XML_ATTR(L"val", m_iLayoutTarget == 1 ? L"outer" : L"inner");}
}
if (m_iLinkObject == 1 && mdTopLt == 2 && mdBotRt == 2)
x += 0.5 + (w > 0 ? w : 0);
//if (m_iLinkObject == 1 && mdTopLt == 2 && mdBotRt == 2 && x == 0)
// x += 0.5 - (w > 0 ? w / 2 : 0);
//if (m_iLinkObject == 2) x += 0.5 + (w > 0 ? w : 0);
//if (m_iLinkObject == 3) y += 0 + (h > 0 ? h : 0);
......
......@@ -47,7 +47,6 @@ public:
~Pos();
BaseObjectPtr clone();
void readFields(CFRecord& record);
......@@ -69,6 +68,7 @@ public:
int m_iLayoutTarget;
short m_iLinkObject;
BaseObjectPtr m_Frame;
};
......
......@@ -66,7 +66,10 @@ public:
BaseObjectPtr m_DataLabExtContents;
BaseObjectPtr m_TEXTPROPS;
short m_iLinkObject;
short m_iLinkObject;
bool m_bUsed;
};
} // namespace XLS
......
......@@ -57,7 +57,9 @@ namespace XLS
ATTACHEDLABEL::ATTACHEDLABEL()
{
m_iLinkObject = -1;
m_iLinkObject = -1;
m_bUsed = false;
}
......@@ -348,19 +350,26 @@ int ATTACHEDLABEL::serialize_rPr (std::wostream & _stream, int iFmt, bool rtl, b
color = font->icv;
color_ext = font->color_ext;
if ((text_props) && (!text_props->fAutoColor))
if (text_props)
{
if (text_props->icvText != 0xff)
if (text_props->fAutoColor)
{
font->icv = text_props->icvText; //biff8
font->color_ext.enabled = false;
font->icv = 0xff;
}
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);
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);
}
}
}
......
......@@ -262,12 +262,28 @@ int AXES::serialize(std::wostream & _stream, bool secondary)
}
CP_XML_NODE(node_ax_type)
{
if (i < m_arATTACHEDLABEL.size())
ATTACHEDLABEL *label = NULL;
for ( int h = 0 ; h < m_arATTACHEDLABEL.size(); h++)
{
ATTACHEDLABEL *l_= dynamic_cast<ATTACHEDLABEL *> (m_arATTACHEDLABEL[h].get() );
if (l_->m_iLinkObject == 2 && l_->m_bUsed == false && (dv || ser))
{
label = l_;
l_->m_bUsed = true;
break;
}
if (l_->m_iLinkObject == 3 && l_->m_bUsed == false && iv)
{
label = l_;
l_->m_bUsed = true;
break;
}
}
if (label)
{
CP_XML_NODE(L"c:title")
{
ATTACHEDLABEL *label = dynamic_cast<ATTACHEDLABEL *> (m_arATTACHEDLABEL[i].get() );
label->serialize(CP_XML_STREAM());
}
......
......@@ -198,7 +198,7 @@ int AXS::serialize(std::wostream & _stream)
axis_line_format->serialize(CP_XML_STREAM());
}
}
if (m_FontX)
if ((m_FontX) || ((tick) && (!tick->fAutoRot)))
{
CP_XML_NODE(L"c:txPr")
{
......
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