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 .
22 #include <sal/config.h>
24 #include <string_view>
26 #include <svtools/svtdllapi.h>
27 #include <rtl/textenc.h>
28 #include <rtl/string.hxx>
29 #include <svl/macitem.hxx>
35 class SvNumberFormatter
;
39 const char *pBasicName
;
40 const char *pJavaName
;
46 SVT_DLLPUBLIC
static OString
ConvertStringToHTML( const OUString
& sSrc
,
47 OUString
*pNonConvertableChars
= nullptr );
49 SVT_DLLPUBLIC
static SvStream
& Out_AsciiTag( SvStream
&, std::string_view rStr
,
51 SVT_DLLPUBLIC
static SvStream
& Out_Char( SvStream
&, sal_uInt32 cChar
,
52 OUString
*pNonConvertableChars
= nullptr );
53 SVT_DLLPUBLIC
static SvStream
& Out_String( SvStream
&, const OUString
&,
54 OUString
*pNonConvertableChars
= nullptr );
55 SVT_DLLPUBLIC
static SvStream
& Out_Hex( SvStream
&, sal_uInt32 nHex
, sal_uInt8 nLen
);
56 SVT_DLLPUBLIC
static SvStream
& Out_Color( SvStream
&, const Color
&, bool bXHTML
= false );
57 SVT_DLLPUBLIC
static SvStream
& Out_ImageMap( SvStream
&, const OUString
&, const ImageMap
&, const OUString
&,
58 const HTMLOutEvent
*pEventTable
,
61 const char *pIndentArea
,
62 const char *pIndentMap
);
63 SVT_DLLPUBLIC
static SvStream
& FlushToAscii( SvStream
& );
65 SVT_DLLPUBLIC
static SvStream
& OutScript( SvStream
& rStrm
,
66 const OUString
& rBaseURL
,
67 std::u16string_view rSource
,
68 const OUString
& rLanguage
,
69 ScriptType eScriptType
,
71 const OUString
*pSBLibrary
,
72 const OUString
*pSBModule
);
74 // the 3rd parameter is an array of HTMLOutEvents which is terminated
75 // by an entry that consists only of 0s
76 SVT_DLLPUBLIC
static SvStream
& Out_Events( SvStream
&, const SvxMacroTableDtor
&,
77 const HTMLOutEvent
*, bool bOutStarBasic
,
78 OUString
*pNonConvertableChars
= nullptr );
80 // <TD SDVAL="..." SDNUM="...">
81 SVT_DLLPUBLIC
static OString
CreateTableDataOptionsValNum(
82 bool bValue
, double fVal
, sal_uInt32 nFormat
,
83 SvNumberFormatter
& rFormatter
,
84 OUString
*pNonConvertableChars
= nullptr);
85 SVT_DLLPUBLIC
static bool PrivateURLToInternalImg( OUString
& rURL
);
88 struct HtmlWriterHelper
90 SVT_DLLPUBLIC
static void applyColor( HtmlWriter
& rHtmlWriter
, std::string_view aAttributeName
, const Color
& rColor
);
91 SVT_DLLPUBLIC
static void applyEvents(HtmlWriter
& rHtmlWriter
, const SvxMacroTableDtor
& rMacroTable
, const HTMLOutEvent
* pEventTable
, bool bOutStarBasic
);
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */