diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-10-09 17:56:21 +0200 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2012-10-10 10:43:15 +0000 |
commit | b747a8f75f97f6e83297073e61acd95c7a9cc3d6 (patch) | |
tree | 4e04ce2af000602dbf25c22060052383a39e1465 /editeng | |
parent | 6dd3e7afecd703e8f1435a63e7dad37a4f07b800 (diff) |
fdo#55526: fix import of RTF \brdrhair:
This is a hairline border that should be mapped to a non-zero width
border given that LO doesn't have hairline borders as such.
Change-Id: I4a2d2f983ac8e016b2ddb6b38435f5562e545c72
(cherry picked from commit 59ab112fe93cbf4e2b052f4e8bafbdb4e6738bef)
Reviewed-on: https://gerrit.libreoffice.org/847
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/borderline.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 8a09ba729e4d..6fdefe2f8e47 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -129,7 +129,7 @@ ConvertBorderStyleFromWord(int const nWordLineStyle) // First the single lines case 1: case 2: // thick line - case 5: + case 5: // hairline // and the unsupported special cases which we map to a single line case 8: case 9: @@ -211,9 +211,23 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const fWidth, { // Single lines case SOLID: + switch (nWordLineStyle) + { + case 2: + return (fWidth * 2.0); // thick + break; + case 5: // fdo#55526: map 0 hairline width to > 0 + return (fWidth > 1.0) ? fWidth : 1.0; + break; + default: + return fWidth; + break; + } + break; + case DOTTED: case DASHED: - return (2 == nWordLineStyle) ? (fWidth * 2.0) : fWidth; + return fWidth; break; // Double lines |