LCOV - code coverage report
Current view: top level - chart2/source/tools - WrappedPropertySet.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 141 232 60.8 %
Date: 2014-04-11 Functions: 17 28 60.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 "WrappedPropertySet.hxx"
      21             : #include "macros.hxx"
      22             : 
      23             : // header for define DELETEZ
      24             : #include <tools/solar.h>
      25             : 
      26             : namespace chart
      27             : {
      28             : 
      29             : using namespace ::com::sun::star;
      30             : using ::com::sun::star::uno::Reference;
      31             : using ::com::sun::star::uno::Sequence;
      32             : using ::com::sun::star::uno::Any;
      33             : 
      34        3567 : WrappedPropertySet::WrappedPropertySet()
      35             :                     : MutexContainer()
      36             :                     , m_xInfo(0)
      37             :                     , m_pPropertyArrayHelper(0)
      38        3567 :                     , m_pWrappedPropertyMap(0)
      39             : {
      40        3567 : }
      41        6864 : WrappedPropertySet::~WrappedPropertySet()
      42             : {
      43        3432 :     clearWrappedPropertySet();
      44        3432 : }
      45             : 
      46      235512 : Reference< beans::XPropertyState > WrappedPropertySet::getInnerPropertyState()
      47             : {
      48      235512 :     return Reference< beans::XPropertyState >( getInnerPropertySet(), uno::UNO_QUERY );
      49             : }
      50             : 
      51        5054 : void WrappedPropertySet::clearWrappedPropertySet()
      52             : {
      53        5054 :     ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
      54             : 
      55             :     //delete all wrapped properties
      56        5054 :     if(m_pWrappedPropertyMap)
      57             :     {
      58      370164 :         for( tWrappedPropertyMap::iterator aIt = m_pWrappedPropertyMap->begin()
      59      246776 :             ; aIt!= m_pWrappedPropertyMap->end(); ++aIt )
      60             :         {
      61      119957 :             const WrappedProperty* pWrappedProperty = (*aIt).second;
      62      119957 :             DELETEZ(pWrappedProperty);
      63             :         }
      64             :     }
      65             : 
      66        5054 :     DELETEZ(m_pPropertyArrayHelper);
      67        5054 :     DELETEZ(m_pWrappedPropertyMap);
      68             : 
      69        5054 :     m_xInfo = NULL;
      70        5054 : }
      71             : 
      72             : //XPropertySet
      73       11932 : Reference< beans::XPropertySetInfo > SAL_CALL WrappedPropertySet::getPropertySetInfo(  )
      74             :                                     throw (uno::RuntimeException, std::exception)
      75             : {
      76       11932 :     Reference< beans::XPropertySetInfo > xInfo = m_xInfo;
      77       11932 :     if( !xInfo.is() )
      78             :     {
      79        3184 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
      80        3184 :         xInfo = m_xInfo;
      81        3184 :         if( !xInfo.is() )
      82             :         {
      83        3184 :             xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
      84             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      85        3184 :             m_xInfo = xInfo;
      86        3184 :         }
      87             :     }
      88             :     else
      89             :     {
      90             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      91             :     }
      92       11932 :     return m_xInfo;
      93             : }
      94             : 
      95       12171 : void SAL_CALL WrappedPropertySet::setPropertyValue( const OUString& rPropertyName, const Any& rValue )
      96             :                                     throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
      97             : {
      98             :     try
      99             :     {
     100       12171 :         sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
     101       12171 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( nHandle );
     102       12171 :         Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     103       12171 :         if( pWrappedProperty )
     104        8378 :             pWrappedProperty->setPropertyValue( rValue, xInnerPropertySet );
     105        3793 :         else if( xInnerPropertySet.is() )
     106        3793 :             xInnerPropertySet->setPropertyValue( rPropertyName, rValue );
     107             :         else
     108             :         {
     109             : #if OSL_DEBUG_LEVEL > 1
     110             :             OSL_FAIL("found no inner property set to map to");
     111             : #endif
     112       12171 :         }
     113             :     }
     114           0 :     catch( const beans::UnknownPropertyException& )
     115             :     {
     116           0 :         throw;
     117             :     }
     118           0 :     catch( const beans::PropertyVetoException& )
     119             :     {
     120           0 :         throw;
     121             :     }
     122           0 :     catch( const lang::IllegalArgumentException& )
     123             :     {
     124           0 :         throw;
     125             :     }
     126           0 :     catch( const lang::WrappedTargetException& )
     127             :     {
     128           0 :         throw;
     129             :     }
     130           0 :     catch( const uno::RuntimeException& )
     131             :     {
     132           0 :         throw;
     133             :     }
     134           0 :     catch( const uno::Exception& ex )
     135             :     {
     136             :         OSL_FAIL("invalid exception caught in WrappedPropertySet::setPropertyValue");
     137           0 :         lang::WrappedTargetException aWrappedException;
     138           0 :         aWrappedException.TargetException = uno::makeAny( ex );
     139           0 :         throw aWrappedException;
     140             :     }
     141       12171 : }
     142      135126 : Any SAL_CALL WrappedPropertySet::getPropertyValue( const OUString& rPropertyName )
     143             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     144             : {
     145      135126 :     Any aRet;
     146             : 
     147             :     try
     148             :     {
     149      135126 :         sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
     150      135126 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( nHandle );
     151      135126 :         Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     152      135126 :         if( pWrappedProperty )
     153       78544 :             aRet = pWrappedProperty->getPropertyValue( xInnerPropertySet );
     154       56582 :         else if( xInnerPropertySet.is() )
     155       56411 :             aRet = xInnerPropertySet->getPropertyValue( rPropertyName );
     156             :         else
     157             :         {
     158             : #if OSL_DEBUG_LEVEL > 1
     159             :             OSL_FAIL("found no inner property set to map to");
     160             : #endif
     161      135126 :         }
     162             :     }
     163        1340 :     catch( const beans::UnknownPropertyException& )
     164             :     {
     165         670 :         throw;
     166             :     }
     167           0 :     catch( const lang::WrappedTargetException& )
     168             :     {
     169           0 :         throw;
     170             :     }
     171           0 :     catch( const uno::RuntimeException& )
     172             :     {
     173           0 :         throw;
     174             :     }
     175           0 :     catch( const uno::Exception& ex )
     176             :     {
     177             :         OSL_FAIL("invalid exception caught in WrappedPropertySet::setPropertyValue");
     178           0 :         lang::WrappedTargetException aWrappedException;
     179           0 :         aWrappedException.TargetException = uno::makeAny( ex );
     180           0 :         throw aWrappedException;
     181             :     }
     182             : 
     183      134456 :     return aRet;
     184             : }
     185             : 
     186         172 : void SAL_CALL WrappedPropertySet::addPropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& xListener )
     187             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     188             : {
     189         172 :     Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     190         172 :     if( xInnerPropertySet.is() )
     191             :     {
     192         172 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     193         172 :         if( pWrappedProperty )
     194          48 :             xInnerPropertySet->addPropertyChangeListener( pWrappedProperty->getInnerName(), xListener );
     195             :         else
     196         124 :             xInnerPropertySet->addPropertyChangeListener( rPropertyName, xListener );
     197         172 :     }
     198         172 : }
     199         172 : void SAL_CALL WrappedPropertySet::removePropertyChangeListener( const OUString& rPropertyName, const Reference< beans::XPropertyChangeListener >& aListener )
     200             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     201             : {
     202         172 :     Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     203         172 :     if( xInnerPropertySet.is() )
     204             :     {
     205         172 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     206         172 :         if( pWrappedProperty )
     207          48 :             xInnerPropertySet->removePropertyChangeListener( pWrappedProperty->getInnerName(), aListener );
     208             :         else
     209         124 :             xInnerPropertySet->removePropertyChangeListener( rPropertyName, aListener );
     210         172 :     }
     211         172 : }
     212           0 : void SAL_CALL WrappedPropertySet::addVetoableChangeListener( const OUString& rPropertyName, const Reference< beans::XVetoableChangeListener >& aListener )
     213             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     214             : {
     215           0 :     Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     216           0 :     if( xInnerPropertySet.is() )
     217             :     {
     218           0 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     219           0 :         if( pWrappedProperty )
     220           0 :             xInnerPropertySet->addVetoableChangeListener( pWrappedProperty->getInnerName(), aListener );
     221             :         else
     222           0 :             xInnerPropertySet->addVetoableChangeListener( rPropertyName, aListener );
     223           0 :     }
     224           0 : }
     225           0 : void SAL_CALL WrappedPropertySet::removeVetoableChangeListener( const OUString& rPropertyName, const Reference< beans::XVetoableChangeListener >& aListener )
     226             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     227             : {
     228           0 :     Reference< beans::XPropertySet > xInnerPropertySet( this->getInnerPropertySet() );
     229           0 :     if( xInnerPropertySet.is() )
     230             :     {
     231           0 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     232           0 :         if( pWrappedProperty )
     233           0 :             xInnerPropertySet->removeVetoableChangeListener( pWrappedProperty->getInnerName(), aListener );
     234             :         else
     235           0 :             xInnerPropertySet->removeVetoableChangeListener( rPropertyName, aListener );
     236           0 :     }
     237           0 : }
     238             : 
     239             : //XMultiPropertySet
     240         982 : void SAL_CALL WrappedPropertySet::setPropertyValues( const Sequence< OUString >& rNameSeq, const Sequence< Any >& rValueSeq )
     241             :                                     throw (beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     242             : {
     243         982 :     bool bUnknownProperty = false;
     244         982 :     sal_Int32 nMinCount = std::min( rValueSeq.getLength(), rNameSeq.getLength() );
     245        8330 :     for(sal_Int32 nN=0; nN<nMinCount; nN++)
     246             :     {
     247        7348 :         OUString aPropertyName( rNameSeq[nN] );
     248             :         try
     249             :         {
     250        7348 :             this->setPropertyValue( aPropertyName, rValueSeq[nN] );
     251             :         }
     252           0 :         catch( const beans::UnknownPropertyException& ex )
     253             :         {
     254             :             ASSERT_EXCEPTION( ex );
     255           0 :             bUnknownProperty = true;
     256             :         }
     257        7348 :     }
     258             :     //todo: store unknown properties elsewhere
     259             :     OSL_ENSURE(!bUnknownProperty,"unknown property");
     260             :     (void)bUnknownProperty;
     261             : //    if( bUnknownProperty )
     262             : //        throw beans::UnknownPropertyException();
     263         982 : }
     264        5066 : Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyValues( const Sequence< OUString >& rNameSeq )
     265             :                                     throw (uno::RuntimeException, std::exception)
     266             : {
     267        5066 :     Sequence< Any > aRetSeq;
     268        5066 :     if( rNameSeq.getLength() )
     269             :     {
     270        5066 :         aRetSeq.realloc( rNameSeq.getLength() );
     271       58584 :         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
     272             :         {
     273             :             try
     274             :             {
     275       53518 :                 OUString aPropertyName( rNameSeq[nN] );
     276       53518 :                 aRetSeq[nN] = this->getPropertyValue( aPropertyName );
     277             :             }
     278           0 :             catch( const beans::UnknownPropertyException& ex )
     279             :             {
     280             :                 ASSERT_EXCEPTION( ex );
     281             :             }
     282           0 :             catch( const lang::WrappedTargetException& ex )
     283             :             {
     284             :                 ASSERT_EXCEPTION( ex );
     285             :             }
     286             :         }
     287             :     }
     288        5066 :     return aRetSeq;
     289             : }
     290           0 : void SAL_CALL WrappedPropertySet::addPropertiesChangeListener( const Sequence< OUString >& /* rNameSeq */, const Reference< beans::XPropertiesChangeListener >& /* xListener */ )
     291             :                                     throw (uno::RuntimeException, std::exception)
     292             : {
     293             :     OSL_FAIL("not implemented yet");
     294             :     //todo
     295           0 : }
     296           0 : void SAL_CALL WrappedPropertySet::removePropertiesChangeListener( const Reference< beans::XPropertiesChangeListener >& /* xListener */ )
     297             :                                     throw (uno::RuntimeException, std::exception)
     298             : {
     299             :     OSL_FAIL("not implemented yet");
     300             :     //todo
     301           0 : }
     302           0 : void SAL_CALL WrappedPropertySet::firePropertiesChangeEvent( const Sequence< OUString >& /* rNameSeq */, const Reference< beans::XPropertiesChangeListener >& /* xListener */ )
     303             :                                     throw (uno::RuntimeException, std::exception)
     304             : {
     305             :     OSL_FAIL("not implemented yet");
     306             :     //todo
     307           0 : }
     308             : 
     309             : //XPropertyState
     310      235512 : beans::PropertyState SAL_CALL WrappedPropertySet::getPropertyState( const OUString& rPropertyName )
     311             :                                     throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     312             : {
     313      235512 :     beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE );
     314             : 
     315      235512 :     Reference< beans::XPropertyState > xInnerPropertyState( this->getInnerPropertyState() );
     316      235512 :     if( xInnerPropertyState.is() )
     317             :     {
     318      235512 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     319      235512 :         if( pWrappedProperty )
     320       84246 :             aState = pWrappedProperty->getPropertyState( xInnerPropertyState );
     321             :         else
     322      151266 :             aState = xInnerPropertyState->getPropertyState( rPropertyName );
     323             :     }
     324      235512 :     return aState;
     325             : }
     326             : 
     327      302952 : const WrappedProperty* WrappedPropertySet::getWrappedProperty( const OUString& rOuterName )
     328             : {
     329      302952 :     sal_Int32 nHandle = getInfoHelper().getHandleByName( rOuterName );
     330      302952 :     return getWrappedProperty( nHandle );
     331             : }
     332             : 
     333      455120 : const WrappedProperty* WrappedPropertySet::getWrappedProperty( sal_Int32 nHandle )
     334             : {
     335      455120 :     tWrappedPropertyMap::const_iterator aFound( getWrappedPropertyMap().find( nHandle ) );
     336      455120 :     if( aFound != getWrappedPropertyMap().end() )
     337      194491 :         return (*aFound).second;
     338      260629 :     return 0;
     339             : }
     340             : 
     341        4724 : Sequence< beans::PropertyState > SAL_CALL WrappedPropertySet::getPropertyStates( const Sequence< OUString >& rNameSeq )
     342             :                                     throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     343             : {
     344        4724 :     Sequence< beans::PropertyState > aRetSeq;
     345        4724 :     if( rNameSeq.getLength() )
     346             :     {
     347        4724 :         aRetSeq.realloc( rNameSeq.getLength() );
     348      308318 :         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
     349             :         {
     350      303594 :             OUString aPropertyName( rNameSeq[nN] );
     351      303594 :             aRetSeq[nN] = this->getPropertyState( aPropertyName );
     352      303594 :         }
     353             :     }
     354        4724 :     return aRetSeq;
     355             : }
     356             : 
     357           0 : void SAL_CALL WrappedPropertySet::setPropertyToDefault( const OUString& rPropertyName )
     358             :                                     throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     359             : {
     360           0 :     Reference< beans::XPropertyState > xInnerPropertyState( this->getInnerPropertyState() );
     361           0 :     if( xInnerPropertyState.is() )
     362             :     {
     363           0 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     364           0 :         if( pWrappedProperty )
     365           0 :             pWrappedProperty->setPropertyToDefault( xInnerPropertyState );
     366             :         else
     367           0 :             xInnerPropertyState->setPropertyToDefault( rPropertyName );
     368           0 :     }
     369           0 : }
     370           0 : Any SAL_CALL WrappedPropertySet::getPropertyDefault( const OUString& rPropertyName )
     371             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     372             : {
     373           0 :     Any aRet;
     374           0 :     Reference< beans::XPropertyState > xInnerPropertyState( this->getInnerPropertyState() );
     375           0 :     if( xInnerPropertyState.is() )
     376             :     {
     377           0 :         const WrappedProperty* pWrappedProperty = getWrappedProperty( rPropertyName );
     378           0 :         if( pWrappedProperty )
     379           0 :             aRet = pWrappedProperty->getPropertyDefault(xInnerPropertyState);
     380             :         else
     381           0 :             aRet = xInnerPropertyState->getPropertyDefault( rPropertyName );
     382             :     }
     383           0 :     return aRet;
     384             : }
     385             : 
     386             : //XMultiPropertyStates
     387           0 : void SAL_CALL WrappedPropertySet::setAllPropertiesToDefault(  )
     388             :                                     throw (uno::RuntimeException, std::exception)
     389             : {
     390           0 :     const Sequence< beans::Property >&  rPropSeq = getPropertySequence();
     391           0 :     for(sal_Int32 nN=0; nN<rPropSeq.getLength(); nN++)
     392             :     {
     393           0 :         OUString aPropertyName( rPropSeq[nN].Name );
     394           0 :         this->setPropertyToDefault( aPropertyName );
     395           0 :     }
     396           0 : }
     397           0 : void SAL_CALL WrappedPropertySet::setPropertiesToDefault( const Sequence< OUString >& rNameSeq )
     398             :                                     throw (beans::UnknownPropertyException, uno::RuntimeException, std::exception)
     399             : {
     400           0 :     for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
     401             :     {
     402           0 :         OUString aPropertyName( rNameSeq[nN] );
     403           0 :         this->setPropertyToDefault( aPropertyName );
     404           0 :     }
     405           0 : }
     406           0 : Sequence< Any > SAL_CALL WrappedPropertySet::getPropertyDefaults( const Sequence< OUString >& rNameSeq )
     407             :                                     throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
     408             : {
     409           0 :     Sequence< Any > aRetSeq;
     410           0 :     if( rNameSeq.getLength() )
     411             :     {
     412           0 :         aRetSeq.realloc( rNameSeq.getLength() );
     413           0 :         for(sal_Int32 nN=0; nN<rNameSeq.getLength(); nN++)
     414             :         {
     415           0 :             OUString aPropertyName( rNameSeq[nN] );
     416           0 :             aRetSeq[nN] = this->getPropertyDefault( aPropertyName );
     417           0 :         }
     418             :     }
     419           0 :     return aRetSeq;
     420             : }
     421             : 
     422      659970 : ::cppu::IPropertyArrayHelper& WrappedPropertySet::getInfoHelper()
     423             : {
     424      659970 :     ::cppu::OPropertyArrayHelper* p = m_pPropertyArrayHelper;
     425      659970 :     if(!p)
     426             :     {
     427        3464 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
     428        3464 :         p = m_pPropertyArrayHelper;
     429        3464 :         if(!p)
     430             :         {
     431        3464 :             p = new ::cppu::OPropertyArrayHelper( getPropertySequence(), sal_True );
     432             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     433        3464 :             m_pPropertyArrayHelper = p;
     434        3464 :         }
     435             :     }
     436             :     else
     437             :     {
     438             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     439             :     }
     440      659970 :     return *m_pPropertyArrayHelper;
     441             : }
     442             : 
     443      910240 : tWrappedPropertyMap& WrappedPropertySet::getWrappedPropertyMap()
     444             : {
     445      910240 :     tWrappedPropertyMap* p = m_pWrappedPropertyMap;
     446      910240 :     if(!p)
     447             :     {
     448        3464 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );//do not use different mutex than is already used for static property sequence
     449        3464 :         p = m_pWrappedPropertyMap;
     450        3464 :         if(!p)
     451             :         {
     452        3464 :             std::vector< WrappedProperty* > aPropList( createWrappedProperties() );
     453        3464 :             p = new tWrappedPropertyMap();
     454             : 
     455      124429 :             for( std::vector< WrappedProperty* >::const_iterator aIt = aPropList.begin(); aIt!=aPropList.end(); ++aIt )
     456             :             {
     457      120965 :                 WrappedProperty* pProperty = *aIt;
     458      120965 :                 if(pProperty)
     459             :                 {
     460      120965 :                     sal_Int32 nHandle = getInfoHelper().getHandleByName( pProperty->getOuterName() );
     461             : 
     462      120965 :                     if( nHandle == -1 )
     463             :                     {
     464             :                         OSL_FAIL( "missing property in property list" );
     465           0 :                         delete pProperty;//we are owner or the created WrappedProperties
     466             :                     }
     467      120965 :                     else if( p->find( nHandle ) != p->end() )
     468             :                     {
     469             :                         //duplicate Wrapped property
     470             :                         OSL_FAIL( "duplicate Wrapped property" );
     471         204 :                         delete pProperty;//we are owner or the created WrappedProperties
     472             :                     }
     473             :                     else
     474      120761 :                         (*p)[ nHandle ] = pProperty;
     475             :                 }
     476             :             }
     477             : 
     478             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     479        3464 :             m_pWrappedPropertyMap = p;
     480        3464 :         }
     481             :     }
     482             :     else
     483             :     {
     484             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     485             :     }
     486      910240 :     return *m_pWrappedPropertyMap;
     487             : }
     488             : 
     489             : } //namespace chart
     490             : 
     491             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10