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/.
12 #include <libepubgen/EPUBPackage.h>
14 #include <com/sun/star/uno/Sequence.h>
15 #include <com/sun/star/uno/Reference.h>
17 namespace com::sun::star
25 class XHierarchicalStorageAccess
;
33 class XComponentContext
;
41 namespace writerperfect
43 /// The epub package has direct access to the resulting ZIP file.
44 class EPUBPackage
: public libepubgen::EPUBPackage
46 css::uno::Reference
<css::uno::XComponentContext
> mxContext
;
47 css::uno::Reference
<css::embed::XHierarchicalStorageAccess
> mxStorage
;
48 css::uno::Reference
<css::io::XOutputStream
> mxOutputStream
;
49 css::uno::Reference
<css::xml::sax::XWriter
> mxOutputWriter
;
52 explicit EPUBPackage(css::uno::Reference
<css::uno::XComponentContext
> xContext
,
53 const css::uno::Sequence
<css::beans::PropertyValue
>& rDescriptor
);
55 ~EPUBPackage() override
;
57 void openXMLFile(const char* pName
) override
;
59 void openElement(const char* pName
, const librevenge::RVNGPropertyList
& rAttributes
) override
;
60 void closeElement(const char* pName
) override
;
62 void insertCharacters(const librevenge::RVNGString
& rCharacters
) override
;
64 void closeXMLFile() override
;
66 void openCSSFile(const char* pName
) override
;
68 void insertRule(const librevenge::RVNGString
& rSelector
,
69 const librevenge::RVNGPropertyList
& rProperties
) override
;
71 void closeCSSFile() override
;
73 void openBinaryFile(const char* pName
) override
;
75 void insertBinaryData(const librevenge::RVNGBinaryData
& rData
) override
;
77 void closeBinaryFile() override
;
79 void openTextFile(const char* pName
) override
;
81 void insertText(const librevenge::RVNGString
& rCharacters
) override
;
83 void insertLineBreak() override
;
85 void closeTextFile() override
;
88 } // namespace writerperfect
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */