diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-03 17:58:11 -0500 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-03-07 08:37:49 +0200 |
commit | 9ec1c955533c8506d996e95fa312e3463898dd09 (patch) | |
tree | 0541d1ad0e1b4c006c37b53d130d8b3e7f0101b1 /editeng | |
parent | 46df72612da749dc6d58bad0f33c0f9e82d389b3 (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.
(cherry picked from commit 2c62596cf264ef10749d8bfdb2bb2ebef2d98fbc)
Conflicts:
cui/source/tabpages/border.cxx
sc/qa/unit/subsequent_export-test.cxx
sc/source/ui/view/tabvwsha.cxx
sw/source/core/layout/paintfrm.cxx
xmloff/source/style/bordrhdl.cxx
Change-Id: Iaaa353b6e4f998b524262bea59260b4333e0cdb4
Reviewed-on: https://gerrit.libreoffice.org/8464
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/borderline.cxx | 5 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index e80685e33ae7..b393420e66be 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -316,6 +316,10 @@ BorderWidthImpl SvxBorderLine::getWidthImpl( SvxBorderStyle nStyle ) 1.0/3.0, 1.0/3.0, 1.0/3.0 ); break; + case DOUBLE_THIN: + aImpl = BorderWidthImpl(CHANGE_DIST, 10.0, 10.0, 1.0); + break; + case THINTHICK_SMALLGAP: aImpl = BorderWidthImpl( CHANGE_LINE1, 1.0, THINTHICK_SMALLGAP_line2, THINTHICK_SMALLGAP_gap ); @@ -429,6 +433,7 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa static const SvxBorderStyle aDoubleStyles[] = { DOUBLE, + DOUBLE_THIN, THINTHICK_SMALLGAP, THINTHICK_MEDIUMGAP, THINTHICK_LARGEGAP, diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 020488cb9846..dff98c6880ae 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -1802,7 +1802,7 @@ SvxBoxItem::LineToSvxLine(const ::com::sun::star::table::BorderLine2& rLine, Svx rSvxLine.SetWidth( bConvert? MM100_TO_TWIP_UNSIGNED( rLine.LineWidth ) : rLine.LineWidth ); // fdo#46112: double does not necessarily mean symmetric // for backwards compatibility - bGuessWidth = (DOUBLE == nStyle) && + bGuessWidth = ((DOUBLE == nStyle || DOUBLE_THIN == nStyle)) && (rLine.InnerLineWidth > 0) && (rLine.OuterLineWidth > 0); } |