LibreOffice Module extensions (master) 1
|
#include <abspilot.hxx>
Public Member Functions | |
OAddressBookSourcePilot (weld::Window *_pParent, const css::uno::Reference< css::uno::XComponentContext > &_rxORB) | |
ctor More... | |
virtual short | run () override |
const css::uno::Reference< css::uno::XComponentContext > & | getORB () const |
get the service factory which was used to create the dialog More... | |
AddressSettings & | getSettings () |
const AddressSettings & | getSettings () const |
const ODataSource & | getDataSource () const |
bool | connectToDataSource (bool _bForceReConnect) |
void | travelNext () |
void | typeSelectionChanged (AddressSourceType _eType) |
to be called when the selected type changed More... | |
Public Member Functions inherited from vcl::RoadmapWizardMachine | |
RoadmapWizardMachine (weld::Window *_pParent) | |
virtual | ~RoadmapWizardMachine () override |
void | SetRoadmapHelpId (const OUString &_rId) |
bool | isStateEnabled (WizardTypes::WizardState nState) const |
virtual bool | canAdvance () const override |
virtual void | updateTravelUI () override |
Public Member Functions inherited from vcl::WizardMachine | |
WizardMachine (weld::Window *_pParent, WizardButtonFlags _nButtonFlags) | |
virtual | ~WizardMachine () override |
bool | Finish (short nResult=RET_CANCEL) |
bool | ShowPage (WizardTypes::WizardState nState) |
bool | ShowNextPage () |
bool | ShowPrevPage () |
void | AddPage (std::unique_ptr< BuilderPage > xPage) |
void | RemovePage (const BuilderPage *pPage) |
void | SetPage (WizardTypes::WizardState nLevel, std::unique_ptr< BuilderPage > xPage) |
BuilderPage * | GetPage (WizardTypes::WizardState eState) const |
void | enableButtons (WizardButtonFlags _nWizardButtonFlags, bool _bEnable) |
void | defaultButton (WizardButtonFlags _nWizardButtonFlags) |
void | defaultButton (weld::Button *_pNewDefButton) |
void | setTitleBase (const OUString &_rTitleBase) |
virtual bool | canAdvance () const |
virtual void | updateTravelUI () |
void | suspendTraveling (AccessGuard) |
void | resumeTraveling (AccessGuard) |
bool | isTravelingSuspended () const |
Public Member Functions inherited from weld::AssistantController | |
AssistantController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId) | |
virtual Dialog * | getDialog () override |
virtual | ~AssistantController () override |
Public Member Functions inherited from weld::DialogController | |
virtual Dialog * | getDialog ()=0 |
const Dialog * | getConstDialog () const |
virtual short | run () |
void | set_title (const OUString &rTitle) |
OUString | get_title () const |
void | set_help_id (const OUString &rHelpId) |
OUString | get_help_id () const |
void | response (int nResponse) |
virtual | ~DialogController () COVERITY_NOEXCEPT_FALSE |
Private Member Functions | |
virtual std::unique_ptr< BuilderPage > | createPage (WizardState _nState) override |
virtual void | enterState (WizardState _nState) override |
virtual bool | prepareLeaveCurrentState (CommitPageReason _eReason) override |
virtual bool | onFinish () override |
virtual OUString | getStateDisplayName (WizardState _nState) const override |
void | implCreateDataSource () |
creates a new data source of the type indicated by m_aSettings More... | |
void | implDoAutoFieldMapping () |
does an automatic field mapping (possible for all types except AST_OTHER) More... | |
void | implDefaultTableName () |
guesses a default for the table name, if no valid table is selected More... | |
bool | needAdminInvokationPage () const |
check if with the current settings, we would need to invoke he administration dialog for more details about the data source More... | |
bool | needManualFieldMapping () const |
checks if we need a manual (user-guided) field mapping More... | |
void | implCleanup () |
void | implCommitAll () |
void | impl_updateRoadmap (AddressSourceType _eType) |
Static Private Member Functions | |
static bool | needAdminInvokationPage (AddressSourceType _eType) |
static bool | needManualFieldMapping (AddressSourceType _eType) |
static bool | needTableSelection (AddressSourceType _eType) |
determines whether the given address book type does provide one table only More... | |
Private Attributes | |
css::uno::Reference< css::uno::XComponentContext > | m_xORB |
AddressSettings | m_aSettings |
ODataSource | m_aNewDataSource |
AddressSourceType | m_eNewDataSourceType |
Definition at line 32 of file abspilot.hxx.
abp::OAddressBookSourcePilot::OAddressBookSourcePilot | ( | weld::Window * | _pParent, |
const css::uno::Reference< css::uno::XComponentContext > & | _rxORB | ||
) |
ctor
Definition at line 55 of file abspilot.cxx.
References vcl::WizardMachine::ActivatePage(), abp::AST_EVOLUTION, abp::AST_MACAB, abp::AST_OTHER, abp::AddressSettings::bEmbedDataSource, abp::AddressSettings::bIgnoreNoTable, abp::AddressSettings::bRegisterDataSource, vcl::RoadmapWizardMachine::declarePath(), vcl::WizardMachine::defaultButton(), vcl::WizardMachine::enableButtons(), abp::AddressSettings::eType, HID_ABSPILOT, HID_ABSPILOT_CANCEL, HID_ABSPILOT_FINISH, HID_ABSPILOT_NEXT, HID_ABSPILOT_PREVIOUS, m_aSettings, weld::AssistantController::m_xAssistant, vcl::WizardMachine::m_xCancel, vcl::WizardMachine::m_xFinish, vcl::WizardMachine::m_xHelp, vcl::WizardMachine::m_xNextPage, vcl::WizardMachine::m_xPrevPage, compmodule::ModuleRes(), PATH_COMPLETE, PATH_NO_FIELDS, PATH_NO_SETTINGS, PATH_NO_SETTINGS_NO_FIELDS, abp::AddressSettings::sDataSourceName, vcl::WizardMachine::setTitleBase(), STATE_FINAL_CONFIRM, STATE_INVOKE_ADMIN_DIALOG, STATE_MANUAL_FIELD_MAPPING, STATE_SELECT_ABTYPE, STATE_TABLE_SELECTION, typeSelectionChanged(), and UID_ABSPILOT_HELP.
bool abp::OAddressBookSourcePilot::connectToDataSource | ( | bool | _bForceReConnect | ) |
Definition at line 351 of file abspilot.cxx.
References abp::ODataSource::connect(), DBG_ASSERT, abp::ODataSource::disconnect(), abp::ODataSource::isConnected(), abp::ODataSource::isValid(), m_aNewDataSource, and weld::AssistantController::m_xAssistant.
Referenced by abp::AdminDialogInvokationPage::implTryConnect(), and prepareLeaveCurrentState().
|
overrideprivatevirtual |
Implements vcl::WizardMachine.
Definition at line 362 of file abspilot.cxx.
References getStateDisplayName(), weld::AssistantController::m_xAssistant, STATE_FINAL_CONFIRM, STATE_INVOKE_ADMIN_DIALOG, STATE_MANUAL_FIELD_MAPPING, STATE_SELECT_ABTYPE, and STATE_TABLE_SELECTION.
|
overrideprivatevirtual |
Reimplemented from vcl::RoadmapWizardMachine.
Definition at line 190 of file abspilot.cxx.
References vcl::RoadmapWizardMachine::enterState(), vcl::WizardMachine::GetPage(), impl_updateRoadmap(), implDefaultTableName(), implDoAutoFieldMapping(), needManualFieldMapping(), STATE_FINAL_CONFIRM, STATE_SELECT_ABTYPE, and STATE_TABLE_SELECTION.
|
inline |
Definition at line 55 of file abspilot.hxx.
References m_aNewDataSource.
Referenced by abp::AdminDialogInvokationPage::canAdvance(), implDefaultTableName(), abp::AdminDialogInvokationPage::implUpdateErrorMessage(), and abp::TableSelectionPage::initializePage().
|
inline |
get the service factory which was used to create the dialog
Definition at line 51 of file abspilot.hxx.
References m_xORB.
Referenced by abp::FinalPage::FinalPage(), abp::AddressBookSourcePage::getORB(), implCommitAll(), implCreateDataSource(), implDoAutoFieldMapping(), onFinish(), and abp::TypeSelectionPage::TypeSelectionPage().
|
inline |
Definition at line 52 of file abspilot.hxx.
References m_aSettings.
Referenced by abp::AddressBookSourcePage::getSettings(), implDefaultTableName(), and prepareLeaveCurrentState().
|
inline |
Definition at line 53 of file abspilot.hxx.
References m_aSettings.
|
overrideprivatevirtual |
Reimplemented from vcl::RoadmapWizardMachine.
Definition at line 120 of file abspilot.cxx.
References DBG_ASSERT, compmodule::ModuleRes(), sDisplayName, STATE_FINAL_CONFIRM, STATE_INVOKE_ADMIN_DIALOG, STATE_MANUAL_FIELD_MAPPING, STATE_SELECT_ABTYPE, and STATE_TABLE_SELECTION.
Referenced by createPage().
|
private |
Definition at line 396 of file abspilot.cxx.
References abp::AddressSettings::bIgnoreNoTable, vcl::RoadmapWizardMachine::enableState(), abp::ODataSource::hasTable(), abp::ODataSource::isConnected(), m_aNewDataSource, m_aSettings, needAdminInvokationPage(), needManualFieldMapping(), needTableSelection(), abp::AddressSettings::sSelectedTable, STATE_FINAL_CONFIRM, STATE_INVOKE_ADMIN_DIALOG, STATE_MANUAL_FIELD_MAPPING, and STATE_TABLE_SELECTION.
Referenced by enterState(), prepareLeaveCurrentState(), and typeSelectionChanged().
|
private |
Definition at line 163 of file abspilot.cxx.
References abp::ODataSource::isValid(), m_aNewDataSource, and abp::ODataSource::remove().
Referenced by run().
|
private |
Definition at line 142 of file abspilot.cxx.
References abp::AddressSettings::aFieldMapping, abp::AddressSettings::bRegisterDataSource, abp::ODataSource::getName(), getORB(), m_aNewDataSource, m_aSettings, abp::ODataSource::registerDataSource(), abp::ODataSource::rename(), abp::AddressSettings::sDataSourceName, abp::AddressSettings::sRegisteredDataSourceName, abp::AddressSettings::sSelectedTable, abp::ODataSource::store(), abp::fieldmapping::writeTemplateAddressFieldMapping(), and abp::addressconfig::writeTemplateAddressSource().
Referenced by onFinish().
|
private |
creates a new data source of the type indicated by m_aSettings
If another data source has been created before, this one is deleted.
Definition at line 299 of file abspilot.cxx.
References abp::AST_EVOLUTION, abp::AST_EVOLUTION_GROUPWISE, abp::AST_EVOLUTION_LDAP, abp::AST_INVALID, abp::AST_KAB, abp::AST_MACAB, abp::AST_OTHER, abp::AST_THUNDERBIRD, abp::ODataSourceContext::createNewEvolution(), abp::ODataSourceContext::createNewEvolutionGroupwise(), abp::ODataSourceContext::createNewEvolutionLdap(), abp::ODataSourceContext::createNewKab(), abp::ODataSourceContext::createNewMacab(), abp::ODataSourceContext::createNewOther(), abp::ODataSourceContext::createNewThunderbird(), abp::ODataSourceContext::disambiguate(), abp::AddressSettings::eType, getORB(), abp::ODataSource::isValid(), m_aNewDataSource, m_aSettings, m_eNewDataSourceType, abp::ODataSource::remove(), and abp::AddressSettings::sDataSourceName.
Referenced by prepareLeaveCurrentState().
|
private |
guesses a default for the table name, if no valid table is selected
Definition at line 269 of file abspilot.cxx.
References abp::AST_EVOLUTION, abp::AST_EVOLUTION_GROUPWISE, abp::AST_EVOLUTION_LDAP, abp::AST_THUNDERBIRD, eType, getDataSource(), getSettings(), abp::ODataSource::getTableNames(), and abp::AddressSettings::sSelectedTable.
Referenced by enterState().
|
private |
does an automatic field mapping (possible for all types except AST_OTHER)
Definition at line 292 of file abspilot.cxx.
References abp::AddressSettings::aFieldMapping, DBG_ASSERT, abp::fieldmapping::defaultMapping(), getORB(), m_aSettings, and needManualFieldMapping().
Referenced by enterState().
|
inlineprivate |
check if with the current settings, we would need to invoke he administration dialog for more details about the data source
Definition at line 90 of file abspilot.hxx.
References abp::AddressSettings::eType, m_aSettings, and needAdminInvokationPage().
Referenced by impl_updateRoadmap(), needAdminInvokationPage(), prepareLeaveCurrentState(), and typeSelectionChanged().
|
inlinestaticprivate |
Definition at line 85 of file abspilot.hxx.
References abp::AST_OTHER.
|
inlineprivate |
checks if we need a manual (user-guided) field mapping
Definition at line 102 of file abspilot.hxx.
References abp::AddressSettings::eType, m_aSettings, and needManualFieldMapping().
Referenced by enterState(), impl_updateRoadmap(), implDoAutoFieldMapping(), needManualFieldMapping(), and typeSelectionChanged().
|
inlinestaticprivate |
Definition at line 95 of file abspilot.hxx.
References abp::AST_EVOLUTION, abp::AST_EVOLUTION_GROUPWISE, abp::AST_EVOLUTION_LDAP, abp::AST_KAB, and abp::AST_OTHER.
|
inlinestaticprivate |
determines whether the given address book type does provide one table only
Definition at line 108 of file abspilot.hxx.
References abp::AST_KAB.
Referenced by impl_updateRoadmap().
|
overrideprivatevirtual |
Reimplemented from vcl::WizardMachine.
Definition at line 178 of file abspilot.cxx.
References getORB(), implCommitAll(), abp::addressconfig::markPilotSuccess(), and vcl::WizardMachine::onFinish().
|
overrideprivatevirtual |
Definition at line 212 of file abspilot.cxx.
References abp::AST_EVOLUTION_GROUPWISE, abp::AddressSettings::bIgnoreNoTable, connectToDataSource(), Application::CreateMessageDialog(), vcl::WizardTypes::eTravelBackward, eType, abp::AddressSettings::eType, vcl::WizardMachine::getCurrentState(), getSettings(), abp::ODataSource::getTableNames(), impl_updateRoadmap(), implCreateDataSource(), m_aNewDataSource, m_aSettings, weld::AssistantController::m_xAssistant, compmodule::ModuleRes(), needAdminInvokationPage(), vcl::WizardMachine::prepareLeaveCurrentState(), RET_YES, abp::AddressSettings::sSelectedTable, STATE_INVOKE_ADMIN_DIALOG, and STATE_SELECT_ABTYPE.
|
overridevirtual |
Reimplemented from weld::DialogController.
Definition at line 169 of file abspilot.cxx.
References implCleanup(), and weld::DialogController::run().
|
inline |
Definition at line 59 of file abspilot.hxx.
References vcl::WizardMachine::travelNext().
Referenced by abp::AdminDialogInvokationPage::implTryConnect().
void abp::OAddressBookSourcePilot::typeSelectionChanged | ( | AddressSourceType | _eType | ) |
to be called when the selected type changed
Definition at line 424 of file abspilot.cxx.
References vcl::RoadmapWizardMachine::activatePath(), abp::AddressSettings::bIgnoreNoTable, abp::ODataSource::disconnect(), impl_updateRoadmap(), m_aNewDataSource, m_aSettings, needAdminInvokationPage(), needManualFieldMapping(), PATH_COMPLETE, PATH_NO_FIELDS, PATH_NO_SETTINGS, and PATH_NO_SETTINGS_NO_FIELDS.
Referenced by OAddressBookSourcePilot().
|
private |
Definition at line 38 of file abspilot.hxx.
Referenced by connectToDataSource(), getDataSource(), impl_updateRoadmap(), implCleanup(), implCommitAll(), implCreateDataSource(), prepareLeaveCurrentState(), and typeSelectionChanged().
|
private |
Definition at line 36 of file abspilot.hxx.
Referenced by getSettings(), impl_updateRoadmap(), implCommitAll(), implCreateDataSource(), implDoAutoFieldMapping(), needAdminInvokationPage(), needManualFieldMapping(), OAddressBookSourcePilot(), prepareLeaveCurrentState(), and typeSelectionChanged().
|
private |
Definition at line 39 of file abspilot.hxx.
Referenced by implCreateDataSource().
|
private |
Definition at line 35 of file abspilot.hxx.
Referenced by getORB().