sc/qa/unit/subsequent_export-test.cxx | 20 ++++++++++++-------- sc/source/filter/oox/stylesbuffer.cxx | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 11 deletions(-)
New commits: commit 910c2888bcc87eb48f88b974cb822c5e98d91e64 Author: Kohei Yoshida <kohei.yosh...@collabora.com> Date: Wed Mar 19 00:47:22 2014 -0400 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 diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index ce1e9d5..45964fc 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -1048,14 +1048,18 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) sal_Int16 mnStyle; long mnWidth; } aChecks[] = { - { 1, table::BorderLineStyle::SOLID, 1L }, // hair - { 3, table::BorderLineStyle::DOTTED, 15L }, // thin - { 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed - { 11, table::BorderLineStyle::SOLID, 15L }, // thin - { 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) + { 1, table::BorderLineStyle::SOLID, 1L }, // hair + { 3, table::BorderLineStyle::DOTTED, 15L }, // dotted + { 5, table::BorderLineStyle::DASH_DOT_DOT, 15L }, // dash dot dot + { 7, table::BorderLineStyle::DASH_DOT, 15L }, // dash dot + { 9, table::BorderLineStyle::FINE_DASHED, 15L }, // dashed + { 11, table::BorderLineStyle::SOLID, 15L }, // thin + { 13, table::BorderLineStyle::DASH_DOT_DOT, 35L }, // medium dash dot dot + { 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) diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index ee0542e..842c168 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1747,14 +1747,23 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& break; case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break; case XML_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; - case XML_mediumDashDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; - case XML_mediumDashDotDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; + case XML_mediumDashDot: + 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: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); rBorderLine.LineStyle = table::BorderLineStyle::DASHED; 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_thin: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN ); break; default: lclSetBorderLineWidth( rBorderLine, API_LINE_NONE ); break; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits