update dev300-m58
[ooovba.git] / extensions / source / abpilot / fieldmappingimpl.hxx
blobf5ba869de0be68df368432e3b0dc51de53f2ae1c
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: fieldmappingimpl.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 ************************************************************************/
31 #ifndef EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX
32 #define EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX
34 #include <rtl/ustring.hxx>
35 #include "abptypes.hxx"
36 #include <com/sun/star/uno/Reference.hxx>
37 #include "addresssettings.hxx"
39 namespace com { namespace sun { namespace star {
40 namespace lang {
41 class XMultiServiceFactory;
43 namespace beans {
44 class XPropertySet;
46 } } }
47 class Window;
49 //.........................................................................
50 namespace abp
52 //.........................................................................
54 //.....................................................................
55 namespace fieldmapping
57 //.....................................................................
59 //-----------------------------------------------------------------
60 /** invokes the field mapping dialog
61 @param _rxORB
62 service factory to use for creating UNO services
63 @param _pParent
64 window to use as parent for the dialog and error messages
65 @param _rSettings
66 current settings. Upon return, the field mapping member of this
67 structure will be filled with the settings the user did in the
68 field mapping dialog.
70 sal_Bool invokeDialog(
71 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
72 class Window* _pParent,
73 const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDataSource,
74 AddressSettings& _rSettings
75 ) SAL_THROW ( ( ) );
77 //-----------------------------------------------------------------
78 /** creates a default field mapping for usage with the address book SDBC driver
79 <p>The column names as used by the SDBC driver for address books is stored in the configuration,
80 and this function creates a mapping which uses this configuration information.</p>
82 void defaultMapping(
83 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
84 MapString2String& /* [out] */ _rFieldAssignment
85 ) SAL_THROW ( ( ) );
87 //-----------------------------------------------------------------
88 /** writes a field mapping for the template document address source
90 void writeTemplateAddressFieldMapping(
91 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
92 const MapString2String& _rFieldAssignment
93 ) SAL_THROW ( ( ) );
95 //.....................................................................
96 } // namespace fieldmapping
97 //.....................................................................
99 //.....................................................................
100 namespace addressconfig
102 //.....................................................................
104 //-----------------------------------------------------------------
105 /** writes the data source / table name given into the configuration, to where the template documents
106 expect it.
108 void writeTemplateAddressSource(
109 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB,
110 const ::rtl::OUString& _rDataSourceName,
111 const ::rtl::OUString& _rTableName
112 ) SAL_THROW ( ( ) );
114 /** writes the configuration entry which states the the pilot has been completed successfully
116 void markPilotSuccess(
117 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
118 ) SAL_THROW ( ( ) );
120 //.....................................................................
121 } // namespace addressconfig
122 //.....................................................................
124 //.........................................................................
125 } // namespace abp
126 //.........................................................................
128 #endif // EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX