lok: vcl: fix multiple floatwin removal case more robustly.
[LibreOffice.git] / package / inc / ZipPackageEntry.hxx
blob0fa479cb8465d47109092fa55719402358dbeff8
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 .
19 #ifndef INCLUDED_PACKAGE_INC_ZIPPACKAGEENTRY_HXX
20 #define INCLUDED_PACKAGE_INC_ZIPPACKAGEENTRY_HXX
22 #include <com/sun/star/container/XChild.hpp>
23 #include <com/sun/star/container/XNamed.hpp>
24 #include <com/sun/star/beans/PropertyValue.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/lang/XUnoTunnel.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include "ZipEntry.hxx"
31 #include <cppuhelper/implbase.hxx>
33 #include <vector>
35 typedef void* rtlRandomPool;
36 class ZipOutputStream;
37 class ZipPackageFolder;
39 class ZipPackageEntry : public cppu::WeakImplHelper
41 css::container::XNamed,
42 css::container::XChild,
43 css::lang::XUnoTunnel,
44 css::beans::XPropertySet,
45 css::lang::XServiceInfo
48 protected:
49 css::uno::Reference< css::uno::XComponentContext > m_xContext;
50 OUString msName;
51 bool mbIsFolder:1;
52 bool mbAllowRemoveOnInsert:1;
53 OUString msMediaType;
54 ZipPackageFolder* mpParent;
55 sal_Int32 m_nFormat;
57 public:
58 ZipEntry aEntry;
59 ZipPackageEntry();
60 virtual ~ZipPackageEntry() override;
62 const OUString& GetMediaType() const { return msMediaType; }
63 void SetMediaType(const OUString & sNewType) { msMediaType = sNewType; }
64 void doSetParent(ZipPackageFolder * pNewParent);
65 bool IsFolder() const { return mbIsFolder; }
66 void SetFolder(const bool bSetFolder) { mbIsFolder = bSetFolder; }
68 virtual bool saveChild( const OUString &rPath,
69 std::vector < css::uno::Sequence < css::beans::PropertyValue > > &rManList,
70 ZipOutputStream & rZipOut,
71 const css::uno::Sequence < sal_Int8 >& rEncryptionKey,
72 sal_Int32 nPBKDF2IterationCount,
73 const rtlRandomPool &rRandomPool ) = 0;
75 void clearParent()
77 // xParent.clear();
78 mpParent = nullptr;
80 // XNamed
81 virtual OUString SAL_CALL getName( ) override;
82 virtual void SAL_CALL setName( const OUString& aName ) override;
83 // XChild
84 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
85 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
86 // XUnoTunnel
87 virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override = 0;
88 // XPropertySet
89 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
90 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override = 0;
91 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override = 0;
92 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
93 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
94 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
95 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
97 #endif
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */