Kaydet (Commit) 910c2888 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Enable import export test for dash-dot and dash-dot-dot line types.

And this already has revealed one bug in the xlsx import filter code!

Change-Id: Ib845a5492ec7b62b8528b31eac8cd1b285500184
üst 402fffa1
...@@ -1048,14 +1048,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) ...@@ -1048,14 +1048,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType )
sal_Int16 mnStyle; sal_Int16 mnStyle;
long mnWidth; long mnWidth;
} aChecks[] = { } aChecks[] = {
{ 1, table::BorderLineStyle::SOLID, 1L }, // hair { 1, table::BorderLineStyle::SOLID, 1L }, // hair
{ 3, table::BorderLineStyle::DOTTED, 15L }, // thin { 3, table::BorderLineStyle::DOTTED, 15L }, // dotted
{ 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed { 5, table::BorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot
{ 11, table::BorderLineStyle::SOLID, 15L }, // thin { 7, table::BorderLineStyle::DASH_DOT, 15L }, // dash dot
{ 19, table::BorderLineStyle::DASHED, 35L }, // medium dashed { 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed
{ 21, table::BorderLineStyle::SOLID, 35L }, // medium { 11, table::BorderLineStyle::SOLID, 15L }, // thin
{ 23, table::BorderLineStyle::SOLID, 50L }, // thick { 13, table::BorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot
{ 25, table::BorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width) { 17, table::BorderLineStyle::DASH_DOT, 35L }, // medium dash dot
{ 19, table::BorderLineStyle::DASHED, 35L }, // medium dashed
{ 21, table::BorderLineStyle::SOLID, 35L }, // medium
{ 23, table::BorderLineStyle::SOLID, 50L }, // thick
{ 25, table::BorderLineStyle::DOUBLE_THIN, -1L }, // double (don't check width)
}; };
for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i) for (size_t i = 0; i < SAL_N_ELEMENTS(aChecks); ++i)
......
...@@ -1747,14 +1747,23 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& ...@@ -1747,14 +1747,23 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel&
break; break;
case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break; case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break;
case XML_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break;
case XML_mediumDashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_mediumDashDot:
case XML_mediumDashDotDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM );
rBorderLine.LineStyle = table::BorderLineStyle::DASH_DOT;
break;
case XML_mediumDashDotDot:
lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM );
rBorderLine.LineStyle = table::BorderLineStyle::DASH_DOT_DOT;
break;
case XML_mediumDashed: case XML_mediumDashed:
lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM );
rBorderLine.LineStyle = table::BorderLineStyle::DASHED; rBorderLine.LineStyle = table::BorderLineStyle::DASHED;
break; break;
case XML_none: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); break; case XML_none: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); break;
case XML_slantDashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; case XML_slantDashDot:
lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM );
rBorderLine.LineStyle = table::BorderLineStyle::DASH_DOT;
break;
case XML_thick: lclSetBorderLineWidth( rBorderLine, API_LINE_THICK ); break; case XML_thick: lclSetBorderLineWidth( rBorderLine, API_LINE_THICK ); break;
case XML_thin: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); break; case XML_thin: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); break;
default: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); break; default: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); 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