bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / svtools / HtmlWriter.hxx
blob49f2aa6c02f27e60f2660a6e3d02307d39b79ab8
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 */
11 #ifndef INCLUDED_SVTOOLS_HTMLWRITER_HXX
12 #define INCLUDED_SVTOOLS_HTMLWRITER_HXX
14 #include <rtl/string.hxx>
15 #include <rtl/ustring.hxx>
16 #include <vector>
17 #include <svtools/svtdllapi.h>
19 class SvStream;
21 class SVT_DLLPUBLIC HtmlWriter final
23 private:
24 std::vector<OString> maElementStack;
26 SvStream& mrStream;
28 bool mbElementOpen;
29 bool mbCharactersWritten;
30 bool mbPrettyPrint;
31 /// XML namespace, in case of XHTML.
32 OString maNamespace;
34 public:
35 HtmlWriter(SvStream& rStream, const OString& rNamespace = OString());
36 ~HtmlWriter();
38 void prettyPrint(bool b);
40 void start(const OString& aElement);
42 void end();
44 void flushStack();
46 void attribute(const OString& aAttribute, const char* aValue);
47 void attribute(const OString& aAttribute, sal_Int32 aValue);
48 void attribute(const OString& aAttribute, const OString& aValue);
49 void attribute(const OString& aAttribute, const OUString& aValue);
50 // boolean attribute e.g. <img ismap>
51 void attribute(const OString& aAttribute);
53 void single(const OString& aContent);
54 void endAttribute();
56 /// Writes character data.
57 void characters(const OString& rChars);
60 #endif
62 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */