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 <sfx2/tabdlg.hxx>
23 #include <com/sun/star/container/XNameReplace.hpp>
24 #include <com/sun/star/configuration/XReadWriteAccess.hpp>
26 // class SvxPathTabPage --------------------------------------------------
28 class SvxOnlineUpdateTabPage
: public SfxTabPage
31 bool m_showTraditionalOnlineUpdate
;
32 bool m_showMarOnlineUpdate
;
34 OUString m_aNeverChecked
;
35 OUString m_aLastCheckedTemplate
;
37 css::uno::Reference
< css::container::XNameReplace
> m_xUpdateAccess
;
38 css::uno::Reference
<css::configuration::XReadWriteAccess
> m_xReadWriteAccess
;
40 std::unique_ptr
<weld::Label
> m_xNeverChecked
;
41 std::unique_ptr
<weld::CheckButton
> m_xAutoCheckCheckBox
;
42 std::unique_ptr
<weld::Widget
> m_xAutoCheckImg
;
43 std::unique_ptr
<weld::RadioButton
> m_xEveryDayButton
;
44 std::unique_ptr
<weld::RadioButton
> m_xEveryWeekButton
;
45 std::unique_ptr
<weld::RadioButton
> m_xEveryMonthButton
;
46 std::unique_ptr
<weld::Widget
> m_xCheckIntervalImg
;
47 std::unique_ptr
<weld::Button
> m_xCheckNowButton
;
48 std::unique_ptr
<weld::CheckButton
> m_xAutoDownloadCheckBox
;
49 std::unique_ptr
<weld::Widget
> m_xAutoDownloadImg
;
50 std::unique_ptr
<weld::Label
> m_xDestPathLabel
;
51 std::unique_ptr
<weld::Label
> m_xDestPath
;
52 std::unique_ptr
<weld::Button
> m_xChangePathButton
;
53 std::unique_ptr
<weld::Label
> m_xLastChecked
;
54 std::unique_ptr
<weld::CheckButton
> m_xExtrasCheckBox
;
55 std::unique_ptr
<weld::Widget
> m_xExtrasImg
;
56 std::unique_ptr
<weld::Label
> m_xUserAgentLabel
;
57 std::unique_ptr
<weld::LinkButton
> m_xPrivacyPolicyButton
;
58 std::unique_ptr
<weld::Box
> m_xBox2
;
59 std::unique_ptr
<weld::Frame
> m_xFrameDest
;
60 std::unique_ptr
<weld::Frame
> m_xFrameAgent
;
61 std::unique_ptr
<weld::Frame
> m_xMar
;
62 std::unique_ptr
<weld::CheckButton
> m_xEnableMar
;
64 DECL_LINK(FileDialogHdl_Impl
, weld::Button
&, void);
65 DECL_LINK(CheckNowHdl_Impl
, weld::Button
&, void);
66 DECL_LINK(AutoCheckHdl_Impl
, weld::Toggleable
&, void);
67 DECL_LINK(ExtrasCheckHdl_Impl
, weld::Toggleable
&, void);
69 void UpdateLastCheckedText();
70 void UpdateUserAgent();
73 SvxOnlineUpdateTabPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
74 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rSet
);
75 virtual ~SvxOnlineUpdateTabPage() override
;
77 virtual OUString
GetAllStrings() override
;
79 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
80 virtual void Reset( const SfxItemSet
* rSet
) override
;
81 virtual void FillUserData() override
;
83 static bool isTraditionalOnlineUpdateAvailable();
84 static bool isMarOnlineUpdateAvailable();
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */