xref: /trunk/main/svtools/inc/svtools/fltcall.hxx (revision 01aa44aa)
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 _FLTCALL_HXX
25 #define _FLTCALL_HXX
26 #include <tools/gen.hxx>
27 #include <vcl/field.hxx>
28 #include <com/sun/star/uno/Sequence.h>
29 #include <com/sun/star/beans/PropertyValue.hpp>
30 #include <svtools/FilterConfigItem.hxx>
31 
32 class FilterConfigItem;
33 class SvStream;
34 class Graphic;
35 class Window;
36 
37 struct FltCallDialogParameter
38 {
39 
40 	Window*		pWindow;
41 	ResMgr*		pResMgr;
42 	FieldUnit	eFieldUnit;
43 	String		aFilterExt;
44 
45 	// In and Out PropertySequence for all filter dialogs
46 	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFilterData;
47 
FltCallDialogParameterFltCallDialogParameter48 	FltCallDialogParameter( Window* pW, ResMgr* pRsMgr, FieldUnit eFiUni ) :
49 		pWindow			( pW ),
50 		pResMgr			( pRsMgr ),
51 		eFieldUnit		( eFiUni ) {};
52 };
53 
54 typedef sal_Bool (*PFilterCall)(SvStream & rStream, Graphic & rGraphic,
55 								FilterConfigItem* pConfigItem, sal_Bool bPrefDialog);
56 	// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
57 	// rFileName ist der komplette Pfadname der zu importierenden bzw. zu exportierenden Datei.
58 	// pCallBack darf auch NULL sein. pCallerData wird der Callback-Funktion uebergeben.
59 	// pOptionsConfig darf NULL sein. Anderenfalls ist die Gruppe des Config schon gesetzt
60 	// und darf von dem Filter nicht geaendert werden!
61 	// Wenn bPrefDialog==sal_True gilt, wird ggf. ein Preferences-Dialog durchgefuehrt.
62 
63 typedef sal_Bool ( *PFilterDlgCall )( FltCallDialogParameter& );
64 	// Von diesem Typ sind sowohl Export-Filter-Funktionen als auch Import-Filter-Funktionen.
65 	// Uebergeben wird ein Pointer auf ein Parent-Fenster und auf die Options-Config.
66 	// pOptions und pWindow duerfen NULL sein, in diesem Fall wird sal_False zurueckgeliefert.
67 	// Anderenfalls ist die Gruppe der Config schon gesetzt
68 	// und darf von dem Filter nicht geaendert werden!
69 
70 #endif
71