Commit a50fdbe6 authored by ElenaSubbotina's avatar ElenaSubbotina

.

parent 7d1a61e8
......@@ -260,10 +260,12 @@ public:
CString RenderToOOX(RenderParameter oRenderParameter)
{
CString sResult;
for( int i = (int)m_aArray.size() - 1; i >= 0; i-- )
for( int i = 0; i < (int)m_aArray.size(); i++ )
{
sResult = m_aArray[i]->RenderToOOX(oRenderParameter) + sResult;
sResult += m_aArray[i]->RenderToOOX(oRenderParameter);
}
return sResult;
}
bool IsValid()
......
......@@ -163,17 +163,10 @@ public:
}
else
{
CString ParagraphContent;// todooo проследить за вложенными объектами (inset fields) - св-ва секций
// нужно чтобы были в последнем параграфе!!! - так что и начнем с него - Australia Electronic Transactions Act 1999.rtf
RenderParameter oNewParam = oRenderParameter;
oNewParam.nType = RENDER_TO_OOX_PARAM_RUN;
for( int i = m_aArray.size() - 1; i >= 0; i-- )
{
ParagraphContent = m_aArray[i]->RenderToOOX(oNewParam) + ParagraphContent;
}
bool bCanConvertToNumbering = false;
if( NULL != m_oOldList )
bCanConvertToNumbering = m_oOldList->CanConvertToNumbering();
......@@ -217,7 +210,16 @@ public:
}
}
sResult += ParagraphContent;
oNewParam.nType = RENDER_TO_OOX_PARAM_RUN;
CString ParagraphContent;
for( int i = 0; i < m_aArray.size(); i++)
{
ParagraphContent += m_aArray[i]->RenderToOOX(oNewParam);
}
if (!ParagraphContent.IsEmpty())
sResult += ParagraphContent;
sResult += _T("</w:p>");
}
......
......@@ -237,8 +237,17 @@ bool OOXDocumentWriter::SaveByItem()
{
sXml = m_oDocument[0].props->operator[](0)->RenderToOOX(oNewParam).GetBuffer();
int nFind = sXml.rfind(L"</w:pPr>");
if( -1 != nFind )
int nFind = -1, nFindPict = -1, pos = sXml.size();
do
{
nFindPict = sXml.rfind(L"<w:pict>", pos);
nFind = sXml.rfind(L"</w:pPr>", pos);
pos = nFindPict - 1;
}while(nFindPict > 0 && nFind > nFindPict);
if( -1 != nFind)
{
sXml.insert( nFind, sectPr );
}
......
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