Commit 1388b79d authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

RtfFormat правка бага обрамления страницы(docx->rtf)

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67610 954022d7-b5bf-4e40-9824-e11837661b57
parent f60981cb
......@@ -13,15 +13,36 @@ public:
OOXBorderReader(ComplexTypes::Word::CBorder * ooxBorder)
{
m_ooxBorder = ooxBorder;
m_ooxPageBorder = NULL;
}
OOXBorderReader(ComplexTypes::Word::CPageBorder * ooxBorder)
{
m_ooxPageBorder = ooxBorder;
m_ooxBorder = NULL;
}
bool Parse( ReaderParameter oParam, RtfBorder& oOutputBorder )
{
if (m_ooxBorder == NULL) return false;
if (m_ooxBorder == NULL && m_ooxPageBorder == NULL) return false;
if (m_ooxPageBorder)
{
if (m_ooxPageBorder->m_oColor.IsInit())
{
RtfColor oColor(m_ooxPageBorder->m_oColor->Get_R(), m_ooxPageBorder->m_oColor->Get_G(), m_ooxPageBorder->m_oColor->Get_B());
oOutputBorder.m_nColor = oParam.oRtf->m_oColorTable.AddItem( oColor );
}
if (m_ooxPageBorder->m_oSpace.IsInit())
{
oOutputBorder.m_nSpace = RtfUtility::pt2Twip(m_ooxPageBorder->m_oSpace->ToPoints());
}
if (m_ooxPageBorder->m_oSz.IsInit())
{
oOutputBorder.m_nWidth = RtfUtility::pt2Twip(m_ooxPageBorder->m_oSz->ToPoints());// = 5 * nSize / 2;//w:sz 1/8 twips (equivalent to 1/576th of an inch)
}
}
if (m_ooxBorder)
{
if (m_ooxBorder->m_oColor.IsInit())
{
RtfColor oColor(m_ooxBorder->m_oColor->Get_R(), m_ooxBorder->m_oColor->Get_G(), m_ooxBorder->m_oColor->Get_B());
......@@ -237,6 +258,7 @@ public:
//oOutputBorder.m_eType = RtfBorder::bt_brdrhair;
}
}
}
return true;
}
};
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