LCOV - code coverage report
Current view: top level - svx/source/unodraw - unottabl.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 12 20 60.0 %
Date: 2014-11-03 Functions: 7 10 70.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 <com/sun/star/awt/Gradient.hpp>
      21             : #include <svl/itempool.hxx>
      22             : #include <svl/itemset.hxx>
      23             : #include <svx/xgrad.hxx>
      24             : #include <svx/xflftrit.hxx>
      25             : 
      26             : #include <svx/svdmodel.hxx>
      27             : #include <svx/xflhtit.hxx>
      28             : #include "svx/unofill.hxx"
      29             : #include <svx/unomid.hxx>
      30             : #include "UnoNameItemTable.hxx"
      31             : 
      32             : using namespace ::com::sun::star;
      33             : using namespace ::cppu;
      34             : 
      35             : class SvxUnoTransGradientTable : public SvxUnoNameItemTable
      36             : {
      37             : public:
      38             :     SvxUnoTransGradientTable( SdrModel* pModel ) throw();
      39             :     virtual ~SvxUnoTransGradientTable() throw();
      40             : 
      41             :     virtual NameOrIndex* createItem() const throw() SAL_OVERRIDE;
      42             : 
      43             :     // XServiceInfo
      44             :     virtual OUString SAL_CALL getImplementationName(  ) throw( uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      45             :     virtual uno::Sequence<  OUString > SAL_CALL getSupportedServiceNames(  ) throw( uno::RuntimeException, std::exception) SAL_OVERRIDE;
      46             : 
      47             :     // XElementAccess
      48             :     virtual uno::Type SAL_CALL getElementType(  ) throw( uno::RuntimeException, std::exception) SAL_OVERRIDE;
      49             : };
      50             : 
      51         784 : SvxUnoTransGradientTable::SvxUnoTransGradientTable( SdrModel* pModel ) throw()
      52         784 : : SvxUnoNameItemTable( pModel, XATTR_FILLFLOATTRANSPARENCE, MID_FILLGRADIENT )
      53             : {
      54         784 : }
      55             : 
      56        1452 : SvxUnoTransGradientTable::~SvxUnoTransGradientTable() throw()
      57             : {
      58        1452 : }
      59             : 
      60           0 : OUString SAL_CALL SvxUnoTransGradientTable::getImplementationName() throw( uno::RuntimeException, std::exception )
      61             : {
      62           0 :     return OUString("SvxUnoTransGradientTable");
      63             : }
      64             : 
      65           0 : uno::Sequence< OUString > SAL_CALL SvxUnoTransGradientTable::getSupportedServiceNames(  )
      66             :     throw( uno::RuntimeException, std::exception )
      67             : {
      68           0 :     uno::Sequence< OUString > aSNS( 1 );
      69           0 :     aSNS.getArray()[0] = "com.sun.star.drawing.TransparencyGradientTable";
      70           0 :     return aSNS;
      71             : }
      72             : 
      73          74 : NameOrIndex* SvxUnoTransGradientTable::createItem() const throw()
      74             : {
      75          74 :     XFillFloatTransparenceItem* pNewItem = new XFillFloatTransparenceItem();
      76          74 :     pNewItem->SetEnabled( true );
      77          74 :     return pNewItem;
      78             : }
      79             : 
      80             : // XElementAccess
      81           0 : uno::Type SAL_CALL SvxUnoTransGradientTable::getElementType(  )
      82             :     throw( uno::RuntimeException, std::exception )
      83             : {
      84           0 :     return cppu::UnoType<awt::Gradient>::get();
      85             : }
      86             : 
      87             : /**
      88             :  * Create a hatchtable
      89             :  */
      90         784 : uno::Reference< uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel )
      91             : {
      92         784 :     return *new SvxUnoTransGradientTable(pModel);
      93         651 : }
      94             : 
      95             : 
      96             : 
      97             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10