From 3e8cfc5ebf56c2cb8b3497c7191e23461f761b3c Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Mon, 26 Feb 2001 11:08:18 +0000 Subject: [PATCH] #76652# XLinkUpdate implemented --- sw/inc/unotxdoc.hxx | 33 ++++++++++++++++++++++----------- sw/source/ui/uno/unotxdoc.cxx | 23 +++++++++++++++++++++-- 2 files changed, 43 insertions(+), 13 deletions(-) diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 0f752cbaf02c..80e5688d67b5 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unotxdoc.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dvo $ $Date: 2001-02-14 13:11:12 $ + * last change: $Author: os $ $Date: 2001-02-26 12:07:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,6 +139,9 @@ #ifndef _COM_SUN_STAR_UTIL_XREFRESHABLE_HPP_ #include #endif +#ifndef _COM_SUN_STAR_UTIL_XLINKUPDATE_HPP_ +#include +#endif #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ #include #endif @@ -167,24 +170,28 @@ #include // helper for implementations #endif -#define __IFC24 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \ -Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24 +#define __IFC25 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \ +Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25 -#define __CLASS_IFC24 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \ -class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24 +#define __CLASS_IFC25 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \ +class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \ +class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\ +class Ifc25 -#define __PUBLIC_IFC24 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \ +#define __PUBLIC_IFC25 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \ public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \ -public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23 , public Ifc24 +public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23 , public Ifc24, \ +public Ifc25 -__DEF_IMPLHELPER_PRE( 24 ) +__DEF_IMPLHELPER_PRE( 25 ) __IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ) __IFC_WRITEOFFSET( 4 ) __IFC_WRITEOFFSET( 5 ) __IFC_WRITEOFFSET( 6 ) __IFC_WRITEOFFSET( 7 ) __IFC_WRITEOFFSET( 8 ) __IFC_WRITEOFFSET( 9 ) __IFC_WRITEOFFSET( 10) __IFC_WRITEOFFSET( 11) __IFC_WRITEOFFSET( 12) __IFC_WRITEOFFSET( 13) __IFC_WRITEOFFSET( 14) __IFC_WRITEOFFSET( 15) __IFC_WRITEOFFSET( 16) __IFC_WRITEOFFSET( 17) __IFC_WRITEOFFSET( 18) __IFC_WRITEOFFSET( 19) __IFC_WRITEOFFSET( 20) __IFC_WRITEOFFSET( 21) __IFC_WRITEOFFSET( 22) __IFC_WRITEOFFSET( 23) __IFC_WRITEOFFSET( 24) -__DEF_IMPLHELPER_POST( 24 ) + __IFC_WRITEOFFSET( 25) +__DEF_IMPLHELPER_POST( 25 ) class SwDocShell; class UnoActionContext; @@ -199,7 +206,7 @@ SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4); /****************************************************************************** * ******************************************************************************/ -typedef cppu::WeakImplHelper24 +typedef cppu::WeakImplHelper25 < ::com::sun::star::text::XTextDocument, ::com::sun::star::text::XLineNumberingProperties, @@ -224,6 +231,7 @@ typedef cppu::WeakImplHelper24 ::com::sun::star::document::XLinkTargetSupplier, ::com::sun::star::document::XRedlinesSupplier, ::com::sun::star::util::XRefreshable, + ::com::sun::star::util::XLinkUpdate, ::com::sun::star::lang::XUnoTunnel > SwXTextDocumentBaseClass; @@ -413,6 +421,9 @@ class SwXTextDocument : public SwXTextDocumentBaseClass, virtual void SAL_CALL addRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL removeRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException ); + // ::com::sun::star::util::XLinkUpdate, + virtual void SAL_CALL updateLinks( ) throw(::com::sun::star::uno::RuntimeException); + // void Invalidate(); void Reactivate(SwDocShell* pNewDocShell); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index 3986a842a175..0252cdddd03c 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unotxdoc.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: os $ $Date: 2001-02-21 07:38:49 $ + * last change: $Author: os $ $Date: 2001-02-26 12:08:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -186,6 +186,9 @@ #include #endif +#ifndef _SVXLINKMGR_HXX +#include +#endif #ifndef _SVX_UNOMID_HXX #include #endif @@ -2132,6 +2135,22 @@ void SwXTextDocument::removeRefreshListener(const Reference< util::XRefreshListe { DBG_WARNING("not implemented") } +/* -----------------------------26.02.01 12:22-------------------------------- + + ---------------------------------------------------------------------------*/ +void SwXTextDocument::updateLinks( ) throw(RuntimeException) +{ + ::vos::OGuard aGuard(Application::GetSolarMutex()); + if(!IsValid()) + throw RuntimeException(); + SwDoc* pDoc = pDocShell->GetDoc(); + SvxLinkManager& rLnkMan = pDoc->GetLinkManager(); + if( rLnkMan.GetLinks().Count() ) + { + UnoActionContext aAction(pDoc); + rLnkMan.UpdateAllLinks( FALSE, FALSE, TRUE ); + } +} /* -----------------------------20.06.00 09:54-------------------------------- ---------------------------------------------------------------------------*/