LCOV - code coverage report
Current view: top level - package/inc - ZipPackageEntry.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 7 7 100.0 %
Date: 2012-08-25 Functions: 5 5 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       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                 :            :  * This file incorporates work covered by the following license notice:
      10                 :            :  *
      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 .
      18                 :            :  */
      19                 :            : #ifndef _ZIP_PACKAGE_ENTRY_HXX
      20                 :            : #define _ZIP_PACKAGE_ENTRY_HXX
      21                 :            : 
      22                 :            : #include <com/sun/star/container/XChild.hpp>
      23                 :            : #include <com/sun/star/container/XNamed.hpp>
      24                 :            : #include <com/sun/star/beans/XPropertySet.hpp>
      25                 :            : #include <com/sun/star/lang/XUnoTunnel.hpp>
      26                 :            : #include <com/sun/star/container/XNameContainer.hpp>
      27                 :            : #include <com/sun/star/lang/XServiceInfo.hpp>
      28                 :            : #include <ZipEntry.hxx>
      29                 :            : #include <cppuhelper/implbase5.hxx>
      30                 :            : 
      31                 :            : class ZipPackageFolder;
      32                 :            : 
      33                 :            : class ZipPackageEntry : public cppu::WeakImplHelper5
      34                 :            : <
      35                 :            :     com::sun::star::container::XNamed,
      36                 :            :     com::sun::star::container::XChild,
      37                 :            :     com::sun::star::lang::XUnoTunnel,
      38                 :            :     com::sun::star::beans::XPropertySet,
      39                 :            :     com::sun::star::lang::XServiceInfo
      40                 :            : >
      41                 :            : {
      42                 :            : protected:
      43                 :            :     ::rtl::OUString msName;
      44                 :            :     bool mbIsFolder:1;
      45                 :            :     bool mbAllowRemoveOnInsert:1;
      46                 :            :     // com::sun::star::uno::Reference < com::sun::star::container::XNameContainer > xParent;
      47                 :            :     ::rtl::OUString     sMediaType;
      48                 :            :     ZipPackageFolder * pParent;
      49                 :            : public:
      50                 :            :     ZipEntry aEntry;
      51                 :            :     ZipPackageEntry ( bool bNewFolder = sal_False );
      52                 :            :     virtual ~ZipPackageEntry( void );
      53                 :            : 
      54                 :       3658 :     ::rtl::OUString & GetMediaType () { return sMediaType; }
      55                 :      10180 :     void SetMediaType ( const ::rtl::OUString & sNewType) { sMediaType = sNewType; }
      56                 :            :     void doSetParent ( ZipPackageFolder * pNewParent, sal_Bool bInsert );
      57                 :      26519 :     bool IsFolder ( ) { return mbIsFolder; }
      58                 :            :     ZipPackageFolder* GetParent ( ) { return pParent; }
      59                 :      65056 :     void SetFolder ( bool bSetFolder ) { mbIsFolder = bSetFolder; }
      60                 :            : 
      61                 :      25634 :     void clearParent ( void )
      62                 :            :     {
      63                 :            :         // xParent.clear();
      64                 :      25634 :         pParent = NULL;
      65                 :      25634 :     }
      66                 :            :     // XNamed
      67                 :            :     virtual ::rtl::OUString SAL_CALL getName(  )
      68                 :            :         throw(::com::sun::star::uno::RuntimeException);
      69                 :            :     virtual void SAL_CALL setName( const ::rtl::OUString& aName )
      70                 :            :         throw(::com::sun::star::uno::RuntimeException);
      71                 :            :     // XChild
      72                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent(  )
      73                 :            :         throw(::com::sun::star::uno::RuntimeException);
      74                 :            :     virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
      75                 :            :         throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
      76                 :            :     // XUnoTunnel
      77                 :            :     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier )
      78                 :            :         throw(::com::sun::star::uno::RuntimeException) = 0;
      79                 :            :     // XPropertySet
      80                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  )
      81                 :            :         throw(::com::sun::star::uno::RuntimeException);
      82                 :            :     virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue )
      83                 :            :         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;
      84                 :            :     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName )
      85                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) = 0;
      86                 :            :     virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener )
      87                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      88                 :            :     virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener )
      89                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      90                 :            :     virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
      91                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      92                 :            :     virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener )
      93                 :            :         throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      94                 :            : };
      95                 :            : #endif
      96                 :            : 
      97                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10