1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include "abspage.hxx"
23 #include "abptypes.hxx"
25 #include <svx/databaselocationinput.hxx>
26 #include <vcl/vclptr.hxx>
31 class FinalPage final
: public AddressBookSourcePage
33 std::unique_ptr
<SvtURLBox
> m_xLocation
;
34 std::unique_ptr
<weld::Button
> m_xBrowse
;
35 std::unique_ptr
<weld::CheckButton
> m_xRegisterName
;
36 std::unique_ptr
<weld::CheckButton
> m_xEmbed
;
37 std::unique_ptr
<weld::Label
> m_xNameLabel
;
38 std::unique_ptr
<weld::Label
> m_xLocationLabel
;
39 std::unique_ptr
<weld::Entry
> m_xName
;
40 std::unique_ptr
<weld::Label
> m_xDuplicateNameError
;
42 std::unique_ptr
<svx::DatabaseLocationInputController
>
43 m_xLocationController
;
45 StringBag m_aInvalidDataSourceNames
;
48 explicit FinalPage(weld::Container
* pPage
, OAddressBookSourcePilot
* pController
);
49 virtual ~FinalPage() override
;
52 // OWizardPage overridables
53 virtual void initializePage() override
;
54 virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason _eReason
) override
;
56 // BuilderPage overridables
57 virtual void Activate() override
;
58 virtual void Deactivate() override
;
60 // OImportPage overridables
61 virtual bool canAdvance() const override
;
63 DECL_LINK(OnEntryNameModified
, weld::Entry
&, void);
64 DECL_LINK(OnComboNameModified
, weld::ComboBox
&, void);
65 DECL_LINK(OnRegister
, weld::Toggleable
&, void);
66 DECL_LINK(OnEmbed
, weld::Toggleable
&, void);
68 bool isValidName() const;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */