summaryrefslogtreecommitdiff
path: root/autodoc/source/display/toolkit/htmlfile.cxx
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2005-08-05 13:26:23 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2005-08-05 13:26:23 +0000
commitbe6204b1d94c6242bdd9dc8877ea423bdf1e5069 (patch)
tree715c9a427df6d632c1e4fa86fe4c113e44317b01 /autodoc/source/display/toolkit/htmlfile.cxx
parentead34048570e33884c2aac2cdba06ebf00e4dc67 (diff)
INTEGRATION: CWS adc12p (1.3.6); FILE MERGED
2005/07/27 11:21:25 np 1.3.6.1: #i52495#
Diffstat (limited to 'autodoc/source/display/toolkit/htmlfile.cxx')
-rw-r--r--autodoc/source/display/toolkit/htmlfile.cxx37
1 files changed, 23 insertions, 14 deletions
diff --git a/autodoc/source/display/toolkit/htmlfile.cxx b/autodoc/source/display/toolkit/htmlfile.cxx
index a4d53b3c6477..3aa3b7be226c 100644
--- a/autodoc/source/display/toolkit/htmlfile.cxx
+++ b/autodoc/source/display/toolkit/htmlfile.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: htmlfile.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: vg $ $Date: 2005-03-23 09:05:00 $
+ * last change: $Author: hr $ $Date: 2005-08-05 14:26:23 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,8 @@ DocuFile_Html::DocuFile_Html()
sStyle(),
sCssFile(),
sCopyright(),
- aBodyData()
+ aBodyData(),
+ aBuffer(60000) // Grows dynamically, when necessary.
{
}
@@ -149,15 +150,17 @@ DocuFile_Html::CreateFile()
void
DocuFile_Html::WriteHeader( csv::File & io_aFile )
{
+ aBuffer.reset();
+
static const char s1[] =
"<html>\n<head>\n<title>";
static const char s2[] =
"</title>\n"
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n";
- io_aFile.write( s1 );
- io_aFile.write( sTitle );
- io_aFile.write( s2 );
+ aBuffer.write( s1 );
+ aBuffer.write( sTitle );
+ aBuffer.write( s2 );
if (NOT sCssFile.empty())
@@ -167,9 +170,9 @@ DocuFile_Html::WriteHeader( csv::File & io_aFile )
static const char s4[] =
"\">\n";
- io_aFile.write(s3);
- io_aFile.write(sCssFile);
- io_aFile.write(s4);
+ aBuffer.write(s3);
+ aBuffer.write(sCssFile);
+ aBuffer.write(s4);
}
if (NOT sStyle.empty())
@@ -179,19 +182,23 @@ DocuFile_Html::WriteHeader( csv::File & io_aFile )
static const char s6[] =
"</style>\n";
- io_aFile.write(s5);
- io_aFile.write(sStyle);
- io_aFile.write(s6);
+ aBuffer.write(s5);
+ aBuffer.write(sStyle);
+ aBuffer.write(s6);
}
static const char s7[] =
"</head>\n";
- io_aFile.write(s7);
+ aBuffer.write(s7);
+
+ io_aFile.write(aBuffer.c_str(), aBuffer.size());
}
void
DocuFile_Html::WriteBody( csv::File & io_aFile )
{
+ aBuffer.reset();
+
aBodyData
>> *new html::Link( "#_top_" )
<< "Top of Page";
@@ -207,7 +214,9 @@ DocuFile_Html::WriteBody( csv::File & io_aFile )
<< new xml::AnAttribute( "align", "center" )
<< new xml::XmlCode(sCopyright);
}
- aBodyData.WriteOut(io_aFile);
+ aBodyData.WriteOut(aBuffer);
+
+ io_aFile.write(aBuffer.c_str(), aBuffer.size());
}