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
20#pragma once
21
22#include <memory>
23#include <sfx2/tabdlg.hxx>
25#include <rtl/ustring.hxx>
26
27class SwWrtShell;
29
31{
32private:
33 // config item
35 // text of the user entry
36 OUString m_sUserEntry;
37 // shell of the current document
39 // impl object
40 std::unique_ptr<SwCompatibilityOptPage_Impl> m_pImpl;
41 // saved options after "Reset"; used in "FillItemSet" for comparison
42 sal_uInt32 m_nSavedOptions;
44
45 // controls
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;
53
54 // handler
55 DECL_LINK(SelectHdl, weld::ComboBox&, void);
56 DECL_LINK(UseAsDefaultHdl, weld::Button&, void);
57
58 // private methods
59 void InitControls( const SfxItemSet& rSet );
60 void SetCurrentOptions( sal_uInt32 nOptions );
61 sal_uInt32 GetDocumentOptions() const;
62 void WriteOptions();
63
64public:
66 virtual ~SwCompatibilityOptPage() override;
67
68 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet );
69
70 virtual bool FillItemSet( SfxItemSet* rSet ) override;
71 virtual void Reset( const SfxItemSet* rSet ) override;
72};
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(UseAsDefaultHdl, weld::Button &, void)
std::unique_ptr< weld::ComboBox > m_xGlobalOptionsLB
Definition: optcomp.hxx:49
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: optcomp.cxx:349
std::unique_ptr< weld::TreeView > m_xGlobalOptionsCLB
Definition: optcomp.hxx:51
std::unique_ptr< weld::Frame > m_xGlobalOptionsFrame
Definition: optcomp.hxx:47
SvtCompatibilityOptions m_aConfigItem
Definition: optcomp.hxx:34
void SetCurrentOptions(sal_uInt32 nOptions)
Definition: optcomp.cxx:293
sal_uInt32 m_nSavedOptions
Definition: optcomp.hxx:42
sal_uInt32 GetDocumentOptions() const
Definition: optcomp.cxx:315
bool m_bSavedMSFormsMenuOption
Definition: optcomp.hxx:43
std::unique_ptr< weld::Frame > m_xMain
Definition: optcomp.hxx:46
SwCompatibilityOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: optcomp.cxx:49
void InitControls(const SfxItemSet &rSet)
Definition: optcomp.cxx:184
std::unique_ptr< weld::TreeView > m_xOptionsLB
Definition: optcomp.hxx:50
std::unique_ptr< weld::Button > m_xDefaultPB
Definition: optcomp.hxx:52
SwWrtShell * m_pWrtShell
Definition: optcomp.hxx:38
std::unique_ptr< weld::ComboBox > m_xFormattingLB
Definition: optcomp.hxx:48
DECL_LINK(SelectHdl, weld::ComboBox &, void)
virtual ~SwCompatibilityOptPage() override
Definition: optcomp.cxx:106
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: optcomp.cxx:354
virtual void Reset(const SfxItemSet *rSet) override
Definition: optcomp.cxx:480
std::unique_ptr< SwCompatibilityOptPage_Impl > m_pImpl
Definition: optcomp.hxx:40
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97