Avoid potential negative array index access to cached text.
[LibreOffice.git] / include / basic / modsizeexceeded.hxx
blobe2a32f954257ce0dd9954afcb5d4b7a3fddcc0aa
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/.
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_BASIC_MODSIZEEXCEEDED_HXX
21 #define INCLUDED_BASIC_MODSIZEEXCEEDED_HXX
23 #include <config_options.h>
24 #include <com/sun/star/task/XInteractionRequest.hpp>
25 #include <cppuhelper/implbase.hxx>
26 #include <basic/basicdllapi.h>
27 #include <comphelper/interaction.hxx>
28 #include <rtl/ref.hxx>
29 #include <vector>
31 namespace com::sun::star::task { class XInteractionContinuation; }
33 #if defined(_MSC_VER) && !defined(__clang__)
34 // MSVC automatically applies dllexport to template instantiations if they are a base class
35 // of a dllexport class, and this template instantiation is a case of that. If we don't
36 // dllimport here, MSVC will complain about duplicate symbols in a mergelibs build.
37 template class __declspec(dllimport) cppu::WeakImplHelper< css::task::XInteractionRequest >;
38 #endif
40 class UNLESS_MERGELIBS(BASIC_DLLPUBLIC) ModuleSizeExceeded final : public cppu::WeakImplHelper< css::task::XInteractionRequest >
42 // C++ interface
43 public:
44 ModuleSizeExceeded( const std::vector<OUString>& sModules );
46 bool isAbort() const;
47 bool isApprove() const;
49 // UNO interface
50 public:
51 virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations() override { return m_lContinuations; }
52 css::uno::Any SAL_CALL getRequest() override
54 return m_aRequest;
57 // member
58 private:
59 css::uno::Any m_aRequest;
60 css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > m_lContinuations;
61 rtl::Reference< comphelper::OInteractionAbort > m_xAbort;
62 rtl::Reference< comphelper::OInteractionApprove> m_xApprove;
65 #endif
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */