1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
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>
30 class XHierarchicalStorageAccess
;
38 class XComponentContext
;
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
;
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
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */