summaryrefslogtreecommitdiffstats
path: root/writerperfect/source/writer/EPUBPackage.hxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /writerperfect/source/writer/EPUBPackage.hxx
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--writerperfect/source/writer/EPUBPackage.hxx90
1 files changed, 90 insertions, 0 deletions
diff --git a/writerperfect/source/writer/EPUBPackage.hxx b/writerperfect/source/writer/EPUBPackage.hxx
new file mode 100644
index 000000000..726d20673
--- /dev/null
+++ b/writerperfect/source/writer/EPUBPackage.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include <libepubgen/EPUBPackage.h>
+
+#include <com/sun/star/uno/Sequence.h>
+#include <com/sun/star/uno/Reference.h>
+
+namespace com::sun::star
+{
+namespace beans
+{
+struct PropertyValue;
+}
+namespace embed
+{
+class XHierarchicalStorageAccess;
+}
+namespace io
+{
+class XOutputStream;
+}
+namespace uno
+{
+class XComponentContext;
+}
+namespace xml::sax
+{
+class XWriter;
+}
+}
+
+namespace writerperfect
+{
+/// The epub package has direct access to the resulting ZIP file.
+class EPUBPackage : public libepubgen::EPUBPackage
+{
+ css::uno::Reference<css::uno::XComponentContext> mxContext;
+ css::uno::Reference<css::embed::XHierarchicalStorageAccess> mxStorage;
+ css::uno::Reference<css::io::XOutputStream> mxOutputStream;
+ css::uno::Reference<css::xml::sax::XWriter> mxOutputWriter;
+
+public:
+ explicit EPUBPackage(css::uno::Reference<css::uno::XComponentContext> xContext,
+ const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
+
+ ~EPUBPackage() override;
+
+ void openXMLFile(const char* pName) override;
+
+ void openElement(const char* pName, const librevenge::RVNGPropertyList& rAttributes) override;
+ void closeElement(const char* pName) override;
+
+ void insertCharacters(const librevenge::RVNGString& rCharacters) override;
+
+ void closeXMLFile() override;
+
+ void openCSSFile(const char* pName) override;
+
+ void insertRule(const librevenge::RVNGString& rSelector,
+ const librevenge::RVNGPropertyList& rProperties) override;
+
+ void closeCSSFile() override;
+
+ void openBinaryFile(const char* pName) override;
+
+ void insertBinaryData(const librevenge::RVNGBinaryData& rData) override;
+
+ void closeBinaryFile() override;
+
+ void openTextFile(const char* pName) override;
+
+ void insertText(const librevenge::RVNGString& rCharacters) override;
+
+ void insertLineBreak() override;
+
+ void closeTextFile() override;
+};
+
+} // namespace writerperfect
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */