1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: fieldmappingimpl.hxx,v $
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
{
41 class XMultiServiceFactory
;
49 //.........................................................................
52 //.........................................................................
54 //.....................................................................
55 namespace fieldmapping
57 //.....................................................................
59 //-----------------------------------------------------------------
60 /** invokes the field mapping dialog
62 service factory to use for creating UNO services
64 window to use as parent for the dialog and error messages
66 current settings. Upon return, the field mapping member of this
67 structure will be filled with the settings the user did in the
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
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>
83 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
>& _rxORB
,
84 MapString2String
& /* [out] */ _rFieldAssignment
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
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
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
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
120 //.....................................................................
121 } // namespace addressconfig
122 //.....................................................................
124 //.........................................................................
126 //.........................................................................
128 #endif // EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX