diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-11-02 10:26:39 +0100 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-11-03 12:19:16 +0000 |
commit | e509c22863b5184421e710cf8ae81e2ddc961623 (patch) | |
tree | 4d7b366c4e5f1fcd0dcb29f901c3732be49d8fe5 /include/comphelper | |
parent | Bin the XSecController::m_pErrorMessage field as it was never used (diff) | |
download | core-e509c22863b5184421e710cf8ae81e2ddc961623.tar.gz core-e509c22863b5184421e710cf8ae81e2ddc961623.zip |
SafeModeDialog: Allow to create zip file from profile
Change-Id: I4296d1cf5058be359ffed46745673cf26eba3375
Reviewed-on: https://gerrit.libreoffice.org/30479
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/backupfilehelper.hxx | 3 | ||||
-rw-r--r-- | include/comphelper/package/ZipPackageHelper.hxx | 57 |
2 files changed, 60 insertions, 0 deletions
diff --git a/include/comphelper/backupfilehelper.hxx b/include/comphelper/backupfilehelper.hxx index 07cfb61053ec..d11208a00572 100644 --- a/include/comphelper/backupfilehelper.hxx +++ b/include/comphelper/backupfilehelper.hxx @@ -182,6 +182,9 @@ namespace comphelper /** Return the profile url */ static const OUString& getUserProfileURL(); + /** Return the url of the backed up profile (when in safe mode) */ + static const OUString& getUserProfileWorkURL(); + private: // internal helper methods static const rtl::OUString getPackURL(); diff --git a/include/comphelper/package/ZipPackageHelper.hxx b/include/comphelper/package/ZipPackageHelper.hxx new file mode 100644 index 000000000000..2cdd5db7dccc --- /dev/null +++ b/include/comphelper/package/ZipPackageHelper.hxx @@ -0,0 +1,57 @@ +/* -*- 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_PACKAGE_ZIPPACKAGEHELPER_HXX +#define INCLUDED_COMPHELPER_PACKAGE_ZIPPACKAGEHELPER_HXX + +#include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/io/XInputStream.hpp> + + +class ZipPackageHelper +{ +public: + ZipPackageHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext, + const OUString& sPackageURL); + + void savePackage(); + + void addFile( const OUString& rSourceFile ) + throw( css::uno::Exception, std::exception ); + + void addStream( css::uno::Reference< css::io::XInputStream > const & xInput, + const OUString& aName ) throw( css::uno::Exception ); + + css::uno::Reference< css::uno::XInterface > addFolder( const OUString& rName ) + throw( css::uno::Exception, std::exception ); + + void addFolderWithContent( const OUString& rDirURL ); + +private: + css::uno::Reference< css::uno::XComponentContext > mxContext; + css::uno::Reference< css::container::XHierarchicalNameAccess > mxHNameAccess; + css::uno::Reference< css::lang::XSingleServiceFactory > mxFactory; + css::uno::Reference< css::uno::XInterface > mxRootFolder; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |