sw: RTF import: fix signedness of cell counter variables
Change-Id: I20c94254eee8c612a6bcdd88c47e911aa66000f4 Signed-off-by: Michael Stahl <michael.stahl@collabora.com> Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/1382 Tested-by: Jenkins CPCI <releng@collaboraoffice.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 159c389eee4a1986403aa307b93c0c9f5f765534) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206296 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Xisco Fauli
parent
f775fb92c9
commit
68c0f96030
@@ -337,20 +337,20 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
|
||||
// Adjust total width, which is done in the \cellx handler for normal cells.
|
||||
m_TopLevelTableRow.nCurrentCellX += m_aStates.top().getTableRowWidthAfter();
|
||||
|
||||
int nCellCount = 0;
|
||||
size_t nCellCount{ 0 };
|
||||
for (Buf_t& i : m_aTableBufferStack.back())
|
||||
{
|
||||
if (RTFBufferTypes::CellEnd == std::get<0>(i))
|
||||
++nCellCount;
|
||||
}
|
||||
if (m_TopLevelTableRow.getCells() < o3tl::make_unsigned(nCellCount))
|
||||
if (m_TopLevelTableRow.getCells() < nCellCount)
|
||||
{
|
||||
m_TopLevelTableRow.cellSprms.push_back(m_aStates.top().getTableCellSprms());
|
||||
m_TopLevelTableRow.cellAttributes.push_back(
|
||||
m_aStates.top().getTableCellAttributes());
|
||||
}
|
||||
|
||||
if (m_TopLevelTableRow.getCells() >= o3tl::make_unsigned(nCellCount))
|
||||
if (m_TopLevelTableRow.getCells() >= nCellCount)
|
||||
{
|
||||
Id aBorderIds[]
|
||||
= { NS_ooxml::LN_CT_TcBorders_bottom, NS_ooxml::LN_CT_TcBorders_top,
|
||||
@@ -377,7 +377,7 @@ RTFError RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
|
||||
//Overwrite font size attribute on fill cells
|
||||
RTFValue::Pointer_t pFontSize;
|
||||
RTFValue::Pointer_t pFontSizeCs;
|
||||
int nCell = 1;
|
||||
size_t nCell{ 1 };
|
||||
for (Buf_t& rTableBufferElement : m_aTableBufferStack.back())
|
||||
{
|
||||
if (RTFBufferTypes::CellEnd == std::get<0>(rTableBufferElement))
|
||||
|
||||
@@ -879,6 +879,7 @@ private:
|
||||
|
||||
std::shared_ptr<oox::GraphicHelper> m_pGraphicHelper;
|
||||
|
||||
/// table row definition, store state of table cells, see <tbldef>/<celldef>
|
||||
struct TableRowDef
|
||||
{
|
||||
/// cell props
|
||||
|
||||
Reference in New Issue
Block a user