xref: /aoo4110/main/svx/inc/svx/fmsearch.hxx (revision b1cdbd2c)
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 _FMSEARCH_HXX
25 #define _FMSEARCH_HXX
26 
27 #include <com/sun/star/sdbc/XResultSet.hpp>
28 
29 #define _SVSTDARR_STRINGSDTOR
30 #include <svl/svstdarr.hxx>
31 
32 #ifndef _DIALOG_HXX //autogen
33 #include <vcl/dialog.hxx>
34 #endif
35 
36 #ifndef _BUTTON_HXX //autogen
37 #include <vcl/button.hxx>
38 #endif
39 
40 #ifndef _FIXED_HXX //autogen
41 #include <vcl/fixed.hxx>
42 #endif
43 
44 #ifndef _EDIT_HXX //autogen
45 #include <vcl/edit.hxx>
46 #endif
47 #include <vcl/combobox.hxx>
48 #include <vcl/lstbox.hxx>
49 #include <tools/link.hxx>
50 #include <comphelper/uno3.hxx>
51 #include <comphelper/stl_types.hxx>
52 #include <tools/string.hxx>
53 #include "svx/svxdllapi.h"
54 
55 FORWARD_DECLARE_INTERFACE(util,XNumberFormatsSupplier)
56 
57 // ===================================================================================================
58 // Hilfsmethoden
59 
60 SVX_DLLPUBLIC sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xControl,
61                                             ::rtl::OUString* pCurrentText = NULL);
62 	// check if the control has one of the interfaces we can use for searching
63 	// *pCurrentText will be filled with the current text of the control (as used when searching this control)
64 
65 // ===================================================================================================
66 // Hilfsstrukturen
67 
68 struct FmFoundRecordInformation
69 {
70 	::com::sun::star::uno::Any		aPosition;	// Bookmark des Datensatzes, in dem der Text gefunden wurde
71 	sal_Int16		nFieldPos;	// dito : die relative Position der Spalte (im Stringnamen in Feldliste im Constructor)
72 	sal_Int16		nContext;	// Kontext, in dem gesucht und gefunden wurde (falls die aktuelle Suche verschiedene solche kennt)
73 };
74 
75 // ===================================================================================================
76 // = struct FmSearchContext - Informationen fuer Suche in verschiedenen Kontexten
77 // ===================================================================================================
78 
79 struct FmSearchContext
80 {
81 	// [in]
82 	sal_Int16					nContext;		// die Nummer des Kontextes
83 	// [out]
84 	::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet>			xCursor;		// der Iterator fuer diesen Kontext
85 	String					strUsedFields;	// eine Liste von durch ';' getrennten Feldnamen
86     ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >
87 	                        arrFields;		// die korrespondierenden Text-Interfaces fuer die Felder in strUsedFields
88 	String					sFieldDisplayNames;		// if not empty : names to be displayed for the searchable fields (must have the same token count as strUsedFields !)
89 };
90 
91 #endif // _FMSEARCH_HXX
92