summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-02-02 19:11:37 +0100
committerMichael Stahl <mstahl@redhat.com>2012-02-03 12:06:00 +0100
commite44b64d297293b83459fddda968923750e2f6a5b (patch)
tree8d87edcce9b6b8a2b91bf4c6b27fb40769075be0 /editeng
parent8a0b87ff6b4a7383c9a5b2ca6f5f435c66942b24 (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>
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 61ceccead0cc..d15f53c7d43d 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -300,6 +300,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 );
}
}