Kaydet (Commit) 1680a8cd authored tarafından Noel Power's avatar Noel Power

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
üst 3d4603e6
...@@ -88,6 +88,7 @@ const sal_Int32 API_RGB_WHITE = 0xFFFFFF; ///< White color for AP ...@@ -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_SOLID = 0;
const sal_Int16 API_LINE_DOTTED = 1; const sal_Int16 API_LINE_DOTTED = 1;
const sal_Int16 API_LINE_DASHED = 2; 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_NONE = 0;
const sal_Int16 API_LINE_HAIR = 2; const sal_Int16 API_LINE_HAIR = 2;
......
...@@ -1575,12 +1575,13 @@ void lclGetBorderLine( ...@@ -1575,12 +1575,13 @@ void lclGetBorderLine(
case table::BorderLineStyle::DOTTED: case table::BorderLineStyle::DOTTED:
rnXclLine = EXC_LINE_DOTTED; rnXclLine = EXC_LINE_DOTTED;
break; break;
case table::BorderLineStyle::FINE_DASHED:
rnXclLine = EXC_LINE_HAIR;
break;
default: default:
break; break;
} }
} }
else if( nOuterWidth >= EXC_BORDER_HAIR )
rnXclLine = EXC_LINE_HAIR;
else else
rnXclLine = EXC_LINE_NONE; rnXclLine = EXC_LINE_NONE;
} }
......
...@@ -904,7 +904,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette& ...@@ -904,7 +904,7 @@ bool lclConvertBorderLine( ::editeng::SvxBorderLine& rLine, const XclImpPalette&
{ EXC_BORDER_THIN, table::BorderLineStyle::DOTTED }, // 4 = dotted { EXC_BORDER_THIN, table::BorderLineStyle::DOTTED }, // 4 = dotted
{ EXC_BORDER_THICK, table::BorderLineStyle::SOLID }, // 5 = thick { EXC_BORDER_THICK, table::BorderLineStyle::SOLID }, // 5 = thick
{ EXC_BORDER_THIN, table::BorderLineStyle::DOUBLE }, // 6 = double { 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_MEDIUM, table::BorderLineStyle::DASHED }, // 8 = med dash
{ EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot { EXC_BORDER_THIN, table::BorderLineStyle::SOLID }, // 9 = thin dashdot
{ EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // A = med dashdot { EXC_BORDER_MEDIUM, table::BorderLineStyle::SOLID }, // A = med dashdot
......
...@@ -254,9 +254,9 @@ const sal_uInt16 EXC_FUTUREREC_ALERT = 0x0002; ...@@ -254,9 +254,9 @@ const sal_uInt16 EXC_FUTUREREC_ALERT = 0x0002;
// TODO: These values are approximate; we should probably tweak these values // TODO: These values are approximate; we should probably tweak these values
// further to better match Excel's border thickness. // further to better match Excel's border thickness.
const sal_uInt16 EXC_BORDER_THICK = 16; const sal_uInt16 EXC_BORDER_THICK = 30;
const sal_uInt16 EXC_BORDER_MEDIUM = 12; const sal_uInt16 EXC_BORDER_MEDIUM = 20;
const sal_uInt16 EXC_BORDER_THIN = 4; const sal_uInt16 EXC_BORDER_THIN = 1;
const sal_uInt16 EXC_BORDER_HAIR = 1; const sal_uInt16 EXC_BORDER_HAIR = 1;
// ============================================================================ // ============================================================================
......
...@@ -1834,7 +1834,7 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel& ...@@ -1834,7 +1834,7 @@ bool Border::convertBorderLine( BorderLine2& rBorderLine, const BorderLineModel&
break; break;
} }
case XML_double: lclSetBorderLineWidth( rBorderLine, API_LINE_THIN, API_LINE_THIN, API_LINE_THIN ); 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_medium: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break;
case XML_mediumDashDot: 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_mediumDashDotDot: lclSetBorderLineWidth( rBorderLine, API_LINE_MEDIUM ); break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment