include/oox/helper/helper.hxx | 1 + sc/source/filter/excel/xestyle.cxx | 5 +++-- sc/source/filter/excel/xistyle.cxx | 2 +- sc/source/filter/inc/xlconst.hxx | 6 +++--- sc/source/filter/oox/stylesbuffer.cxx | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-)
New commits: commit 1680a8cd4f4393ec15c4f85cb63b6654117d56d1 Author: Noel Power <noel.po...@suse.com> Date: Mon Jun 24 21:04:51 2013 +0100 fix hair & fine cell border export ( followon fix fdo#56960 ) 1) align excel binary and oox import filter border thickness values 2) use new fine-dash border style 3) detect & determine hair vrs fine borderline on export Change-Id: Ieb024bc6f4bfc87c525082c7b9a1f3c444f5c5ca diff --git a/include/oox/helper/helper.hxx b/include/oox/helper/helper.hxx index 4f8e738..1b85ac3 100644 --- a/include/oox/helper/helper.hxx +++ b/include/oox/helper/helper.hxx @@ -88,6 +88,7 @@ const sal_Int32 API_RGB_WHITE = 0xFFFFFF; ///< White color for AP const sal_Int16 API_LINE_SOLID = 0; const sal_Int16 API_LINE_DOTTED = 1; const sal_Int16 API_LINE_DASHED = 2; +const sal_Int16 API_FINE_LINE_DASHED = 14; const sal_Int16 API_LINE_NONE = 0; const sal_Int16 API_LINE_HAIR = 2; diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 0623ae5..c3ab137 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1575,12 +1575,13 @@ void lclGetBorderLine( case table::BorderLineStyle::DOTTED: rnXclLine = EXC_LINE_DOTTED; break; + case table::BorderLineStyle::FINE_DASHED: + rnXclLine = EXC_LINE_HAIR; + break; default: break; } } - else if( nOuterWidth >= EXC_BORDER_HAIR ) - rnXclLine = EXC_LINE_HAIR; else rnXclLine = EXC_LINE_NONE; } diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index 8158652..a22ef9b 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -904,7 +904,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette& { 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_HAIR, table::BorderLineStyle::SOLID }, // 7 = hair + { EXC_BORDER_HAIR, table::BorderLineStyle::FINE_DASHED }, // 7 = hair { EXC_BORDER_MEDIUM, table::BorderLineStyle::DASHED }, // 8 = med dash { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // A = med dashdot diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx index f8ccaec..fc7a662 100644 --- a/sc/source/filter/inc/xlconst.hxx +++ b/sc/source/filter/inc/xlconst.hxx @@ -254,9 +254,9 @@ const sal_uInt16 EXC_FUTUREREC_ALERT = 0x0002; // TODO: These values are approximate; we should probably tweak these values // further to better match Excel's border thickness. -const sal_uInt16 EXC_BORDER_THICK = 16; -const sal_uInt16 EXC_BORDER_MEDIUM = 12; -const sal_uInt16 EXC_BORDER_THIN = 4; +const sal_uInt16 EXC_BORDER_THICK = 30; +const sal_uInt16 EXC_BORDER_MEDIUM = 20; +const sal_uInt16 EXC_BORDER_THIN = 1; const sal_uInt16 EXC_BORDER_HAIR = 1; // ============================================================================ diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx index e06f075..e34080e 100644 --- a/sc/source/filter/oox/stylesbuffer.cxx +++ b/sc/source/filter/oox/stylesbuffer.cxx @@ -1834,7 +1834,7 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& break; } case XML_double: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN, API_LINE_THIN, API_LINE_THIN ); break; - case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); break; + case XML_hair: lclSetBorderLineWidth( rBorderLine, API_LINE_HAIR ); rBorderLine.LineStyle = API_FINE_LINE_DASHED; 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits