diff options
author | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:51 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-01-08 17:13:51 +0100 |
commit | 30bfe9b171379f987c470761acf6735a8b48fe67 (patch) | |
tree | 03f39f552b03fad3bec8ed0156e4f78682a450cf /sw/inc/unotextrange.hxx | |
parent | 2fee7963e992089b67eeb2fb60da27054037da32 (diff) |
swunolocking1: #i105557#: fix locking for SwXTextRanges:
add Impl struct, and use UnoImplPtr to lock destructor.
move all implementation details out of header, into Impl struct.
use new XServiceInfo helpers.
replace SvWeirdArray with STL vector.
clean up the implementation a little.
Diffstat (limited to 'sw/inc/unotextrange.hxx')
-rw-r--r-- | sw/inc/unotextrange.hxx | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx index a7d13daf4848..94d4996b4633 100644 --- a/sw/inc/unotextrange.hxx +++ b/sw/inc/unotextrange.hxx @@ -45,10 +45,9 @@ #include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase8.hxx> -#include <svtools/svarray.hxx> - #include <calbck.hxx> #include <pam.hxx> +#include <unobaseclass.hxx> class String; @@ -85,6 +84,13 @@ public: }; +namespace sw { + + void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget); + +} // namespace sw + + typedef ::cppu::WeakImplHelper8 < ::com::sun::star::lang::XUnoTunnel , ::com::sun::star::lang::XServiceInfo @@ -300,9 +306,6 @@ public: /* -----------------15.05.98 08:29------------------- * * --------------------------------------------------*/ -typedef ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > * - XTextRangeRefPtr; -SV_DECL_PTRARR(XTextRangeArr, XTextRangeRefPtr, 4, 4) typedef ::cppu::WeakImplHelper3 < ::com::sun::star::lang::XUnoTunnel @@ -312,32 +315,20 @@ typedef ::cppu::WeakImplHelper3 class SwXTextRanges : public SwXTextRanges_Base - , public SwClient { private: - XTextRangeArr* pRangeArr; - ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > - xParentText; - XTextRangeArr* GetRangesArray(); - SwUnoCrsr* GetCrsr() const { return (SwUnoCrsr*)GetRegisteredIn(); } - -protected: + class Impl; + ::sw::UnoImplPtr<Impl> m_pImpl; virtual ~SwXTextRanges(); public: - SwXTextRanges(); - SwXTextRanges(SwPaM* pCrsr); + SwXTextRanges(SwPaM *const pCrsr); - const SwUnoCrsr* GetCursor() const { - return (const SwUnoCrsr*)(GetRegisteredIn()); - } - - // SwClient - virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew); + const SwUnoCrsr* GetCursor() const; static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId(); |