nss: upgrade to release 3.73
[LibreOffice.git] / sw / source / uibase / inc / outline.hxx
blobf9c3c1f15ddeffd2a408f28727f30ef5cbaddc11
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_OUTLINE_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_OUTLINE_HXX
22 #include <memory>
23 #include <sfx2/tabdlg.hxx>
24 #include <swtypes.hxx>
25 #include "numprevw.hxx"
26 #include "numberingtypelistbox.hxx"
27 #include <rtl/ustring.hxx>
29 class SwWrtShell;
30 class SwNumRule;
31 class SwChapterNumRules;
33 class SwOutlineTabDialog final : public SfxTabDialogController
35 static sal_uInt16 nNumLevel;
37 OUString aCollNames[MAXLEVEL];
39 SwWrtShell& rWrtSh;
40 std::unique_ptr<SwNumRule> xNumRule;
41 SwChapterNumRules* pChapterNumRules;
43 bool bModified : 1;
45 std::unique_ptr<weld::MenuButton> m_xMenuButton;
47 DECL_LINK(CancelHdl, weld::Button&, void);
48 DECL_LINK(FormHdl, weld::ToggleButton&, void);
49 DECL_LINK(MenuSelectHdl, const OString&, void);
51 virtual void PageCreated(const OString& rPageId, SfxTabPage& rPage) override;
52 virtual short Ok() override;
54 public:
55 SwOutlineTabDialog(weld::Window* pParent, const SfxItemSet* pSwItemSet, SwWrtShell &);
56 virtual ~SwOutlineTabDialog() override;
58 SwNumRule* GetNumRule() { return xNumRule.get(); }
59 sal_uInt16 GetLevel(const OUString &rFormatName) const;
60 OUString* GetCollNames() {return aCollNames;}
62 static sal_uInt16 GetActNumLevel() {return nNumLevel;}
63 static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
66 class SwOutlineSettingsTabPage : public SfxTabPage
68 OUString aNoFormatName;
69 OUString aSaveCollNames[MAXLEVEL];
70 SwWrtShell* pSh;
71 SwNumRule* pNumRule;
72 OUString* pCollNames;
73 sal_uInt16 nActLevel;
74 NumberingPreview m_aPreviewWIN;
76 std::unique_ptr<weld::TreeView> m_xLevelLB;
77 std::unique_ptr<weld::ComboBox> m_xCollBox;
78 std::unique_ptr<SwNumberingTypeListBox> m_xNumberBox;
79 std::unique_ptr<weld::ComboBox> m_xCharFormatLB;
80 std::unique_ptr<weld::Label> m_xAllLevelFT;
81 std::unique_ptr<weld::SpinButton> m_xAllLevelNF;
82 std::unique_ptr<weld::Entry> m_xPrefixED;
83 std::unique_ptr<weld::Entry> m_xSuffixED;
84 std::unique_ptr<weld::SpinButton> m_xStartEdit;
85 std::unique_ptr<weld::CustomWeld> m_xPreviewWIN;
87 DECL_LINK( LevelHdl, weld::TreeView&, void );
88 DECL_LINK( ToggleComplete, weld::SpinButton&, void );
89 DECL_LINK( CollSelect, weld::ComboBox&, void );
90 void CollSave();
91 DECL_LINK( NumberSelect, weld::ComboBox&, void );
92 DECL_LINK( DelimModify, weld::Entry&, void );
93 DECL_LINK( StartModified, weld::SpinButton&, void );
94 DECL_LINK( CharFormatHdl, weld::ComboBox&, void );
96 void Update();
98 void SetModified() { m_aPreviewWIN.Invalidate(); }
99 void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
101 public:
102 SwOutlineSettingsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
103 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
104 const SfxItemSet* rAttrSet);
105 virtual ~SwOutlineSettingsTabPage() override;
107 void SetWrtShell(SwWrtShell* pShell);
109 virtual void ActivatePage(const SfxItemSet& rSet) override;
110 virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override;
112 virtual bool FillItemSet( SfxItemSet* rSet ) override;
113 virtual void Reset( const SfxItemSet* rSet ) override;
114 void SetNumRule(SwNumRule *pRule)
116 pNumRule = pRule;
117 m_aPreviewWIN.SetNumRule(pNumRule);
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */