LibreOffice Module sw (master)  1
optcomp.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_OPTCOMP_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_OPTCOMP_HXX
21 
22 #include <memory>
23 #include <sfx2/tabdlg.hxx>
26 #include <rtl/ustring.hxx>
27 
28 class SwWrtShell;
30 
32 {
33 private:
34  // config item
36  // config item
38  // text of the user entry
39  OUString m_sUserEntry;
40  // shell of the current document
42  // impl object
43  std::unique_ptr<SwCompatibilityOptPage_Impl> m_pImpl;
44  // saved options after "Reset"; used in "FillItemSet" for comparison
47 
48  // controls
49  std::unique_ptr<weld::Frame> m_xMain;
50  std::unique_ptr<weld::Frame> m_xGlobalOptionsFrame;
51  std::unique_ptr<weld::ComboBox> m_xFormattingLB;
52  std::unique_ptr<weld::ComboBox> m_xGlobalOptionsLB;
53  std::unique_ptr<weld::TreeView> m_xOptionsLB;
54  std::unique_ptr<weld::TreeView> m_xGlobalOptionsCLB;
55  std::unique_ptr<weld::Button> m_xDefaultPB;
56 
57  // handler
58  DECL_LINK(SelectHdl, weld::ComboBox&, void);
59  DECL_LINK(UseAsDefaultHdl, weld::Button&, void);
60 
61  // private methods
62  void InitControls( const SfxItemSet& rSet );
63  void SetCurrentOptions( sal_uLong nOptions );
65  void WriteOptions();
66 
67 public:
68  SwCompatibilityOptPage(TabPageParent pParent, const SfxItemSet& rSet);
69  virtual ~SwCompatibilityOptPage() override;
70 
71  static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rAttrSet );
72 
73  virtual bool FillItemSet( SfxItemSet* rSet ) override;
74  virtual void Reset( const SfxItemSet* rSet ) override;
75 };
76 
77 #endif
78 
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SvtCompatibilityOptions m_aConfigItem
Definition: optcomp.hxx:35
sal_uLong m_nSavedOptions
Definition: optcomp.hxx:45
sal_uIntPtr sal_uLong
std::unique_ptr< weld::ComboBox > m_xGlobalOptionsLB
Definition: optcomp.hxx:52
void SetCurrentOptions(sal_uLong nOptions)
Definition: optcomp.cxx:298
std::unique_ptr< weld::TreeView > m_xGlobalOptionsCLB
Definition: optcomp.hxx:54
virtual ~SwCompatibilityOptPage() override
Definition: optcomp.cxx:112
Used by the UI to modify the document model.
Definition: wrtsh.hxx:88
virtual void Reset(const SfxItemSet *rSet) override
Definition: optcomp.cxx:460
std::unique_ptr< weld::Frame > m_xGlobalOptionsFrame
Definition: optcomp.hxx:50
std::unique_ptr< weld::Button > m_xDefaultPB
Definition: optcomp.hxx:55
std::unique_ptr< weld::Frame > m_xMain
Definition: optcomp.hxx:49
bool m_bSavedMSFormsMenuOption
Definition: optcomp.hxx:46
sal_uLong GetDocumentOptions() const
Definition: optcomp.cxx:310
SwWrtShell * m_pWrtShell
Definition: optcomp.hxx:41
std::unique_ptr< weld::ComboBox > m_xFormattingLB
Definition: optcomp.hxx:51
void InitControls(const SfxItemSet &rSet)
Definition: optcomp.cxx:186
DECL_LINK(SelectHdl, weld::ComboBox &, void)
static VclPtr< SfxTabPage > Create(TabPageParent pParent, const SfxItemSet *rAttrSet)
Definition: optcomp.cxx:343
std::unique_ptr< SwCompatibilityOptPage_Impl > m_pImpl
Definition: optcomp.hxx:43
SwCompatibilityOptPage(TabPageParent pParent, const SfxItemSet &rSet)
Definition: optcomp.cxx:55
std::unique_ptr< weld::TreeView > m_xOptionsLB
Definition: optcomp.hxx:53
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optcomp.cxx:348
SvtCompatibilityViewOptions m_aViewConfigItem
Definition: optcomp.hxx:37