LCOV - code coverage report
Current view: top level - canvas/source/cairo - cairo_services.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 9 13 69.2 %
Date: 2015-06-13 12:38:46 Functions: 4 5 80.0 %
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             : #include <canvas/debug.hxx>
      21             : #include <canvas/verbosetrace.hxx>
      22             : #include <canvas/canvastools.hxx>
      23             : 
      24             : #include <com/sun/star/registry/XRegistryKey.hpp>
      25             : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      26             : #include <com/sun/star/uno/XComponentContext.hpp>
      27             : 
      28             : #include <cppuhelper/factory.hxx>
      29             : #include <cppuhelper/implementationentry.hxx>
      30             : #include <comphelper/servicedecl.hxx>
      31             : 
      32             : #include <algorithm>
      33             : 
      34             : #include "cairo_canvas.hxx"
      35             : #include "cairo_spritecanvas.hxx"
      36             : 
      37             : 
      38             : using namespace ::com::sun::star;
      39             : 
      40             : #if defined(WNT) || defined (MACOSX)
      41             : #  error "The cairo canvas should not be enabled on Windows or Mac cf fdo#46901"
      42             : #endif
      43             : 
      44             : namespace cairocanvas
      45             : {
      46           3 :     static uno::Reference<uno::XInterface> initCanvas( Canvas* pCanvas )
      47             :     {
      48           3 :         uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
      49           3 :         pCanvas->initialize();
      50           2 :         return xRet;
      51             :     }
      52             : 
      53             :     namespace sdecl = comphelper::service_decl;
      54           2 :     sdecl::class_< Canvas, sdecl::with_args<true> > serviceImpl1(&initCanvas);
      55           2 :     const sdecl::ServiceDecl cairoCanvasDecl(
      56             :         serviceImpl1,
      57             :         CANVAS_IMPLEMENTATION_NAME,
      58             :         CANVAS_SERVICE_NAME );
      59             : 
      60           0 :     static uno::Reference<uno::XInterface> initSpriteCanvas( SpriteCanvas* pCanvas )
      61             :     {
      62           0 :         uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pCanvas));
      63           0 :         pCanvas->initialize();
      64           0 :         return xRet;
      65             :     }
      66             : 
      67             :     namespace sdecl = comphelper::service_decl;
      68           2 :     sdecl::class_< SpriteCanvas, sdecl::with_args<true> > serviceImpl2(&initSpriteCanvas);
      69           2 :     const sdecl::ServiceDecl cairoSpriteCanvasDecl(
      70             :         serviceImpl2,
      71             :         SPRITECANVAS_IMPLEMENTATION_NAME,
      72             :         SPRITECANVAS_SERVICE_NAME );
      73             : }
      74             : 
      75             : // The C shared lib entry points
      76           8 : COMPHELPER_SERVICEDECL_EXPORTS2(cairocanvas, cairocanvas::cairoCanvasDecl, cairocanvas::cairoSpriteCanvasDecl)
      77             : 
      78             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11