xref: /aoo42x/main/sc/inc/srchuno.hxx (revision 38d50f7b)
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 
24 #ifndef SC_SRCHUNO_HXX
25 #define SC_SRCHUNO_HXX
26 
27 #include <com/sun/star/util/XReplaceDescriptor.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/lang/XUnoTunnel.hpp>
30 #include <svl/itemprop.hxx>
31 #include <cppuhelper/implbase3.hxx>
32 
33 
34 class SvxSearchItem;
35 
36 
37 class ScCellSearchObj : public cppu::WeakImplHelper3<
38 								com::sun::star::util::XReplaceDescriptor,
39 								com::sun::star::lang::XUnoTunnel,
40 								com::sun::star::lang::XServiceInfo >
41 {
42 private:
43 	SfxItemPropertySet		aPropSet;
44 	SvxSearchItem*			pSearchItem;
45 
46 public:
47 							ScCellSearchObj();
48 	virtual					~ScCellSearchObj();
49 
GetSearchItem() const50 	SvxSearchItem*			GetSearchItem() const		{ return pSearchItem; }
51 
52 							// XReplaceDescriptor
53 	virtual ::rtl::OUString SAL_CALL getReplaceString() throw(::com::sun::star::uno::RuntimeException);
54 	virtual void SAL_CALL	setReplaceString( const ::rtl::OUString& aReplaceString )
55 								throw(::com::sun::star::uno::RuntimeException);
56 
57 							// XSearchDescriptor
58 	virtual ::rtl::OUString SAL_CALL getSearchString() throw(::com::sun::star::uno::RuntimeException);
59 	virtual void SAL_CALL	setSearchString( const ::rtl::OUString& aString )
60 								throw(::com::sun::star::uno::RuntimeException);
61 
62 							// Search/Replace muss von aussen (vom XSearchable) gerufen werden...
63 
64 							// XPropertySet
65 	virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
66 							SAL_CALL getPropertySetInfo()
67 								throw(::com::sun::star::uno::RuntimeException);
68 	virtual void SAL_CALL	setPropertyValue( const ::rtl::OUString& aPropertyName,
69 									const ::com::sun::star::uno::Any& aValue )
70 								throw(::com::sun::star::beans::UnknownPropertyException,
71 									::com::sun::star::beans::PropertyVetoException,
72 									::com::sun::star::lang::IllegalArgumentException,
73 									::com::sun::star::lang::WrappedTargetException,
74 									::com::sun::star::uno::RuntimeException);
75 	virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
76 									const ::rtl::OUString& PropertyName )
77 								throw(::com::sun::star::beans::UnknownPropertyException,
78 									::com::sun::star::lang::WrappedTargetException,
79 									::com::sun::star::uno::RuntimeException);
80 	virtual void SAL_CALL	addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
81 									const ::com::sun::star::uno::Reference<
82 										::com::sun::star::beans::XPropertyChangeListener >& xListener )
83 								throw(::com::sun::star::beans::UnknownPropertyException,
84 									::com::sun::star::lang::WrappedTargetException,
85 									::com::sun::star::uno::RuntimeException);
86 	virtual void SAL_CALL	removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
87 									const ::com::sun::star::uno::Reference<
88 										::com::sun::star::beans::XPropertyChangeListener >& aListener )
89 								throw(::com::sun::star::beans::UnknownPropertyException,
90 									::com::sun::star::lang::WrappedTargetException,
91 									::com::sun::star::uno::RuntimeException);
92 	virtual void SAL_CALL	addVetoableChangeListener( const ::rtl::OUString& PropertyName,
93 									const ::com::sun::star::uno::Reference<
94 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
95 								throw(::com::sun::star::beans::UnknownPropertyException,
96 									::com::sun::star::lang::WrappedTargetException,
97 									::com::sun::star::uno::RuntimeException);
98 	virtual void SAL_CALL	removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
99 									const ::com::sun::star::uno::Reference<
100 										::com::sun::star::beans::XVetoableChangeListener >& aListener )
101 								throw(::com::sun::star::beans::UnknownPropertyException,
102 									::com::sun::star::lang::WrappedTargetException,
103 									::com::sun::star::uno::RuntimeException);
104 
105 								// XUnoTunnel
106 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
107 									sal_Int8 >& aIdentifier )
108 								throw(::com::sun::star::uno::RuntimeException);
109 
110 	static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
111 	static ScCellSearchObj* getImplementation( const com::sun::star::uno::Reference<
112 									com::sun::star::util::XSearchDescriptor> xObj );
113 
114 							// XServiceInfo
115 	virtual ::rtl::OUString SAL_CALL getImplementationName()
116 								throw(::com::sun::star::uno::RuntimeException);
117 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
118 								throw(::com::sun::star::uno::RuntimeException);
119 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
120 								throw(::com::sun::star::uno::RuntimeException);
121 };
122 
123 
124 #endif
125 
126