An error occurred while fetching merge requests data.
Kaydet (Commit) 604cf702 authored tarafından Justin Luth's avatar Justin Luth

tdf#81263 ww8par6: only use valid sal_uInt16 values for ULSpace

VerticalOrient position returns a signed SwTwips number,
but ULSpace uses unsigned int16, so negative numbers
were creating huge margins.

fixes commit 3755c87d

Change-Id: I23daea9a913ef73efc42a65e0adfc393eaf4e775
Reviewed-on: https://gerrit.libreoffice.org/32400Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJustin Luth <justin_luth@sil.org>
üst 79995e83
......@@ -2355,8 +2355,9 @@ bool SwWW8ImplReader::StartApo(const ApoTestResults &rApo,
if (aFlySet.HasItem(RES_VERT_ORIENT, &pItem))
{
const SwFormatVertOrient* pOrient = static_cast<const SwFormatVertOrient*>(pItem);
if (pOrient->GetPos() != 0)
pULSpaceItem->SetUpper(pOrient->GetPos());
SwTwips nPos = pOrient->GetPos();
if( 0 < nPos && nPos <= SAL_MAX_UINT16 )
pULSpaceItem->SetUpper( sal_uInt16(nPos) );
}
}
}
......
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