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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_DOCINTERACTION_HXX
21 #define INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_DOCINTERACTION_HXX
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <com/sun/star/task/XInteractionHandler.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
32 // DocumentErrorHandling
33 struct InteractionHandler_Data
;
34 /** wraps common operations with an interaction handler.
36 class InteractionHandler
39 /** creates an interaction handler by instantiating a css.task.InteractionHandler
40 component at the given component context, or using the given document's interaction handler,
41 if one is specified in the document's media descriptor.
44 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rContext
,
45 const ::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& _rxDocument
);
49 ~InteractionHandler();
51 /** requests a document password
55 the initial password on method entry, the password as entered by the user on method leave
57 <TRUE/> if and only if the user entered a password, and confirmed with OK, <FALSE/>
58 if the user aborted the request.
60 bool requestDocumentPassword(
61 const OUString
& _rDocumentName
,
62 OUString
& _io_rPassword
65 /** reports the given error (usually an exception caught on the caller's side)
69 const ::com::sun::star::uno::Any
& _rError
73 ::std::unique_ptr
< InteractionHandler_Data
> m_pData
;
78 #endif // INCLUDED_DBACCESS_SOURCE_EXT_MACROMIGRATION_DOCINTERACTION_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */