1*46dbaceeSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*46dbaceeSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*46dbaceeSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*46dbaceeSAndrew Rist * distributed with this work for additional information 6*46dbaceeSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*46dbaceeSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*46dbaceeSAndrew Rist * "License"); you may not use this file except in compliance 9*46dbaceeSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*46dbaceeSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*46dbaceeSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*46dbaceeSAndrew Rist * software distributed under the License is distributed on an 15*46dbaceeSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*46dbaceeSAndrew Rist * KIND, either express or implied. See the License for the 17*46dbaceeSAndrew Rist * specific language governing permissions and limitations 18*46dbaceeSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*46dbaceeSAndrew Rist *************************************************************/ 21*46dbaceeSAndrew Rist 22*46dbaceeSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX 25cdf0e10cSrcweir #define EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <rtl/ustring.hxx> 28cdf0e10cSrcweir #include "abptypes.hxx" 29cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx> 30cdf0e10cSrcweir #include "addresssettings.hxx" 31cdf0e10cSrcweir 32cdf0e10cSrcweir namespace com { namespace sun { namespace star { 33cdf0e10cSrcweir namespace lang { 34cdf0e10cSrcweir class XMultiServiceFactory; 35cdf0e10cSrcweir } 36cdf0e10cSrcweir namespace beans { 37cdf0e10cSrcweir class XPropertySet; 38cdf0e10cSrcweir } 39cdf0e10cSrcweir } } } 40cdf0e10cSrcweir class Window; 41cdf0e10cSrcweir 42cdf0e10cSrcweir //......................................................................... 43cdf0e10cSrcweir namespace abp 44cdf0e10cSrcweir { 45cdf0e10cSrcweir //......................................................................... 46cdf0e10cSrcweir 47cdf0e10cSrcweir //..................................................................... 48cdf0e10cSrcweir namespace fieldmapping 49cdf0e10cSrcweir { 50cdf0e10cSrcweir //..................................................................... 51cdf0e10cSrcweir 52cdf0e10cSrcweir //----------------------------------------------------------------- 53cdf0e10cSrcweir /** invokes the field mapping dialog 54cdf0e10cSrcweir @param _rxORB 55cdf0e10cSrcweir service factory to use for creating UNO services 56cdf0e10cSrcweir @param _pParent 57cdf0e10cSrcweir window to use as parent for the dialog and error messages 58cdf0e10cSrcweir @param _rSettings 59cdf0e10cSrcweir current settings. Upon return, the field mapping member of this 60cdf0e10cSrcweir structure will be filled with the settings the user did in the 61cdf0e10cSrcweir field mapping dialog. 62cdf0e10cSrcweir */ 63cdf0e10cSrcweir sal_Bool invokeDialog( 64cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 65cdf0e10cSrcweir class Window* _pParent, 66cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDataSource, 67cdf0e10cSrcweir AddressSettings& _rSettings 68cdf0e10cSrcweir ) SAL_THROW ( ( ) ); 69cdf0e10cSrcweir 70cdf0e10cSrcweir //----------------------------------------------------------------- 71cdf0e10cSrcweir /** creates a default field mapping for usage with the address book SDBC driver 72cdf0e10cSrcweir <p>The column names as used by the SDBC driver for address books is stored in the configuration, 73cdf0e10cSrcweir and this function creates a mapping which uses this configuration information.</p> 74cdf0e10cSrcweir */ 75cdf0e10cSrcweir void defaultMapping( 76cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 77cdf0e10cSrcweir MapString2String& /* [out] */ _rFieldAssignment 78cdf0e10cSrcweir ) SAL_THROW ( ( ) ); 79cdf0e10cSrcweir 80cdf0e10cSrcweir //----------------------------------------------------------------- 81cdf0e10cSrcweir /** writes a field mapping for the template document address source 82cdf0e10cSrcweir */ 83cdf0e10cSrcweir void writeTemplateAddressFieldMapping( 84cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 85cdf0e10cSrcweir const MapString2String& _rFieldAssignment 86cdf0e10cSrcweir ) SAL_THROW ( ( ) ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir //..................................................................... 89cdf0e10cSrcweir } // namespace fieldmapping 90cdf0e10cSrcweir //..................................................................... 91cdf0e10cSrcweir 92cdf0e10cSrcweir //..................................................................... 93cdf0e10cSrcweir namespace addressconfig 94cdf0e10cSrcweir { 95cdf0e10cSrcweir //..................................................................... 96cdf0e10cSrcweir 97cdf0e10cSrcweir //----------------------------------------------------------------- 98cdf0e10cSrcweir /** writes the data source / table name given into the configuration, to where the template documents 99cdf0e10cSrcweir expect it. 100cdf0e10cSrcweir */ 101cdf0e10cSrcweir void writeTemplateAddressSource( 102cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB, 103cdf0e10cSrcweir const ::rtl::OUString& _rDataSourceName, 104cdf0e10cSrcweir const ::rtl::OUString& _rTableName 105cdf0e10cSrcweir ) SAL_THROW ( ( ) ); 106cdf0e10cSrcweir 107cdf0e10cSrcweir /** writes the configuration entry which states the the pilot has been completed successfully 108cdf0e10cSrcweir */ 109cdf0e10cSrcweir void markPilotSuccess( 110cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB 111cdf0e10cSrcweir ) SAL_THROW ( ( ) ); 112cdf0e10cSrcweir 113cdf0e10cSrcweir //..................................................................... 114cdf0e10cSrcweir } // namespace addressconfig 115cdf0e10cSrcweir //..................................................................... 116cdf0e10cSrcweir 117cdf0e10cSrcweir //......................................................................... 118cdf0e10cSrcweir } // namespace abp 119cdf0e10cSrcweir //......................................................................... 120cdf0e10cSrcweir 121cdf0e10cSrcweir #endif // EXTENSIONS_ABP_FIELDMAPPINGIMPL_HXX 122cdf0e10cSrcweir 123