LibreOffice Module svtools (master) 1
htmlout.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <sal/config.h>
23
24#include <string_view>
25
26#include <svtools/svtdllapi.h>
27#include <rtl/textenc.h>
28#include <rtl/string.hxx>
29#include <svl/macitem.hxx>
30
31class Color;
32class ImageMap;
33class HtmlWriter;
34class SvStream;
36
38{
39 const char *pBasicName;
40 const char *pJavaName;
42};
43
45{
46 SVT_DLLPUBLIC static OString ConvertStringToHTML( const OUString& sSrc,
47 OUString *pNonConvertableChars = nullptr );
48
49 SVT_DLLPUBLIC static SvStream& Out_AsciiTag( SvStream&, std::string_view rStr,
50 bool bOn = true);
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,
59 bool bOutStarBasic,
60 const char *pDelim,
61 const char *pIndentArea,
62 const char *pIndentMap );
64
66 const OUString& rBaseURL,
67 std::u16string_view rSource,
68 const OUString& rLanguage,
69 ScriptType eScriptType,
70 const OUString& rSrc,
71 const OUString *pSBLibrary,
72 const OUString *pSBModule );
73
74 // the 3rd parameter is an array of HTMLOutEvents which is terminated
75 // by an entry that consists only of 0s
77 const HTMLOutEvent*, bool bOutStarBasic,
78 OUString *pNonConvertableChars = nullptr );
79
80 // <TD SDVAL="..." SDNUM="...">
82 bool bValue, double fVal, sal_uInt32 nFormat,
83 SvNumberFormatter& rFormatter,
84 OUString *pNonConvertableChars = nullptr);
85 SVT_DLLPUBLIC static bool PrivateURLToInternalImg( OUString& rURL );
86};
87
89{
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);
92};
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvMacroItemId
ScriptType
void SvStream & rStrm
SvMacroItemId nEvent
Definition: htmlout.hxx:41
const char * pBasicName
Definition: htmlout.hxx:39
const char * pJavaName
Definition: htmlout.hxx:40
static SVT_DLLPUBLIC SvStream & Out_AsciiTag(SvStream &, std::string_view rStr, bool bOn=true)
Definition: htmlout.cxx:509
static SVT_DLLPUBLIC SvStream & Out_String(SvStream &, const OUString &, OUString *pNonConvertableChars=nullptr)
Definition: htmlout.cxx:530
static SVT_DLLPUBLIC bool PrivateURLToInternalImg(OUString &rURL)
Definition: htmlout.cxx:957
static SVT_DLLPUBLIC SvStream & Out_Hex(SvStream &, sal_uInt32 nHex, sal_uInt8 nLen)
Definition: htmlout.cxx:551
static SVT_DLLPUBLIC OString CreateTableDataOptionsValNum(bool bValue, double fVal, sal_uInt32 nFormat, SvNumberFormatter &rFormatter, OUString *pNonConvertableChars=nullptr)
Definition: htmlout.cxx:912
static SVT_DLLPUBLIC SvStream & OutScript(SvStream &rStrm, const OUString &rBaseURL, std::u16string_view rSource, const OUString &rLanguage, ScriptType eScriptType, const OUString &rSrc, const OUString *pSBLibrary, const OUString *pSBModule)
Definition: htmlout.cxx:773
static SVT_DLLPUBLIC SvStream & Out_Char(SvStream &, sal_uInt32 cChar, OUString *pNonConvertableChars=nullptr)
Definition: htmlout.cxx:522
static SVT_DLLPUBLIC SvStream & Out_ImageMap(SvStream &, const OUString &, const ImageMap &, const OUString &, const HTMLOutEvent *pEventTable, bool bOutStarBasic, const char *pDelim, const char *pIndentArea, const char *pIndentMap)
Definition: htmlout.cxx:593
static SVT_DLLPUBLIC SvStream & Out_Color(SvStream &, const Color &, bool bXHTML=false)
Definition: htmlout.cxx:572
static SVT_DLLPUBLIC SvStream & FlushToAscii(SvStream &)
Definition: htmlout.cxx:541
static SVT_DLLPUBLIC SvStream & Out_Events(SvStream &, const SvxMacroTableDtor &, const HTMLOutEvent *, bool bOutStarBasic, OUString *pNonConvertableChars=nullptr)
Definition: htmlout.cxx:879
static SVT_DLLPUBLIC OString ConvertStringToHTML(const OUString &sSrc, OUString *pNonConvertableChars=nullptr)
Definition: htmlout.cxx:498
static SVT_DLLPUBLIC void applyEvents(HtmlWriter &rHtmlWriter, const SvxMacroTableDtor &rMacroTable, const HTMLOutEvent *pEventTable, bool bOutStarBasic)
Definition: htmlout.cxx:993
static SVT_DLLPUBLIC void applyColor(HtmlWriter &rHtmlWriter, std::string_view aAttributeName, const Color &rColor)
Definition: htmlout.cxx:968
#define SVT_DLLPUBLIC
Definition: svtdllapi.h:27
unsigned char sal_uInt8