diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx index ffa5f7a310e7..4929492e759e 100644 --- a/sw/inc/unodraw.hxx +++ b/sw/inc/unodraw.hxx @@ -2,9 +2,9 @@ * * $RCSfile: unodraw.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: os $ $Date: 2001-04-04 12:29:22 $ + * last change: $Author: os $ $Date: 2001-05-21 12:38:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,8 +82,11 @@ #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ #include #endif -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ -#include // helper for implementations +#ifndef _COM_SUN_STAR_FORM_XFORMSSUPPLIER_HPP_ +#include +#endif +#ifndef _CPPUHELPER_IMPLBASE4_HXX_ +#include // helper for implementations #endif #ifndef _CPPUHELPER_IMPLBASE5_HXX_ #include // helper for implementations @@ -130,8 +133,9 @@ public: /* -----------------09.12.98 08:57------------------- * * --------------------------------------------------*/ -typedef cppu::WeakAggImplHelper3 +typedef cppu::WeakAggImplHelper4 < + ::com::sun::star::form::XFormsSupplier, ::com::sun::star::drawing::XDrawPage, ::com::sun::star::lang::XServiceInfo, ::com::sun::star::drawing::XShapeGrouper @@ -165,6 +169,9 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > SAL_CALL group(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > & xShapes) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL ungroup(const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapeGroup > & aGroup) throw( ::com::sun::star::uno::RuntimeException ); + //XFormsSupplier + virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getForms( ) throw (::com::sun::star::uno::RuntimeException); + //XServiceInfo virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException ); virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException ); diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx index d9287e2ca893..2eb4f588dc26 100644 --- a/sw/source/core/unocore/unodraw.cxx +++ b/sw/source/core/unocore/unodraw.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodraw.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: ama $ $Date: 2001-05-04 13:12:27 $ + * last change: $Author: os $ $Date: 2001-05-21 12:40:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -143,6 +143,7 @@ #include #endif using namespace ::com::sun::star; +using namespace ::com::sun::star::container; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; @@ -459,7 +460,7 @@ Sequence< Type > SwXDrawPage::getTypes( ) throw(RuntimeException) Sequence< uno::Type > aSvxTypes = GetSvxPage()->getTypes(); long nIndex = aPageTypes.getLength(); - aPageTypes.realloc(aPageTypes.getLength() + aSvxTypes.getLength() + 1); + aPageTypes.realloc(aPageTypes.getLength() + aSvxTypes.getLength()); uno::Type* pPageTypes = aPageTypes.getArray(); const uno::Type* pSvxTypes = aSvxTypes.getConstArray(); @@ -468,7 +469,6 @@ Sequence< Type > SwXDrawPage::getTypes( ) throw(RuntimeException) { pPageTypes[nIndex++] = pSvxTypes[nPos]; } - pPageTypes[nIndex] = ::getCppuType((Reference< ::com::sun::star::form::XFormsSupplier>*)0); return aPageTypes; } /*-- 22.01.99 11:33:44--------------------------------------------------- @@ -739,7 +739,22 @@ void SwXDrawPage::ungroup(const uno::Reference< drawing::XShapeGroup > & xShapeG pPage->RemovePageView(); } } +/* -----------------------------21.05.01 13:47-------------------------------- + ---------------------------------------------------------------------------*/ +Reference< XNameContainer > SwXDrawPage::getForms( ) throw (RuntimeException) +{ + vos::OGuard aGuard(Application::GetSolarMutex()); + if(!pDoc) + throw uno::RuntimeException(); + if(!pDoc->GetDrawModel()) + return Reference< XNameContainer > (); + else + { + ((SwXDrawPage*)this)->GetSvxPage(); + return pDrawPage->getForms(); + } +} /* -----------------05.05.98 17:05------------------- * * --------------------------------------------------*/