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/string.hxx>
28 #include <svl/macitem.hxx>
34 class SvNumberFormatter
;
38 const char *pBasicName
;
39 const char *pJavaName
;
45 SVT_DLLPUBLIC
static OString
ConvertStringToHTML( std::u16string_view sSrc
,
46 OUString
*pNonConvertableChars
= nullptr );
48 SVT_DLLPUBLIC
static SvStream
& Out_AsciiTag( SvStream
&, std::string_view rStr
,
50 SVT_DLLPUBLIC
static SvStream
& Out_Char( SvStream
&, sal_uInt32 cChar
,
51 OUString
*pNonConvertableChars
= nullptr );
52 SVT_DLLPUBLIC
static SvStream
& Out_String( SvStream
&, std::u16string_view
,
53 OUString
*pNonConvertableChars
= nullptr );
54 SVT_DLLPUBLIC
static SvStream
& Out_Hex( SvStream
&, sal_uInt32 nHex
, sal_uInt8 nLen
);
55 SVT_DLLPUBLIC
static SvStream
& Out_Color( SvStream
&, const Color
&, bool bXHTML
= false );
56 SVT_DLLPUBLIC
static SvStream
& Out_ImageMap( SvStream
&, const OUString
&, const ImageMap
&, const OUString
&,
57 const HTMLOutEvent
*pEventTable
,
60 const char *pIndentArea
,
61 const char *pIndentMap
);
62 SVT_DLLPUBLIC
static SvStream
& FlushToAscii( SvStream
& );
64 SVT_DLLPUBLIC
static SvStream
& OutScript( SvStream
& rStrm
,
65 const OUString
& rBaseURL
,
66 std::u16string_view rSource
,
67 std::u16string_view rLanguage
,
68 ScriptType eScriptType
,
70 const OUString
*pSBLibrary
,
71 const OUString
*pSBModule
);
73 // the 3rd parameter is an array of HTMLOutEvents which is terminated
74 // by an entry that consists only of 0s
75 SVT_DLLPUBLIC
static SvStream
& Out_Events( SvStream
&, const SvxMacroTableDtor
&,
76 const HTMLOutEvent
*, bool bOutStarBasic
);
78 // <TD SDVAL="..." SDNUM="...">
79 SVT_DLLPUBLIC
static OString
CreateTableDataOptionsValNum(
80 bool bValue
, double fVal
, sal_uInt32 nFormat
,
81 SvNumberFormatter
& rFormatter
,
82 OUString
*pNonConvertableChars
= nullptr);
83 SVT_DLLPUBLIC
static bool PrivateURLToInternalImg( OUString
& rURL
);
86 struct HtmlWriterHelper
88 SVT_DLLPUBLIC
static void applyColor( HtmlWriter
& rHtmlWriter
, std::string_view aAttributeName
, const Color
& rColor
);
89 SVT_DLLPUBLIC
static void applyEvents(HtmlWriter
& rHtmlWriter
, const SvxMacroTableDtor
& rMacroTable
, const HTMLOutEvent
* pEventTable
, bool bOutStarBasic
);
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */