diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-09 09:17:25 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-09 09:17:25 +0200 |
commit | 51030a1a5e06cd22de7676715ae65f37e6ad5548 (patch) | |
tree | 68f78d8a14ee52d43391e9ba56022b77c10cbad6 /vcl/quartz | |
parent | d5874376a7db53a4b0e8b3fabb902d14639032cc (diff) |
Handle all-space corner case
Change-Id: I07981a63a30ac3d610be03e736188a6539884f01
Diffstat (limited to 'vcl/quartz')
-rw-r--r-- | vcl/quartz/ctlayout.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 5c611500572f..7969991f11d2 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -175,7 +175,8 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs ) if(rArgs.mpDXArray) { int nFullPixelWidth = nPixelWidth; - nPixelWidth = rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1]; + nPixelWidth = mnTrailingSpaceCount == mnCharCount + ? 0 : rArgs.mpDXArray[ mnCharCount - mnTrailingSpaceCount - 1]; mfTrailingSpaceWidth = nFullPixelWidth - nPixelWidth; } else |