diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-05-31 01:58:53 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-06-09 12:54:39 +0200 |
commit | 736d19c4040fc14a5282130902c9ac0db361225c (patch) | |
tree | 938d65556321569553c55fe32c89853723276bc1 /sw/inc/unotextrange.hxx | |
parent | f14a3a043dec75bf2c2ee7e0e8b62aefe4ef6acf (diff) |
use ABC instead of Pimpl for SwXTextRanges
- abstract base class reduces boilerplate
- Pimpl is pointless here, except for SolarMutex, which is handled by
overriding release
Change-Id: I55df9b20c9b0a78412535f2cca37e04ddaccb5cf
Diffstat (limited to 'sw/inc/unotextrange.hxx')
-rw-r--r-- | sw/inc/unotextrange.hxx | 49 |
1 files changed, 3 insertions, 46 deletions
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index b7f7ae90b743..19f6ae3beeb7 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -263,54 +263,11 @@ typedef ::cppu::WeakImplHelper , ::com::sun::star::container::XIndexAccess > SwXTextRanges_Base; -class SwXTextRanges - : public SwXTextRanges_Base +struct SwXTextRanges : public SwXTextRanges_Base { - -private: - - class Impl; - ::sw::UnoImplPtr<Impl> m_pImpl; - - virtual ~SwXTextRanges(); - -public: - - SwXTextRanges(SwPaM *const pCrsr); - - const SwUnoCrsr* GetCursor() const; - + virtual SwUnoCrsr* GetCursor() =0; + static SwXTextRanges* Create(SwPaM* const pCrsr); static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); - - // XUnoTunnel - virtual sal_Int64 SAL_CALL getSomething( - const ::com::sun::star::uno::Sequence< sal_Int8 >& rIdentifier) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL supportsService( - const OUString& rServiceName) - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL - getSupportedServiceNames() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // XElementAccess - virtual ::com::sun::star::uno::Type SAL_CALL getElementType() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual sal_Bool SAL_CALL hasElements() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - - // XIndexAccess - virtual sal_Int32 SAL_CALL getCount() - throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - virtual ::com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) - throw (::com::sun::star::lang::IndexOutOfBoundsException, - ::com::sun::star::lang::WrappedTargetException, - ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; - }; #endif // INCLUDED_SW_INC_UNOTEXTRANGE_HXX |