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 .
23 #include <sfx2/tabdlg.hxx>
24 #include <unotools/compatibility.hxx>
25 #include <rtl/ustring.hxx>
28 struct SwCompatibilityOptPage_Impl
;
30 class SwCompatibilityOptPage final
: public SfxTabPage
34 SvtCompatibilityOptions m_aConfigItem
;
35 // text of the user entry
36 OUString m_sUserEntry
;
37 // shell of the current document
38 SwWrtShell
* m_pWrtShell
;
40 std::unique_ptr
<SwCompatibilityOptPage_Impl
> m_pImpl
;
41 // saved options after "Reset"; used in "FillItemSet" for comparison
42 sal_uInt32 m_nSavedOptions
;
43 bool m_bSavedMSFormsMenuOption
;
46 std::unique_ptr
<weld::Frame
> m_xMain
;
47 std::unique_ptr
<weld::Frame
> m_xGlobalOptionsFrame
;
48 std::unique_ptr
<weld::ComboBox
> m_xFormattingLB
;
49 std::unique_ptr
<weld::ComboBox
> m_xGlobalOptionsLB
;
50 std::unique_ptr
<weld::TreeView
> m_xOptionsLB
;
51 std::unique_ptr
<weld::TreeView
> m_xGlobalOptionsCLB
;
52 std::unique_ptr
<weld::Button
> m_xDefaultPB
;
55 DECL_LINK(SelectHdl
, weld::ComboBox
&, void);
56 DECL_LINK(UseAsDefaultHdl
, weld::Button
&, void);
59 void InitControls( const SfxItemSet
& rSet
);
60 void SetCurrentOptions( sal_uInt32 nOptions
);
61 sal_uInt32
GetDocumentOptions() const;
65 SwCompatibilityOptPage(weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
& rSet
);
66 virtual ~SwCompatibilityOptPage() override
;
68 static std::unique_ptr
<SfxTabPage
> Create( weld::Container
* pPage
, weld::DialogController
* pController
, const SfxItemSet
* rAttrSet
);
70 virtual bool FillItemSet( SfxItemSet
* rSet
) override
;
71 virtual void Reset( const SfxItemSet
* rSet
) override
;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */