Avoid potential negative array index access to cached text.
[LibreOffice.git] / extensions / source / abpilot / fieldmappingimpl.hxx
blobe4a2dd1c9649c63f9bbde4be21cb3363539ecaa6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <rtl/ustring.hxx>
23 #include "abptypes.hxx"
24 #include <com/sun/star/uno/Reference.hxx>
25 #include "addresssettings.hxx"
27 namespace com::sun::star {
28 namespace lang {
29 class XMultiServiceFactory;
31 namespace uno {
32 class XComponentContext;
34 namespace beans {
35 class XPropertySet;
38 namespace weld { class Window; }
40 namespace abp
44 namespace fieldmapping
48 /** invokes the field mapping dialog
49 @param _rxORB
50 service factory to use for creating UNO services
51 @param _pParent
52 window to use as parent for the dialog and error messages
53 @param _rSettings
54 current settings. Upon return, the field mapping member of this
55 structure will be filled with the settings the user did in the
56 field mapping dialog.
58 bool invokeDialog(
59 const css::uno::Reference< css::uno::XComponentContext >& _rxORB,
60 class weld::Window* _pParent,
61 const css::uno::Reference< css::beans::XPropertySet >& _rxDataSource,
62 AddressSettings& _rSettings
66 /** creates a default field mapping for usage with the address book SDBC driver
67 <p>The column names as used by the SDBC driver for address books is stored in the configuration,
68 and this function creates a mapping which uses this configuration information.</p>
70 void defaultMapping(
71 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
72 MapString2String& /* [out] */ _rFieldAssignment
76 /** writes a field mapping for the template document address source
78 void writeTemplateAddressFieldMapping(
79 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
80 MapString2String&& _rFieldAssignment
84 } // namespace fieldmapping
87 namespace addressconfig
91 /** writes the data source / table name given into the configuration, to where the template documents
92 expect it.
94 void writeTemplateAddressSource(
95 const css::uno::Reference< css::uno::XComponentContext >& _rxContext,
96 const OUString& _rDataSourceName,
97 const OUString& _rTableName
100 /** writes the configuration entry which states the pilot has been completed successfully
102 void markPilotSuccess(
103 const css::uno::Reference< css::uno::XComponentContext >& _rxContext
107 } // namespace addressconfig
110 } // namespace abp
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */