bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / outline.hxx
blob0e2fa18b03520ffd9a799c8ff20117921308325f
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 _OUTLINE_HXX
20 #define _OUTLINE_HXX
22 #include <sfx2/tabdlg.hxx>
25 #include <vcl/menu.hxx>
27 #include <vcl/button.hxx>
28 #include <svtools/stdctrl.hxx>
30 #include <vcl/fixed.hxx>
32 #include <vcl/lstbox.hxx>
34 #include <vcl/edit.hxx>
36 #include <vcl/field.hxx>
38 #include "swtypes.hxx" //for MAXLEVEL
39 #include <numprevw.hxx>
40 #include <numberingtypelistbox.hxx>
42 class SwWrtShell;
43 class SwNumRule;
44 class SwChapterNumRules;
46 class SwOutlineTabDialog : public SfxTabDialog
48 static sal_uInt16 nNumLevel;
50 sal_uInt16 m_nNumPosId;
51 sal_uInt16 m_nOutlineId;
53 String aCollNames[MAXLEVEL];
55 SwWrtShell& rWrtSh;
56 SwNumRule* pNumRule;
57 SwChapterNumRules* pChapterNumRules;
59 sal_Bool bModified : 1;
61 protected:
62 DECL_LINK(CancelHdl, void *);
63 DECL_LINK( FormHdl, Button * );
64 DECL_LINK( MenuSelectHdl, Menu * );
66 virtual void PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage);
67 virtual short Ok();
69 public:
70 SwOutlineTabDialog(Window* pParent,
71 const SfxItemSet* pSwItemSet,
72 SwWrtShell &);
73 ~SwOutlineTabDialog();
75 SwNumRule* GetNumRule() {return pNumRule;}
76 sal_uInt16 GetLevel(const String &rFmtName) const;
77 String* GetCollNames() {return aCollNames;}
79 static sal_uInt16 GetActNumLevel() {return nNumLevel;}
80 static void SetActNumLevel(sal_uInt16 nSet) {nNumLevel = nSet;}
83 class SwOutlineSettingsTabPage : public SfxTabPage
85 ListBox* m_pLevelLB;
87 ListBox* m_pCollBox;
88 SwNumberingTypeListBox* m_pNumberBox;
89 ListBox* m_pCharFmtLB;
90 FixedText* m_pAllLevelFT;
91 NumericField* m_pAllLevelNF;
92 Edit* m_pPrefixED;
93 Edit* m_pSuffixED;
94 NumericField* m_pStartEdit;
95 NumberingPreview* m_pPreviewWIN;
97 String aNoFmtName;
98 String aSaveCollNames[MAXLEVEL];
99 SwWrtShell* pSh;
100 SwNumRule* pNumRule;
101 String* pCollNames;
102 sal_uInt16 nActLevel;
104 DECL_LINK( LevelHdl, ListBox * );
105 DECL_LINK( ToggleComplete, NumericField * );
106 DECL_LINK( CollSelect, ListBox * );
107 DECL_LINK(CollSelectGetFocus, void *);
108 DECL_LINK( NumberSelect, SwNumberingTypeListBox * );
109 DECL_LINK(DelimModify, void *);
110 DECL_LINK( StartModified, NumericField * );
111 DECL_LINK(CharFmtHdl, void *);
113 void Update();
115 void SetModified(){m_pPreviewWIN->Invalidate();}
116 void CheckForStartValue_Impl(sal_uInt16 nNumberingType);
118 using SfxTabPage::ActivatePage;
119 using SfxTabPage::DeactivatePage;
121 public:
122 SwOutlineSettingsTabPage(Window* pParent, const SfxItemSet& rSet);
123 ~SwOutlineSettingsTabPage();
125 void SetWrtShell(SwWrtShell* pShell);
127 virtual void ActivatePage(const SfxItemSet& rSet);
128 virtual int DeactivatePage(SfxItemSet *pSet);
130 virtual sal_Bool FillItemSet( SfxItemSet& rSet );
131 virtual void Reset( const SfxItemSet& rSet );
132 static SfxTabPage* Create( Window* pParent,
133 const SfxItemSet& rAttrSet);
136 #endif
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */