/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #ifndef INCLUDED_COMPHELPER_DOCPASSWORDREQUEST_HXX #define INCLUDED_COMPHELPER_DOCPASSWORDREQUEST_HXX #include #include #include #include #include namespace com::sun::star::task { class XInteractionAbort; } namespace comphelper { class PasswordContinuation; /** Selects which UNO document password request type to use. */ enum class DocPasswordRequestType { Standard, /// Uses the standard com.sun.star.task.DocumentPasswordRequest request. MS /// Uses the com.sun.star.task.DocumentMSPasswordRequest request. }; class COMPHELPER_DLLPUBLIC SimplePasswordRequest final : public cppu::WeakImplHelper { public: explicit SimplePasswordRequest(); virtual ~SimplePasswordRequest() override; bool isPassword() const; OUString getPassword() const; private: SimplePasswordRequest(SimplePasswordRequest const&) = delete; SimplePasswordRequest& operator=(SimplePasswordRequest const&) = delete; // XInteractionRequest virtual css::uno::Any SAL_CALL getRequest() override; virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations() override; private: css::uno::Any maRequest; css::uno::Reference mxAbort; rtl::Reference mxPassword; }; /** Implements the task.XInteractionRequest interface for requesting a password string for a document. */ class COMPHELPER_DLLPUBLIC DocPasswordRequest final : public cppu::WeakImplHelper { public: explicit DocPasswordRequest( DocPasswordRequestType eType, css::task::PasswordRequestMode eMode, const OUString& rDocumentUrl, bool bPasswordToModify = false ); virtual ~DocPasswordRequest() override; bool isPassword() const; OUString getPassword() const; OUString getPasswordToModify() const; bool getRecommendReadOnly() const; private: DocPasswordRequest(DocPasswordRequest const&) = delete; DocPasswordRequest& operator=(DocPasswordRequest const&) = delete; // XInteractionRequest virtual css::uno::Any SAL_CALL getRequest() override; virtual css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL getContinuations() override; private: css::uno::Any maRequest; css::uno::Reference mxAbort; rtl::Reference mxPassword; }; } // namespace comphelper #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ collabora/cp-5.0'>distro/collabora/cp-5.0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2023-12-24Rewrite bin/find-unusedheaders.pyGabor Kelemen
2023-10-23Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]StringStephan Bergmann
2023-03-03flatten DocumentUndoGuardNoel Grandin
2023-01-05Revert all the recent loplugin:unocast changesStephan Bergmann
2022-12-23loplugin:unocast (framework::Desktop)Stephan Bergmann
2022-08-30tdf#149956 Rework toolbar image flippingMaxim Monastirsky
2022-08-30tdf#149741 tdf#149956 Make flipping work also in the sidebarMaxim Monastirsky
2022-07-23Removed executable bits from source fileAndrea Gelmini
2022-07-22tdf#143148 Use pragma once instead of include guardsPoonamShokeen
2022-07-17No need for SfxWeldToolBoxControllerFactoryMaxim Monastirsky
2022-06-02clang-tidy modernize-pass-by-value in frameworkNoel Grandin
2022-05-30framework: fix crash on Writer startup when using --enable-ext-wiki-publisherMiklos Vajna
2022-05-26tdf#149261 sdext: fix crash on starting the presenter console for the 2nd timeMiklos Vajna
2022-05-17osl::Mutex->std::mutex in framework::TransactionManagerNoel Grandin
2022-05-14osl::Mutex->std::mutex in framework::GateNoel Grandin
2022-04-29use more string_view in INetURLObjectNoel Grandin
2022-04-13loplugin:stringviewparam whitelist some more functionsNoel Grandin
2022-01-26move ToolBoxItemId into its own headerCaolán McNamara
2021-12-12prefer more css::awt::XPopupMenu apiCaolán McNamara
2021-12-12prefer css::awt::XPopupMenu apiCaolán McNamara
2021-11-26loplugin:stringliteraldefine in frameworkNoel Grandin
2021-11-05use more DECL_DLLPRIVATE_STATIC_LINKNoel Grandin
2021-10-29simplify framework::TitleHelperNoel Grandin
2021-08-18loplugin:passstuffbyrefNoel Grandin
2021-08-07create comphelper::OMultiTypeInterfaceContainerHelper2 and use itNoel Grandin
2021-07-30osl::Mutex->std::mutex in DispatchHelperNoel Grandin
2021-05-05loplugin:constmethodNoel Grandin
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
2021-04-30tdf#79049 speed up OOXML workbook loadNoel Grandin
2021-04-09Recheck include/ with IWYUGabor Kelemen
2021-04-06Extend ToolBarManager to build weld::ToolbarSzymon Kłos
2021-03-23use single-use attribute for ContextChangeEventMultiplexerNoel Grandin
2021-03-11use strong_int for item ids in vcl::ToolBoxNoel
2021-03-01loplugin:refcounting in sfx2Noel
2021-01-26loplugin:passstuffbyrefNoel
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
2020-11-21tdf#123936 Formatting files in module include with clang-formatPhilipp Hofer
2020-08-19Fix typosAndrea Gelmini
2020-08-14One toolbar generic controller is enoughMaxim Monastirsky