LCOV - code coverage report
Current view: top level - embeddedobj/source/inc - dummyobject.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 3 100.0 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 1 2 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #ifndef _INC_DUMMYOBJECT_HXX_
      30                 :            : #define _INC_DUMMYOBJECT_HXX_
      31                 :            : 
      32                 :            : #include <com/sun/star/uno/Sequence.hxx>
      33                 :            : #include <com/sun/star/uno/Reference.hxx>
      34                 :            : #include <com/sun/star/uno/Any.hxx>
      35                 :            : #include <com/sun/star/embed/XEmbeddedObject.hpp>
      36                 :            : #include <com/sun/star/embed/XEmbedPersist.hpp>
      37                 :            : #include <cppuhelper/implbase2.hxx>
      38                 :            : 
      39                 :            : namespace com { namespace sun { namespace star {
      40                 :            :     namespace embed {
      41                 :            :         class XStorage;
      42                 :            :     }
      43                 :            :     namespace util {
      44                 :            :         class XCloseListener;
      45                 :            :     }
      46                 :            :     namespace beans {
      47                 :            :         struct PropertyValue;
      48                 :            :         struct NamedValue;
      49                 :            :     }
      50                 :            : }}}
      51                 :            : 
      52                 :            : namespace cppu {
      53                 :            :     class OMultiTypeInterfaceContainerHelper;
      54                 :            : }
      55                 :            : 
      56                 :            : class ODummyEmbeddedObject : public ::cppu::WeakImplHelper2
      57                 :            :                         < ::com::sun::star::embed::XEmbeddedObject
      58                 :            :                         , ::com::sun::star::embed::XEmbedPersist >
      59                 :            : {
      60                 :            :     ::osl::Mutex    m_aMutex;
      61                 :            :     ::cppu::OMultiTypeInterfaceContainerHelper* m_pInterfaceContainer;
      62                 :            :     sal_Bool m_bDisposed;
      63                 :            : 
      64                 :            :     ::rtl::OUString m_aEntryName;
      65                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xParentStorage;
      66                 :            :     sal_Int32 m_nObjectState;
      67                 :            : 
      68                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > m_xClientSite;
      69                 :            : 
      70                 :            :     sal_Int64 m_nCachedAspect;
      71                 :            :     ::com::sun::star::awt::Size m_aCachedSize;
      72                 :            :     sal_Bool m_bHasCachedSize;
      73                 :            : 
      74                 :            :     // following information will be used between SaveAs and SaveCompleted
      75                 :            :     sal_Bool m_bWaitSaveCompleted;
      76                 :            :     ::rtl::OUString m_aNewEntryName;
      77                 :            :     ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > m_xNewParentStorage;
      78                 :            : 
      79                 :            : protected:
      80                 :            :     void CheckInit();
      81                 :            :     void PostEvent_Impl( const ::rtl::OUString& aEventName );
      82                 :            : 
      83                 :            : public:
      84                 :            : 
      85                 :          9 :     ODummyEmbeddedObject()
      86                 :            :     : m_pInterfaceContainer( NULL )
      87                 :            :     , m_bDisposed( sal_False )
      88                 :            :     , m_nObjectState( -1 )
      89                 :            :     , m_nCachedAspect( 0 )
      90                 :            :     , m_bHasCachedSize( sal_False )
      91         [ +  - ]:          9 :     , m_bWaitSaveCompleted( sal_False )
      92                 :          9 :     {}
      93                 :            : 
      94                 :            :     ~ODummyEmbeddedObject();
      95                 :            : 
      96                 :            : // XEmbeddedObject
      97                 :            : 
      98                 :            :     virtual void SAL_CALL changeState( sal_Int32 nNewState )
      99                 :            :         throw ( ::com::sun::star::embed::UnreachableStateException,
     100                 :            :                 ::com::sun::star::embed::WrongStateException,
     101                 :            :                 ::com::sun::star::uno::Exception,
     102                 :            :                 ::com::sun::star::uno::RuntimeException );
     103                 :            : 
     104                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getReachableStates()
     105                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     106                 :            :                 ::com::sun::star::uno::RuntimeException );
     107                 :            : 
     108                 :            :     virtual sal_Int32 SAL_CALL getCurrentState()
     109                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     110                 :            :                 ::com::sun::star::uno::RuntimeException );
     111                 :            : 
     112                 :            :     virtual void SAL_CALL doVerb( sal_Int32 nVerbID )
     113                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     114                 :            :                 ::com::sun::star::embed::WrongStateException,
     115                 :            :                 ::com::sun::star::embed::UnreachableStateException,
     116                 :            :                 ::com::sun::star::uno::Exception,
     117                 :            :                 ::com::sun::star::uno::RuntimeException );
     118                 :            : 
     119                 :            :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::embed::VerbDescriptor > SAL_CALL getSupportedVerbs()
     120                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     121                 :            :                 ::com::sun::star::uno::RuntimeException );
     122                 :            : 
     123                 :            :     virtual void SAL_CALL setClientSite(
     124                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient >& xClient )
     125                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     126                 :            :                 ::com::sun::star::uno::RuntimeException );
     127                 :            : 
     128                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedClient > SAL_CALL getClientSite()
     129                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     130                 :            :                 ::com::sun::star::uno::RuntimeException );
     131                 :            : 
     132                 :            :     virtual void SAL_CALL update()
     133                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     134                 :            :                 ::com::sun::star::uno::Exception,
     135                 :            :                 ::com::sun::star::uno::RuntimeException );
     136                 :            : 
     137                 :            :     virtual void SAL_CALL setUpdateMode( sal_Int32 nMode )
     138                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     139                 :            :                 ::com::sun::star::uno::RuntimeException );
     140                 :            : 
     141                 :            :     virtual sal_Int64 SAL_CALL getStatus( sal_Int64 nAspect )
     142                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     143                 :            :                 ::com::sun::star::uno::RuntimeException );
     144                 :            : 
     145                 :            :     virtual void SAL_CALL setContainerName( const ::rtl::OUString& sName )
     146                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     147                 :            : 
     148                 :            : 
     149                 :            : // XVisualObject
     150                 :            : 
     151                 :            :     virtual void SAL_CALL setVisualAreaSize( sal_Int64 nAspect, const ::com::sun::star::awt::Size& aSize )
     152                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     153                 :            :                 ::com::sun::star::embed::WrongStateException,
     154                 :            :                 ::com::sun::star::uno::Exception,
     155                 :            :                 ::com::sun::star::uno::RuntimeException );
     156                 :            : 
     157                 :            :     virtual ::com::sun::star::awt::Size SAL_CALL getVisualAreaSize( sal_Int64 nAspect )
     158                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     159                 :            :                 ::com::sun::star::embed::WrongStateException,
     160                 :            :                 ::com::sun::star::uno::Exception,
     161                 :            :                 ::com::sun::star::uno::RuntimeException );
     162                 :            : 
     163                 :            :     virtual ::com::sun::star::embed::VisualRepresentation SAL_CALL getPreferredVisualRepresentation( ::sal_Int64 nAspect )
     164                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     165                 :            :                 ::com::sun::star::embed::WrongStateException,
     166                 :            :                 ::com::sun::star::uno::Exception,
     167                 :            :                 ::com::sun::star::uno::RuntimeException );
     168                 :            : 
     169                 :            :     virtual sal_Int32 SAL_CALL getMapUnit( sal_Int64 nAspect )
     170                 :            :         throw ( ::com::sun::star::uno::Exception,
     171                 :            :                 ::com::sun::star::uno::RuntimeException);
     172                 :            : 
     173                 :            : // XEmbedPersist
     174                 :            : 
     175                 :            :     virtual void SAL_CALL setPersistentEntry(
     176                 :            :                     const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
     177                 :            :                     const ::rtl::OUString& sEntName,
     178                 :            :                     sal_Int32 nEntryConnectionMode,
     179                 :            :                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
     180                 :            :                     const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
     181                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     182                 :            :                 ::com::sun::star::embed::WrongStateException,
     183                 :            :                 ::com::sun::star::io::IOException,
     184                 :            :                 ::com::sun::star::uno::Exception,
     185                 :            :                 ::com::sun::star::uno::RuntimeException );
     186                 :            : 
     187                 :            :     virtual void SAL_CALL storeToEntry( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage, const ::rtl::OUString& sEntName, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
     188                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     189                 :            :                 ::com::sun::star::embed::WrongStateException,
     190                 :            :                 ::com::sun::star::io::IOException,
     191                 :            :                 ::com::sun::star::uno::Exception,
     192                 :            :                 ::com::sun::star::uno::RuntimeException );
     193                 :            : 
     194                 :            :     virtual void SAL_CALL storeAsEntry(
     195                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xStorage,
     196                 :            :                 const ::rtl::OUString& sEntName,
     197                 :            :                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
     198                 :            :                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
     199                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     200                 :            :                 ::com::sun::star::embed::WrongStateException,
     201                 :            :                 ::com::sun::star::io::IOException,
     202                 :            :                 ::com::sun::star::uno::Exception,
     203                 :            :                 ::com::sun::star::uno::RuntimeException );
     204                 :            : 
     205                 :            :     virtual void SAL_CALL saveCompleted( sal_Bool bUseNew )
     206                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     207                 :            :                 ::com::sun::star::uno::Exception,
     208                 :            :                 ::com::sun::star::uno::RuntimeException );
     209                 :            : 
     210                 :            :     virtual sal_Bool SAL_CALL hasEntry()
     211                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     212                 :            :                 ::com::sun::star::uno::RuntimeException );
     213                 :            : 
     214                 :            :     virtual ::rtl::OUString SAL_CALL getEntryName()
     215                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     216                 :            :                 ::com::sun::star::uno::RuntimeException );
     217                 :            : 
     218                 :            : 
     219                 :            : // XCommonEmbedPersist
     220                 :            : 
     221                 :            :     virtual void SAL_CALL storeOwn()
     222                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     223                 :            :                 ::com::sun::star::io::IOException,
     224                 :            :                 ::com::sun::star::uno::Exception,
     225                 :            :                 ::com::sun::star::uno::RuntimeException );
     226                 :            : 
     227                 :            :     virtual sal_Bool SAL_CALL isReadonly()
     228                 :            :         throw ( ::com::sun::star::embed::WrongStateException,
     229                 :            :                 ::com::sun::star::uno::RuntimeException );
     230                 :            : 
     231                 :            :     virtual void SAL_CALL reload(
     232                 :            :                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lArguments,
     233                 :            :                 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& lObjArgs )
     234                 :            :         throw ( ::com::sun::star::lang::IllegalArgumentException,
     235                 :            :                 ::com::sun::star::embed::WrongStateException,
     236                 :            :                 ::com::sun::star::io::IOException,
     237                 :            :                 ::com::sun::star::uno::Exception,
     238                 :            :                 ::com::sun::star::uno::RuntimeException );
     239                 :            : 
     240                 :            : 
     241                 :            : // XClassifiedObject
     242                 :            : 
     243                 :            :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getClassID()
     244                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     245                 :            : 
     246                 :            :     virtual ::rtl::OUString SAL_CALL getClassName()
     247                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     248                 :            : 
     249                 :            :     virtual void SAL_CALL setClassInfo(
     250                 :            :                 const ::com::sun::star::uno::Sequence< sal_Int8 >& aClassID, const ::rtl::OUString& aClassName )
     251                 :            :         throw ( ::com::sun::star::lang::NoSupportException,
     252                 :            :                 ::com::sun::star::uno::RuntimeException );
     253                 :            : 
     254                 :            : 
     255                 :            : // XComponentSupplier
     256                 :            : 
     257                 :            :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable > SAL_CALL getComponent()
     258                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     259                 :            : 
     260                 :            : // XStateChangeBroadcaster
     261                 :            :     virtual void SAL_CALL addStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     262                 :            :     virtual void SAL_CALL removeStateChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStateChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
     263                 :            : 
     264                 :            : // XCloseable
     265                 :            : 
     266                 :            :     virtual void SAL_CALL close( sal_Bool DeliverOwnership )
     267                 :            :         throw ( ::com::sun::star::util::CloseVetoException,
     268                 :            :                 ::com::sun::star::uno::RuntimeException );
     269                 :            : 
     270                 :            :     virtual void SAL_CALL addCloseListener(
     271                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
     272                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     273                 :            : 
     274                 :            :     virtual void SAL_CALL removeCloseListener(
     275                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseListener >& Listener )
     276                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     277                 :            : 
     278                 :            : // XEventBroadcaster
     279                 :            :     virtual void SAL_CALL addEventListener(
     280                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
     281                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     282                 :            : 
     283                 :            :     virtual void SAL_CALL removeEventListener(
     284                 :            :                 const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& Listener )
     285                 :            :         throw ( ::com::sun::star::uno::RuntimeException );
     286                 :            : 
     287                 :            : };
     288                 :            : 
     289                 :            : #endif
     290                 :            : 
     291                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10