summaryrefslogtreecommitdiff
path: root/svx/source/table
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-09-09 14:03:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-09-09 17:46:37 +0200
commit21d97438e2944861e26e4984195f959a0cce1e41 (patch)
tree0a980fe781bae8aa564412165c17ebd6d4795749 /svx/source/table
parent34e5e5ecec9779bae3ee48f698d52318f0be5f89 (diff)
sb140: #i117082# avoid unncessary static class data members (which are destroyed too late)
plus sb140: #i117082# extra indirections to apeace MSC sb140: #i117082# avoid warnings about not intializing boost::noncopyable base in copy ctors
Diffstat (limited to 'svx/source/table')
-rw-r--r--svx/source/table/cell.cxx74
-rw-r--r--svx/source/table/cell.hxx25
2 files changed, 11 insertions, 88 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index d0f8f1693af7..f9191f1b9d23 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -300,7 +300,7 @@ rtl::Reference< Cell > Cell::create( SdrTableObj& rTableObj, OutlinerParaObject*
Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) throw()
: SdrText( rTableObj, pOutlinerParaObject )
-, SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
+, Cell_Base( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
, mpPropSet( ImplGetSvxCellPropertySet() )
, mpProperties( new sdr::properties::CellProperties( rTableObj, this ) )
, mnCellContentType( CellContentType_EMPTY )
@@ -757,78 +757,6 @@ sdr::properties::TextProperties* Cell::CloneProperties( SdrObject& rNewObj, Cell
}
// -----------------------------------------------------------------------------
-// XInterface
-// -----------------------------------------------------------------------------
-
-Any SAL_CALL Cell::queryInterface( const Type & rType ) throw(RuntimeException)
-{
- if( rType == XMergeableCell::static_type() )
- return Any( Reference< XMergeableCell >( this ) );
-
- if( rType == XCell::static_type() )
- return Any( Reference< XCell >( this ) );
-
- if( rType == XLayoutConstrains::static_type() )
- return Any( Reference< XLayoutConstrains >( this ) );
-
- if( rType == XEventListener::static_type() )
- return Any( Reference< XEventListener >( this ) );
-
- Any aRet( SvxUnoTextBase::queryAggregation( rType ) );
- if( aRet.hasValue() )
- return aRet;
-
- return ::cppu::OWeakObject::queryInterface( rType );
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL Cell::acquire() throw ()
-{
- ::cppu::OWeakObject::acquire();
-}
-
-// -----------------------------------------------------------------------------
-
-void SAL_CALL Cell::release() throw ()
-{
- ::cppu::OWeakObject::release();
-}
-
-// -----------------------------------------------------------------------------
-// XTypeProvider
-// -----------------------------------------------------------------------------
-
-Sequence< Type > SAL_CALL Cell::getTypes( ) throw (RuntimeException)
-{
- Sequence< Type > aTypes( SvxUnoTextBase::getTypes() );
-
- sal_Int32 nLen = aTypes.getLength();
- aTypes.realloc(nLen + 2);
- aTypes[nLen++] = XMergeableCell::static_type();
- aTypes[nLen++] = XLayoutConstrains::static_type();
-
- return aTypes;
-}
-
-// -----------------------------------------------------------------------------
-
-Sequence< sal_Int8 > SAL_CALL Cell::getImplementationId( ) throw (RuntimeException)
-{
- static ::cppu::OImplementationId* pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
-
-// -----------------------------------------------------------------------------
// XServiceInfo
// -----------------------------------------------------------------------------
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index be22b33f1aad..689eea07769f 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -34,6 +34,7 @@
#include <com/sun/star/beans/XMultiPropertyStates.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
+#include <cppuhelper/implbase3.hxx>
#include <rtl/ref.hxx>
#include <svl/style.hxx>
#include "svx/sdtaitm.hxx"
@@ -57,12 +58,15 @@ namespace sdr { namespace table {
// -----------------------------------------------------------------------------
-class SVX_DLLPUBLIC Cell : public SdrText,
- public SvxUnoTextBase,
- public ::com::sun::star::table::XMergeableCell,
- public ::com::sun::star::awt::XLayoutConstrains,
- public ::com::sun::star::lang::XEventListener,
- public ::cppu::OWeakObject
+typedef
+ cppu::AggImplInheritanceHelper3<
+ SvxUnoTextBase,
+ ::com::sun::star::table::XMergeableCell,
+ ::com::sun::star::awt::XLayoutConstrains,
+ ::com::sun::star::lang::XEventListener >
+ Cell_Base;
+
+class SVX_DLLPUBLIC Cell : public SdrText, public Cell_Base
{
friend class CellUndo;
@@ -112,15 +116,6 @@ public:
SVX_DLLPRIVATE void setMerged();
- // XInterface
- SVX_DLLPRIVATE virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& Type ) throw (::com::sun::star::uno::RuntimeException);
- SVX_DLLPRIVATE virtual void SAL_CALL acquire() throw ();
- SVX_DLLPRIVATE virtual void SAL_CALL release() throw ();
-
- // XTypeProvider
- SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
- SVX_DLLPRIVATE virtual ::com::sun::star::uno::Sequence< ::sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
-
// XServiceInfo
SVX_DLLPRIVATE virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException);
SVX_DLLPRIVATE virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);