summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-31 16:16:18 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-31 21:38:58 -0500
commit90d27afdd8e2488a9757da978d96081e35bb0e3f (patch)
treee8cf3f4bb54a8dcf242d1ebc725aa115280441d1 /svx
parentc5bb73cae7c172ad0f02f8c67dd57b53337f1d78 (diff)
Simplified & non-inlined setUnoShape().
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/svdobj.hxx16
-rw-r--r--svx/source/svdraw/svdobj.cxx5
-rw-r--r--svx/source/unodraw/unoshape.cxx6
3 files changed, 10 insertions, 17 deletions
diff --git a/svx/inc/svx/svdobj.hxx b/svx/inc/svx/svdobj.hxx
index 7da0ddd29649..7acba1d82e9e 100644
--- a/svx/inc/svx/svdobj.hxx
+++ b/svx/inc/svx/svdobj.hxx
@@ -1014,22 +1014,10 @@ public:
static SdrObject* getSdrObjectFromXShape( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInt );
- // helper struct for granting access exclusive to SvxShape
- struct GrantXShapeAccess
- {
- friend class SvxShape;
- private:
- GrantXShapeAccess() { }
- };
-
// setting the UNO representation is allowed for the UNO representation itself only!
void setUnoShape(
- const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxUnoShape,
- GrantXShapeAccess /*aGrant*/
- )
- {
- impl_setUnoShape( _rxUnoShape );
- }
+ const com::sun::star::uno::Reference<
+ com::sun::star::uno::XInterface>& _rxUnoShape);
/** retrieves the instance responsible for notifying changes in the properties of the shape associated with
the SdrObject
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 568b88df2923..4018e65314a5 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -3027,6 +3027,11 @@ SvxShape* SdrObject::getSvxShape() const
return xShape;
}
+void SdrObject::setUnoShape(const uno::Reference<uno::XInterface >& _rxUnoShape)
+{
+ impl_setUnoShape( _rxUnoShape );
+}
+
::svx::PropertyChangeNotifier& SdrObject::getShapePropertyChangeNotifier()
{
DBG_TESTSOLARMUTEX();
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 6a15396a68c6..f1a3c37b4c4a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -257,7 +257,7 @@ SvxShape::~SvxShape() throw()
mpImpl->mpMaster->dispose();
if ( mpObj.is() )
- mpObj->setUnoShape( NULL, SdrObject::GrantXShapeAccess() );
+ mpObj->setUnoShape(NULL);
if( HasSdrObjectOwnership() && mpObj.is() )
{
@@ -385,7 +385,7 @@ void SvxShape::impl_initFromSdrObject()
osl_incrementInterlockedCount( &m_refCount );
{
- mpObj->setUnoShape( *this, SdrObject::GrantXShapeAccess() );
+ mpObj->setUnoShape(*this);
}
osl_decrementInterlockedCount( &m_refCount );
@@ -1382,7 +1382,7 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException)
}
}
- mpObj->setUnoShape( NULL, SdrObject::GrantXShapeAccess() );
+ mpObj->setUnoShape(NULL);
if ( bFreeSdrObject )
{