[Libreoffice-commits] core.git: 5 commits - dbaccess/source include/svtools sc/source sw/source
Thomas Arnhold
thomas at arnhold.org
Mon Oct 7 02:54:15 PDT 2013
dbaccess/source/ui/misc/TokenWriter.cxx | 5 +-
include/svtools/htmlkywd.hxx | 2
sc/source/filter/html/htmlexp.cxx | 17 +-------
sw/source/filter/html/htmlatr.cxx | 27 ++++++------
sw/source/filter/html/htmldraw.cxx | 18 ++++----
sw/source/filter/html/htmlfly.cxx | 42 ++++++++++----------
sw/source/filter/html/htmlforw.cxx | 32 +++++++--------
sw/source/filter/html/htmlnum.cxx | 6 +-
sw/source/filter/html/htmltabw.cxx | 67 ++++++++++++++------------------
sw/source/filter/html/wrthtml.cxx | 4 -
10 files changed, 103 insertions(+), 117 deletions(-)
New commits:
commit 49bae3b37fba86f9ca84a317d6c1dd7d41736eae
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Oct 7 11:34:38 2013 +0200
html export: <table> has no cols attribute in 4.0
Moreover it's rendundant, because we have <col> and <colgroup>.
Change-Id: Ic39a5dafdf252a7a7052681e7791aa57b99860bd
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index f435aa1..4794cff 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -724,17 +724,6 @@ void ScHTMLExport::WriteTables()
aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing).
append(RTL_CONSTASCII_STRINGPARAM("=\"")).
append(static_cast<sal_Int32>(nCellSpacing)).append('"');
- // COLS=n
- SCCOL nColCnt = 0;
- SCCOL nCol;
- for ( nCol=nStartCol; nCol<=nEndCol; nCol++ )
- {
- if ( !pDoc->ColHidden(nCol, nTab) )
- ++nColCnt;
- }
- aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols).
- append(RTL_CONSTASCII_STRINGPARAM("=\"")).
- append(static_cast<sal_Int32>(nColCnt)).append('"');
// BORDER=0, we do the styling of the cells in <TD>
aByteStrOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_border).
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 24e5c5c..b3b80ad 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -642,14 +642,6 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
rWrt.OutDirection( rWrt.nDirection );
}
- // COLS ausgeben: Nur bei Export ueber Layout, wenn es beim Import
- // vorhanden war.
- if( bColsOption )
- {
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols).
- append("=\"").append(static_cast<sal_Int32>(aCols.size())).append("\"");
- }
-
// ALIGN= ausgeben
if( text::HoriOrientation::RIGHT == eAlign )
{
commit 467aedafa5e19f9928af39c37a04124b3ee0549b
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Oct 7 09:55:30 2013 +0200
drop PURE_HTML
Change-Id: I977e279706d2e53d9b2edc4e8719aa88187e97fc
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index ca1481a..24e5c5c 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -271,10 +271,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
if ( !nRowSpan )
return;
-#ifndef PURE_HTML
SwWriteTableCol *pCol = aCols[nCol];
-#endif
-
bool bOutWidth = true;
const SwStartNode* pSttNd = pBox->GetSttNd();
@@ -328,7 +325,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_colspan).
append("=\"").append(static_cast<sal_Int32>(nColSpan)).append("\"");
}
-#ifndef PURE_HTML
+
long nWidth = 0;
sal_uInt32 nPrcWidth = USHRT_MAX;
if( bOutWidth )
@@ -395,7 +392,6 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height)
.append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
}
-#endif
const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pItem;
commit c20f23a66010bdfccb2c5c8c2d0be0a9637e476c
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Oct 7 09:54:44 2013 +0200
html export: 4.0 needs type attribute for style tag
Change-Id: Iaa076f639a4da564945385ee616d346c4f0d0889
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 48041db..80194af 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -737,7 +737,8 @@ void OHTMLImportExport::WriteBody()
{
SAL_INFO("dbaccess.ui", "OHTMLImportExport::WriteBody" );
- IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style );
+ IncIndent(1);
+ (*m_pStream) << "<" << OOO_STRING_SVTOOLS_HTML_style << " " << OOO_STRING_SVTOOLS_HTML_O_type << "=\"text/css\">";
(*m_pStream) << sMyBegComment; OUT_LF();
(*m_pStream) << OOO_STRING_SVTOOLS_HTML_body " { " << sFontFamily << '"' << OUStringToOString(m_aFont.Name, osl_getThreadTextEncoding()).getStr() << '\"';
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index edbd8a2..f435aa1 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -363,7 +363,9 @@ void ScHTMLExport::WriteHeader()
// CSS1 StyleSheet
PageDefaults( bAll ? 0 : aRange.aStart.Tab() );
- IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_style );
+ IncIndent(1);
+ rStrm << "<" << OOO_STRING_SVTOOLS_HTML_style << " " << OOO_STRING_SVTOOLS_HTML_O_type << "=\"text/css\">";
+
rStrm << sMyBegComment; OUT_LF();
rStrm << OOO_STRING_SVTOOLS_HTML_body << "," << OOO_STRING_SVTOOLS_HTML_division << "," << OOO_STRING_SVTOOLS_HTML_table << ","
<< OOO_STRING_SVTOOLS_HTML_thead << "," << OOO_STRING_SVTOOLS_HTML_tbody << "," << OOO_STRING_SVTOOLS_HTML_tfoot << ","
commit 646950f96d8ca8625be53621d8d28c62de5597f5
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Mon Oct 7 09:53:54 2013 +0200
html export: use only HTML 4.0 for export
Change-Id: I36d8ddf7b8b38e27686c6cc51ef2a676394f97fb
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 8e450ef..48041db 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -683,7 +683,7 @@ sal_Bool OHTMLImportExport::Write()
ODatabaseImportExport::Write();
if(m_xObject.is())
{
- (*m_pStream) << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype32 << '>' << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine;
+ (*m_pStream) << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype40 << '>' << ODatabaseImportExport::sNewLine << ODatabaseImportExport::sNewLine;
TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html );
WriteHeader();
OUT_LF();
diff --git a/include/svtools/htmlkywd.hxx b/include/svtools/htmlkywd.hxx
index 7120393..68dde7d 100644
--- a/include/svtools/htmlkywd.hxx
+++ b/include/svtools/htmlkywd.hxx
@@ -22,8 +22,6 @@
#include "sal/config.h"
-#define OOO_STRING_SVTOOLS_HTML_doctype32 \
- "HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\""
#define OOO_STRING_SVTOOLS_HTML_doctype40 \
"HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\""
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 7239885..edbd8a2 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -316,7 +316,7 @@ Size ScHTMLExport::MMToPixel( const Size& rSize )
sal_uLong ScHTMLExport::Write()
{
- rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype32 << '>'
+ rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype40 << '>'
<< sNewLine << sNewLine;
TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_html );
WriteHeader();
commit 53037545be634d7e45d158e9184c13d2f6e2e7a5
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sun Oct 6 21:54:36 2013 +0200
html export: export attributes with literals
This improves validity of generated html files.
Change-Id: I3fbf92e861d9a3931870e25beaaf9f91a469f40c
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index eb56c84..41dd658 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -803,7 +803,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( USHRT_MAX != nNumStart )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_value).
- append('=').append(static_cast<sal_Int32>(nNumStart));
+ append("=\"").append(static_cast<sal_Int32>(nNumStart)).append("\"");
}
sOut.append('>');
rWrt.Strm() << sOut.getStr();
@@ -2137,18 +2137,19 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width)
- .append('=');
+ .append("=\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
- rWrt.OutULong( rHTMLWrt.ToPixel(nPageWidth-nLeft-nRight,false) );
+ rWrt.OutULong( rHTMLWrt.ToPixel(nPageWidth-nLeft-nRight,false) ) << "\"";
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align)
- .append('=');
+ .append("=\"");
if( !nLeft )
sOut.append(OOO_STRING_SVTOOLS_HTML_AL_left);
else if( !nRight )
sOut.append(OOO_STRING_SVTOOLS_HTML_AL_right);
else
sOut.append(OOO_STRING_SVTOOLS_HTML_AL_center);
+ sOut.append("\"");
}
}
rWrt.Strm() << sOut.makeStringAndClear().getStr();
@@ -2160,15 +2161,15 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
sal_uInt16 nWidth = pBorderLine->GetScaledWidth();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size)
- .append('=');
+ .append("=\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
- rWrt.OutULong( rHTMLWrt.ToPixel(nWidth,false) );
+ rWrt.OutULong( rHTMLWrt.ToPixel(nWidth,false) ) << "\"";
const Color& rBorderColor = pBorderLine->GetColor();
if( !rBorderColor.IsRGBEqual( Color(COL_GRAY) ) )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_color)
- .append('=');
+ .append("=");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_Color( rWrt.Strm(), rBorderColor,
rHTMLWrt.eDestEnc );
@@ -2633,7 +2634,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
pStr = OOO_STRING_SVTOOLS_HTML_AL_right;
OStringBuffer sOut(OOO_STRING_SVTOOLS_HTML_linebreak);
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_clear).append('=').append(pStr);
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_clear).append("=").append(pStr).append("\"");
HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.getStr() );
rHTMLWrt.bClearLeft = sal_False;
@@ -2710,7 +2711,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_font).append(' ')
- .append(OOO_STRING_SVTOOLS_HTML_O_color).append('=');
+ .append(OOO_STRING_SVTOOLS_HTML_O_color).append("=");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor, rHTMLWrt.eDestEnc ) << '>';
}
@@ -2778,8 +2779,8 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).append('=').
- append(static_cast<sal_Int32>(nSize));
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).append("=\"").
+ append(static_cast<sal_Int32>(nSize)).append("\"");
rWrt.Strm() << sOut.getStr();
if( rHTMLWrt.bCfgOutStyles && rHTMLWrt.bTxtAttr &&
@@ -3218,8 +3219,8 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
if( pStr )
{
OStringBuffer sOut;
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=')
- .append(pStr);
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append("=\"")
+ .append(pStr).append("\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
}
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 2f021ac..31f7df8 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -708,7 +708,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
if( pStr )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_behavior).
- append('=').append(pStr);
+ append("=\"").append(pStr).append("\"");
}
// DIRECTION
@@ -725,7 +725,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
if( pStr )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_direction).
- append('=').append(pStr);
+ append("=\"").append(pStr).append("\"");
}
// LOOP
@@ -734,15 +734,15 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
.GetValue();
if( 0==nCount )
nCount = SDRTEXTANI_SLIDE==eAniKind ? 1 : -1;
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_loop).append('=').
- append(nCount);
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_loop).append("=\"").
+ append(nCount).append("\"");
// SCROLLDELAY
sal_uInt16 nDelay =
((const SdrTextAniDelayItem&)rItemSet.Get( SDRATTR_TEXT_ANIDELAY ))
.GetValue();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolldelay).
- append('=').append(static_cast<sal_Int32>(nDelay));
+ append("=\"").append(static_cast<sal_Int32>(nDelay)).append("\"");
// SCROLLAMOUNT
sal_Int16 nAmount =
@@ -761,7 +761,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
if( nAmount )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrollamount).
- append('=').append(static_cast<sal_Int32>(nAmount));
+ append("=\"").append(static_cast<sal_Int32>(nAmount)).append("\"");
}
Size aTwipSz( pTextObj->GetLogicRect().GetSize() );
@@ -793,13 +793,13 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
if( aPixelSz.Width() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\"");
}
if( aPixelSz.Height() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
}
}
@@ -811,7 +811,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
const Color& rFillColor =
((const XFillColorItem&)rItemSet.Get(XATTR_FILLCOLOR)).GetColorValue();
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).append('=');
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).append("=");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_Color( rWrt.Strm(), rFillColor, rHTMLWrt.eDestEnc );
}
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index b41acc0..1b5871d 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -608,8 +608,8 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( pStr )
{
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=').
- append(pStr);
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append("=\"").
+ append(pStr).append("\"");
}
@@ -647,13 +647,13 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( aPixelSpc.Width() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_hspace).
- append('=').append(static_cast<sal_Int32>(aPixelSpc.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\"");
}
if( aPixelSpc.Height() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_vspace).
- append('=').append(static_cast<sal_Int32>(aPixelSpc.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\"");
}
}
@@ -722,22 +722,24 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
((nPrcWidth && nPrcWidth!=255) || aPixelSz.Width()) )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=');
+ append("=\"");
if( nPrcWidth )
sOut.append(static_cast<sal_Int32>(nPrcWidth)).append('%');
else
sOut.append(static_cast<sal_Int32>(aPixelSz.Width()));
+ sOut.append("\"");
}
if( (nFrmOpts & HTML_FRMOPT_HEIGHT) &&
((nPrcHeight && nPrcHeight!=255) || aPixelSz.Height()) )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height).
- append('=');
+ append("=\"");
if( nPrcHeight )
sOut.append(static_cast<sal_Int32>(nPrcHeight)).append('%');
else
sOut.append(static_cast<sal_Int32>(aPixelSz.Height()));
+ sOut.append("\"");
}
}
@@ -804,7 +806,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
{
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_linebreak).
append(' ').append(OOO_STRING_SVTOOLS_HTML_O_clear).
- append('=').append(pStr).append('>').append(rEndTags);
+ append("=\"").append(pStr).append("\">").append(rEndTags);
sRetEndTags = sOut.makeStringAndClear();
}
}
@@ -1115,7 +1117,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
{
sOut.append('<');
sOut.append(OOO_STRING_SVTOOLS_HTML_font).append(' ').
- append(OOO_STRING_SVTOOLS_HTML_O_color).append('=');
+ append(OOO_STRING_SVTOOLS_HTML_O_color).append("=");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_Color( rWrt.Strm(),
pColBorderLine->GetColor(), rHTMLWrt.eDestEnc ) << '>';
@@ -1161,7 +1163,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( nFrmOpts & HTML_FRMOPT_BORDER )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_border).
- append('=').append(static_cast<sal_Int32>(nBorderWidth));
+ append("=\"").append(static_cast<sal_Int32>(nBorderWidth)).append("\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
}
@@ -1243,13 +1245,13 @@ Writer& OutHTML_BulletImage( Writer& rWrt,
if( aPixelSz.Width() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\"");
}
if( aPixelSz.Height() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
}
if( pVertOrient )
@@ -1271,7 +1273,7 @@ Writer& OutHTML_BulletImage( Writer& rWrt,
if( pStr )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).
- append('=').append(pStr);
+ append("=\"").append(pStr).append("\"");
}
}
@@ -1357,7 +1359,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
if( nCols )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols).
- append('=').append(static_cast<sal_Int32>(nCols));
+ append("=\"").append(static_cast<sal_Int32>(nCols)).append("\"");
}
// die Gutter-Breite (Minimalwert) als GUTTER
@@ -1371,7 +1373,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
MapMode(MAP_TWIP) ).Width();
}
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_gutter).
- append('=').append(static_cast<sal_Int32>(nGutter));
+ append("=\"").append(static_cast<sal_Int32>(nGutter)).append("\"");
}
rWrt.Strm() << sOut.makeStringAndClear().getStr();
@@ -1424,8 +1426,8 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_spacer).append(' ')
- .append(OOO_STRING_SVTOOLS_HTML_O_type).append('=')
- .append(OOO_STRING_SVTOOLS_HTML_SPTYPE_block);
+ .append(OOO_STRING_SVTOOLS_HTML_O_type).append("=\"")
+ .append(OOO_STRING_SVTOOLS_HTML_SPTYPE_block).append("\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
// ALIGN, WIDTH, HEIGHT
@@ -1582,8 +1584,8 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.OutNewLine();
OStringBuffer sOut;
sOut.append(OOO_STRING_SVTOOLS_HTML_division).append(' ')
- .append(OOO_STRING_SVTOOLS_HTML_O_title).append('=')
- .append( bHeader ? "header" : "footer" );
+ .append(OOO_STRING_SVTOOLS_HTML_O_title).append("=\"")
+ .append( bHeader ? "header" : "footer" ).append("\"");
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.makeStringAndClear().getStr() );
rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken;
@@ -1605,9 +1607,9 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aSpacer = OStringBuffer(OOO_STRING_SVTOOLS_HTML_spacer).
append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
- append('=').append(OOO_STRING_SVTOOLS_HTML_SPTYPE_vertical).
+ append("=\"").append(OOO_STRING_SVTOOLS_HTML_SPTYPE_vertical).append("\"").
append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).
- append('=').append(static_cast<sal_Int32>(nSize)).
+ append("=\"").append(static_cast<sal_Int32>(nSize)).append("\"").
makeStringAndClear();
}
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index c209514..6917b8b 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -610,8 +610,8 @@ void SwHTMLWriter::OutHiddenControls(
OutNewLine( sal_True );
OStringBuffer sOut;
sOut.append('<').append(OOO_STRING_SVTOOLS_HTML_input).append(' ')
- .append(OOO_STRING_SVTOOLS_HTML_O_type).append('=')
- .append(OOO_STRING_SVTOOLS_HTML_IT_hidden);
+ .append(OOO_STRING_SVTOOLS_HTML_O_type).append("=\"")
+ .append(OOO_STRING_SVTOOLS_HTML_IT_hidden).append("\"");
aTmp = xPropSet->getPropertyValue(
OUString("Name") );
@@ -830,7 +830,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( aSz.Height() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).
- append('=').append(static_cast<sal_Int32>(aSz.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aSz.Height())).append("\"");
}
aTmp = xPropSet->getPropertyValue(
@@ -866,14 +866,14 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( aSz.Height() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_rows).
- append('=').
- append(static_cast<sal_Int32>(aSz.Height()));
+ append("=\"").
+ append(static_cast<sal_Int32>(aSz.Height())).append("\"");
}
if( aSz.Width() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols).
- append('=').
- append(static_cast<sal_Int32>(aSz.Width()));
+ append("=\"").
+ append(static_cast<sal_Int32>(aSz.Width())).append("\"");
}
aTmp = xPropSet->getPropertyValue(
@@ -890,7 +890,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
*(sal_Bool*)aTmp.getValue()) ? OOO_STRING_SVTOOLS_HTML_WW_hard
: OOO_STRING_SVTOOLS_HTML_WW_soft;
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_wrap).
- append('=').append(pWrapStr);
+ append("=\"").append(pWrapStr).append("\"");
}
}
else
@@ -908,7 +908,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( aSz.Width() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).
- append('=').append(static_cast<sal_Int32>(aSz.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aSz.Width())).append("\"");
}
aTmp = xPropSet->getPropertyValue(
@@ -918,8 +918,8 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
{
sOptions.append(' ').
append(OOO_STRING_SVTOOLS_HTML_O_maxlength).
- append('=').append(static_cast<sal_Int32>(
- *(sal_Int16*) aTmp.getValue()));
+ append("=\"").append(static_cast<sal_Int32>(
+ *(sal_Int16*) aTmp.getValue())).append("\"");
}
OUString sDefaultText("DefaultText");
@@ -945,7 +945,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( aSz.Width() )
{
sOptions.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_size).
- append('=').append(static_cast<sal_Int32>(aSz.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aSz.Width())).append("\"");
}
// VALUE vim form aus Sicherheitsgruenden nicht exportieren
@@ -971,7 +971,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( eType != TYPE_NONE )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
- append('=').append(TypeNames[eType]);
+ append("=\"").append(TypeNames[eType]).append("\"");
}
aTmp = xPropSet->getPropertyValue("Name");
@@ -1038,13 +1038,13 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
if( aPixelSz.Width() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Width())).append("\"");
}
if( aPixelSz.Height() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
}
}
@@ -1059,7 +1059,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
nTabIndex = 32767;
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_tabindex).
- append('=').append(static_cast<sal_Int32>(nTabIndex));
+ append("=\"").append(static_cast<sal_Int32>(nTabIndex)).append("\"");
}
}
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 0fff1bf..110e8b0 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -817,7 +817,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
if( pStr )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
- append('=').append(pStr);
+ append("=\"").append(pStr).append("\"");
}
}
else if( SVX_NUM_BITMAP == eType )
@@ -848,7 +848,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
if( cType )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_type).
- append('=').append(cType);
+ append("=\"").append(cType).append("\"");
}
sal_uInt16 nStartVal = rNumFmt.GetStart();
@@ -868,7 +868,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
if( nStartVal != 1 )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_start).
- append('=').append(static_cast<sal_Int32>(nStartVal));
+ append("=\"").append(static_cast<sal_Int32>(nStartVal)).append("\"");
}
}
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 6ebe035..ca1481a 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -321,12 +321,12 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
if( nRowSpan>1 )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_rowspan).
- append('=').append(static_cast<sal_Int32>(nRowSpan));
+ append("=\"").append(static_cast<sal_Int32>(nRowSpan)).append("\"");
}
if( nColSpan > 1 )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_colspan).
- append('=').append(static_cast<sal_Int32>(nColSpan));
+ append("=\"").append(static_cast<sal_Int32>(nColSpan)).append("\"");
}
#ifndef PURE_HTML
long nWidth = 0;
@@ -376,7 +376,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
if( bOutWidth )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=');
+ append("=\"");
if( nPrcWidth != USHRT_MAX )
{
sOut.append(static_cast<sal_Int32>(nPrcWidth)).append('%');
@@ -385,14 +385,15 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
{
sOut.append(static_cast<sal_Int32>(aPixelSz.Width()));
}
+ sOut.append("\"");
if( !bLayoutExport && nColSpan==1 )
pCol->SetOutWidth( false );
}
if( nHeight )
{
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height).
- append('=').append(static_cast<sal_Int32>(aPixelSz.Height()));
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_height)
+ .append("=\"").append(static_cast<sal_Int32>(aPixelSz.Height())).append("\"");
}
#endif
@@ -407,10 +408,11 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sal_Int16 eVertOri = pCell->GetVertOri();
if( text::VertOrientation::TOP==eVertOri || text::VertOrientation::BOTTOM==eVertOri )
{
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_valign).
- append('=').append(text::VertOrientation::TOP==eVertOri ?
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_valign)
+ .append("=\"").append(text::VertOrientation::TOP==eVertOri ?
OOO_STRING_SVTOOLS_HTML_VA_top :
- OOO_STRING_SVTOOLS_HTML_VA_bottom);
+ OOO_STRING_SVTOOLS_HTML_VA_bottom)
+ .append("\"");
}
}
@@ -549,7 +551,8 @@ void SwHTMLWrtTable::OutTableCells( SwHTMLWriter& rWrt,
{
OStringBuffer sOut;
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_valign)
- .append('=').append(text::VertOrientation::TOP==eRowVertOri ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom);
+ .append("=\"").append(text::VertOrientation::TOP==eRowVertOri ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom)
+ .append("\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
}
@@ -648,31 +651,31 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
if( bColsOption )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cols).
- append('=').append(static_cast<sal_Int32>(aCols.size()));
+ append("=\"").append(static_cast<sal_Int32>(aCols.size())).append("\"");
}
// ALIGN= ausgeben
if( text::HoriOrientation::RIGHT == eAlign )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).
- append('=').append(OOO_STRING_SVTOOLS_HTML_AL_right);
+ append("=\"").append(OOO_STRING_SVTOOLS_HTML_AL_right).append("\"");
}
else if( text::HoriOrientation::CENTER == eAlign )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).
- append('=').append(OOO_STRING_SVTOOLS_HTML_AL_center);
+ append("=\"").append(OOO_STRING_SVTOOLS_HTML_AL_center).append("\"");
}
else if( text::HoriOrientation::LEFT == eAlign )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).
- append('=').append(OOO_STRING_SVTOOLS_HTML_AL_left);
+ append("=\"").append(OOO_STRING_SVTOOLS_HTML_AL_left).append("\"");
}
// WIDTH ausgeben: Stammt aus Layout oder ist berechnet
if( nTabWidth )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=');
+ append("=\"");
if( HasRelWidths() )
sOut.append(static_cast<sal_Int32>(nTabWidth)).append('%');
else if( Application::GetDefaultDevice() )
@@ -687,8 +690,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
else
{
OSL_ENSURE( Application::GetDefaultDevice(), "kein Application-Window!?" );
- sOut.append(RTL_CONSTASCII_STRINGPARAM("100%"));
+ sOut.append("100%");
}
+ sOut.append("\"");
}
if( (nHSpace || nVSpace) && Application::GetDefaultDevice())
@@ -704,23 +708,23 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
if( aPixelSpc.Width() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_hspace).
- append('=').append(static_cast<sal_Int32>(aPixelSpc.Width()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Width())).append("\"");
}
if( aPixelSpc.Height() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_vspace).
- append('=').append(static_cast<sal_Int32>(aPixelSpc.Height()));
+ append("=\"").append(static_cast<sal_Int32>(aPixelSpc.Height())).append("\"");
}
}
// CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellpadding).
- append('=').append(static_cast<sal_Int32>(rWrt.ToPixel(nCellPadding,false)));
+ append("=\"").append(static_cast<sal_Int32>(rWrt.ToPixel(nCellPadding,false))).append("\"");
// CELLSPACING ausgeben: Stammt aus Layout oder ist berechnet
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing).
- append('=').append(static_cast<sal_Int32>(rWrt.ToPixel(nCellSpacing,false)));
+ append("=\"").append(static_cast<sal_Int32>(rWrt.ToPixel(nCellSpacing,false))).append("\"");
rWrt.Strm() << sOut.makeStringAndClear().getStr();
@@ -743,8 +747,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
{
rWrt.OutNewLine(); // <CAPTION> in neue Zeile
OStringBuffer sOutStr(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_caption));
- sOutStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=')
- .append(bTopCaption ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom);
+ sOutStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append("=\"")
+ .append(bTopCaption ? OOO_STRING_SVTOOLS_HTML_VA_top : OOO_STRING_SVTOOLS_HTML_VA_bottom)
+ .append("\"");
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOutStr.getStr(), sal_True );
HTMLOutFuncs::Out_String( rWrt.Strm(), *pCaption, rWrt.eDestEnc, &rWrt.aNonConvertableCharacters );
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_caption, sal_False );
@@ -788,12 +793,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
}
sOutStr.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
- append('=');
+ append("=\"");
if( bRel )
sOutStr.append(static_cast<sal_Int32>(nWidth)).append('*');
else
sOutStr.append(static_cast<sal_Int32>(rWrt.ToPixel(nWidth,false)));
- sOutStr.append('>');
+ sOutStr.append("\">");
rWrt.Strm() << sOutStr.makeStringAndClear().getStr();
if( bColGroups && pColumn->bRightBorder && nCol<nCols-1 )
@@ -1109,8 +1114,8 @@ Writer& OutHTML_SwTblNode( Writer& rWrt, SwTableNode & rNode,
else
{
OStringBuffer sOut(RTL_CONSTASCII_STRINGPARAM(OOO_STRING_SVTOOLS_HTML_division));
- sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append('=')
- .append(OOO_STRING_SVTOOLS_HTML_AL_right);
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_align).append("=\"")
+ .append(OOO_STRING_SVTOOLS_HTML_AL_right).append("\"");
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), sOut.getStr(),
sal_True );
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 2403e86..cf13747 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -600,7 +600,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
MapMode(MAP_TWIP) ).Width();
}
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_gutter).
- append('=').append(static_cast<sal_Int32>(nGutter));
+ append("=\"").append(static_cast<sal_Int32>(nGutter)).append("\"");
}
}
@@ -842,7 +842,7 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
if( pColorItem )
{
OStringBuffer sOut;
- sOut.append(' ').append(pTag).append('=');
+ sOut.append(' ').append(pTag).append("=");
rHWrt.Strm() << sOut.makeStringAndClear().getStr();
Color aColor( pColorItem->GetValue() );
if( COL_AUTO == aColor.GetColor() )
More information about the Libreoffice-commits
mailing list