1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 /* 3 * This file is part of the LibreOffice project. 4 * 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 * 9 */ 10 11 #ifndef INCLUDED_OOX_CRYPTO_DOCUMENTENCRYPTION_HXX 12 #define INCLUDED_OOX_CRYPTO_DOCUMENTENCRYPTION_HXX 13 14 #include <com/sun/star/uno/Reference.hxx> 15 #include <com/sun/star/uno/Sequence.hxx> 16 17 namespace com::sun::star { 18 namespace io { class XStream; } 19 namespace packages { class XPackageEncryption; } 20 namespace beans { struct NamedValue; } 21 namespace uno { class XComponentContext; } 22 } 23 24 namespace oox::ole { class OleStorage; } 25 26 namespace oox::crypto { 27 28 class DocumentEncryption 29 { 30 private: 31 css::uno::Reference< css::uno::XComponentContext > mxContext; 32 css::uno::Reference< css::io::XStream > mxDocumentStream; 33 oox::ole::OleStorage& mrOleStorage; 34 35 css::uno::Reference< css::packages::XPackageEncryption > mxPackageEncryption; 36 const css::uno::Sequence< css::beans::NamedValue >& mMediaEncData; 37 38 public: 39 DocumentEncryption(const css::uno::Reference< css::uno::XComponentContext >& rxContext, 40 css::uno::Reference< css::io::XStream > const & xDocumentStream, 41 oox::ole::OleStorage& rOleStorage, 42 const css::uno::Sequence< css::beans::NamedValue >& rMediaEncData); 43 44 bool encrypt(); 45 46 }; 47 48 } // namespace oox::crypto 49 50 #endif 51 52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 53