1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX
29 #define EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX
31 #include <rtl/ustring.hxx>
32 #include "abptypes.hxx"
33 #include <com/sun/star/uno/Reference.hxx>
34 #include "addresssettings.hxx"
36 namespace com
{ namespace sun
{ namespace star
{
38 class XMultiServiceFactory
;
46 //.........................................................................
49 //.........................................................................
51 //.....................................................................
52 namespace fieldmapping
54 //.....................................................................
56 //-----------------------------------------------------------------
57 /** invokes the field mapping dialog
59 service factory to use for creating UNO services
61 window to use as parent for the dialog and error messages
63 current settings. Upon return, the field mapping member of this
64 structure will be filled with the settings the user did in the
67 sal_Bool
invokeDialog(
68 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
69 class Window
* _pParent
,
70 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
>& _rxDataSource
,
71 AddressSettings
& _rSettings
74 //-----------------------------------------------------------------
75 /** creates a default field mapping for usage with the address book SDBC driver
76 <p>The column names as used by the SDBC driver for address books is stored in the configuration,
77 and this function creates a mapping which uses this configuration information.</p>
80 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
81 MapString2String
& /* [out] */ _rFieldAssignment
84 //-----------------------------------------------------------------
85 /** writes a field mapping for the template document address source
87 void writeTemplateAddressFieldMapping(
88 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
89 const MapString2String
& _rFieldAssignment
92 //.....................................................................
93 } // namespace fieldmapping
94 //.....................................................................
96 //.....................................................................
97 namespace addressconfig
99 //.....................................................................
101 //-----------------------------------------------------------------
102 /** writes the data source / table name given into the configuration, to where the template documents
105 void writeTemplateAddressSource(
106 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
107 const ::rtl::OUString
& _rDataSourceName
,
108 const ::rtl::OUString
& _rTableName
111 /** writes the configuration entry which states the the pilot has been completed successfully
113 void markPilotSuccess(
114 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
117 //.....................................................................
118 } // namespace addressconfig
119 //.....................................................................
121 //.........................................................................
123 //.........................................................................
125 #endif // EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX