merge the formfield patch from ooo-build
[ooovba.git] / sw / inc / unoredlines.hxx
blob8f932617f4ae94c359959dd8257c57f1030a7c51
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unoredlines.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOREDLINES_HXX
31 #define _UNOREDLINES_HXX
33 #include <unocoll.hxx>
34 #include <unobaseclass.hxx>
35 #include <com/sun/star/container/XEnumerationAccess.hpp>
37 class SwRedline;
38 namespace com{ namespace sun{ namespace star{
39 namespace beans{
40 class XPropertySet;
42 }}}
43 typedef
44 cppu::WeakImplHelper3
46 ::com::sun::star::container::XIndexAccess,
47 ::com::sun::star::container::XEnumerationAccess,
48 ::com::sun::star::lang::XServiceInfo
50 SwRedlinesBaseClass;
51 class SwXRedlines : public SwRedlinesBaseClass,
52 public SwUnoCollection
54 protected:
55 virtual ~SwXRedlines();
56 public:
57 SwXRedlines(SwDoc* pDoc);
60 //XIndexAccess
61 virtual sal_Int32 SAL_CALL getCount( ) throw(::com::sun::star::uno::RuntimeException);
62 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 );
64 //XEnumerationAccess - frueher XParagraphEnumerationAccess
65 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
67 //XElementAccess
68 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
69 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
71 //XServiceInfo
72 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
73 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
74 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
76 static ::com::sun::star::beans::XPropertySet* GetObject( SwRedline& rRedline, SwDoc& rDoc );
78 /* -----------------------------12.01.01 14:58--------------------------------
80 ---------------------------------------------------------------------------*/
81 class SwXRedlineEnumeration : public SwSimpleEnumerationBaseClass,
82 public SwClient
84 SwDoc* pDoc;
85 USHORT nCurrentIndex;
86 protected:
87 virtual ~SwXRedlineEnumeration();
88 public:
89 SwXRedlineEnumeration(SwDoc& rDoc);
92 //XEnumeration
93 virtual BOOL SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
94 virtual ::com::sun::star::uno::Any SAL_CALL nextElement(void) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
96 //XServiceInfo
97 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
98 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
99 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
101 //SwClient
102 virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
106 #endif