Kaydet (Commit) 12c3ab8c authored tarafından Miklos Vajna's avatar Miklos Vajna

sw HTML export: XHTML ns alias for table markup

This was forgotten from the previous mass-conversion of adding namespace
aliases to written elements.

Change-Id: Id9b7e961c941ec3b3614e3694963c3f9ef9e46eb
Reviewed-on: https://gerrit.libreoffice.org/50595Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 4bb67227
<reqif-xhtml:p>aaa<reqif-xhtml:br/>bbb</reqif-xhtml:p> <reqif-xhtml:p>aaa<reqif-xhtml:br/>bbb</reqif-xhtml:p>
<reqif-xhtml:table><reqif-xhtml:tr><reqif-xhtml:td>in table</reqif-xhtml:tr></reqif-xhtml:tr></reqif-xhtml:table>
...@@ -337,6 +337,10 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml") ...@@ -337,6 +337,10 @@ DECLARE_HTMLEXPORT_TEST(testReqIfParagraph, "reqif-p.xhtml")
CPPUNIT_ASSERT(pStream); CPPUNIT_ASSERT(pStream);
OString aExpected("<reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb</reqif-xhtml:p>" SAL_NEWLINE_STRING); OString aExpected("<reqif-xhtml:p>aaa<reqif-xhtml:br/>\nbbb</reqif-xhtml:p>" SAL_NEWLINE_STRING);
// This was '<table' instead.
aExpected += "<reqif-xhtml:table";
OString aActual(read_uInt8s_ToOString(*pStream, aExpected.getLength())); OString aActual(read_uInt8s_ToOString(*pStream, aExpected.getLength()));
// This was a HTML header, like '<!DOCTYPE html ...'. // This was a HTML header, like '<!DOCTYPE html ...'.
CPPUNIT_ASSERT_EQUAL(aExpected, aActual); CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
......
...@@ -300,7 +300,8 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, ...@@ -300,7 +300,8 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
rWrt.OutNewLine(); // <TH>/<TD> in new line rWrt.OutNewLine(); // <TH>/<TD> in new line
OStringBuffer sOut; OStringBuffer sOut;
sOut.append('<'); sOut.append('<');
sOut.append(bHead ? OOO_STRING_SVTOOLS_HTML_tableheader : OOO_STRING_SVTOOLS_HTML_tabledata); OString aTag(bHead ? OOO_STRING_SVTOOLS_HTML_tableheader : OOO_STRING_SVTOOLS_HTML_tabledata);
sOut.append(rWrt.GetNamespace() + aTag);
// output ROW- and COLSPAN // output ROW- and COLSPAN
if( nRowSpan>1 ) if( nRowSpan>1 )
...@@ -483,7 +484,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, ...@@ -483,7 +484,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
if( rWrt.m_bLFPossible ) if( rWrt.m_bLFPossible )
rWrt.OutNewLine(); rWrt.OutNewLine();
OString aTag = bHead ? OOO_STRING_SVTOOLS_HTML_tableheader : OOO_STRING_SVTOOLS_HTML_tabledata; aTag = bHead ? OOO_STRING_SVTOOLS_HTML_tableheader : OOO_STRING_SVTOOLS_HTML_tabledata;
HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), rWrt.GetNamespace() + aTag, false); HTMLOutFuncs::Out_AsciiTag(rWrt.Strm(), rWrt.GetNamespace() + aTag, false);
rWrt.m_bLFPossible = true; rWrt.m_bLFPossible = true;
} }
...@@ -514,7 +515,7 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt, ...@@ -514,7 +515,7 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt,
} }
rWrt.OutNewLine(); // <TR> in new line rWrt.OutNewLine(); // <TR> in new line
rWrt.Strm().WriteChar( '<' ).WriteCharPtr( OOO_STRING_SVTOOLS_HTML_tablerow ); rWrt.Strm().WriteChar( '<' ).WriteOString( rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_tablerow );
if( pBrushItem ) if( pBrushItem )
{ {
rWrt.OutBackground( pBrushItem, false ); rWrt.OutBackground( pBrushItem, false );
...@@ -598,7 +599,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, ...@@ -598,7 +599,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
if( rWrt.m_bLFPossible ) if( rWrt.m_bLFPossible )
rWrt.OutNewLine(); // <TABLE> in new line rWrt.OutNewLine(); // <TABLE> in new line
OStringBuffer sOut; OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_table); sOut.append('<').append(rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_table);
const SvxFrameDirection nOldDirection = rWrt.m_nDirection; const SvxFrameDirection nOldDirection = rWrt.m_nDirection;
if( pFrameFormat ) if( pFrameFormat )
...@@ -732,7 +733,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign, ...@@ -732,7 +733,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
const SwWriteTableCol *pColumn = m_aCols[nCol]; const SwWriteTableCol *pColumn = m_aCols[nCol];
OStringBuffer sOutStr; OStringBuffer sOutStr;
sOutStr.append('<').append(OOO_STRING_SVTOOLS_HTML_col); sOutStr.append('<').append(rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_col);
sal_uInt32 nWidth; sal_uInt32 nWidth;
bool bRel; bool bRel;
......
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