LCOV - code coverage report
Current view: top level - chart2/source/controller/chartapiwrapper - WrappedAddInProperty.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 48 0.0 %
Date: 2014-04-14 Functions: 0 20 0.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 "WrappedAddInProperty.hxx"
      21             : #include "macros.hxx"
      22             : 
      23             : using ::com::sun::star::uno::Reference;
      24             : using ::com::sun::star::uno::Any;
      25             : using namespace ::com::sun::star;
      26             : 
      27             : namespace chart
      28             : {
      29             : namespace wrapper
      30             : {
      31             : 
      32           0 : WrappedAddInProperty::WrappedAddInProperty( ChartDocumentWrapper& rChartDocumentWrapper )
      33             :     : ::chart::WrappedProperty( "AddIn", OUString() )
      34           0 :     , m_rChartDocumentWrapper( rChartDocumentWrapper )
      35             : {
      36           0 : }
      37           0 : WrappedAddInProperty::~WrappedAddInProperty()
      38             : {
      39           0 : }
      40             : 
      41           0 : void WrappedAddInProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      42             :                         throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
      43             : {
      44           0 :     Reference< util::XRefreshable > xAddIn;
      45           0 :     if( ! (rOuterValue >>= xAddIn) )
      46           0 :         throw lang::IllegalArgumentException( "AddIn properties require type XRefreshable", 0, 0 );
      47             : 
      48           0 :     m_rChartDocumentWrapper.setAddIn( xAddIn );
      49           0 : }
      50             : 
      51           0 : Any WrappedAddInProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      52             :                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
      53             : {
      54           0 :     return uno::makeAny( m_rChartDocumentWrapper.getAddIn() );
      55             : }
      56             : 
      57           0 : WrappedBaseDiagramProperty::WrappedBaseDiagramProperty( ChartDocumentWrapper& rChartDocumentWrapper )
      58             :     : ::chart::WrappedProperty( "BaseDiagram" , OUString() )
      59           0 :     , m_rChartDocumentWrapper( rChartDocumentWrapper )
      60             : {
      61           0 : }
      62           0 : WrappedBaseDiagramProperty::~WrappedBaseDiagramProperty()
      63             : {
      64           0 : }
      65             : 
      66           0 : void WrappedBaseDiagramProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      67             :                         throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
      68             : {
      69           0 :     OUString aBaseDiagram;
      70           0 :     if( ! (rOuterValue >>= aBaseDiagram) )
      71           0 :         throw lang::IllegalArgumentException( "BaseDiagram properties require type OUString", 0, 0 );
      72             : 
      73           0 :     m_rChartDocumentWrapper.setBaseDiagram( aBaseDiagram );
      74           0 : }
      75             : 
      76           0 : Any WrappedBaseDiagramProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      77             :                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
      78             : {
      79           0 :     return uno::makeAny( m_rChartDocumentWrapper.getBaseDiagram() );
      80             : }
      81             : 
      82           0 : WrappedAdditionalShapesProperty::WrappedAdditionalShapesProperty( ChartDocumentWrapper& rChartDocumentWrapper )
      83             :     : ::chart::WrappedProperty( "AdditionalShapes" , OUString() )
      84           0 :     , m_rChartDocumentWrapper( rChartDocumentWrapper )
      85             : {
      86           0 : }
      87           0 : WrappedAdditionalShapesProperty::~WrappedAdditionalShapesProperty()
      88             : {
      89           0 : }
      90             : 
      91           0 : void WrappedAdditionalShapesProperty::setPropertyValue( const Any& /*rOuterValue*/, const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      92             :                         throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
      93             : {
      94           0 :     throw lang::IllegalArgumentException( "AdditionalShapes is a read only property", 0, 0 );
      95             : }
      96             : 
      97           0 : Any WrappedAdditionalShapesProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
      98             :                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
      99             : {
     100           0 :     return uno::makeAny( m_rChartDocumentWrapper.getAdditionalShapes() );
     101             : }
     102             : 
     103           0 : WrappedRefreshAddInAllowedProperty::WrappedRefreshAddInAllowedProperty( ChartDocumentWrapper& rChartDocumentWrapper )
     104             :     : ::chart::WrappedProperty( "RefreshAddInAllowed" , OUString() )
     105           0 :     , m_rChartDocumentWrapper( rChartDocumentWrapper )
     106             : {
     107           0 : }
     108           0 : WrappedRefreshAddInAllowedProperty::~WrappedRefreshAddInAllowedProperty()
     109             : {
     110           0 : }
     111             : 
     112           0 : void WrappedRefreshAddInAllowedProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& /* xInnerPropertySet */ ) const
     113             :                         throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
     114             : {
     115           0 :     sal_Bool bUpdateAddIn = sal_True;
     116           0 :     if( ! (rOuterValue >>= bUpdateAddIn) )
     117           0 :         throw lang::IllegalArgumentException( "The property RefreshAddInAllowed requires type boolean", 0, 0 );
     118             : 
     119           0 :     m_rChartDocumentWrapper.setUpdateAddIn( bUpdateAddIn );
     120           0 : }
     121             : 
     122           0 : Any WrappedRefreshAddInAllowedProperty::getPropertyValue( const Reference< beans::XPropertySet >& /* xInnerPropertySet */ ) const
     123             :                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     124             : {
     125           0 :     return uno::makeAny( m_rChartDocumentWrapper.getUpdateAddIn() );
     126             : }
     127             : 
     128             : } //namespace wrapper
     129             : 
     130             : } //namespace chart
     131             : 
     132             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10