diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-03 17:58:11 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-04 22:02:37 -0500 |
commit | 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc (patch) | |
tree | 1311156cb36884d0dde2b022467d7d0de6d799df /sc | |
parent | fb052ae6174e4c96157ef6973f02c1d3cd4d9ba2 (diff) |
fdo#75260: Correctly draw double lines for both Writer and Calc.
Fix all sorts of incorrect double line handling in drawinglayer in order to
draw thick-thin double line types correctly. Also change handling of border
lines in writer tables. There are still some outstanding issues but it's
much better than how it was before.
Also realized that Word and Excel handle simple thin double lines differently;
Word varies widths of all of the lines and the gap whereas Excel only has one
fixed size for its double line. For this reason I decided to add a separate
double line type (DOUBLE_THIN) to handle Excel's double line.
Change-Id: Iaaa353b6e4f998b524262bea59260b4333e0cdb4
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/excel/xistyle.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/html/htmlexp.cxx | 1 | ||||
-rw-r--r-- | sc/source/filter/lotus/lotattr.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/oox/stylesbuffer.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/view/tabvwsha.cxx | 2 |
6 files changed, 8 insertions, 7 deletions
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx index 3a669ba6bafb..f2f653b76a18 100644 --- a/sc/qa/unit/subsequent_export-test.cxx +++ b/sc/qa/unit/subsequent_export-test.cxx @@ -1015,7 +1015,7 @@ const char* toBorderName( sal_Int16 eStyle ) case table::BorderLineStyle::SOLID: return "SOLID"; case table::BorderLineStyle::DOTTED: return "DOTTED"; case table::BorderLineStyle::DASHED: return "DASHED"; - case table::BorderLineStyle::DOUBLE: return "DOUBLE"; + case table::BorderLineStyle::DOUBLE_THIN: return "DOUBLE_THIN"; case table::BorderLineStyle::FINE_DASHED: return "FINE_DASHED"; default: ; @@ -1046,7 +1046,7 @@ void ScExportTest::testExcelCellBorders( sal_uLong nFormatType ) { 19, table::BorderLineStyle::DASHED, 35L }, // medium dashed { 21, table::BorderLineStyle::SOLID, 35L }, // medium { 23, table::BorderLineStyle::SOLID, 50L }, // thick - { 25, table::BorderLineStyle::DOUBLE, -1L }, // double (don't check width) + { 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/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 5b2d03ccaa33..f1cae7f5b90d 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -903,7 +903,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette& { EXC_BORDER_THIN, table::BorderLineStyle::FINE_DASHED }, // 3 = dashed { EXC_BORDER_THIN, table::BorderLineStyle::DOTTED }, // 4 = dotted { EXC_BORDER_THICK, table::BorderLineStyle::SOLID }, // 5 = thick - { EXC_BORDER_THIN, table::BorderLineStyle::DOUBLE }, // 6 = double + { EXC_BORDER_THICK, table::BorderLineStyle::DOUBLE_THIN }, // 6 = double { EXC_BORDER_HAIR, table::BorderLineStyle::SOLID }, // 7 = hair { EXC_BORDER_MEDIUM, table::BorderLineStyle::DASHED }, // 8 = med dash { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 269f924096fc..00e160d40144 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -513,6 +513,7 @@ OString ScHTMLExport::BorderToStyle(const char* pBorderName, aOut.append("dashed"); break; case table::BorderLineStyle::DOUBLE: + case table::BorderLineStyle::DOUBLE_THIN: case table::BorderLineStyle::THINTHICK_SMALLGAP: case table::BorderLineStyle::THINTHICK_MEDIUMGAP: case table::BorderLineStyle::THINTHICK_LARGEGAP: diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index bc17dff927d5..cdc804aa613c 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -169,7 +169,7 @@ void LotAttrCache::LotusToScBorderLine( sal_uInt8 nLine, ::editeng::SvxBorderLin case 2: aBL.SetWidth( DEF_LINE_WIDTH_2 ); break; case 3: { - aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE); + aBL.SetBorderLineStyle(table::BorderLineStyle::DOUBLE_THIN); aBL.SetWidth( DEF_LINE_WIDTH_1 ); } break; diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index 5b8447ffacd4..dfa5570afa2b 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1736,8 +1736,8 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& rBorderLine.LineStyle = table::BorderLineStyle::DOTTED; break; case XML_double: - lclSetBorderLineWidth( rBorderLine, 5 ,5, 5 ); - rBorderLine.LineStyle = table::BorderLineStyle::DOUBLE; + lclSetBorderLineWidth( rBorderLine, 10, 30, 10 ); + rBorderLine.LineStyle = table::BorderLineStyle::DOUBLE_THIN; break; case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break; case XML_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break; diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index 7bd88aca8b14..7dae366edba2 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -490,7 +490,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName aBorderStyles.push_back(table::BorderLineStyle::DOTTED); aBorderStyles.push_back(table::BorderLineStyle::DASHED); aBorderStyles.push_back(table::BorderLineStyle::FINE_DASHED); - aBorderStyles.push_back(table::BorderLineStyle::DOUBLE); + aBorderStyles.push_back(table::BorderLineStyle::DOUBLE_THIN); SfxIntegerListItem aBorderStylesItem(SID_ATTR_BORDER_STYLES, aBorderStyles); pOldSet->Put(aBorderStylesItem); |