summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-19 00:47:22 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-19 00:48:19 -0400
commit910c2888bcc87eb48f88b974cb822c5e98d91e64 (patch)
treeae7ce869854f6c5fda5b043fed7384756a30ff04
parent402fffa1b42e8b54704bab5442590d192dea67ca (diff)
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
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx20
-rw-r--r--sc/source/filter/oox/stylesbuffer.cxx15
2 files changed, 24 insertions, 11 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index ce1e9d59a286..45964fc1d7cd 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 ee0542e24ee7..842c168c992b 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;