xref: /aoo42x/main/editeng/inc/editeng/unopracc.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SVX_UNOPRACC_HXX
29 #define _SVX_UNOPRACC_HXX
30 
31 #include <editeng/unotext.hxx>
32 
33 
34 class SvxEditSource;
35 
36 /** Wraps SvxUnoTextRangeBase and provides us with the text properties
37 
38     Inherits from SvxUnoTextRangeBase and provides XPropertySet and
39     XMultiPropertySet interfaces. Just set the selection to the
40     required text range and return a reference to a XPropertySet.
41  */
42 class SvxAccessibleTextPropertySet : public SvxUnoTextRangeBase,
43                                      public ::com::sun::star::lang::XTypeProvider,
44                                      public ::cppu::OWeakObject
45 {
46 public:
47     SvxAccessibleTextPropertySet( const SvxEditSource*, const SvxItemPropertySet* );
48 	virtual ~SvxAccessibleTextPropertySet() throw();
49 
50     // XTextRange
51     virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException);
52 
53 	// uno::XInterface
54 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
55 	virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
56 	virtual void SAL_CALL acquire() throw();
57 	virtual void SAL_CALL release() throw();
58 
59 	// lang::XServiceInfo
60     virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
61     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ) throw (::com::sun::star::uno::RuntimeException);
62     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
63 
64 	// lang::XTypeProvider
65     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
66     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
67 
68 	// XServiceName
69     ::rtl::OUString SAL_CALL getServiceName() throw (::com::sun::star::uno::RuntimeException);
70 };
71 
72 #endif
73 
74