mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-04-07 13:55:33 +08:00
fix bug #59365
This commit is contained in:
@ -153,12 +153,20 @@ namespace DocFileFormat
|
|||||||
|
|
||||||
if ((m_document->Text) && (cpParaEnd < (int)m_document->Text->size()))
|
if ((m_document->Text) && (cpParaEnd < (int)m_document->Text->size()))
|
||||||
{
|
{
|
||||||
while ( ( m_document->Text->at( cpParaEnd ) != TextMark::ParagraphEnd ) &&
|
while (true)
|
||||||
( m_document->Text->at( cpParaEnd ) != TextMark::CellOrRowMark ) &&
|
|
||||||
!(( m_document->Text->at( cpParaEnd ) == TextMark::PageBreakOrSectionMark )&&
|
|
||||||
isSectionEnd( cpParaEnd ) ) )
|
|
||||||
{
|
{
|
||||||
if (cpParaEnd >= (int)m_document->Text->size()-1) break;
|
if (m_document->m_mapBadCP.end() != m_document->m_mapBadCP.find(cpParaEnd))
|
||||||
|
{
|
||||||
|
cpParaEnd++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if ((m_document->Text->at(cpParaEnd) == TextMark::ParagraphEnd) ||
|
||||||
|
(m_document->Text->at(cpParaEnd) == TextMark::CellOrRowMark) ||
|
||||||
|
((m_document->Text->at(cpParaEnd) == TextMark::PageBreakOrSectionMark) &&
|
||||||
|
isSectionEnd(cpParaEnd)))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (cpParaEnd >= (int)m_document->Text->size()-1) break;
|
||||||
cpParaEnd++;
|
cpParaEnd++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -215,7 +215,6 @@ namespace DocFileFormat
|
|||||||
ParagraphPropertyExceptions* papxBackup = documentMapping->_lastValidPapx;
|
ParagraphPropertyExceptions* papxBackup = documentMapping->_lastValidPapx;
|
||||||
SectionPropertyExceptions* sepxBackup = documentMapping->_lastValidSepx;
|
SectionPropertyExceptions* sepxBackup = documentMapping->_lastValidSepx;
|
||||||
|
|
||||||
//start w:tr
|
|
||||||
documentMapping->GetXMLWriter()->WriteNodeBegin( L"w:tr" );
|
documentMapping->GetXMLWriter()->WriteNodeBegin( L"w:tr" );
|
||||||
|
|
||||||
//convert the properties
|
//convert the properties
|
||||||
@ -248,7 +247,6 @@ namespace DocFileFormat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//end w:tr
|
|
||||||
documentMapping->GetXMLWriter()->WriteNodeEnd( L"w:tr" );
|
documentMapping->GetXMLWriter()->WriteNodeEnd( L"w:tr" );
|
||||||
|
|
||||||
RELEASEOBJECT( chpxs );
|
RELEASEOBJECT( chpxs );
|
||||||
@ -450,8 +448,8 @@ namespace DocFileFormat
|
|||||||
{
|
{
|
||||||
if (bBad)
|
if (bBad)
|
||||||
{
|
{
|
||||||
|
documentMapping->m_document->m_mapBadCP.insert(std::make_pair(_cp, (char)1));
|
||||||
tableCell.AddItem(DocParagraph(documentMapping, paragraphBeginCP, _cp));
|
tableCell.AddItem(DocParagraph(documentMapping, paragraphBeginCP, _cp));
|
||||||
_cp++;
|
|
||||||
paragraphBeginCP = (_cp + 1);
|
paragraphBeginCP = (_cp + 1);
|
||||||
|
|
||||||
bBadMarker = bBad;
|
bBadMarker = bBad;
|
||||||
@ -463,11 +461,11 @@ namespace DocFileFormat
|
|||||||
tableCell.SetDepth(_depth);
|
tableCell.SetDepth(_depth);
|
||||||
|
|
||||||
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
||||||
//if (bBadMarker && !tableCell.IsEmpty())
|
if (bBadMarker && !tableCell.IsEmpty())
|
||||||
//{
|
{
|
||||||
// tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
||||||
//}
|
}
|
||||||
//else
|
else
|
||||||
tableCell.AddItem(para);
|
tableCell.AddItem(para);
|
||||||
|
|
||||||
bBadMarker = false;
|
bBadMarker = false;
|
||||||
@ -485,11 +483,11 @@ namespace DocFileFormat
|
|||||||
tableCell.SetDepth(_depth);
|
tableCell.SetDepth(_depth);
|
||||||
|
|
||||||
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
||||||
//if (bBadMarker && !tableCell.IsEmpty())
|
if (bBadMarker && !tableCell.IsEmpty())
|
||||||
//{
|
{
|
||||||
// tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
||||||
//}
|
}
|
||||||
//else
|
else
|
||||||
tableCell.AddItem(para);
|
tableCell.AddItem(para);
|
||||||
|
|
||||||
bBadMarker = false;
|
bBadMarker = false;
|
||||||
@ -507,11 +505,11 @@ namespace DocFileFormat
|
|||||||
else if ( IsParagraphMarker( _cp ) )
|
else if ( IsParagraphMarker( _cp ) )
|
||||||
{
|
{
|
||||||
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
DocParagraph para(documentMapping, paragraphBeginCP, _cp);
|
||||||
//if (bBadMarker && !tableCell.IsEmpty())
|
if (bBadMarker && !tableCell.IsEmpty())
|
||||||
//{
|
{
|
||||||
// tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
tableCell.GetLast()->AddCP(paragraphBeginCP, _cp);
|
||||||
//}
|
}
|
||||||
//else
|
else
|
||||||
tableCell.AddItem(para);
|
tableCell.AddItem(para);
|
||||||
|
|
||||||
paragraphBeginCP = ( _cp + 1 );
|
paragraphBeginCP = ( _cp + 1 );
|
||||||
|
|||||||
@ -171,6 +171,8 @@ namespace DocFileFormat
|
|||||||
|
|
||||||
std::map<int, int> PictureBulletsCPsMap;
|
std::map<int, int> PictureBulletsCPsMap;
|
||||||
|
|
||||||
|
std::map<int, char> m_mapBadCP;
|
||||||
|
|
||||||
struct _bmkStartEnd
|
struct _bmkStartEnd
|
||||||
{
|
{
|
||||||
int start;
|
int start;
|
||||||
|
|||||||
Reference in New Issue
Block a user