xref: /aoo42x/main/sw/inc/unoredlines.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _UNOREDLINES_HXX
24 #define _UNOREDLINES_HXX
25 
26 #include <unocoll.hxx>
27 #include <unobaseclass.hxx>
28 #include <com/sun/star/container/XEnumerationAccess.hpp>
29 
30 class SwRedline;
31 namespace com{ namespace sun{ namespace star{
32 		namespace beans{
33 			class XPropertySet;
34 		}
35 }}}
36 typedef
37 cppu::WeakImplHelper3
38 <
39 	::com::sun::star::container::XIndexAccess,
40 	::com::sun::star::container::XEnumerationAccess,
41 	::com::sun::star::lang::XServiceInfo
42 >
43 SwRedlinesBaseClass;
44 class SwXRedlines : public SwRedlinesBaseClass,
45 	public SwUnoCollection
46 {
47 protected:
48 	virtual ~SwXRedlines();
49 public:
50 	SwXRedlines(SwDoc* pDoc);
51 
52 
53 	//XIndexAccess
54     virtual sal_Int32 SAL_CALL getCount(  ) throw(::com::sun::star::uno::RuntimeException);
55 	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 );
56 
57 	//XEnumerationAccess - frueher XParagraphEnumerationAccess
58 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration >  SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
59 
60 	//XElementAccess
61     virtual ::com::sun::star::uno::Type SAL_CALL getElementType(  ) throw(::com::sun::star::uno::RuntimeException);
62     virtual sal_Bool SAL_CALL hasElements(  ) throw(::com::sun::star::uno::RuntimeException);
63 
64 	//XServiceInfo
65 	virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
66 	virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
67 	virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
68 
69 	static ::com::sun::star::beans::XPropertySet* 			GetObject( SwRedline& rRedline, SwDoc& rDoc );
70 };
71 /* -----------------------------12.01.01 14:58--------------------------------
72 
73  ---------------------------------------------------------------------------*/
74 class SwXRedlineEnumeration
75     : public SwSimpleEnumeration_Base
76     , public SwClient
77 {
78 	SwDoc* pDoc;
79 	sal_uInt16 nCurrentIndex;
80 protected:
81 	virtual ~SwXRedlineEnumeration();
82 public:
83 	SwXRedlineEnumeration(SwDoc& rDoc);
84 
85 
86 	//XEnumeration
87 	virtual sal_Bool SAL_CALL hasMoreElements(void) throw( ::com::sun::star::uno::RuntimeException );
88 	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 );
89 
90 	//XServiceInfo
91 	virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
92 	virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
93 	virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
94 protected:
95 	//SwClient
96    virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
97 };
98 
99 
100 #endif
101 
102