Avoid potential negative array index access to cached text.
[LibreOffice.git] / include / comphelper / simplefileaccessinteraction.hxx
blobe9295d4d7e8323a4fb84214689c23c1483cce842
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_COMPHELPER_SIMPLEFILEACCESSINTERACTION_HXX
11 #define INCLUDED_COMPHELPER_SIMPLEFILEACCESSINTERACTION_HXX
13 #include <sal/config.h>
14 #include <ucbhelper/interceptedinteraction.hxx>
15 #include <comphelper/comphelperdllapi.h>
17 namespace com::sun::star::task { class XInteractionHandler; }
18 namespace com::sun::star::task { class XInteractionRequest; }
20 namespace comphelper {
21 /** An interaction handler wrapper for simple file access.
23 This wrapper is to be used together with XSimpleFileAccess when
24 you want to avoid the error messages displayed when accessing a file (the messages activated
25 by ucphelper::cancelCommandExecution).
27 This wrapper is especially useful when you need to access a Web/DAV connection
28 enabling https certificate validation and optionally enabling the authentication
29 dialog that may be needed in these operations.
31 @param xHandler
32 Used handler, always needed.
33 It will be used for Certificate Validation dialog or authentication dialog.
34 The authentication is used in Web/DAV access when the server requests credentials to be accessed.
36 class COMPHELPER_DLLPUBLIC SimpleFileAccessInteraction final : public ::ucbhelper::InterceptedInteraction
39 public:
40 SimpleFileAccessInteraction(const css::uno::Reference< css::task::XInteractionHandler >& xHandler);
41 virtual ~SimpleFileAccessInteraction() override;
43 private:
45 virtual ucbhelper::InterceptedInteraction::EInterceptionState intercepted(const ::ucbhelper::InterceptedInteraction::InterceptedRequest& aRequest,
46 const css::uno::Reference< css::task::XInteractionRequest >& xRequest) override;
50 #endif
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */