merge the formfield patch from ooo-build
[ooovba.git] / package / source / zippackage / ZipPackageEntry.hxx
blob21e487f0bb864d7d1766260e1b4ed180dd645491
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: ZipPackageEntry.hxx,v $
10 * $Revision: 1.16 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _ZIP_PACKAGE_ENTRY_HXX
31 #define _ZIP_PACKAGE_ENTRY_HXX
33 #include <com/sun/star/container/XChild.hpp>
34 #include <com/sun/star/container/XNamed.hpp>
35 #include <com/sun/star/beans/XPropertySet.hpp>
36 #include <com/sun/star/lang/XUnoTunnel.hpp>
37 #include <com/sun/star/container/XNameContainer.hpp>
38 #ifndef _COM_SUN_STAR_LANG_XPSERVICEINFO_HPP_
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #endif
41 #include <ZipEntry.hxx>
42 #include <cppuhelper/implbase5.hxx>
44 class ZipPackageFolder;
46 class ZipPackageEntry : public cppu::WeakImplHelper5
48 com::sun::star::container::XNamed,
49 com::sun::star::container::XChild,
50 com::sun::star::lang::XUnoTunnel,
51 com::sun::star::beans::XPropertySet,
52 com::sun::star::lang::XServiceInfo
55 protected:
56 ::rtl::OUString msName;
57 bool mbIsFolder:1;
58 bool mbAllowRemoveOnInsert:1;
59 // com::sun::star::uno::Reference < com::sun::star::container::XNameContainer > xParent;
60 ::rtl::OUString sMediaType;
61 ZipPackageFolder * pParent;
62 public:
63 ZipEntry aEntry;
64 ZipPackageEntry ( bool bNewFolder = sal_False );
65 virtual ~ZipPackageEntry( void );
67 ::rtl::OUString & GetMediaType () { return sMediaType; }
68 void SetMediaType ( const ::rtl::OUString & sNewType) { sMediaType = sNewType; }
69 void doSetParent ( ZipPackageFolder * pNewParent, sal_Bool bInsert );
70 bool IsFolder ( ) { return mbIsFolder; }
71 ZipPackageFolder* GetParent ( ) { return pParent; }
72 void SetFolder ( bool bSetFolder ) { mbIsFolder = bSetFolder; }
74 void clearParent ( void )
76 // xParent.clear();
77 pParent = NULL;
79 // XNamed
80 virtual ::rtl::OUString SAL_CALL getName( )
81 throw(::com::sun::star::uno::RuntimeException);
82 virtual void SAL_CALL setName( const ::rtl::OUString& aName )
83 throw(::com::sun::star::uno::RuntimeException);
84 // XChild
85 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( )
86 throw(::com::sun::star::uno::RuntimeException);
87 virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
88 throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
89 // XUnoTunnel
90 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
91 throw(::com::sun::star::uno::RuntimeException) = 0;
92 // XPropertySet
93 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( )
94 throw(::com::sun::star::uno::RuntimeException);
95 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
96 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
97 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName )
98 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
99 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
100 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
101 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
102 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
103 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
104 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
105 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
106 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
108 #endif