LCOV - code coverage report
Current view: top level - svx/source/unodraw - unohtabl.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 9 17 52.9 %
Date: 2012-08-25 Functions: 5 8 62.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 2 8 25.0 %

           Branch data     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 <com/sun/star/drawing/Hatch.hpp>
      21                 :            : #include <svl/itempool.hxx>
      22                 :            : #include <svl/itemset.hxx>
      23                 :            : #include "UnoNameItemTable.hxx"
      24                 :            : 
      25                 :            : #include <svx/xhatch.hxx>
      26                 :            : #include <svx/svdmodel.hxx>
      27                 :            : #include <svx/xdef.hxx>
      28                 :            : #include <svx/xflhtit.hxx>
      29                 :            : #include <svx/unomid.hxx>
      30                 :            : #include "svx/unofill.hxx"
      31                 :            : 
      32                 :            : using namespace ::com::sun::star;
      33                 :            : using namespace ::rtl;
      34                 :            : using namespace ::cppu;
      35                 :            : 
      36                 :            : class SvxUnoHatchTable : public SvxUnoNameItemTable
      37                 :            : {
      38                 :            : public:
      39                 :            :     SvxUnoHatchTable( SdrModel* pModel ) throw();
      40                 :            :     virtual ~SvxUnoHatchTable() throw();
      41                 :            : 
      42                 :            :     virtual NameOrIndex* createItem() const throw();
      43                 :            : 
      44                 :            :     // XServiceInfo
      45                 :            :     virtual OUString SAL_CALL getImplementationName(  ) throw( uno::RuntimeException );
      46                 :            :     virtual uno::Sequence<  OUString > SAL_CALL getSupportedServiceNames(  ) throw( uno::RuntimeException);
      47                 :            : 
      48                 :            :     // XElementAccess
      49                 :            :     virtual uno::Type SAL_CALL getElementType(  ) throw( uno::RuntimeException);
      50                 :            : };
      51                 :            : 
      52                 :         98 : SvxUnoHatchTable::SvxUnoHatchTable( SdrModel* pModel ) throw()
      53                 :         98 : : SvxUnoNameItemTable( pModel, XATTR_FILLHATCH, MID_FILLHATCH )
      54                 :            : {
      55                 :         98 : }
      56                 :            : 
      57                 :         95 : SvxUnoHatchTable::~SvxUnoHatchTable() throw()
      58                 :            : {
      59         [ -  + ]:        190 : }
      60                 :            : 
      61                 :          0 : OUString SAL_CALL SvxUnoHatchTable::getImplementationName() throw( uno::RuntimeException )
      62                 :            : {
      63                 :          0 :     return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoHatchTable") );
      64                 :            : }
      65                 :            : 
      66                 :          0 : uno::Sequence< OUString > SAL_CALL SvxUnoHatchTable::getSupportedServiceNames(  )
      67                 :            :     throw( uno::RuntimeException )
      68                 :            : {
      69                 :          0 :     uno::Sequence< OUString > aSNS( 1 );
      70 [ #  # ][ #  # ]:          0 :     aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.HatchTable" ));
      71                 :          0 :     return aSNS;
      72                 :            : }
      73                 :            : 
      74                 :         36 : NameOrIndex* SvxUnoHatchTable::createItem() const throw()
      75                 :            : {
      76         [ +  - ]:         36 :     return new XFillHatchItem();
      77                 :            : }
      78                 :            : 
      79                 :            : // XElementAccess
      80                 :          0 : uno::Type SAL_CALL SvxUnoHatchTable::getElementType(  )
      81                 :            :     throw( uno::RuntimeException )
      82                 :            : {
      83                 :          0 :     return ::getCppuType((const struct drawing::Hatch*)0);
      84                 :            : }
      85                 :            : 
      86                 :            : /**
      87                 :            :  * Create a hatchtable
      88                 :            :  */
      89                 :         98 : uno::Reference< uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel )
      90                 :            : {
      91                 :         98 :     return *new SvxUnoHatchTable(pModel);
      92                 :            : }
      93                 :            : 
      94                 :            : 
      95                 :            : 
      96                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10