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 /unotools | |
parent | 18f41dfaf19d656d290c47d196ef2702e169a522 (diff) |
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/useroptions.cxx | 22 | ||||
-rw-r--r-- | unotools/source/i18n/localedatawrapper.cxx | 2 | ||||
-rw-r--r-- | unotools/source/misc/atom.cxx | 8 | ||||
-rw-r--r-- | unotools/source/misc/closeveto.cxx | 7 |
4 files changed, 19 insertions, 20 deletions
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index fd1f65749fea..fca529632017 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -70,7 +70,7 @@ const sal_uInt16 nOptionNameCount = SAL_N_ELEMENTS(vOptionNames); } // namespace -boost::weak_ptr<SvtUserOptions::Impl> SvtUserOptions::pSharedImpl; +std::weak_ptr<SvtUserOptions::Impl> SvtUserOptions::xSharedImpl; class SvtUserOptions::ChangeListener : public cppu::WeakImplHelper1<util::XChangesListener> { @@ -254,21 +254,21 @@ SvtUserOptions::SvtUserOptions () // Global access, must be guarded (multithreading) osl::MutexGuard aGuard(GetInitMutex()); - if (pSharedImpl.expired()) + if (xSharedImpl.expired()) { - pImpl.reset(new Impl); - pSharedImpl = pImpl; + xImpl.reset(new Impl); + xSharedImpl = xImpl; ItemHolder1::holdConfigItem(E_USEROPTIONS); } - pImpl = pSharedImpl.lock(); - pImpl->AddListener(this); + xImpl = xSharedImpl.lock(); + xImpl->AddListener(this); } SvtUserOptions::~SvtUserOptions() { // Global access, must be guarded (multithreading) osl::MutexGuard aGuard( GetInitMutex() ); - pImpl->RemoveListener(this); + xImpl->RemoveListener(this); } namespace @@ -300,25 +300,25 @@ OUString SvtUserOptions::GetEmail () const { return GetToken(USER_OPT_E bool SvtUserOptions::IsTokenReadonly (sal_uInt16 nToken) const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->IsTokenReadonly(nToken); + return xImpl->IsTokenReadonly(nToken); } OUString SvtUserOptions::GetToken (sal_uInt16 nToken) const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->GetToken(nToken); + return xImpl->GetToken(nToken); } void SvtUserOptions::SetToken (sal_uInt16 nToken, OUString const& rNewToken) { osl::MutexGuard aGuard(GetInitMutex()); - pImpl->SetToken(nToken, rNewToken); + xImpl->SetToken(nToken, rNewToken); } OUString SvtUserOptions::GetFullName () const { osl::MutexGuard aGuard(GetInitMutex()); - return pImpl->GetFullName(); + return xImpl->GetFullName(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 26a3b31b5487..e1239e837d01 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -468,7 +468,7 @@ void LocaleDataWrapper::getDefaultCalendarImpl() } } -const ::boost::shared_ptr< ::com::sun::star::i18n::Calendar2 > LocaleDataWrapper::getDefaultCalendar() const +const std::shared_ptr< ::com::sun::star::i18n::Calendar2 > LocaleDataWrapper::getDefaultCalendar() const { ::utl::ReadWriteGuard aGuard( aMutex ); if (!xDefaultCalendar) diff --git a/unotools/source/misc/atom.cxx b/unotools/source/misc/atom.cxx index 5adcbdcea009..85ddad4d23a9 100644 --- a/unotools/source/misc/atom.cxx +++ b/unotools/source/misc/atom.cxx @@ -48,7 +48,7 @@ int AtomProvider::getAtom( const OUString& rString, bool bCreate ) const OUString& AtomProvider::getString( int nAtom ) const { static OUString aEmpty; - std::unordered_map< int, OUString, ::boost::hash< int > >::const_iterator it = m_aStringMap.find( nAtom ); + std::unordered_map<int, OUString>::const_iterator it = m_aStringMap.find( nAtom ); return it == m_aStringMap.end() ? aEmpty : it->second; } @@ -59,13 +59,13 @@ MultiAtomProvider::MultiAtomProvider() MultiAtomProvider::~MultiAtomProvider() { - for( std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) + for( std::unordered_map<int, AtomProvider*>::iterator it = m_aAtomLists.begin(); it != m_aAtomLists.end(); ++it ) delete it->second; } int MultiAtomProvider::getAtom( int atomClass, const OUString& rString, bool bCreate ) { - std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::iterator it = + std::unordered_map<int, AtomProvider*>::iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getAtom( rString, bCreate ); @@ -81,7 +81,7 @@ int MultiAtomProvider::getAtom( int atomClass, const OUString& rString, bool bCr const OUString& MultiAtomProvider::getString( int atomClass, int atom ) const { - std::unordered_map< int, AtomProvider*, ::boost::hash< int > >::const_iterator it = + std::unordered_map<int, AtomProvider*>::const_iterator it = m_aAtomLists.find( atomClass ); if( it != m_aAtomLists.end() ) return it->second->getString( atom ); diff --git a/unotools/source/misc/closeveto.cxx b/unotools/source/misc/closeveto.cxx index 4044fa775e4b..290a18cb715f 100644 --- a/unotools/source/misc/closeveto.cxx +++ b/unotools/source/misc/closeveto.cxx @@ -138,16 +138,15 @@ namespace utl } //= CloseVeto - CloseVeto::CloseVeto( const Reference< XInterface >& i_closeable ) - :m_pData( new CloseVeto_Data ) + : m_xData(new CloseVeto_Data) { - lcl_init( *m_pData, i_closeable ); + lcl_init(*m_xData, i_closeable); } CloseVeto::~CloseVeto() { - lcl_deinit( *m_pData ); + lcl_deinit(*m_xData); } } // namespace utl |