xref: /trunk/main/extensions/source/dbpilots/wizardcontext.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
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 _EXTENSIONS_DBP_WIZARDCONTEXT_HXX_
29 #define _EXTENSIONS_DBP_WIZARDCONTEXT_HXX_
30 
31 #include <com/sun/star/container/XNameAccess.hpp>
32 #include <com/sun/star/beans/XPropertySet.hpp>
33 #include <com/sun/star/sdbc/XRowSet.hpp>
34 #include <com/sun/star/uno/Sequence.hxx>
35 #include <com/sun/star/drawing/XDrawPage.hpp>
36 #include <com/sun/star/drawing/XControlShape.hpp>
37 #include <com/sun/star/frame/XModel.hpp>
38 #include <comphelper/stl_types.hxx>
39 
40 //.........................................................................
41 namespace dbp
42 {
43 //.........................................................................
44 
45     //=====================================================================
46     //= OControlWizardContext
47     //=====================================================================
48     struct OControlWizardContext
49     {
50         // the global data source context
51         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
52                     xDatasourceContext;
53 
54         // the control mode
55         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
56                     xObjectModel;
57         // the form the control model belongs to
58         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
59                     xForm;
60         // the form as rowset
61         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >
62                     xRowSet;
63 
64         // the model of the document
65         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
66                     xDocumentModel;
67         // the page where the control mode resides
68         ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >
69                     xDrawPage;
70         // the shape which carries the control
71         ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XControlShape >
72                     xObjectShape;
73 
74         // the tables or queries of the data source the form is bound to (if any)
75         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
76                     xObjectContainer;
77         // the column types container of the object the form is bound to (table, query or SQL statement)
78         DECLARE_STL_USTRINGACCESS_MAP(sal_Int32,TNameTypeMap);
79         TNameTypeMap aTypes;
80         // the column names of the object the form is bound to (table, query or SQL statement)
81         ::com::sun::star::uno::Sequence< ::rtl::OUString >
82                     aFieldNames;
83 
84         sal_Bool bEmbedded;
85     };
86 
87 //.........................................................................
88 }   // namespace dbp
89 //.........................................................................
90 
91 #endif // _EXTENSIONS_DBP_WIZARDCONTEXT_HXX_
92 
93