use SimpleReferenceObject in sdr::overlay::OverlayManager
to replace hand-rolled version Change-Id: I3f47bf686ac07bba03acacace817767f2845af4f
This commit is contained in:
parent
1dcef2a123
commit
e656d583e7
2 changed files with 2 additions and 20 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <svtools/optionsdrawinglayer.hxx>
|
||||
#include <basegfx/matrix/b2dhommatrix.hxx>
|
||||
#include <drawinglayer/geometry/viewinformation2d.hxx>
|
||||
#include <salhelper/simplereferenceobject.hxx>
|
||||
|
||||
|
||||
// predeclarations
|
||||
|
@ -54,10 +55,8 @@ namespace sdr
|
|||
class SVX_DLLPUBLIC OverlayManager
|
||||
: private boost::noncopyable
|
||||
, protected ::sdr::animation::Scheduler
|
||||
, public rtl::IReference
|
||||
, public salhelper::SimpleReferenceObject
|
||||
{
|
||||
private:
|
||||
oslInterlockedCount mnRefCount;
|
||||
protected:
|
||||
// the OutputDevice to work on, set on construction and not to be changed
|
||||
OutputDevice& rmOutputDevice;
|
||||
|
@ -137,9 +136,6 @@ namespace sdr
|
|||
const SvtOptionsDrawinglayer& getDrawinglayerOpt() const { return maDrawinglayerOpt; }
|
||||
|
||||
void InsertEvent(sdr::animation::Event* pNew) { Scheduler::InsertEvent(pNew); }
|
||||
|
||||
virtual oslInterlockedCount SAL_CALL acquire() SAL_OVERRIDE;
|
||||
virtual oslInterlockedCount SAL_CALL release() SAL_OVERRIDE;
|
||||
};
|
||||
} // end of namespace overlay
|
||||
} // end of namespace sdr
|
||||
|
|
|
@ -117,7 +117,6 @@ namespace sdr
|
|||
|
||||
OverlayManager::OverlayManager(OutputDevice& rOutputDevice)
|
||||
: Scheduler(),
|
||||
mnRefCount(0),
|
||||
rmOutputDevice(rOutputDevice),
|
||||
maOverlayObjects(),
|
||||
maStripeColorA(Color(COL_BLACK)),
|
||||
|
@ -362,19 +361,6 @@ namespace sdr
|
|||
}
|
||||
}
|
||||
|
||||
oslInterlockedCount OverlayManager::acquire()
|
||||
{
|
||||
return osl_atomic_increment( &mnRefCount );
|
||||
}
|
||||
|
||||
oslInterlockedCount OverlayManager::release()
|
||||
{
|
||||
oslInterlockedCount nCount( osl_atomic_decrement( &mnRefCount ) );
|
||||
if ( nCount == 0 )
|
||||
delete this;
|
||||
return nCount;
|
||||
}
|
||||
|
||||
} // end of namespace overlay
|
||||
} // end of namespace sdr
|
||||
|
||||
|
|
Loading…
Reference in a new issue