Files
libreoffice/xml2cmp/source/xcd/cr_html.hxx
Rüdiger Timm 19bc4523a3 INTEGRATION: CWS ooo19126 (1.6.92); FILE MERGED
2005/09/05 14:47:38 rt 1.6.92.1: #i54170# Change license header: remove SISSL
2005-09-09 11:01:08 +00:00

108 lines
3.7 KiB
C++

/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: cr_html.hxx,v $
*
* $Revision: 1.7 $
*
* last change: $Author: rt $ $Date: 2005-09-09 12:01:08 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef X2C_CR_HTML_HXX
#define X2C_CR_HTML_HXX
#include <string.h>
#include <fstream>
#include "../support/sistr.hxx"
#include "../support/syshelp.hxx"
class XmlElement;
class SglTextElement;
class MultipleTextElement;
class HtmlCreator
{
public:
HtmlCreator(
const char * i_pOutputFileName,
const XmlElement & i_rDocument,
const Simstr & i_sIDL_BaseDirectory );
~HtmlCreator();
void Run();
void StartTable();
void FinishTable();
void StartBigCell(
const char * i_sTitle );
void FinishBigCell();
void Write_SglTextElement(
const SglTextElement &
i_rElement,
bool i_bStrong = false );
void Write_MultiTextElement(
const MultipleTextElement &
i_rElement );
void Write_SglText(
const Simstr & i_sName,
const Simstr & i_sValue );
void Write_ReferenceDocu(
const Simstr & i_sName,
const Simstr & i_sRef,
const Simstr & i_sRole,
const Simstr & i_sTitle );
private:
void PrintH1(
char * i_pText );
void StartRow();
void FinishRow();
void StartCell(
char * i_pWidth );
void FinishCell();
void WriteElementName(
const Simstr & i_sName,
bool i_bStrong );
void WriteStr(
const char * i_sStr )
{ aFile.write( i_sStr, strlen(i_sStr) ); }
// DATA
std::ofstream aFile;
const XmlElement & rDocument;
Simstr sIdl_BaseDirectory;
};
#endif