Avoid potential negative array index access to cached text.
[LibreOffice.git] / writerperfect / source / writer / EPUBExportUIComponent.hxx
blobb453a4e8809663401b9111eee288f67384e5c4e4
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 #pragma once
12 #include <com/sun/star/beans/XPropertyAccess.hpp>
13 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <com/sun/star/lang/XInitialization.hpp>
15 #include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
16 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
17 #include <com/sun/star/document/XExporter.hpp>
18 #include <com/sun/star/awt/XWindow.hpp>
20 #include <comphelper/sequenceashashmap.hxx>
21 #include <cppuhelper/implbase.hxx>
23 namespace weld
25 class DialogController;
28 namespace com::sun::star::uno
30 class XComponentContext;
33 namespace writerperfect
35 /// EPUB export UI component implementation.
36 class EPUBExportUIComponent
37 : public cppu::WeakImplHelper<css::beans::XPropertyAccess, css::lang::XInitialization,
38 css::lang::XServiceInfo, css::ui::dialogs::XExecutableDialog,
39 css::ui::dialogs::XAsynchronousExecutableDialog,
40 css::document::XExporter>
42 public:
43 EPUBExportUIComponent(css::uno::Reference<css::uno::XComponentContext> xContext);
45 // XPropertyAccess
46 css::uno::Sequence<css::beans::PropertyValue> SAL_CALL getPropertyValues() override;
47 void SAL_CALL
48 setPropertyValues(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) override;
50 // XServiceInfo
51 OUString SAL_CALL getImplementationName() override;
52 sal_Bool SAL_CALL supportsService(const OUString& rServiceName) override;
53 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
55 // XExecutableDialog
56 void SAL_CALL setTitle(const OUString& rTitle) override;
57 sal_Int16 SAL_CALL execute() override;
59 // XAsynchronousExecutableDialog
60 void SAL_CALL setDialogTitle(const OUString& aTitle) override;
62 void SAL_CALL startExecuteModal(
63 const css::uno::Reference<css::ui::dialogs::XDialogClosedListener>& xListener) override;
65 // XExporter
66 void SAL_CALL
67 setSourceDocument(const css::uno::Reference<css::lang::XComponent>& xDocument) override;
69 // XInitialization
70 void SAL_CALL initialize(const css::uno::Sequence<css::uno::Any>& rArguments) override;
72 private:
73 /// The full set of property values.
74 comphelper::SequenceAsHashMap maMediaDescriptor;
75 /// The filter data key.
76 comphelper::SequenceAsHashMap maFilterData;
77 /// UNO context.
78 css::uno::Reference<css::uno::XComponentContext> mxContext;
79 css::uno::Reference<css::lang::XComponent> mxSourceDocument;
80 css::uno::Reference<css::awt::XWindow> mxDialogParent;
81 std::shared_ptr<weld::DialogController> mxAsyncDialog;
84 } // namespace writerperfect
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */