LCOV - code coverage report
Current view: top level - cppcanvas/source/uno - uno_mtfrenderer.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 1 2 50.0 %
Date: 2015-06-13 12:38:46 Functions: 1 3 33.3 %
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             : 
      10             : #ifndef INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX
      11             : #define INCLUDED_CPPCANVAS_SOURCE_UNO_UNO_MTFRENDERER_HXX
      12             : #include <com/sun/star/rendering/MtfRenderer.hpp>
      13             : #include <com/sun/star/rendering/XBitmapCanvas.hpp>
      14             : #include <com/sun/star/uno/XComponentContext.hpp>
      15             : #include <com/sun/star/beans/XFastPropertySet.hpp>
      16             : #include <cppuhelper/compbase2.hxx>
      17             : #include <cppuhelper/basemutex.hxx>
      18             : #include <vcl/gdimtf.hxx>
      19             : 
      20             : typedef cppu::WeakComponentImplHelper2<com::sun::star::rendering::XMtfRenderer, com::sun::star::beans::XFastPropertySet> MtfRendererBase;
      21             : 
      22           2 : class MtfRenderer : private cppu::BaseMutex, public MtfRendererBase
      23             : {
      24             : public:
      25             :     MtfRenderer (com::sun::star::uno::Sequence<com::sun::star::uno::Any> const& args,
      26             :                  com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&);
      27             : 
      28             :     // XMtfRenderer iface
      29             :     void SAL_CALL setMetafile (const ::com::sun::star::uno::Sequence< sal_Int8 >& rMtf) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      30             :     void SAL_CALL draw (double fScaleX, double fScaleY) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      31             : 
      32             :     // XFastPropertySet
      33             :     // setFastPropertyValue (0, GDIMetaFile*) is used to speedup the rendering
      34           0 :     virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue(sal_Int32 /*nHandle*/)  throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return ::com::sun::star::uno::Any(); }
      35             :     virtual void SAL_CALL setFastPropertyValue(sal_Int32 nHandle, const ::com::sun::star::uno::Any&)  throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      36             : 
      37             : private:
      38             :     GDIMetaFile* mpMetafile;
      39             :     com::sun::star::uno::Reference<com::sun::star::rendering::XBitmapCanvas> mxCanvas;
      40             : };
      41             : 
      42             : #endif
      43             : 
      44             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11