summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-02-02 19:11:37 +0100
committerEike Rathke <erack@redhat.com>2012-02-02 19:11:37 +0100
commit971f826a96f0938bfcfd8dfe26edd50d8e031bb4 (patch)
treecf2f8e9fa20aea8772da9b07a9e01bff7ca09572 /editeng
parentf439dde9be6e269903dfd65fb63a786fcaba3971 (diff)
resolved fdo#42784 BorderLine with only InnerWidth set does not work
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/items/borderline.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
index 8d073c6da93b..b617ff43a4dc 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -298,6 +298,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 );
}
}