LCOV - code coverage report
Current view: top level - framework/inc/uiconfiguration - imagemanager.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 8 75.0 %
Date: 2015-06-13 12:38:46 Functions: 2 3 66.7 %
Legend: Lines: hit not hit

          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             : 
      20             : #ifndef INCLUDED_FRAMEWORK_INC_UICONFIGURATION_IMAGEMANAGER_HXX
      21             : #define INCLUDED_FRAMEWORK_INC_UICONFIGURATION_IMAGEMANAGER_HXX
      22             : 
      23             : #include <memory>
      24             : 
      25             : #include <stdtypes.h>
      26             : #include <uiconfiguration/imagetype.hxx>
      27             : 
      28             : #include <com/sun/star/lang/XServiceInfo.hpp>
      29             : #include <com/sun/star/lang/XTypeProvider.hpp>
      30             : #include <com/sun/star/lang/XComponent.hpp>
      31             : #include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
      32             : #include <com/sun/star/ui/XUIConfigurationStorage.hpp>
      33             : #include <com/sun/star/ui/XUIConfiguration.hpp>
      34             : #include <com/sun/star/ui/XImageManager.hpp>
      35             : #include <com/sun/star/lang/XInitialization.hpp>
      36             : #include <com/sun/star/ui/ConfigurationEvent.hpp>
      37             : #include <com/sun/star/embed/XTransactedObject.hpp>
      38             : #include <com/sun/star/uno/XComponentContext.hpp>
      39             : 
      40             : #include <cppuhelper/implbase2.hxx>
      41             : #include <cppuhelper/interfacecontainer.hxx>
      42             : #include <cppuhelper/supportsservice.hxx>
      43             : #include <rtl/ustring.hxx>
      44             : 
      45             : #include <vcl/image.hxx>
      46             : #include <rtl/ref.hxx>
      47             : 
      48             : namespace framework
      49             : {
      50             :     class ImageManagerImpl;
      51             :     class ImageManager :    public ::cppu::WeakImplHelper2< ::com::sun::star::ui::XImageManager, css::lang::XServiceInfo>
      52             :     {
      53             :         public:
      54             :             ImageManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
      55             :             virtual ~ImageManager();
      56             : 
      57           1 :             virtual OUString SAL_CALL getImplementationName()
      58             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      59             :             {
      60           1 :                 return OUString("com.sun.star.comp.framework.ImageManager");
      61             :             }
      62             : 
      63           0 :             virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
      64             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      65             :             {
      66           0 :                 return cppu::supportsService(this, ServiceName);
      67             :             }
      68             : 
      69           1 :             virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
      70             :                 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      71             :             {
      72           1 :                 css::uno::Sequence< OUString > aSeq(1);
      73           1 :                 aSeq[0] = "com.sun.star.ui.ImageManager";
      74           1 :                 return aSeq;
      75             :             }
      76             : 
      77             :             // XComponent
      78             :             virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      79             :             virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      80             :             virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      81             : 
      82             :             // XInitialization
      83             :             virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      84             : 
      85             :             // XImageManager
      86             :             virtual void SAL_CALL reset()
      87             :                 throw (css::lang::IllegalAccessException,
      88             :                        css::uno::RuntimeException,
      89             :                        std::exception) SAL_OVERRIDE;
      90             :             virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAllImageNames( ::sal_Int16 nImageType ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      91             :             virtual sal_Bool SAL_CALL hasImage( ::sal_Int16 nImageType, const OUString& aCommandURL ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      92             :             virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > > SAL_CALL getImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< OUString >& aCommandURLSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      93             :             virtual void SAL_CALL replaceImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< OUString >& aCommandURLSequence, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& aGraphicsSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      94             :             virtual void SAL_CALL removeImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< OUString >& aResourceURLSequence ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      95             :             virtual void SAL_CALL insertImages( ::sal_Int16 nImageType, const ::com::sun::star::uno::Sequence< OUString >& aCommandURLSequence, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > >& aGraphicSequence ) throw (::com::sun::star::container::ElementExistException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IllegalAccessException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      96             : 
      97             :             // XUIConfiguration
      98             :             virtual void SAL_CALL addConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      99             :             virtual void SAL_CALL removeConfigurationListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIConfigurationListener >& Listener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     100             : 
     101             :             // XUIConfigurationPersistence
     102             :             virtual void SAL_CALL reload() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     103             :             virtual void SAL_CALL store() throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     104             :             virtual void SAL_CALL storeToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     105             :             virtual sal_Bool SAL_CALL isModified() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     106             :             virtual sal_Bool SAL_CALL isReadOnly() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     107             : 
     108             :             // Non-UNO methods
     109             :             void setStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& Storage ) throw (::com::sun::star::uno::RuntimeException);
     110             : 
     111             :         private:
     112             :             ::std::unique_ptr<ImageManagerImpl> m_pImpl;
     113             :    };
     114             : }
     115             : 
     116             : #endif // INCLUDED_FRAMEWORK_INC_UICONFIGURATION_IMAGEMANAGER_HXX
     117             : 
     118             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11