LCOV - code coverage report
Current view: top level - sd/source/ui/unoidl - unodoc.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 24 24 100.0 %
Date: 2012-08-25 Functions: 6 6 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 16 32 50.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include <rtl/ustring.hxx>
      30                 :            : #include <sfx2/docfac.hxx>
      31                 :            : #include <sfx2/sfxmodelfactory.hxx>
      32                 :            : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
      33                 :            : 
      34                 :            : #include "sddll.hxx"
      35                 :            : #include "DrawDocShell.hxx"
      36                 :            : #include "GraphicDocShell.hxx"
      37                 :            : #include <osl/mutex.hxx>
      38                 :            : #include <vcl/svapp.hxx>
      39                 :            : 
      40                 :            : using namespace ::com::sun::star;
      41                 :            : 
      42                 :            : // com.sun.star.comp.Draw.DrawingDocument
      43                 :            : 
      44                 :         38 : ::rtl::OUString SAL_CALL SdDrawingDocument_getImplementationName() throw( uno::RuntimeException )
      45                 :            : {
      46                 :         38 :     return rtl::OUString( "com.sun.star.comp.Draw.DrawingDocument" );
      47                 :            : }
      48                 :            : 
      49                 :         16 : uno::Sequence< rtl::OUString > SAL_CALL SdDrawingDocument_getSupportedServiceNames() throw( uno::RuntimeException )
      50                 :            : {
      51                 :         16 :     uno::Sequence< rtl::OUString > aSeq( 2 );
      52         [ +  - ]:         16 :     aSeq[0] = "com.sun.star.drawing.DrawingDocument";
      53         [ +  - ]:         16 :     aSeq[1] = "com.sun.star.drawing.DrawingDocumentFactory";
      54                 :            : 
      55                 :         16 :     return aSeq;
      56                 :            : }
      57                 :            : 
      58                 :        104 : uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance(
      59                 :            :                 const uno::Reference< lang::XMultiServiceFactory > &, const sal_uInt64 _nCreationFlags )
      60                 :            : {
      61         [ +  - ]:        104 :     SolarMutexGuard aGuard;
      62                 :            : 
      63         [ +  - ]:        104 :     SdDLL::Init();
      64                 :            : 
      65                 :            :     SfxObjectShell* pShell =
      66                 :            :         new ::sd::GraphicDocShell(
      67 [ +  - ][ +  - ]:        104 :             _nCreationFlags, sal_False, DOCUMENT_TYPE_DRAW );
      68 [ +  - ][ +  - ]:        104 :     return uno::Reference< uno::XInterface >( pShell->GetModel() );
      69                 :            : }
      70                 :            : 
      71                 :            : // com.sun.star.comp.Draw.PresentationDocument
      72                 :            : 
      73                 :         36 : ::rtl::OUString SAL_CALL SdPresentationDocument_getImplementationName() throw( uno::RuntimeException )
      74                 :            : {
      75                 :         36 :     return rtl::OUString( "com.sun.star.comp.Draw.PresentationDocument" );
      76                 :            : }
      77                 :            : 
      78                 :         14 : uno::Sequence< rtl::OUString > SAL_CALL SdPresentationDocument_getSupportedServiceNames() throw( uno::RuntimeException )
      79                 :            : {
      80                 :         14 :     uno::Sequence< rtl::OUString > aSeq( 2 );
      81         [ +  - ]:         14 :     aSeq[0] = "com.sun.star.drawing.DrawingDocumentFactory";
      82         [ +  - ]:         14 :     aSeq[1] = "com.sun.star.presentation.PresentationDocument";
      83                 :            : 
      84                 :         14 :     return aSeq;
      85                 :            : }
      86                 :            : 
      87                 :         41 : uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance(
      88                 :            :                 const uno::Reference< lang::XMultiServiceFactory > &, const sal_uInt64 _nCreationFlags )
      89                 :            : {
      90         [ +  - ]:         41 :     SolarMutexGuard aGuard;
      91                 :            : 
      92         [ +  - ]:         41 :     SdDLL::Init();
      93                 :            : 
      94                 :            :     SfxObjectShell* pShell =
      95                 :            :         new ::sd::DrawDocShell(
      96 [ +  - ][ +  - ]:         41 :             _nCreationFlags, sal_False, DOCUMENT_TYPE_IMPRESS );
      97 [ +  - ][ +  - ]:         41 :     return uno::Reference< uno::XInterface >( pShell->GetModel() );
      98                 :            : }
      99                 :            : 
     100                 :            : 
     101                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10