1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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>
33 class SvxMacroTableDtor
;
34 class SvNumberFormatter
;
38 const sal_Char
*pBasicName
;
39 const sal_Char
*pJavaName
;
43 struct SVT_DLLPUBLIC HTMLOutContext
45 rtl_TextEncoding m_eDestEnc
;
46 rtl_TextToUnicodeConverter m_hConv
;
47 rtl_TextToUnicodeContext m_hContext
;
49 HTMLOutContext( rtl_TextEncoding eDestEnc
);
56 static const sal_Char sNewLine
; // nur \012 oder \015
58 static const sal_Char sNewLine
[]; // \015\012
61 SVT_DLLPUBLIC
static OString
ConvertStringToHTML( const String
& sSrc
,
62 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
63 String
*pNonConvertableChars
= 0 );
65 SVT_DLLPUBLIC
static SvStream
& Out_AsciiTag( SvStream
&, const sal_Char
* pStr
,
66 sal_Bool bOn
= sal_True
,
67 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
);
68 SVT_DLLPUBLIC
static SvStream
& Out_Char( SvStream
&, sal_Unicode cChar
,
69 HTMLOutContext
& rContext
,
70 String
*pNonConvertableChars
= 0 );
71 SVT_DLLPUBLIC
static SvStream
& Out_String( SvStream
&, const String
&,
72 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
73 String
*pNonConvertableChars
= 0 );
74 SVT_DLLPUBLIC
static SvStream
& Out_Hex( SvStream
&, sal_uLong nHex
, sal_uInt8 nLen
,
75 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
);
76 SVT_DLLPUBLIC
static SvStream
& Out_Color( SvStream
&, const Color
&,
77 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
);
78 SVT_DLLPUBLIC
static SvStream
& Out_ImageMap( SvStream
&, const String
&, const ImageMap
&, const String
&,
79 const HTMLOutEvent
*pEventTable
,
80 sal_Bool bOutStarBasic
,
81 const sal_Char
*pDelim
= 0,
82 const sal_Char
*pIndentArea
= 0,
83 const sal_Char
*pIndentMap
= 0,
84 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
85 String
*pNonConvertableChars
= 0 );
86 SVT_DLLPUBLIC
static SvStream
& FlushToAscii( SvStream
&, HTMLOutContext
& rContext
);
88 SVT_DLLPUBLIC
static SvStream
& OutScript( SvStream
& rStrm
,
89 const String
& rBaseURL
,
90 const String
& rSource
,
91 const String
& rLanguage
,
92 ScriptType eScriptType
,
94 const String
*pSBLibrary
= 0,
95 const String
*pSBModule
= 0,
96 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
97 String
*pNonConvertableChars
= 0 );
99 // der 3. Parameter ist ein Array von HTMLOutEvents, das mit einem
100 // nur aus 0 bestehen Eintrag terminiert ist.
101 SVT_DLLPUBLIC
static SvStream
& Out_Events( SvStream
&, const SvxMacroTableDtor
&,
102 const HTMLOutEvent
*, sal_Bool bOutStarBasic
,
103 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
104 String
*pNonConvertableChars
= 0 );
106 // <TD SDVAL="..." SDNUM="...">
107 SVT_DLLPUBLIC
static OString
CreateTableDataOptionsValNum(
108 sal_Bool bValue
, double fVal
, sal_uLong nFormat
,
109 SvNumberFormatter
& rFormatter
,
110 rtl_TextEncoding eDestEnc
= RTL_TEXTENCODING_MS_1252
,
111 String
*pNonConvertableChars
= 0);
113 SVT_DLLPUBLIC
static sal_Bool
PrivateURLToInternalImg( String
& rURL
);
118 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */