| commit | 1ccf361e78eb0acd7ff682bf6c74ec8471abc0d4 | [log] |
|---|---|---|
| author | Muhammet Kara <muhammet.kara@collabora.com> | Sun Jun 09 22:17:32 2019 +0300 |
| committer | Caolán McNamara <caolanm@redhat.com> | Mon Jun 10 09:57:44 2019 +0200 |
| tree | e0752d576f2cdc0d9f4bd6b6c5e944846f4da13e | |
| parent | dbb046db3ec1523b2c1ba6c5446b05a77bebfeb4 [diff] |
Fix logic error and simplify. Related: tdf#122120 To bring back centering of the preview on the Format Cells dialog. Change-Id: I2bf1e1dc5cb722c742713d3b245d2b6714976527 Reviewed-on: https://gerrit.libreoffice.org/73740 Tested-by: Jenkins Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com> (cherry picked from commit 0d35f8f673ac4e6aa3f1e5f1edc0c6c7a45d2f95) Reviewed-on: https://gerrit.libreoffice.org/73741 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 6f2b605..282a504 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx
@@ -167,16 +167,13 @@ aTmpStr = aTmpStr.replaceAt(mnPos, 0, OUString(mnChar)); } } long nX; if (mnPos != -1) nX = 0; else long nX = 0; if (mnPos == -1 && nLeadSpace > 0) //tdf#122120 if it won't fit anyway, then left align it { //tdf#122120 if it won't fit anyway, then left align it if (nLeadSpace > 0) nX = nLeadSpace; nX = 0; nX = nLeadSpace; } Point aPosText = Point(nX, (aSzWnd.Height() - GetTextHeight()) / 2); rRenderContext.DrawText(aPosText, aTmpStr); rRenderContext.Pop();