diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-02-15 20:41:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-02-16 12:54:44 +0000 |
commit | a1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch) | |
tree | 56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /toolkit | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/animatedimagespeer.cxx | 32 | ||||
-rw-r--r-- | toolkit/source/controls/animatedimages.cxx | 26 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 50 |
3 files changed, 53 insertions, 55 deletions
diff --git a/toolkit/source/awt/animatedimagespeer.cxx b/toolkit/source/awt/animatedimagespeer.cxx index 2b544919ea98..3c77117e6116 100644 --- a/toolkit/source/awt/animatedimagespeer.cxx +++ b/toolkit/source/awt/animatedimagespeer.cxx @@ -298,7 +298,7 @@ namespace toolkit AnimatedImagesPeer::AnimatedImagesPeer() :AnimatedImagesPeer_Base() - ,m_pData( new AnimatedImagesPeer_Data( *this ) ) + ,m_xData( new AnimatedImagesPeer_Data( *this ) ) { } @@ -425,7 +425,7 @@ namespace toolkit switch ( i_windowEvent.GetId() ) { case VCLEVENT_WINDOW_RESIZE: - lcl_updateImageList_nothrow( *m_pData ); + lcl_updateImageList_nothrow( *m_xData ); break; } @@ -437,7 +437,7 @@ namespace toolkit { SolarMutexGuard aGuard; - lcl_updateImageList_nothrow( *m_pData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); + lcl_updateImageList_nothrow( *m_xData, Reference< XAnimatedImages >( i_animatedImages, UNO_QUERY_THROW ) ); } @@ -449,18 +449,18 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position > m_pData->aCachedImageSets.size() ) + if ( position > m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementInserted: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } Sequence< OUString > aImageURLs; OSL_VERIFY( i_event.Element >>= aImageURLs ); ::std::vector< CachedImage > aImages; lcl_init( aImageURLs, aImages ); - m_pData->aCachedImageSets.insert( m_pData->aCachedImageSets.begin() + position, aImages ); - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets.insert( m_xData->aCachedImageSets.begin() + position, aImages ); + lcl_updateImageList_nothrow( *m_xData ); } @@ -472,14 +472,14 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position >= m_pData->aCachedImageSets.size() ) + if ( position >= m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementRemoved: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } - m_pData->aCachedImageSets.erase( m_pData->aCachedImageSets.begin() + position ); - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets.erase( m_xData->aCachedImageSets.begin() + position ); + lcl_updateImageList_nothrow( *m_xData ); } @@ -491,18 +491,18 @@ namespace toolkit sal_Int32 nPosition(0); OSL_VERIFY( i_event.Accessor >>= nPosition ); size_t position = size_t( nPosition ); - if ( position >= m_pData->aCachedImageSets.size() ) + if ( position >= m_xData->aCachedImageSets.size() ) { OSL_ENSURE( false, "AnimatedImagesPeer::elementReplaced: illegal accessor/index!" ); - lcl_updateImageList_nothrow( *m_pData, xAnimatedImages ); + lcl_updateImageList_nothrow( *m_xData, xAnimatedImages ); } Sequence< OUString > aImageURLs; OSL_VERIFY( i_event.Element >>= aImageURLs ); ::std::vector< CachedImage > aImages; lcl_init( aImageURLs, aImages ); - m_pData->aCachedImageSets[ position ] = aImages; - lcl_updateImageList_nothrow( *m_pData ); + m_xData->aCachedImageSets[ position ] = aImages; + lcl_updateImageList_nothrow( *m_xData ); } @@ -522,7 +522,7 @@ namespace toolkit { AnimatedImagesPeer_Base::dispose(); SolarMutexGuard aGuard; - m_pData->aCachedImageSets.resize(0); + m_xData->aCachedImageSets.resize(0); } diff --git a/toolkit/source/controls/animatedimages.cxx b/toolkit/source/controls/animatedimages.cxx index 60a10c66cbe4..97fd0166a32c 100644 --- a/toolkit/source/controls/animatedimages.cxx +++ b/toolkit/source/controls/animatedimages.cxx @@ -37,8 +37,6 @@ #include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase2.hxx> -#include <boost/scoped_ptr.hpp> - #include "helper/unopropertyarrayhelper.hxx" using namespace css::awt; @@ -245,7 +243,7 @@ namespace toolkit { AnimatedImagesControlModel::AnimatedImagesControlModel( Reference< com::sun::star::uno::XComponentContext > const & i_factory ) :AnimatedImagesControlModel_Base( i_factory ) - ,m_pData( new AnimatedImagesControlModel_Data ) + ,m_xData( new AnimatedImagesControlModel_Data ) { ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT ); ImplRegisterProperty( BASEPROPERTY_BORDER ); @@ -262,7 +260,7 @@ namespace toolkit { AnimatedImagesControlModel::AnimatedImagesControlModel( const AnimatedImagesControlModel& i_copySource ) :AnimatedImagesControlModel_Base( i_copySource ) - ,m_pData( new AnimatedImagesControlModel_Data( *i_copySource.m_pData ) ) + ,m_xData( new AnimatedImagesControlModel_Data( *i_copySource.m_xData ) ) { } @@ -412,7 +410,7 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - return m_pData->aImageSets.size(); + return m_xData->aImageSets.size(); } @@ -422,9 +420,9 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); - return m_pData->aImageSets[ i_index ]; + return m_xData->aImageSets[ i_index ]; } @@ -435,10 +433,10 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this, true ); + lcl_checkIndex( *m_xData, i_index, *this, true ); // actaul insertion - m_pData->aImageSets.insert( m_pData->aImageSets.begin() + i_index, i_imageURLs ); + m_xData->aImageSets.insert( m_xData->aImageSets.begin() + i_index, i_imageURLs ); // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementInserted, i_index, i_imageURLs, *this ); @@ -452,10 +450,10 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); // actaul insertion - m_pData->aImageSets[ i_index ] = i_imageURLs; + m_xData->aImageSets[ i_index ] = i_imageURLs; // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementReplaced, i_index, i_imageURLs, *this ); @@ -469,12 +467,12 @@ namespace toolkit { if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose ) throw DisposedException(); - lcl_checkIndex( *m_pData, i_index, *this ); + lcl_checkIndex( *m_xData, i_index, *this ); // actual removal - ::std::vector< Sequence< OUString > >::iterator removalPos = m_pData->aImageSets.begin() + i_index; + ::std::vector< Sequence< OUString > >::iterator removalPos = m_xData->aImageSets.begin() + i_index; Sequence< OUString > aRemovedElement( *removalPos ); - m_pData->aImageSets.erase( removalPos ); + m_xData->aImageSets.erase( removalPos ); // listener notification lcl_notify( aGuard, BrdcstHelper, &XContainerListener::elementRemoved, i_index, aRemovedElement, *this ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 4d5636e115c9..8c8ec5f51553 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -1990,7 +1990,7 @@ private: UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XComponentContext >& rxContext, ConstructorMode const i_mode ) :UnoControlListBoxModel_Base( rxContext ) - ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_xData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { if ( i_mode == ConstructDefault ) @@ -2001,10 +2001,10 @@ UnoControlListBoxModel::UnoControlListBoxModel( const Reference< XComponentConte UnoControlListBoxModel::UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource ) :UnoControlListBoxModel_Base( i_rSource ) - ,m_pData( new UnoControlListBoxModel_Data( *this ) ) + ,m_xData( new UnoControlListBoxModel_Data( *this ) ) ,m_aItemListListeners( GetMutex() ) { - m_pData->copyItems( *i_rSource.m_pData ); + m_xData->copyItems( *i_rSource.m_xData ); } UnoControlListBoxModel::~UnoControlListBoxModel() { @@ -2073,7 +2073,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3 aAny <<= aSeq; setDependentFastPropertyValue( BASEPROPERTY_SELECTEDITEMS, aAny ); - if ( !m_pData->m_bSettingLegacyProperty ) + if ( !m_xData->m_bSettingLegacyProperty ) { // synchronize the legacy StringItemList property with our list items Sequence< OUString > aStringItemList; @@ -2088,7 +2088,7 @@ void SAL_CALL UnoControlListBoxModel::setFastPropertyValue_NoBroadcast( sal_Int3 aItems.begin(), CreateListItem() ); - m_pData->setAllItems( aItems ); + m_xData->setAllItems( aItems ); // since an XItemListListener does not have a "all items modified" or some such method, // we simulate this by notifying removal of all items, followed by insertion of all new @@ -2117,7 +2117,7 @@ void UnoControlListBoxModel::ImplNormalizePropertySequence( const sal_Int32 _nCo ::sal_Int32 SAL_CALL UnoControlListBoxModel::getItemCount() throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - return m_pData->getItemCount(); + return m_xData->getItemCount(); } @@ -2125,7 +2125,7 @@ void SAL_CALL UnoControlListBoxModel::insertItem( ::sal_Int32 i_nPosition, const { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemText = i_rItemText; rItem.ItemImageURL = i_rItemImageURL; @@ -2138,7 +2138,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemText( ::sal_Int32 i_nPosition, c { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemText = i_rItemText; impl_handleInsert( i_nPosition, i_rItemText, ::boost::optional< OUString >(), aGuard ); @@ -2150,7 +2150,7 @@ void SAL_CALL UnoControlListBoxModel::insertItemImage( ::sal_Int32 i_nPosition, { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->insertItem( i_nPosition ) ); + ListItem& rItem( m_xData->insertItem( i_nPosition ) ); rItem.ItemImageURL = i_rItemImageURL; impl_handleInsert( i_nPosition, ::boost::optional< OUString >(), i_rItemImageURL, aGuard ); @@ -2162,7 +2162,7 @@ void SAL_CALL UnoControlListBoxModel::removeItem( ::sal_Int32 i_nPosition ) thro { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - m_pData->removeItem( i_nPosition ); + m_xData->removeItem( i_nPosition ); impl_handleRemove( i_nPosition, aGuard ); // <----- SYNCHRONIZED @@ -2173,7 +2173,7 @@ void SAL_CALL UnoControlListBoxModel::removeAllItems( ) throw (::com::sun::star { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - m_pData->removeAllItems(); + m_xData->removeAllItems(); impl_handleRemove( -1, aGuard ); // <----- SYNCHRONIZED @@ -2184,7 +2184,7 @@ void SAL_CALL UnoControlListBoxModel::setItemText( ::sal_Int32 i_nPosition, cons { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemText = i_rItemText; impl_handleModify( i_nPosition, i_rItemText, ::boost::optional< OUString >(), aGuard ); @@ -2196,7 +2196,7 @@ void SAL_CALL UnoControlListBoxModel::setItemImage( ::sal_Int32 i_nPosition, con { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemImageURL = i_rItemImageURL; impl_handleModify( i_nPosition, ::boost::optional< OUString >(), i_rItemImageURL, aGuard ); @@ -2208,7 +2208,7 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi { ::osl::ClearableMutexGuard aGuard( GetMutex() ); // SYNCHRONIZED -----> - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemText = i_rItemText; rItem.ItemImageURL = i_rItemImageURL; @@ -2220,7 +2220,7 @@ void SAL_CALL UnoControlListBoxModel::setItemTextAndImage( ::sal_Int32 i_nPositi void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, const Any& i_rDataValue ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - ListItem& rItem( m_pData->getItem( i_nPosition ) ); + ListItem& rItem( m_xData->getItem( i_nPosition ) ); rItem.ItemData = i_rDataValue; } @@ -2228,7 +2228,7 @@ void SAL_CALL UnoControlListBoxModel::setItemData( ::sal_Int32 i_nPosition, cons OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemText; } @@ -2236,7 +2236,7 @@ OUString SAL_CALL UnoControlListBoxModel::getItemText( ::sal_Int32 i_nPosition ) OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemImageURL; } @@ -2244,7 +2244,7 @@ OUString SAL_CALL UnoControlListBoxModel::getItemImage( ::sal_Int32 i_nPosition beans::Pair< OUString, OUString > SAL_CALL UnoControlListBoxModel::getItemTextAndImage( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return beans::Pair< OUString, OUString >( rItem.ItemText, rItem.ItemImageURL ); } @@ -2252,7 +2252,7 @@ beans::Pair< OUString, OUString > SAL_CALL UnoControlListBoxModel::getItemTextAn Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) throw (IndexOutOfBoundsException, RuntimeException, std::exception) { ::osl::ClearableMutexGuard aGuard( GetMutex() ); - const ListItem& rItem( m_pData->getItem( i_nPosition ) ); + const ListItem& rItem( m_xData->getItem( i_nPosition ) ); return rItem.ItemData; } @@ -2260,7 +2260,7 @@ Any SAL_CALL UnoControlListBoxModel::getItemData( ::sal_Int32 i_nPosition ) thro Sequence< beans::Pair< OUString, OUString > > SAL_CALL UnoControlListBoxModel::getAllItems( ) throw (RuntimeException, std::exception) { ::osl::MutexGuard aGuard( GetMutex() ); - return m_pData->getAllItems(); + return m_xData->getAllItems(); } @@ -2302,17 +2302,17 @@ void UnoControlListBoxModel::impl_setStringItemList_nolck( const ::std::vector< i_rStringItems.end(), aStringItems.getArray() ); - m_pData->m_bSettingLegacyProperty = true; + m_xData->m_bSettingLegacyProperty = true; try { setFastPropertyValue( BASEPROPERTY_STRINGITEMLIST, uno::makeAny( aStringItems ) ); } catch( const Exception& ) { - m_pData->m_bSettingLegacyProperty = false; + m_xData->m_bSettingLegacyProperty = false; throw; } - m_pData->m_bSettingLegacyProperty = false; + m_xData->m_bSettingLegacyProperty = false; } @@ -2905,7 +2905,7 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int { UnoControlModel::setFastPropertyValue_NoBroadcast( nHandle, rValue ); - if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_pData->m_bSettingLegacyProperty) + if ( nHandle == BASEPROPERTY_STRINGITEMLIST && !m_xData->m_bSettingLegacyProperty) { // synchronize the legacy StringItemList property with our list items Sequence< OUString > aStringItemList; @@ -2920,7 +2920,7 @@ void SAL_CALL UnoControlComboBoxModel::setFastPropertyValue_NoBroadcast( sal_Int aItems.begin(), CreateListItem() ); - m_pData->setAllItems( aItems ); + m_xData->setAllItems( aItems ); // since an XItemListListener does not have a "all items modified" or some such method, // we simulate this by notifying removal of all items, followed by insertion of all new |