summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-15 20:41:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-16 12:54:44 +0000
commita1ceacc17e3f30d5e9c06b3218ad8ec26ca2f1b9 (patch)
tree56a29f66f75f326a0a677ab1697ce28f1bc9fcbf /comphelper
parent18f41dfaf19d656d290c47d196ef2702e169a522 (diff)
boost::foo_ptr->std::foo_ptr
Change-Id: I9219619b538b6530a89f5932ac51eb3b62eb396a
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/asyncnotification.cxx42
-rw-r--r--comphelper/source/misc/storagehelper.cxx10
2 files changed, 22 insertions, 30 deletions
diff --git a/comphelper/source/misc/asyncnotification.cxx b/comphelper/source/misc/asyncnotification.cxx
index ceb2b37eacb7..d9ecbcbe2e50 100644
--- a/comphelper/source/misc/asyncnotification.cxx
+++ b/comphelper/source/misc/asyncnotification.cxx
@@ -28,25 +28,17 @@
#include <functional>
#include <algorithm>
-
namespace comphelper
{
-
-
-
//= AnyEvent
-
-
AnyEvent::AnyEvent()
{
}
-
AnyEvent::~AnyEvent()
{
}
-
//= ProcessableEvent
struct ProcessableEvent
@@ -101,7 +93,7 @@ namespace comphelper
AsyncEventNotifier::AsyncEventNotifier(char const * name):
- Thread(name), m_pImpl(new EventNotifierImpl)
+ Thread(name), m_xImpl(new EventNotifierImpl)
{
}
@@ -113,35 +105,35 @@ namespace comphelper
void AsyncEventNotifier::removeEventsForProcessor( const ::rtl::Reference< IEventProcessor >& _xProcessor )
{
- ::osl::MutexGuard aGuard( m_pImpl->aMutex );
+ ::osl::MutexGuard aGuard( m_xImpl->aMutex );
// remove all events for this processor
- m_pImpl->aEvents.erase(::std::remove_if( m_pImpl->aEvents.begin(), m_pImpl->aEvents.end(), EqualProcessor( _xProcessor ) ), m_pImpl->aEvents.end());
+ m_xImpl->aEvents.erase(::std::remove_if( m_xImpl->aEvents.begin(), m_xImpl->aEvents.end(), EqualProcessor( _xProcessor ) ), m_xImpl->aEvents.end());
}
void SAL_CALL AsyncEventNotifier::terminate()
{
- ::osl::MutexGuard aGuard( m_pImpl->aMutex );
+ ::osl::MutexGuard aGuard( m_xImpl->aMutex );
// remember the termination request
- m_pImpl->bTerminate = true;
+ m_xImpl->bTerminate = true;
// awake the thread
- m_pImpl->aPendingActions.set();
+ m_xImpl->aPendingActions.set();
}
void AsyncEventNotifier::addEvent( const AnyEventRef& _rEvent, const ::rtl::Reference< IEventProcessor >& _xProcessor )
{
- ::osl::MutexGuard aGuard( m_pImpl->aMutex );
+ ::osl::MutexGuard aGuard( m_xImpl->aMutex );
OSL_TRACE( "AsyncEventNotifier(%p): adding %p", this, _rEvent.get() );
// remember this event
- m_pImpl->aEvents.push_back( ProcessableEvent( _rEvent, _xProcessor ) );
+ m_xImpl->aEvents.push_back( ProcessableEvent( _rEvent, _xProcessor ) );
// awake the thread
- m_pImpl->aPendingActions.set();
+ m_xImpl->aPendingActions.set();
}
@@ -149,25 +141,25 @@ namespace comphelper
{
for (;;)
{
- m_pImpl->aPendingActions.wait();
+ m_xImpl->aPendingActions.wait();
ProcessableEvent aEvent;
{
- osl::MutexGuard aGuard(m_pImpl->aMutex);
- if (m_pImpl->bTerminate)
+ osl::MutexGuard aGuard(m_xImpl->aMutex);
+ if (m_xImpl->bTerminate)
{
break;
}
- if (!m_pImpl->aEvents.empty())
+ if (!m_xImpl->aEvents.empty())
{
- aEvent = m_pImpl->aEvents.front();
- m_pImpl->aEvents.pop_front();
+ aEvent = m_xImpl->aEvents.front();
+ m_xImpl->aEvents.pop_front();
OSL_TRACE(
"AsyncEventNotifier(%p): popping %p", this,
aEvent.aEvent.get());
}
- if (m_pImpl->aEvents.empty())
+ if (m_xImpl->aEvents.empty())
{
- m_pImpl->aPendingActions.reset();
+ m_xImpl->aPendingActions.reset();
}
}
if (aEvent.aEvent.is()) {
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 03b8ce4c4df5..91e3687a7ff8 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -514,13 +514,13 @@ bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString& aSeg
class LifecycleProxy::Impl
: public std::vector< uno::Reference< embed::XStorage > > {};
LifecycleProxy::LifecycleProxy()
- : m_pBadness( new Impl() ) { }
+ : m_xBadness( new Impl() ) { }
LifecycleProxy::~LifecycleProxy() { }
void LifecycleProxy::commitStorages()
{
- for (Impl::reverse_iterator iter = m_pBadness->rbegin();
- iter != m_pBadness->rend(); ++iter) // reverse order (outwards)
+ for (Impl::reverse_iterator iter = m_xBadness->rbegin();
+ iter != m_xBadness->rend(); ++iter) // reverse order (outwards)
{
uno::Reference<embed::XTransactedObject> const xTransaction(*iter,
uno::UNO_QUERY);
@@ -544,11 +544,11 @@ static uno::Reference< embed::XStorage > LookupStorageAtPath(
LifecycleProxy &rNastiness )
{
uno::Reference< embed::XStorage > xStorage( xParentStorage );
- rNastiness.m_pBadness->push_back( xStorage );
+ rNastiness.m_xBadness->push_back( xStorage );
for( size_t i = 0; i < rElems.size() && xStorage.is(); i++ )
{
xStorage = xStorage->openStorageElement( rElems[i], nOpenMode );
- rNastiness.m_pBadness->push_back( xStorage );
+ rNastiness.m_xBadness->push_back( xStorage );
}
return xStorage;
}