Index: abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp,v retrieving revision 1.184 diff -u -r1.184 ie_imp_MsWord_97.cpp --- abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp 31 Oct 2002 00:20:59 -0000 1.184 +++ abi/src/wp/impexp/xp/ie_imp_MsWord_97.cpp 31 Oct 2002 15:19:22 -0000 @@ -777,7 +777,7 @@ ch = '-'; break; } - UT_DEBUGMSG(("%c", ch)); + xxx_UT_DEBUGMSG(("%c", ch)); } if ( m_bIsLower ) @@ -2855,7 +2855,7 @@ props += propBuffer; } - props += UT_String_sprintf("; table-col-spacing:%din", (2 * apap->ptap.dxaGapHalf)/ 1440); + props += UT_String_sprintf("; table-line-thickness:0; table-col-spacing:%din", (2 * apap->ptap.dxaGapHalf)/ 1440); setlocale(LC_NUMERIC, loc); @@ -2913,11 +2913,21 @@ //--------------------------------------------------------------------------/ //--------------------------------------------------------------------------/ +// from fp_TableContainer.h +#define LS_OFF 0 // No line style, which means no line is drawn +#define LS_NORMAL 1 // A normal solid line +// + static int sConvertLineStyle (short lineType) { // TODO - convert msword line styles to ours - return 1; + switch (lineType) { + case 0: return LS_OFF; + case 1: return LS_NORMAL; + // more cases here + } + return LS_OFF; } void IE_Imp_MsWord_97::_cell_open (const wvParseStruct *ps, const PAP *apap) @@ -2973,20 +2983,21 @@ propBuffer += "bg-style:1;"; // each unit is 1/8 of a pixel. abi only deals with whole numbers -#define BRC_TO_PIXEL(x) (int)(((x)+.5)/8.) - propBuffer += UT_String_sprintf("top-color:%s; table-line-thickness: %d;table-line-type:%d;", +#define BRC_TO_PIXEL(x) x == 255 ? 0 : (int)(((x)+.5)/8.) + + propBuffer += UT_String_sprintf("top-color:%s; top-thickness:%d; top-style:%d;", sMapIcoToColor(apap->ptap.rgtc[m_iCurrentCell - 1].brcTop.ico).c_str(), BRC_TO_PIXEL(apap->ptap.rgtc[m_iCurrentCell - 1].brcTop.dptLineWidth), sConvertLineStyle(apap->ptap.rgtc[m_iCurrentCell - 1].brcTop.brcType)); - propBuffer += UT_String_sprintf("left-color:%s; table-line-thickness: %d;table-line-type:%d;", + propBuffer += UT_String_sprintf("left-color:%s; left-thickness:%d; left-style:%d;", sMapIcoToColor(apap->ptap.rgtc[m_iCurrentCell - 1].brcLeft.ico).c_str(), BRC_TO_PIXEL(apap->ptap.rgtc[m_iCurrentCell - 1].brcLeft.dptLineWidth), sConvertLineStyle(apap->ptap.rgtc[m_iCurrentCell - 1].brcLeft.brcType)); - propBuffer += UT_String_sprintf("bot-color:%s; table-line-thickness: %d;table-line-type:%d;", + propBuffer += UT_String_sprintf("bot-color:%s; bot-thickness:%d; bot-style:%d;", sMapIcoToColor(apap->ptap.rgtc[m_iCurrentCell - 1].brcBottom.ico).c_str(), BRC_TO_PIXEL(apap->ptap.rgtc[m_iCurrentCell - 1].brcBottom.dptLineWidth), sConvertLineStyle(apap->ptap.rgtc[m_iCurrentCell - 1].brcBottom.brcType)); - propBuffer += UT_String_sprintf("right-color:%s; table-line-thickness: %d;table-line-type:%d", + propBuffer += UT_String_sprintf("right-color:%s; right-thickness:%d; right-style:%d", sMapIcoToColor(apap->ptap.rgtc[m_iCurrentCell - 1].brcRight.ico).c_str(), BRC_TO_PIXEL(apap->ptap.rgtc[m_iCurrentCell - 1].brcRight.dptLineWidth), sConvertLineStyle(apap->ptap.rgtc[m_iCurrentCell - 1].brcRight.brcType));