xref: /trunk/main/sc/inc/srchuno.hxx (revision 91144cd0085a7583d2099b982122deb2184ab956)
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();
54     virtual void SAL_CALL   setReplaceString( const ::rtl::OUString& aReplaceString );
55 
56                             // XSearchDescriptor
57     virtual ::rtl::OUString SAL_CALL getSearchString();
58     virtual void SAL_CALL   setSearchString( const ::rtl::OUString& aString );
59 
60                             // Search/Replace muss von aussen (vom XSearchable) gerufen werden...
61 
62                             // XPropertySet
63     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
64                             SAL_CALL getPropertySetInfo();
65     virtual void SAL_CALL   setPropertyValue( const ::rtl::OUString& aPropertyName,
66                                     const ::com::sun::star::uno::Any& aValue );
67     virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
68                                     const ::rtl::OUString& PropertyName );
69     virtual void SAL_CALL   addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
70                                     const ::com::sun::star::uno::Reference<
71                                         ::com::sun::star::beans::XPropertyChangeListener >& xListener );
72     virtual void SAL_CALL   removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
73                                     const ::com::sun::star::uno::Reference<
74                                         ::com::sun::star::beans::XPropertyChangeListener >& aListener );
75     virtual void SAL_CALL   addVetoableChangeListener( const ::rtl::OUString& PropertyName,
76                                     const ::com::sun::star::uno::Reference<
77                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener );
78     virtual void SAL_CALL   removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
79                                     const ::com::sun::star::uno::Reference<
80                                         ::com::sun::star::beans::XVetoableChangeListener >& aListener );
81 
82                                 // XUnoTunnel
83     virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
84                                     sal_Int8 >& aIdentifier );
85 
86     static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
87     static ScCellSearchObj* getImplementation( const com::sun::star::uno::Reference<
88                                     com::sun::star::util::XSearchDescriptor> xObj );
89 
90                             // XServiceInfo
91     virtual ::rtl::OUString SAL_CALL getImplementationName();
92     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName );
93     virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames();
94 };
95 
96 
97 #endif
98