Revert "tdf#110987: type detection, binary Office formats > templates"
[LibreOffice.git] / writerperfect / source / writer / EPUBPackage.hxx
blob00cd129d80458b851e9b94c23be3affb99044706
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/.
8 */
10 #ifndef INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBPACKAGE_HXX
11 #define INCLUDED_WRITERPERFECT_SOURCE_WRITER_EPUBPACKAGE_HXX
13 #include <libepubgen/EPUBPackage.h>
15 #include <com/sun/star/uno/Sequence.h>
16 #include <com/sun/star/uno/Reference.h>
18 namespace com
20 namespace sun
22 namespace star
24 namespace beans
26 struct PropertyValue;
28 namespace embed
30 class XHierarchicalStorageAccess;
32 namespace io
34 class XOutputStream;
36 namespace uno
38 class XComponentContext;
40 namespace xml
42 namespace sax
44 class XWriter;
51 namespace writerperfect
53 /// The epub package has direct access to the resulting ZIP file.
54 class EPUBPackage : public libepubgen::EPUBPackage
56 css::uno::Reference<css::uno::XComponentContext> mxContext;
57 css::uno::Reference<css::embed::XHierarchicalStorageAccess> mxStorage;
58 css::uno::Reference<css::io::XOutputStream> mxOutputStream;
59 css::uno::Reference<css::xml::sax::XWriter> mxOutputWriter;
61 public:
62 explicit EPUBPackage(css::uno::Reference<css::uno::XComponentContext> xContext,
63 const css::uno::Sequence<css::beans::PropertyValue>& rDescriptor);
65 ~EPUBPackage() override;
67 void openXMLFile(const char* pName) override;
69 void openElement(const char* pName, const librevenge::RVNGPropertyList& rAttributes) override;
70 void closeElement(const char* pName) override;
72 void insertCharacters(const librevenge::RVNGString& rCharacters) override;
74 void closeXMLFile() override;
76 void openCSSFile(const char* pName) override;
78 void insertRule(const librevenge::RVNGString& rSelector,
79 const librevenge::RVNGPropertyList& rProperties) override;
81 void closeCSSFile() override;
83 void openBinaryFile(const char* pName) override;
85 void insertBinaryData(const librevenge::RVNGBinaryData& rData) override;
87 void closeBinaryFile() override;
89 void openTextFile(const char* pName) override;
91 void insertText(const librevenge::RVNGString& rCharacters) override;
93 void insertLineBreak() override;
95 void closeTextFile() override;
98 } // namespace writerperfect
100 #endif
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */