LCOV - code coverage report
Current view: top level - chart2/source/controller/chartapiwrapper - WrappedAxisAndGridExistenceProperties.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 152 171 88.9 %
Date: 2014-04-11 Functions: 18 21 85.7 %
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 "WrappedAxisAndGridExistenceProperties.hxx"
      21             : #include "AxisHelper.hxx"
      22             : #include "ChartModelHelper.hxx"
      23             : #include "TitleHelper.hxx"
      24             : #include "macros.hxx"
      25             : 
      26             : using namespace ::com::sun::star;
      27             : using ::com::sun::star::uno::Any;
      28             : using ::com::sun::star::uno::Reference;
      29             : using ::com::sun::star::uno::Sequence;
      30             : 
      31             : namespace chart
      32             : {
      33             : namespace wrapper
      34             : {
      35             : 
      36             : class WrappedAxisAndGridExistenceProperty : public WrappedProperty
      37             : {
      38             : public:
      39             :     WrappedAxisAndGridExistenceProperty( bool bAxis, bool bMain, sal_Int32 nDimensionIndex
      40             :         , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
      41             :     virtual ~WrappedAxisAndGridExistenceProperty();
      42             : 
      43             :     virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
      44             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
      45             : 
      46             :     virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
      47             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
      48             : 
      49             :     virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
      50             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
      51             : 
      52             : private: //member
      53             :     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
      54             :     bool        m_bAxis;
      55             :     bool        m_bMain;
      56             :     sal_Int32   m_nDimensionIndex;
      57             : };
      58             : 
      59         204 : void WrappedAxisAndGridExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
      60             :             , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
      61             : {
      62         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 0, spChart2ModelContact ) );//x axis
      63         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( true, false, 0, spChart2ModelContact ) );//x secondary axis
      64         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 0, spChart2ModelContact ) );//x grid
      65         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 0, spChart2ModelContact ) );//x help grid
      66             : 
      67         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 1, spChart2ModelContact ) );//y axis
      68         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( true, false, 1, spChart2ModelContact ) );//y secondary axis
      69         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 1, spChart2ModelContact ) );//y grid
      70         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 1, spChart2ModelContact ) );//y help grid
      71             : 
      72         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( true, true, 2, spChart2ModelContact ) );//z axis
      73         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, true, 2, spChart2ModelContact ) );//z grid
      74         204 :     rList.push_back( new WrappedAxisAndGridExistenceProperty( false, false, 2, spChart2ModelContact ) );//z help grid
      75         204 : }
      76             : 
      77        2244 : WrappedAxisAndGridExistenceProperty::WrappedAxisAndGridExistenceProperty( bool bAxis, bool bMain, sal_Int32 nDimensionIndex
      78             :                 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
      79             :             : WrappedProperty(OUString(),OUString())
      80             :             , m_spChart2ModelContact( spChart2ModelContact )
      81             :             , m_bAxis( bAxis )
      82             :             , m_bMain( bMain )
      83        2244 :             , m_nDimensionIndex( nDimensionIndex )
      84             : {
      85        2244 :     switch( m_nDimensionIndex )
      86             :     {
      87             :         case 0:
      88             :         {
      89         816 :             if( m_bAxis )
      90             :             {
      91         408 :                 if( m_bMain )
      92         204 :                     m_aOuterName = "HasXAxis";
      93             :                 else
      94         204 :                     m_aOuterName = "HasSecondaryXAxis";
      95             :             }
      96             :             else
      97             :             {
      98         408 :                 if( m_bMain )
      99         204 :                     m_aOuterName = "HasXAxisGrid";
     100             :                 else
     101         204 :                     m_aOuterName = "HasXAxisHelpGrid";
     102             :             }
     103             :         }
     104         816 :         break;
     105             :         case 2:
     106             :         {
     107         612 :             if( m_bAxis )
     108             :             {
     109             :                 OSL_ENSURE(m_bMain == true,"there is no secondary z axis at the old api");
     110         204 :                 m_bMain = true;
     111         204 :                 m_aOuterName = "HasZAxis";
     112             :             }
     113             :             else
     114             :             {
     115         408 :                 if( m_bMain )
     116         204 :                     m_aOuterName = "HasZAxisGrid";
     117             :                 else
     118         204 :                     m_aOuterName = "HasZAxisHelpGrid";
     119             :             }
     120             :         }
     121         612 :         break;
     122             :         default:
     123             :         {
     124         816 :             if( m_bAxis )
     125             :             {
     126         408 :                 if( m_bMain )
     127         204 :                     m_aOuterName = "HasYAxis";
     128             :                 else
     129         204 :                     m_aOuterName = "HasSecondaryYAxis";
     130             :             }
     131             :             else
     132             :             {
     133         408 :                 if( m_bMain )
     134         204 :                     m_aOuterName = "HasYAxisGrid";
     135             :                 else
     136         204 :                     m_aOuterName = "HasYAxisHelpGrid";
     137             :             }
     138             :         }
     139         816 :         break;
     140             :     }
     141        2244 : }
     142             : 
     143        4356 : WrappedAxisAndGridExistenceProperty::~WrappedAxisAndGridExistenceProperty()
     144             : {
     145        4356 : }
     146             : 
     147         878 : void WrappedAxisAndGridExistenceProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
     148             :                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
     149             : {
     150         878 :     sal_Bool bNewValue = false;
     151         878 :     if( ! (rOuterValue >>= bNewValue) )
     152           0 :         throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 );
     153             : 
     154         878 :     sal_Bool bOldValue = sal_False;
     155         878 :     getPropertyValue( xInnerPropertySet ) >>= bOldValue;
     156             : 
     157         878 :     if( bOldValue == bNewValue )
     158        1287 :         return;
     159             : 
     160         469 :     Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
     161         469 :     if( bNewValue )
     162             :     {
     163         220 :         if( m_bAxis )
     164         126 :             AxisHelper::showAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext );
     165             :         else
     166          94 :             AxisHelper::showGrid( m_nDimensionIndex, 0, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext );
     167             :     }
     168             :     else
     169             :     {
     170         249 :         if( m_bAxis )
     171         166 :             AxisHelper::hideAxis( m_nDimensionIndex, m_bMain, xDiagram );
     172             :         else
     173          83 :             AxisHelper::hideGrid( m_nDimensionIndex, 0, m_bMain, xDiagram );
     174         469 :     }
     175             : }
     176             : 
     177        4985 : Any WrappedAxisAndGridExistenceProperty::getPropertyValue( const Reference< beans::XPropertySet >& /* xInnerPropertySet */ ) const
     178             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     179             : {
     180        4985 :     Any aRet;
     181        9970 :     Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
     182        4985 :     if(m_bAxis)
     183             :     {
     184        2385 :         sal_Bool bShown = AxisHelper::isAxisShown( m_nDimensionIndex, m_bMain, xDiagram );
     185        2385 :         aRet <<= bShown;
     186             :     }
     187             :     else
     188             :     {
     189        2600 :         sal_Bool bShown = AxisHelper::isGridShown( m_nDimensionIndex, 0, m_bMain, xDiagram );
     190        2600 :         aRet <<= bShown;
     191             :     }
     192        9970 :     return aRet;
     193             : }
     194             : 
     195           0 : Any WrappedAxisAndGridExistenceProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
     196             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     197             : {
     198           0 :     Any aRet;
     199           0 :     aRet <<= false;
     200           0 :     return aRet;
     201             : }
     202             : 
     203             : class WrappedAxisTitleExistenceProperty : public WrappedProperty
     204             : {
     205             : public:
     206             :     WrappedAxisTitleExistenceProperty( sal_Int32 nTitleIndex
     207             :         , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
     208             :     virtual ~WrappedAxisTitleExistenceProperty();
     209             : 
     210             :     virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
     211             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     212             : 
     213             :     virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
     214             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     215             : 
     216             :     virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
     217             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     218             : 
     219             : private: //member
     220             :     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
     221             :     TitleHelper::eTitleType             m_eTitleType;
     222             : };
     223             : 
     224         204 : void WrappedAxisTitleExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
     225             :             , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
     226             : {
     227         204 :     rList.push_back( new WrappedAxisTitleExistenceProperty( 0, spChart2ModelContact ) );//x axis title
     228         204 :     rList.push_back( new WrappedAxisTitleExistenceProperty( 1, spChart2ModelContact ) );//y axis title
     229         204 :     rList.push_back( new WrappedAxisTitleExistenceProperty( 2, spChart2ModelContact ) );//z axis title
     230         204 :     rList.push_back( new WrappedAxisTitleExistenceProperty( 3, spChart2ModelContact ) );//secondary x axis title
     231         204 :     rList.push_back( new WrappedAxisTitleExistenceProperty( 4, spChart2ModelContact ) );//secondary y axis title
     232         204 : }
     233             : 
     234        1020 : WrappedAxisTitleExistenceProperty::WrappedAxisTitleExistenceProperty( sal_Int32 nTitleIndex
     235             :                 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
     236             :             : WrappedProperty(OUString(),OUString())
     237             :             , m_spChart2ModelContact( spChart2ModelContact )
     238        1020 :             , m_eTitleType( TitleHelper::Y_AXIS_TITLE )
     239             : {
     240        1020 :     switch( nTitleIndex )
     241             :     {
     242             :         case 0:
     243         204 :             m_aOuterName = "HasXAxisTitle";
     244         204 :             m_eTitleType = TitleHelper::X_AXIS_TITLE;
     245         204 :             break;
     246             :         case 2:
     247         204 :             m_aOuterName = "HasZAxisTitle";
     248         204 :             m_eTitleType = TitleHelper::Z_AXIS_TITLE;
     249         204 :             break;
     250             :         case 3:
     251         204 :             m_aOuterName = "HasSecondaryXAxisTitle";
     252         204 :             m_eTitleType = TitleHelper::SECONDARY_X_AXIS_TITLE;
     253         204 :             break;
     254             :         case 4:
     255         204 :             m_aOuterName = "HasSecondaryYAxisTitle";
     256         204 :             m_eTitleType = TitleHelper::SECONDARY_Y_AXIS_TITLE;
     257         204 :             break;
     258             :         default:
     259         204 :             m_aOuterName = "HasYAxisTitle";
     260         204 :             m_eTitleType = TitleHelper::Y_AXIS_TITLE;
     261         204 :             break;
     262             :     }
     263        1020 : }
     264             : 
     265        1980 : WrappedAxisTitleExistenceProperty::~WrappedAxisTitleExistenceProperty()
     266             : {
     267        1980 : }
     268             : 
     269          22 : void WrappedAxisTitleExistenceProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
     270             :                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
     271             : {
     272          22 :     sal_Bool bNewValue = false;
     273          22 :     if( ! (rOuterValue >>= bNewValue) )
     274           0 :         throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 );
     275             : 
     276          22 :     sal_Bool bOldValue = sal_False;
     277          22 :     getPropertyValue( xInnerPropertySet ) >>= bOldValue;
     278             : 
     279          22 :     if( bOldValue == bNewValue )
     280          22 :         return;
     281             : 
     282          22 :     if( bNewValue )
     283             :     {
     284          22 :         OUString aTitleText;
     285             :         TitleHelper::createTitle(  m_eTitleType, aTitleText
     286          22 :             , m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext );
     287             :     }
     288             :     else
     289             :     {
     290           0 :         TitleHelper::removeTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() );
     291             :     }
     292             : }
     293             : 
     294        1994 : Any WrappedAxisTitleExistenceProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
     295             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     296             : {
     297        1994 :     sal_Bool bHasTitle = sal_False;
     298             : 
     299        1994 :     Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() ) );
     300        1994 :     if( xTitle.is() && !TitleHelper::getCompleteString( xTitle ).isEmpty() )
     301         172 :         bHasTitle = sal_True;
     302             : 
     303        1994 :     Any aRet;
     304        1994 :     aRet <<= bHasTitle;
     305        1994 :     return aRet;
     306             : 
     307             : }
     308             : 
     309           0 : Any WrappedAxisTitleExistenceProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
     310             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     311             : {
     312           0 :     Any aRet;
     313           0 :     aRet <<= sal_Bool( sal_False );
     314           0 :     return aRet;
     315             : }
     316             : 
     317             : class WrappedAxisLabelExistenceProperty : public WrappedProperty
     318             : {
     319             : public:
     320             :     WrappedAxisLabelExistenceProperty( bool bMain, sal_Int32 nDimensionIndex
     321             :         , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
     322             :     virtual ~WrappedAxisLabelExistenceProperty();
     323             : 
     324             :     virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
     325             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     326             : 
     327             :     virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
     328             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     329             : 
     330             :     virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
     331             :                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
     332             : 
     333             : private: //member
     334             :     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
     335             :     bool        m_bMain;
     336             :     sal_Int32   m_nDimensionIndex;
     337             : };
     338             : 
     339         204 : void WrappedAxisLabelExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
     340             :             , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
     341             : {
     342         204 :     rList.push_back( new WrappedAxisLabelExistenceProperty( true, 0, spChart2ModelContact ) );//x axis
     343         204 :     rList.push_back( new WrappedAxisLabelExistenceProperty( true, 1, spChart2ModelContact ) );//y axis
     344         204 :     rList.push_back( new WrappedAxisLabelExistenceProperty( true, 2, spChart2ModelContact ) );//z axis
     345         204 :     rList.push_back( new WrappedAxisLabelExistenceProperty( false, 0, spChart2ModelContact ) );//secondary x axis
     346         204 :     rList.push_back( new WrappedAxisLabelExistenceProperty( false, 1, spChart2ModelContact ) );//secondary y axis
     347         204 : }
     348             : 
     349        1020 : WrappedAxisLabelExistenceProperty::WrappedAxisLabelExistenceProperty( bool bMain, sal_Int32 nDimensionIndex
     350             :                 , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
     351             :             : WrappedProperty(OUString(),OUString())
     352             :             , m_spChart2ModelContact( spChart2ModelContact )
     353             :             , m_bMain( bMain )
     354        1020 :             , m_nDimensionIndex( nDimensionIndex )
     355             : {
     356        1020 :     switch( m_nDimensionIndex )
     357             :     {
     358             :         case 0:
     359         408 :             m_bMain ? m_aOuterName = "HasXAxisDescription" : m_aOuterName = "HasSecondaryXAxisDescription";
     360         408 :             break;
     361             :         case 2:
     362             :             OSL_ENSURE(m_bMain,"there is no description available for a secondary z axis");
     363         204 :             m_aOuterName = "HasZAxisDescription";
     364         204 :             break;
     365             :         default:
     366         408 :             m_bMain ? m_aOuterName = "HasYAxisDescription" : m_aOuterName = "HasSecondaryYAxisDescription";
     367         408 :             break;
     368             :     }
     369        1020 : }
     370             : 
     371        1980 : WrappedAxisLabelExistenceProperty::~WrappedAxisLabelExistenceProperty()
     372             : {
     373        1980 : }
     374             : 
     375         417 : void WrappedAxisLabelExistenceProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
     376             :                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
     377             : {
     378         417 :     sal_Bool bNewValue = false;
     379         417 :     if( ! (rOuterValue >>= bNewValue) )
     380           0 :         throw lang::IllegalArgumentException( "Has axis or grid properties require boolean values", 0, 0 );
     381             : 
     382         417 :     sal_Bool bOldValue = sal_False;
     383         417 :     getPropertyValue( xInnerPropertySet ) >>= bOldValue;
     384             : 
     385         417 :     if( bOldValue == bNewValue )
     386         666 :         return;
     387             : 
     388         168 :     Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
     389         336 :     Reference< beans::XPropertySet > xProp( AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ), uno::UNO_QUERY );
     390         168 :     if( !xProp.is() && bNewValue )
     391             :     {
     392             :         //create axis if needed
     393           0 :         xProp.set( AxisHelper::createAxis( m_nDimensionIndex, m_bMain, xDiagram, m_spChart2ModelContact->m_xContext ), uno::UNO_QUERY );
     394           0 :         if( xProp.is() )
     395           0 :             xProp->setPropertyValue( "Show", uno::makeAny( sal_False ) );
     396             :     }
     397         168 :     if( xProp.is() )
     398         336 :         xProp->setPropertyValue( "DisplayLabels", rOuterValue );
     399             : }
     400             : 
     401         421 : Any WrappedAxisLabelExistenceProperty::getPropertyValue( const Reference< beans::XPropertySet >& /*xInnerPropertySet*/ ) const
     402             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     403             : {
     404         421 :     Any aRet;
     405         842 :     Reference< chart2::XDiagram > xDiagram( m_spChart2ModelContact->getChart2Diagram() );
     406         842 :     Reference< beans::XPropertySet > xProp( AxisHelper::getAxis( m_nDimensionIndex, m_bMain, xDiagram ), uno::UNO_QUERY );
     407         421 :     if( xProp.is() )
     408         172 :         aRet = xProp->getPropertyValue( "DisplayLabels" );
     409             :     else
     410         249 :         aRet <<= sal_False;
     411         842 :     return aRet;
     412             : }
     413             : 
     414           0 : Any WrappedAxisLabelExistenceProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
     415             :                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
     416             : {
     417           0 :     Any aRet;
     418           0 :     aRet <<= sal_Bool( sal_True );
     419           0 :     return aRet;
     420             : }
     421             : 
     422             : } //namespace wrapper
     423             : } //namespace chart
     424             : 
     425             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10