No reason to restrict values to sal_uInt16 instead of SwTwips (aka long) here
Change-Id: Iaeefae99f41926a6af83ae4cef60796d9f2b3980 Reviewed-on: https://gerrit.libreoffice.org/49110 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
@@ -1540,13 +1540,13 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth );
|
static void lcl_ResizeLine( const SwTableLine* pLine, SwTwips *pWidth );
|
||||||
|
|
||||||
static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth )
|
static void lcl_ResizeBox( const SwTableBox* pBox, SwTwips* pWidth )
|
||||||
{
|
{
|
||||||
if( !pBox->GetSttNd() )
|
if( !pBox->GetSttNd() )
|
||||||
{
|
{
|
||||||
sal_uInt16 nWidth = 0;
|
SwTwips nWidth = 0;
|
||||||
for( const SwTableLine *pLine : pBox->GetTabLines() )
|
for( const SwTableLine *pLine : pBox->GetTabLines() )
|
||||||
lcl_ResizeLine( pLine, &nWidth );
|
lcl_ResizeLine( pLine, &nWidth );
|
||||||
pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 ));
|
pBox->GetFrameFormat()->SetFormatAttr( SwFormatFrameSize( ATT_VAR_SIZE, nWidth, 0 ));
|
||||||
@@ -1554,13 +1554,13 @@ static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pWidth = *pWidth + static_cast<sal_uInt16>(pBox->GetFrameFormat()->GetFrameSize().GetSize().Width());
|
*pWidth = *pWidth + pBox->GetFrameFormat()->GetFrameSize().GetSize().Width();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth )
|
static void lcl_ResizeLine( const SwTableLine* pLine, SwTwips *pWidth )
|
||||||
{
|
{
|
||||||
sal_uInt16 nOldWidth = *pWidth;
|
SwTwips nOldWidth = *pWidth;
|
||||||
*pWidth = 0;
|
*pWidth = 0;
|
||||||
for( const SwTableBox* pBox : pLine->GetTabBoxes() )
|
for( const SwTableBox* pBox : pLine->GetTabBoxes() )
|
||||||
lcl_ResizeBox(pBox, pWidth );
|
lcl_ResizeBox(pBox, pWidth );
|
||||||
@@ -1632,7 +1632,7 @@ void SwHTMLTableLayout::SetWidths( bool bCallPass2, sal_uInt16 nAbsAvail,
|
|||||||
// filler cell's width instead.
|
// filler cell's width instead.
|
||||||
if( IsTopTable() )
|
if( IsTopTable() )
|
||||||
{
|
{
|
||||||
sal_uInt16 nCalcTabWidth = 0;
|
SwTwips nCalcTabWidth = 0;
|
||||||
for( const SwTableLine *pLine : m_pSwTable->GetTabLines() )
|
for( const SwTableLine *pLine : m_pSwTable->GetTabLines() )
|
||||||
lcl_ResizeLine( pLine, &nCalcTabWidth );
|
lcl_ResizeLine( pLine, &nCalcTabWidth );
|
||||||
SAL_WARN_IF( std::abs( m_nRelTabWidth-nCalcTabWidth ) >= COLFUZZY, "sw.core",
|
SAL_WARN_IF( std::abs( m_nRelTabWidth-nCalcTabWidth ) >= COLFUZZY, "sw.core",
|
||||||
|
Reference in New Issue
Block a user