1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _FMSEARCH_HXX 29 #define _FMSEARCH_HXX 30 31 #include <com/sun/star/sdbc/XResultSet.hpp> 32 33 #define _SVSTDARR_STRINGSDTOR 34 #include <svl/svstdarr.hxx> 35 36 #ifndef _DIALOG_HXX //autogen 37 #include <vcl/dialog.hxx> 38 #endif 39 40 #ifndef _BUTTON_HXX //autogen 41 #include <vcl/button.hxx> 42 #endif 43 44 #ifndef _FIXED_HXX //autogen 45 #include <vcl/fixed.hxx> 46 #endif 47 48 #ifndef _EDIT_HXX //autogen 49 #include <vcl/edit.hxx> 50 #endif 51 #include <vcl/combobox.hxx> 52 #include <vcl/lstbox.hxx> 53 #include <tools/link.hxx> 54 #include <comphelper/uno3.hxx> 55 #include <comphelper/stl_types.hxx> 56 #include <tools/string.hxx> 57 #include "svx/svxdllapi.h" 58 59 FORWARD_DECLARE_INTERFACE(util,XNumberFormatsSupplier) 60 61 // =================================================================================================== 62 // Hilfsmethoden 63 64 SVX_DLLPUBLIC sal_Bool IsSearchableControl( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface>& _xControl, 65 ::rtl::OUString* pCurrentText = NULL); 66 // check if the control has one of the interfaces we can use for searching 67 // *pCurrentText will be filled with the current text of the control (as used when searching this control) 68 69 // =================================================================================================== 70 // Hilfsstrukturen 71 72 struct FmFoundRecordInformation 73 { 74 ::com::sun::star::uno::Any aPosition; // Bookmark des Datensatzes, in dem der Text gefunden wurde 75 sal_Int16 nFieldPos; // dito : die relative Position der Spalte (im Stringnamen in Feldliste im Constructor) 76 sal_Int16 nContext; // Kontext, in dem gesucht und gefunden wurde (falls die aktuelle Suche verschiedene solche kennt) 77 }; 78 79 // =================================================================================================== 80 // = struct FmSearchContext - Informationen fuer Suche in verschiedenen Kontexten 81 // =================================================================================================== 82 83 struct FmSearchContext 84 { 85 // [in] 86 sal_Int16 nContext; // die Nummer des Kontextes 87 // [out] 88 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet> xCursor; // der Iterator fuer diesen Kontext 89 String strUsedFields; // eine Liste von durch ';' getrennten Feldnamen 90 ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > 91 arrFields; // die korrespondierenden Text-Interfaces fuer die Felder in strUsedFields 92 String sFieldDisplayNames; // if not empty : names to be displayed for the searchable fields (must have the same token count as strUsedFields !) 93 }; 94 95 #endif // _FMSEARCH_HXX 96