LibreOffice Module extensions (master) 1
abspilot.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <vcl/roadmapwizard.hxx>
23#include "addresssettings.hxx"
25
28
29namespace abp
30{
33 {
34 css::uno::Reference< css::uno::XComponentContext >
37
40
41 public:
44 weld::Window* _pParent,
45 const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
46
47 virtual short run() override;
48
50 const css::uno::Reference< css::uno::XComponentContext >&
51 getORB() const { return m_xORB; }
53 const AddressSettings& getSettings() const { return m_aSettings; }
54
55 const ODataSource& getDataSource() const { return m_aNewDataSource; }
56
57 bool connectToDataSource( bool _bForceReConnect );
58
60
63
64 private:
65 // OWizardMachine overridables
66 virtual std::unique_ptr<BuilderPage> createPage( WizardState _nState ) override;
67 virtual void enterState( WizardState _nState ) override;
68 virtual bool prepareLeaveCurrentState( CommitPageReason _eReason ) override;
69 virtual bool onFinish() override;
70
71 // RoadmapWizard
72 virtual OUString getStateDisplayName( WizardState _nState ) const override;
73
78
81
84
86 {
87 return ( AST_OTHER == _eType );
88 }
91 {
93 }
94
96 {
97 return ( AST_OTHER == _eType ) || ( AST_KAB == _eType ) ||
98 ( AST_EVOLUTION == _eType ) || ( AST_EVOLUTION_GROUPWISE == _eType ) ||
99 ( AST_EVOLUTION_LDAP == _eType );
100 }
103 {
105 }
106
109 {
110 return ( AST_KAB != _eType );
111 }
112
113 void implCleanup();
114 void implCommitAll();
115
117 };
118} // namespace abp
119/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual OUString getStateDisplayName(WizardState _nState) const override
Definition: abspilot.cxx:120
AddressSettings m_aSettings
Definition: abspilot.hxx:36
virtual bool onFinish() override
Definition: abspilot.cxx:178
static bool needAdminInvokationPage(AddressSourceType _eType)
Definition: abspilot.hxx:85
void implDefaultTableName()
guesses a default for the table name, if no valid table is selected
Definition: abspilot.cxx:269
void implDoAutoFieldMapping()
does an automatic field mapping (possible for all types except AST_OTHER)
Definition: abspilot.cxx:292
bool needManualFieldMapping() const
checks if we need a manual (user-guided) field mapping
Definition: abspilot.hxx:102
static bool needTableSelection(AddressSourceType _eType)
determines whether the given address book type does provide one table only
Definition: abspilot.hxx:108
css::uno::Reference< css::uno::XComponentContext > m_xORB
Definition: abspilot.hxx:35
virtual std::unique_ptr< BuilderPage > createPage(WizardState _nState) override
Definition: abspilot.cxx:362
const css::uno::Reference< css::uno::XComponentContext > & getORB() const
get the service factory which was used to create the dialog
Definition: abspilot.hxx:51
bool needAdminInvokationPage() const
check if with the current settings, we would need to invoke he administration dialog for more details...
Definition: abspilot.hxx:90
OAddressBookSourcePilot(weld::Window *_pParent, const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
ctor
Definition: abspilot.cxx:55
const ODataSource & getDataSource() const
Definition: abspilot.hxx:55
AddressSourceType m_eNewDataSourceType
Definition: abspilot.hxx:39
const AddressSettings & getSettings() const
Definition: abspilot.hxx:53
virtual short run() override
Definition: abspilot.cxx:169
static bool needManualFieldMapping(AddressSourceType _eType)
Definition: abspilot.hxx:95
void impl_updateRoadmap(AddressSourceType _eType)
Definition: abspilot.cxx:396
bool connectToDataSource(bool _bForceReConnect)
Definition: abspilot.cxx:351
virtual bool prepareLeaveCurrentState(CommitPageReason _eReason) override
Definition: abspilot.cxx:212
void implCreateDataSource()
creates a new data source of the type indicated by m_aSettings
Definition: abspilot.cxx:299
AddressSettings & getSettings()
Definition: abspilot.hxx:52
virtual void enterState(WizardState _nState) override
Definition: abspilot.cxx:190
void typeSelectionChanged(AddressSourceType _eType)
to be called when the selected type changed
Definition: abspilot.cxx:424
a non-UNO wrapper for a data source
::vcl::RoadmapWizardMachine OAddressBookSourcePilot_Base
Definition: abspilot.hxx:31
@ AST_EVOLUTION_GROUPWISE
@ AST_EVOLUTION_LDAP
@ AST_EVOLUTION
sal_Int16 WizardState
AddressSourceType eType