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>
24 #include <com/sun/star/ui/dialogs/XFolderPicker2.hpp>
25 #include <svtools/dialogclosedlistener.hxx>
26 #include <unotools/pathoptions.hxx>
28 // forward ---------------------------------------------------------------
32 // class SvxPathTabPage --------------------------------------------------
33 class SvxPathTabPage
: public SfxTabPage
36 std::unique_ptr
<OptPath_Impl
> pImpl
;
38 rtl::Reference
< ::svt::DialogClosedListener
> xDialogListener
;
39 css::uno::Reference
< css::ui::dialogs::XFolderPicker2
> xFolderPicker
;
41 std::unique_ptr
<weld::Button
> m_xStandardBtn
;
42 std::unique_ptr
<weld::Button
> m_xPathBtn
;
43 std::unique_ptr
<weld::TreeView
> m_xPathBox
;
45 void ChangeCurrentEntry( const OUString
& _rFolder
);
47 DECL_LINK(PathHdl_Impl
, weld::Button
&, void);
48 DECL_LINK(DoubleClickPathHdl_Impl
, weld::TreeView
&, bool);
49 DECL_LINK(StandardHdl_Impl
, weld::Button
&, void);
51 DECL_LINK(PathSelect_Impl
, weld::TreeView
&, void);
52 DECL_LINK(HeaderBarClick
, int, void);
54 DECL_LINK(DialogClosedHdl
, css::ui::dialogs::DialogClosedEvent
*, void);
56 void GetPathList( SvtPathOptions::Paths _nPathHandle
, OUString
& _rInternalPath
,
57 OUString
& _rUserPath
, OUString
& _rWritablePath
, bool& _rReadOnly
);
58 void SetPathList( SvtPathOptions::Paths _nPathHandle
,
59 std::u16string_view _rUserPath
, const OUString
& _rWritablePath
);
62 SvxPathTabPage( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
63 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rSet
);
64 virtual ~SvxPathTabPage() override
;
66 virtual OUString
GetAllStrings() override
;
68 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
69 virtual void Reset( const SfxItemSet
* rSet
) override
;
72 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */