bump product version to 4.2.0.1
[LibreOffice.git] / include / svtools / htmlout.hxx
blobc13d6b92713f573f4eda1f819563c72a3f09814f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_SVTOOLS_HTMLOUT_HXX
21 #define INCLUDED_SVTOOLS_HTMLOUT_HXX
23 #include <svtools/svtdllapi.h>
24 #include <tools/solar.h>
25 #include <rtl/textenc.h>
26 #include <rtl/string.hxx>
27 #include <svl/macitem.hxx>
29 class Color;
30 class ImageMap;
31 class SvStream;
32 class SvxMacroTableDtor;
33 class SvNumberFormatter;
35 struct HTMLOutEvent
37 const sal_Char *pBasicName;
38 const sal_Char *pJavaName;
39 sal_uInt16 nEvent;
42 struct SVT_DLLPUBLIC HTMLOutContext
44 rtl_TextEncoding m_eDestEnc;
45 rtl_TextToUnicodeConverter m_hConv;
46 rtl_TextToUnicodeContext m_hContext;
48 HTMLOutContext( rtl_TextEncoding eDestEnc );
49 ~HTMLOutContext();
52 struct HTMLOutFuncs
54 SVT_DLLPUBLIC static OString ConvertStringToHTML( const OUString& sSrc,
55 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
56 OUString *pNonConvertableChars = 0 );
58 SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, const sal_Char* pStr,
59 sal_Bool bOn = sal_True,
60 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252);
61 SVT_DLLPUBLIC static SvStream& Out_Char( SvStream&, sal_Unicode cChar,
62 HTMLOutContext& rContext,
63 OUString *pNonConvertableChars = 0 );
64 SVT_DLLPUBLIC static SvStream& Out_String( SvStream&, const OUString&,
65 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
66 OUString *pNonConvertableChars = 0 );
67 SVT_DLLPUBLIC static SvStream& Out_Hex( SvStream&, sal_uLong nHex, sal_uInt8 nLen,
68 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
69 SVT_DLLPUBLIC static SvStream& Out_Color( SvStream&, const Color&,
70 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252 );
71 SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const OUString&, const ImageMap&, const OUString&,
72 const HTMLOutEvent *pEventTable,
73 sal_Bool bOutStarBasic,
74 const sal_Char *pDelim = 0,
75 const sal_Char *pIndentArea = 0,
76 const sal_Char *pIndentMap = 0,
77 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
78 OUString *pNonConvertableChars = 0 );
79 SVT_DLLPUBLIC static SvStream& FlushToAscii( SvStream&, HTMLOutContext& rContext );
81 SVT_DLLPUBLIC static SvStream& OutScript( SvStream& rStrm,
82 const OUString& rBaseURL,
83 const OUString& rSource,
84 const OUString& rLanguage,
85 ScriptType eScriptType,
86 const OUString& rSrc,
87 const OUString *pSBLibrary = 0,
88 const OUString *pSBModule = 0,
89 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
90 OUString *pNonConvertableChars = 0 );
92 // der 3. Parameter ist ein Array von HTMLOutEvents, das mit einem
93 // nur aus 0 bestehen Eintrag terminiert ist.
94 SVT_DLLPUBLIC static SvStream& Out_Events( SvStream&, const SvxMacroTableDtor&,
95 const HTMLOutEvent*, sal_Bool bOutStarBasic,
96 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
97 OUString *pNonConvertableChars = 0 );
99 // <TD SDVAL="..." SDNUM="...">
100 SVT_DLLPUBLIC static OString CreateTableDataOptionsValNum(
101 sal_Bool bValue, double fVal, sal_uLong nFormat,
102 SvNumberFormatter& rFormatter,
103 rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252,
104 OUString *pNonConvertableChars = 0);
107 #endif
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */