Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef SC_SRCHUNO_HXX
30 : : #define SC_SRCHUNO_HXX
31 : :
32 : : #include <com/sun/star/util/XReplaceDescriptor.hpp>
33 : : #include <com/sun/star/lang/XServiceInfo.hpp>
34 : : #include <com/sun/star/lang/XUnoTunnel.hpp>
35 : : #include <svl/itemprop.hxx>
36 : : #include <cppuhelper/implbase3.hxx>
37 : :
38 : :
39 : : class SvxSearchItem;
40 : :
41 : :
42 : : class ScCellSearchObj : public cppu::WeakImplHelper3<
43 : : com::sun::star::util::XReplaceDescriptor,
44 : : com::sun::star::lang::XUnoTunnel,
45 : : com::sun::star::lang::XServiceInfo >
46 : : {
47 : : private:
48 : : SfxItemPropertySet aPropSet;
49 : : SvxSearchItem* pSearchItem;
50 : :
51 : : public:
52 : : ScCellSearchObj();
53 : : virtual ~ScCellSearchObj();
54 : :
55 : 64 : SvxSearchItem* GetSearchItem() const { return pSearchItem; }
56 : :
57 : : // XReplaceDescriptor
58 : : virtual ::rtl::OUString SAL_CALL getReplaceString() throw(::com::sun::star::uno::RuntimeException);
59 : : virtual void SAL_CALL setReplaceString( const ::rtl::OUString& aReplaceString )
60 : : throw(::com::sun::star::uno::RuntimeException);
61 : :
62 : : // XSearchDescriptor
63 : : virtual ::rtl::OUString SAL_CALL getSearchString() throw(::com::sun::star::uno::RuntimeException);
64 : : virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString )
65 : : throw(::com::sun::star::uno::RuntimeException);
66 : :
67 : : // search/replace should be called from outside (from XSearchable)...
68 : :
69 : : // XPropertySet
70 : : virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
71 : : SAL_CALL getPropertySetInfo()
72 : : throw(::com::sun::star::uno::RuntimeException);
73 : : virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName,
74 : : const ::com::sun::star::uno::Any& aValue )
75 : : throw(::com::sun::star::beans::UnknownPropertyException,
76 : : ::com::sun::star::beans::PropertyVetoException,
77 : : ::com::sun::star::lang::IllegalArgumentException,
78 : : ::com::sun::star::lang::WrappedTargetException,
79 : : ::com::sun::star::uno::RuntimeException);
80 : : virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(
81 : : const ::rtl::OUString& PropertyName )
82 : : throw(::com::sun::star::beans::UnknownPropertyException,
83 : : ::com::sun::star::lang::WrappedTargetException,
84 : : ::com::sun::star::uno::RuntimeException);
85 : : virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName,
86 : : const ::com::sun::star::uno::Reference<
87 : : ::com::sun::star::beans::XPropertyChangeListener >& xListener )
88 : : throw(::com::sun::star::beans::UnknownPropertyException,
89 : : ::com::sun::star::lang::WrappedTargetException,
90 : : ::com::sun::star::uno::RuntimeException);
91 : : virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName,
92 : : const ::com::sun::star::uno::Reference<
93 : : ::com::sun::star::beans::XPropertyChangeListener >& aListener )
94 : : throw(::com::sun::star::beans::UnknownPropertyException,
95 : : ::com::sun::star::lang::WrappedTargetException,
96 : : ::com::sun::star::uno::RuntimeException);
97 : : virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName,
98 : : const ::com::sun::star::uno::Reference<
99 : : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
100 : : throw(::com::sun::star::beans::UnknownPropertyException,
101 : : ::com::sun::star::lang::WrappedTargetException,
102 : : ::com::sun::star::uno::RuntimeException);
103 : : virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName,
104 : : const ::com::sun::star::uno::Reference<
105 : : ::com::sun::star::beans::XVetoableChangeListener >& aListener )
106 : : throw(::com::sun::star::beans::UnknownPropertyException,
107 : : ::com::sun::star::lang::WrappedTargetException,
108 : : ::com::sun::star::uno::RuntimeException);
109 : :
110 : : // XUnoTunnel
111 : : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
112 : : sal_Int8 >& aIdentifier )
113 : : throw(::com::sun::star::uno::RuntimeException);
114 : :
115 : : static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
116 : : static ScCellSearchObj* getImplementation( const com::sun::star::uno::Reference<
117 : : com::sun::star::util::XSearchDescriptor> xObj );
118 : :
119 : : // XServiceInfo
120 : : virtual ::rtl::OUString SAL_CALL getImplementationName()
121 : : throw(::com::sun::star::uno::RuntimeException);
122 : : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
123 : : throw(::com::sun::star::uno::RuntimeException);
124 : : virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
125 : : throw(::com::sun::star::uno::RuntimeException);
126 : : };
127 : :
128 : :
129 : : #endif
130 : :
131 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|