Kaydet (Commit) b9505d6b authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#122120 left align text if preview won't fit

in the number format page

Change-Id: Ic398e5302ee54dfd437e07fdf892269e6eefd8fa
Reviewed-on: https://gerrit.libreoffice.org/65284
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 0a9917b7
......@@ -168,8 +168,17 @@ void SvxNumberPreview::Paint(vcl::RenderContext& rRenderContext, const ::tools::
aTmpStr = aTmpStr.replaceAt(mnPos, 0, OUString(mnChar));
}
}
Point aPosText = Point((mnPos != -1) ? 0 : nLeadSpace,
(aSzWnd.Height() - GetTextHeight()) / 2);
long nX;
if (mnPos != -1)
nX = 0;
else
{
//tdf#122120 if it won't fit anyway, then left align it
if (nLeadSpace > 0)
nX = nLeadSpace;
nX = 0;
}
Point aPosText = Point(nX, (aSzWnd.Height() - GetTextHeight()) / 2);
rRenderContext.DrawText(aPosText, aTmpStr);
rRenderContext.Pop();
}
......
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