libreoffice/include/unotools/ZipPackageHelper.hxx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

65 lines
2.4 KiB
C++
Raw Permalink Normal View History

/* -*- 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_UNOTOOLS_ZIPPACKAGEHELPER_HXX
#define INCLUDED_UNOTOOLS_ZIPPACKAGEHELPER_HXX
#include <unotools/unotoolsdllapi.h>
#include <com/sun/star/uno/XInterface.hpp>
namespace com::sun::star::container { class XHierarchicalNameAccess; }
namespace com::sun::star::lang { class XSingleServiceFactory; }
namespace com::sun::star::uno { class XComponentContext; }
namespace utl {
ZipPackageHelper is now used in Library_cui outside Library_merged ...since 6cb3c79b84e396959a982070f6fc4d439a9c396d "Added the feature to store VCL test results as a zip file", see e.g. failed <https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&brief-log=1627450201.2981>: > 61078 /tinderbox/buildslave/build/workdir/CxxObject/cui/source/dialogs/GraphicTestsDialog.o: In function `GraphicsTestsDialog::HandleDownloadRequest(weld::Button&)´: > 61079 /tinderbox/buildslave/source/libo-master/cui/source/dialogs/GraphicTestsDialog.cxx:87: undefined reference to `utl::ZipPackageHelper::ZipPackageHelper(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&)´ > 61080 /tinderbox/buildslave/source/libo-master/cui/source/dialogs/GraphicTestsDialog.cxx:88: undefined reference to `utl::ZipPackageHelper::getRootFolder()´ > 61081 /tinderbox/buildslave/source/libo-master/cui/source/dialogs/GraphicTestsDialog.cxx:88: undefined reference to `utl::ZipPackageHelper::addFolderWithContent(com::sun::star::uno::Reference<com::sun::star::uno::XInterface> const&, rtl::OUString const&)´ > 61082 /tinderbox/buildslave/source/libo-master/cui/source/dialogs/GraphicTestsDialog.cxx:89: undefined reference to `utl::ZipPackageHelper::savePackage()´ > 61083 NEXT collect2: error: ld returned 1 exit status > 61084 NEXT make[1]: *** [/tinderbox/buildslave/source/libo-master/cui/Library_cui.mk:10: /tinderbox/buildslave/build/instdir/program/libcuilo.so] Error 1 Change-Id: Ia7af3bd4ed23adb8cadd66fb20ce8914040eb901 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119582 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-07-28 09:38:09 +02:00
class UNOTOOLS_DLLPUBLIC ZipPackageHelper
{
public:
ZipPackageHelper( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
const OUString& sPackageURL);
void savePackage();
/// @throws css::uno::Exception
void addFile( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rSourceFile );
/// @throws css::uno::Exception
css::uno::Reference< css::uno::XInterface > addFolder( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rName );
void addFolderWithContent( css::uno::Reference< css::uno::XInterface > const & xRootFolder,
const OUString& rDirURL );
css::uno::Reference< css::uno::XInterface >& getRootFolder();
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: */