Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


to continue our regularly scheduled border regression fixes, here's
another one in the Writer HTML filter.

this change was done in d18feffd49f4481626417daac7984b2a7e70c3bf,
replacing the write of BORDER and BORDERCOLOR on TABLE element with a
function call that writes CSS properties on individual cells:

@@ -433,6 +433,11 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
             OutCSS1_TableBGStyleOpt( rWrt, *pBrushItem );
     }
 
+    ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_style ) += "=\"";
+    rWrt.Strm() << sOut.GetBuffer( );
+    OutCSS1_SvxBox( rWrt, pBox->GetFrmFmt()->GetBox() );
+    sOut = '"';
+
     sal_uInt32 nNumFmt = 0;
     double nValue = 0.0;
     sal_Bool bNumFmt = sal_False, bValue = sal_False;
@@ -701,19 +706,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
     // Anderenfalls enthaelt nBorder naemlich nur die Breite der Umrandung,
     // die genutzt wird, wenn gar kein sheet::Border angegeben ist.
     sal_Bool bHasAnyBorders = nFrameMask || bColsHaveBorder || bRowsHaveBorder;
-    if( bCollectBorderWidth || nBorder==0 || bHasAnyBorders )
-        (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_border ) += '=')
-            += ByteString::CreateFromInt32( rWrt.ToPixel( nBorder ) );
-
-    // BORDERCOLOR ausgeben
-
-    if( (sal_uInt32)-1 != nBorderColor && rWrt.bCfgOutStyles && bHasAnyBorders )
-    {
-        ((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_bordercolor ) += '=';
-        rWrt.Strm() << sOut.GetBuffer();
-        HTMLOutFuncs::Out_Color( rWrt.Strm(), nBorderColor, rWrt.eDestEnc );
-        sOut.Erase();
-    }
 
     // CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
     (((sOut += ' ' ) += OOO_STRING_SVTOOLS_HTML_O_cellpadding ) += '=')

i don't know why that was done or whether it is a good idea (Cedric?),
but it wasn't done properly (presumably because the strange hieroglyphs
used to document this dependency were not deciphered), and there are
still attributes written on TABLE that only make sense together with
BORDER, leading to Mozilla (but not WebKit) not rendering some of the
borders.

this commit removes the code that writes these attributes:

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e1424390d45deb75a75a167e7eba36c012f32d74

(by the way, i've experimented with removing the CELLPADDING and
CELLSPACING attributes here as well but the result looks awful in Mozilla)


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.