2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-06-11 08:51:33 +00:00
|
|
|
|
2013-11-05 02:29:10 +01:00
|
|
|
#ifndef INCLUDED_SVTOOLS_SOURCE_INC_RENDERER_HXX
|
|
|
|
#define INCLUDED_SVTOOLS_SOURCE_INC_RENDERER_HXX
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
#include <tools/gen.hxx>
|
|
|
|
#include <comphelper/propertysethelper.hxx>
|
|
|
|
#include <com/sun/star/lang/XServiceInfo.hpp>
|
|
|
|
#include <com/sun/star/awt/XDevice.hpp>
|
|
|
|
#include <com/sun/star/graphic/XGraphic.hpp>
|
|
|
|
#include <com/sun/star/graphic/XGraphicRenderer.hpp>
|
|
|
|
|
|
|
|
class OutputDevice;
|
|
|
|
|
2013-12-23 09:21:14 +01:00
|
|
|
namespace {
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
class GraphicRendererVCL : public ::cppu::OWeakAggObject,
|
2015-10-30 10:16:38 +02:00
|
|
|
public css::lang::XServiceInfo,
|
|
|
|
public css::lang::XTypeProvider,
|
2004-06-11 08:51:33 +00:00
|
|
|
public ::comphelper::PropertySetHelper,
|
2015-10-30 10:16:38 +02:00
|
|
|
public css::graphic::XGraphicRenderer
|
2004-06-11 08:51:33 +00:00
|
|
|
{
|
2014-01-18 10:51:50 +01:00
|
|
|
static ::comphelper::PropertySetInfo* createPropertySetInfo();
|
|
|
|
|
2004-06-11 08:51:33 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
GraphicRendererVCL();
|
2014-04-01 19:18:35 +02:00
|
|
|
virtual ~GraphicRendererVCL() throw();
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
// XInterface
|
2015-10-30 10:16:38 +02:00
|
|
|
virtual css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
|
2015-10-12 16:04:04 +02:00
|
|
|
virtual void SAL_CALL acquire() throw() override;
|
|
|
|
virtual void SAL_CALL release() throw() override;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
// XServiceInfo
|
2015-10-30 10:16:38 +02:00
|
|
|
virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override;
|
|
|
|
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw( css::uno::RuntimeException, std::exception ) override;
|
|
|
|
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
// XTypeProvider
|
2015-10-30 10:16:38 +02:00
|
|
|
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) throw(css::uno::RuntimeException, std::exception) override;
|
|
|
|
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(css::uno::RuntimeException, std::exception) override;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
// PropertySetHelper
|
2015-10-30 10:16:38 +02:00
|
|
|
virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const css::uno::Any* pValues ) throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException ) override;
|
|
|
|
virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, css::uno::Any* pValue ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException ) override;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
// XGraphicRenderer
|
2015-10-30 10:16:38 +02:00
|
|
|
virtual void SAL_CALL render( const css::uno::Reference< css::graphic::XGraphic >& Graphic ) throw (css::uno::RuntimeException, std::exception) override;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2015-10-30 10:16:38 +02:00
|
|
|
css::uno::Reference< css::awt::XDevice > mxDevice;
|
2004-06-11 08:51:33 +00:00
|
|
|
|
2015-03-19 13:54:12 +02:00
|
|
|
VclPtr<OutputDevice> mpOutDev;
|
2004-06-11 08:51:33 +00:00
|
|
|
Rectangle maDestRect;
|
2015-10-30 10:16:38 +02:00
|
|
|
css::uno::Any maRenderData;
|
2004-06-11 08:51:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
2010-10-14 08:27:31 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|