summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-09-20 14:50:46 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-09-22 00:31:47 +0200
commitd42813db533b0a4930528ba1ccd34f33498ffe36 (patch)
tree519cf354a36b3885671a3aecd947062b282e24a0 /include
parent0ce8533ee2b3202922e0ff7ba9f9212080965167 (diff)
Extend HTMLWriter: flush the stack, more values for attribute(..)
Change-Id: I733426ba5f82ee25751387f88942dbc66689821d
Diffstat (limited to 'include')
-rw-r--r--include/svtools/HtmlWriter.hxx31
1 files changed, 23 insertions, 8 deletions
diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index fc2c5c5b6c08..3c065ffd6259 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -12,6 +12,7 @@
#define INCLUDED_SVTOOLS_HTMLWRITER_HXX
#include <rtl/string.hxx>
+#include <rtl/ustring.hxx>
#include <tools/stream.hxx>
#include <vector>
#include <svtools/svtdllapi.h>
@@ -20,11 +21,13 @@ class SVT_DLLPUBLIC HtmlWriter
{
private:
std::vector<OString> maElementStack;
- SvStream& mrStream;
- bool mbElementOpen;
- bool mbContentWritten;
- bool mbPrettyPrint;
+ SvStream& mrStream;
+
+ bool mbElementOpen;
+ bool mbContentWritten;
+ bool mbPrettyPrint;
+ rtl_TextEncoding maEncoding;
public:
HtmlWriter(SvStream& rStream);
@@ -32,11 +35,23 @@ public:
void prettyPrint(bool bChoice);
- void start(const OString &aElement);
+ void start(const OString& aElement);
+
void end();
- void write(const OString &aContent);
- void attribute(const OString &aAttribute, const OString &aValue);
- void single(const OString &aContent);
+
+ void flushStack();
+ void flushStack(const OString& aElement);
+
+ void write(const OString& aContent);
+
+ void attribute(const OString& aAttribute, const char* aValue);
+ void attribute(const OString& aAttribute, sal_Int32 aValue);
+ void attribute(const OString& aAttribute, const OString& aValue);
+ void attribute(const OString& aAttribute, const OUString& aValue);
+ // boolean attribute e.g. <img ismap>
+ void attribute(const OString& aAttribute);
+
+ void single(const OString& aContent);
void endAttribute();
};