2004-06-11 03:51:09 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* $RCSfile: provider.hxx,v $
|
|
|
|
* $Revision: 1.7 $
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
2008-04-10 18:09:08 -05:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2004-06-11 03:51:09 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _GOODIES_PROVIDER_HXX
|
|
|
|
#define _GOODIES_PROVIDER_HXX
|
|
|
|
|
|
|
|
#include <cppuhelper/implbase1.hxx>
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/graphic/XGraphicProvider.hpp>
|
|
|
|
|
|
|
|
using namespace com::sun::star;
|
|
|
|
|
|
|
|
namespace unographic {
|
|
|
|
|
|
|
|
// -------------------
|
|
|
|
// - GraphicProvider -
|
|
|
|
// -------------------
|
|
|
|
|
|
|
|
class GraphicProvider : public ::cppu::WeakImplHelper1< ::com::sun::star::graphic::XGraphicProvider >
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
GraphicProvider();
|
|
|
|
~GraphicProvider();
|
|
|
|
|
|
|
|
static ::rtl::OUString getImplementationName_Static() throw();
|
|
|
|
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
// XServiceInfo
|
|
|
|
virtual rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException );
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) throw( ::com::sun::star::uno::RuntimeException );
|
|
|
|
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException );
|
|
|
|
|
|
|
|
// XTypeProvider
|
|
|
|
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
|
|
|
|
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
|
|
|
|
|
|
|
|
// XGraphicProvider
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL queryGraphicDescriptor( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& MediaProperties ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
|
|
|
|
virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL queryGraphic( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& MediaProperties ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL storeGraphic( const ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic >& Graphic, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& MediaProperties ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2006-01-19 11:44:56 -06:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > implLoadMemory( const ::rtl::OUString& rResourceURL ) const;
|
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > implLoadResource( const ::rtl::OUString& rResourceURL ) const;
|
2006-10-05 06:50:02 -05:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > implLoadRepositoryImage( const ::rtl::OUString& rResourceURL ) const;
|
2007-10-10 09:33:21 -05:00
|
|
|
::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > implLoadStandardImage( const ::rtl::OUString& rResourceURL ) const;
|
2004-06-11 03:51:09 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|