Kaydet (Commit) fe3dff30 authored tarafından Luke Deller's avatar Luke Deller Kaydeden (comit) Caolán McNamara

.doc support for recently-added border line types

Some new border line types have been added recently to LibreOffice
(FINE_DASHED, DASH_DOT, DASH_DOT_DOT)

This change updates .doc import/export to support these.
(Import of FINE_DASHED was already working, but not export).

Change-Id: Id3bcb1d4e6e9ceb97b492f0c578fd5b885ab16ff
Reviewed-on: https://gerrit.libreoffice.org/8780Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2498e472
...@@ -119,8 +119,6 @@ ConvertBorderStyleFromWord(int const nWordLineStyle) ...@@ -119,8 +119,6 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
case 2: // thick line case 2: // thick line
case 5: // hairline case 5: // hairline
// and the unsupported special cases which we map to a single line // and the unsupported special cases which we map to a single line
case 8:
case 9:
case 20: case 20:
return SOLID; return SOLID;
case 6: case 6:
...@@ -129,6 +127,10 @@ ConvertBorderStyleFromWord(int const nWordLineStyle) ...@@ -129,6 +127,10 @@ ConvertBorderStyleFromWord(int const nWordLineStyle)
return DASHED; return DASHED;
case 22: case 22:
return FINE_DASHED; return FINE_DASHED;
case 8:
return DASH_DOT;
case 9:
return DASH_DOT_DOT;
// then the shading beams which we represent by a double line // then the shading beams which we represent by a double line
case 23: case 23:
return DOUBLE; return DOUBLE;
...@@ -199,6 +201,8 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth, ...@@ -199,6 +201,8 @@ ConvertBorderWidthFromWord(SvxBorderStyle const eStyle, double const i_fWidth,
case DOTTED: case DOTTED:
case DASHED: case DASHED:
case DASH_DOT:
case DASH_DOT_DOT:
return fWidth; return fWidth;
// Display a minimum effective border width of 1pt // Display a minimum effective border width of 1pt
...@@ -249,6 +253,8 @@ ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth) ...@@ -249,6 +253,8 @@ ConvertBorderWidthToWord(SvxBorderStyle const eStyle, double const fWidth)
case DOTTED: case DOTTED:
case DASHED: case DASHED:
case FINE_DASHED: case FINE_DASHED:
case DASH_DOT:
case DASH_DOT_DOT:
return fWidth; return fWidth;
// Double lines // Double lines
......
...@@ -4266,6 +4266,15 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine, ...@@ -4266,6 +4266,15 @@ WW8_BRCVer9 WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
case table::BorderLineStyle::INSET: case table::BorderLineStyle::INSET:
brcType = 27; brcType = 27;
break; break;
case table::BorderLineStyle::FINE_DASHED:
brcType = 22;
break;
case table::BorderLineStyle::DASH_DOT:
brcType = 8;
break;
case table::BorderLineStyle::DASH_DOT_DOT:
brcType = 9;
break;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment