Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef SC_SRCHUNO_HXX
21 : #define SC_SRCHUNO_HXX
22 :
23 : #include <com/sun/star/util/XReplaceDescriptor.hpp>
24 : #include <com/sun/star/lang/XServiceInfo.hpp>
25 : #include <com/sun/star/lang/XUnoTunnel.hpp>
26 : #include <svl/itemprop.hxx>
27 : #include <cppuhelper/implbase3.hxx>
28 :
29 :
30 : class SvxSearchItem;
31 :
32 :
33 : class ScCellSearchObj : public cppu::WeakImplHelper3<
34 : com::sun::star::util::XReplaceDescriptor,
35 : com::sun::star::lang::XUnoTunnel,
36 : com::sun::star::lang::XServiceInfo >
37 : {
38 : private:
39 : SfxItemPropertySet aPropSet;
40 : SvxSearchItem* pSearchItem;
41 :
42 : public:
43 : ScCellSearchObj();
44 : virtual ~ScCellSearchObj();
45 :
46 71 : SvxSearchItem* GetSearchItem() const { return pSearchItem; }
47 :
48 : // XReplaceDescriptor
49 : virtual OUString SAL_CALL getReplaceString() throw(::com::sun::star::uno::RuntimeException);
50 : virtual void SAL_CALL setReplaceString( const OUString& aReplaceString )
51 : throw(::com::sun::star::uno::RuntimeException);
52 :
53 : // XSearchDescriptor
54 : virtual OUString SAL_CALL getSearchString() throw(::com::sun::star::uno::RuntimeException);
55 : virtual void SAL_CALL setSearchString( const OUString& aString )
56 : throw(::com::sun::star::uno::RuntimeException);
57 :
58 : // search/replace should be called from outside (from XSearchable)...
59 :
60 : // XPropertySet
61 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
62 : SAL_CALL getPropertySetInfo()
63 : throw(::com::sun::star::uno::RuntimeException);
64 : virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
65 : const ::com::sun::star::uno::Any& aValue )
66 : throw(::com::sun::star::beans::UnknownPropertyException,
67 : ::com::sun::star::beans::PropertyVetoException,
68 : ::com::sun::star::lang::IllegalArgumentException,
69 : ::com::sun::star::lang::WrappedTargetException,
70 : ::com::sun::star::uno::RuntimeException);
71 : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
72 : const OUString& PropertyName )
73 : throw(::com::sun::star::beans::UnknownPropertyException,
74 : ::com::sun::star::lang::WrappedTargetException,
75 : ::com::sun::star::uno::RuntimeException);
76 : virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName,
77 : const ::com::sun::star::uno::Reference<
78 : ::com::sun::star::beans::XPropertyChangeListener >& xListener )
79 : throw(::com::sun::star::beans::UnknownPropertyException,
80 : ::com::sun::star::lang::WrappedTargetException,
81 : ::com::sun::star::uno::RuntimeException);
82 : virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName,
83 : const ::com::sun::star::uno::Reference<
84 : ::com::sun::star::beans::XPropertyChangeListener >& aListener )
85 : throw(::com::sun::star::beans::UnknownPropertyException,
86 : ::com::sun::star::lang::WrappedTargetException,
87 : ::com::sun::star::uno::RuntimeException);
88 : virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName,
89 : const ::com::sun::star::uno::Reference<
90 : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
91 : throw(::com::sun::star::beans::UnknownPropertyException,
92 : ::com::sun::star::lang::WrappedTargetException,
93 : ::com::sun::star::uno::RuntimeException);
94 : virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName,
95 : const ::com::sun::star::uno::Reference<
96 : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
97 : throw(::com::sun::star::beans::UnknownPropertyException,
98 : ::com::sun::star::lang::WrappedTargetException,
99 : ::com::sun::star::uno::RuntimeException);
100 :
101 : // XUnoTunnel
102 : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
103 : sal_Int8 >& aIdentifier )
104 : throw(::com::sun::star::uno::RuntimeException);
105 :
106 : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
107 : static ScCellSearchObj* getImplementation( const com::sun::star::uno::Reference<
108 : com::sun::star::util::XSearchDescriptor> xObj );
109 :
110 : // XServiceInfo
111 : virtual OUString SAL_CALL getImplementationName()
112 : throw(::com::sun::star::uno::RuntimeException);
113 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
114 : throw(::com::sun::star::uno::RuntimeException);
115 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
116 : throw(::com::sun::star::uno::RuntimeException);
117 : };
118 :
119 :
120 : #endif
121 :
122 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|