merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_sw / unosrch.hxx
bloba5a7638697c5e20905f8cb64882db986745ba24c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unosrch.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOSRCH_HXX
31 #define _UNOSRCH_HXX
33 #ifndef _COM_SUN_STAR_UTIL_XPROPERTYREPLACE_HPP_
34 #include <com/sun/star/util/XPropertyReplace.hpp>
35 #endif
36 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #endif
39 #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
40 #include <com/sun/star/lang/XUnoTunnel.hpp>
41 #endif
42 #ifndef _CPPUHELPER_IMPLBASE3_HXX_
43 #include <cppuhelper/implbase3.hxx> // helper for implementations
44 #endif
45 #ifndef _STRING_HXX
46 #include <tools/string.hxx>
47 #endif
48 namespace com{namespace sun{namespace star{namespace util{
49 struct SearchOptions;
50 }}}}
51 namespace binfilter {
53 struct SfxItemPropertyMap;
54 class SfxItemSet;
55 /******************************************************************************
57 ******************************************************************************/
59 class SwXTextDocument;
60 class SwSearchProperties_Impl;
63 //STRIP008 namespace com{namespace sun{namespace star{namespace util{
64 //STRIP008 struct SearchOptions;
65 //STRIP008 }}}}
68 /*-----------------19.12.97 12:58-------------------
70 --------------------------------------------------*/
71 class SwXTextSearch : public cppu::WeakImplHelper3
73 ::com::sun::star::util::XPropertyReplace,
74 ::com::sun::star::lang::XServiceInfo,
75 ::com::sun::star::lang::XUnoTunnel
78 friend class SwXTextDocument;
80 String sSearchText;
81 String sReplaceText;
83 SwSearchProperties_Impl* pSearchProperties;
84 SwSearchProperties_Impl* pReplaceProperties;
87 const SfxItemPropertyMap* _pMap;
88 sal_Bool bAll : 1;
89 sal_Bool bWord : 1;
90 sal_Bool bBack : 1;
91 sal_Bool bExpr : 1;
92 sal_Bool bCase : 1;
93 // sal_Bool bInSel: 1; // wie geht Suchen in Selektionen?
94 sal_Bool bStyles:1;
95 sal_Bool bSimilarity : 1;
96 sal_Bool bLevRelax :1;
97 sal_Int16 nLevExchange;
98 sal_Int16 nLevAdd;
99 sal_Int16 nLevRemove;
101 sal_Bool bIsValueSearch :1;
102 protected:
103 virtual ~SwXTextSearch();
104 public:
105 SwXTextSearch();
109 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
111 //XUnoTunnel
112 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
114 //XSearchDescriptor
115 virtual ::rtl::OUString SAL_CALL getSearchString( ) throw(::com::sun::star::uno::RuntimeException);
116 virtual void SAL_CALL setSearchString( const ::rtl::OUString& aString ) throw(::com::sun::star::uno::RuntimeException);
118 //XReplaceDescriptor
119 virtual ::rtl::OUString SAL_CALL getReplaceString(void) throw( ::com::sun::star::uno::RuntimeException );
120 virtual void SAL_CALL setReplaceString(const ::rtl::OUString& aReplaceString) throw( ::com::sun::star::uno::RuntimeException );
122 //XPropertySet
123 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
124 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
125 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
126 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
127 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
128 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
129 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
131 //XPropertyReplace
132 virtual sal_Bool SAL_CALL getValueSearch(void) throw( ::com::sun::star::uno::RuntimeException );
133 virtual void SAL_CALL setValueSearch(sal_Bool ValueSearch_) throw( ::com::sun::star::uno::RuntimeException );
134 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getSearchAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
135 virtual void SAL_CALL setSearchAttributes(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
136 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getReplaceAttributes(void) throw( ::com::sun::star::uno::RuntimeException );
137 virtual void SAL_CALL setReplaceAttributes(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aSearchAttribs) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
139 //XServiceInfo
140 virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
141 virtual BOOL SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
142 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
144 void FillSearchItemSet(SfxItemSet& rSet) const;
145 void FillReplaceItemSet(SfxItemSet& rSet) const;
147 sal_Bool HasSearchAttributes() const;
148 sal_Bool HasReplaceAttributes() const;
150 void FillSearchOptions( ::com::sun::star::util::SearchOptions&
151 rSearchOpt ) const;
154 } //namespace binfilter
155 #endif