diff options
author | Eike Rathke <erack@redhat.com> | 2012-02-02 19:11:37 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-02-03 12:15:23 +0100 |
commit | 4b410ce0e8d70f57e341ca513118ec67f69dd25e (patch) | |
tree | 630a1ba73214f29135e4fc9575ef00cf2544a3b5 | |
parent | ed41167d5ffae11efdd9cb43b2d88a8147e6d13f (diff) |
resolved fdo#42784 BorderLine with only InnerWidth set does not work
(cherry picked from commit 971f826a96f0938bfcfd8dfe26edd50d8e031bb4)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | editeng/source/items/borderline.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 88adf29e0a..b6f8e471ac 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -302,6 +302,22 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa else { SetStyle( nStyle ); + if (nOut == 0 && nIn > 0) + { + // If only inner width is given swap inner and outer widths for + // single line styles, otherwise GuessWidth() marks this as invalid + // and returns a 0 width. + switch (nStyle) + { + case SOLID: + case DOTTED: + case DASHED: + ::std::swap( nOut, nIn); + break; + default: + ; // nothing + } + } m_nWidth = m_aWidthImpl.GuessWidth( nOut, nIn, nDist ); } } |