RTF_CELL should alter the cell definition list outside its current group
This commit is contained in:
parent
61f9a54b21
commit
37da7aa99a
2 changed files with 14 additions and 1 deletions
|
@ -677,6 +677,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
|
|||
Mapper().props(pTableCellProperties);
|
||||
m_aStates.top().aTableCellsAttributes.pop_front();
|
||||
m_aStates.top().aTableCellsSprms.pop_front();
|
||||
m_aStates.top().nTableCellPops++;
|
||||
}
|
||||
|
||||
if (nKeyword == RTF_CELL)
|
||||
|
@ -1660,6 +1661,7 @@ int RTFDocumentImpl::popState()
|
|||
std::vector<std::pair<rtl::OUString, rtl::OUString>> aShapeProperties;
|
||||
bool bPopShapeProperties = false;
|
||||
bool bPicPropEnd = false;
|
||||
int nTableCellPops = 0;
|
||||
|
||||
if (m_aStates.top().nDestinationState == DESTINATION_FONTTABLE)
|
||||
{
|
||||
|
@ -1773,6 +1775,7 @@ int RTFDocumentImpl::popState()
|
|||
}
|
||||
if (m_aStates.top().nDestinationState == DESTINATION_NESTEDTABLEPROPERTIES)
|
||||
m_aBuffer.clear();
|
||||
nTableCellPops = m_aStates.top().nTableCellPops;
|
||||
|
||||
m_aStates.pop();
|
||||
|
||||
|
@ -1811,6 +1814,13 @@ int RTFDocumentImpl::popState()
|
|||
m_aStates.top().aShapeProperties = aShapeProperties;
|
||||
else if (bPicPropEnd)
|
||||
resolveShapeProperties(aShapeProperties);
|
||||
for (int i = 0; i < nTableCellPops; ++i)
|
||||
{
|
||||
if (m_aStates.top().aTableCellsAttributes.size())
|
||||
m_aStates.top().aTableCellsAttributes.pop_front();
|
||||
if (m_aStates.top().aTableCellsSprms.size())
|
||||
m_aStates.top().aTableCellsSprms.pop_front();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1979,7 +1989,8 @@ RTFParserState::RTFParserState()
|
|||
aShapeProperties(),
|
||||
nCellX(0),
|
||||
aTableCellsSprms(),
|
||||
aTableCellsAttributes()
|
||||
aTableCellsAttributes(),
|
||||
nTableCellPops(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -151,6 +151,8 @@ namespace writerfilter {
|
|||
int nCellX;
|
||||
std::deque<RTFSprms::Pointer_t> aTableCellsSprms;
|
||||
std::deque<RTFSprms::Pointer_t> aTableCellsAttributes;
|
||||
/// Number of cell definitions which should be popped after leaving the current group.
|
||||
int nTableCellPops;
|
||||
};
|
||||
|
||||
/// Implementation of the RTFDocument interface.
|
||||
|
|
Loading…
Reference in a new issue