LibreOffice Module sw (master)  1
navicfg.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_NAVICFG_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_NAVICFG_HXX
21 
22 #include <unotools/configitem.hxx>
23 
24 enum class RegionMode;
25 enum class ContentTypeId;
26 
27 class SwNavigationConfig final : public utl::ConfigItem
28 {
30  sal_Int32 m_nSelectedPos; //SelectedPosition
31  sal_Int32 m_nOutlineLevel; //OutlineLevel
32  RegionMode m_nRegionMode; //InsertMode
33  sal_Int32 m_nActiveBlock; //ActiveBlock//Expand/CollapsState
34  bool m_bIsSmall; //ShowListBox
35  bool m_bIsGlobalActive; //GlobalDocMode// global view for GlobalDoc valid?
36  sal_Int32 m_nOutlineTracking;
39 
40  static css::uno::Sequence<OUString> GetPropertyNames();
41 
42  virtual void ImplCommit() override;
43 
44 public:
46  virtual ~SwNavigationConfig() override;
47 
48  virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
49 
52  if(m_nRootType != nSet)
53  {
54  SetModified();
55  m_nRootType = nSet;
56  }
57  }
58 
59  sal_Int32 GetOutlineLevel()const {return m_nOutlineLevel;}
60  void SetOutlineLevel(sal_Int32 nSet){
61  if(m_nOutlineLevel != nSet)
62  {
63  SetModified();
64  m_nOutlineLevel = nSet;
65  }
66  }
67 
70  if(m_nRegionMode != nSet)
71  {
72  SetModified();
73  m_nRegionMode = nSet;
74  }
75  }
76 
77  sal_Int32 GetActiveBlock()const {return m_nActiveBlock;}
78  void SetActiveBlock(sal_Int32 nSet){
79  if(m_nActiveBlock != nSet)
80  {
81  SetModified();
82  m_nActiveBlock = nSet;
83  }
84  }
85 
86  bool IsSmall() const {return m_bIsSmall;}
87  void SetSmall(bool bSet){
88  if(m_bIsSmall != bSet)
89  {
90  SetModified();
91  m_bIsSmall = bSet;
92  }
93  }
94 
95  bool IsGlobalActive() const {return m_bIsGlobalActive;}
96  void SetGlobalActive(bool bSet){
97  if(m_bIsGlobalActive != bSet)
98  {
99  SetModified();
100  m_bIsGlobalActive = bSet;
101  }
102  }
103 
104  sal_Int32 GetOutlineTracking()const {return m_nOutlineTracking;}
105  void SetOutlineTracking(sal_Int32 nSet){
106  if(m_nOutlineTracking != nSet)
107  {
108  SetModified();
109  m_nOutlineTracking = nSet;
110  }
111  }
112 
113  bool IsTableTracking() const {return m_bIsTableTracking;}
114  void SetTableTracking(bool bSet){
115  if(m_bIsTableTracking != bSet)
116  {
117  SetModified();
118  m_bIsTableTracking = bSet;
119  }
120  }
121 
123  void SetSectionTracking(bool bSet){
124  if(m_bIsSectionTracking != bSet)
125  {
126  SetModified();
127  m_bIsSectionTracking = bSet;
128  }
129  }
130 };
131 
132 #endif
133 
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ContentTypeId
Definition: swcont.hxx:29
bool IsGlobalActive() const
Definition: navicfg.hxx:95
sal_Int32 m_nOutlineTracking
Definition: navicfg.hxx:36
bool m_bIsSectionTracking
Definition: navicfg.hxx:38
void SetTableTracking(bool bSet)
Definition: navicfg.hxx:114
bool m_bIsGlobalActive
Definition: navicfg.hxx:35
void SetOutlineLevel(sal_Int32 nSet)
Definition: navicfg.hxx:60
bool m_bIsTableTracking
Definition: navicfg.hxx:37
ContentTypeId m_nRootType
Definition: navicfg.hxx:29
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: navicfg.cxx:138
void SetOutlineTracking(sal_Int32 nSet)
Definition: navicfg.hxx:105
sal_Int32 GetActiveBlock() const
Definition: navicfg.hxx:77
RegionMode m_nRegionMode
Definition: navicfg.hxx:32
ContentTypeId GetRootType() const
Definition: navicfg.hxx:50
virtual ~SwNavigationConfig() override
Definition: navicfg.cxx:109
virtual void ImplCommit() override
Definition: navicfg.cxx:113
RegionMode GetRegionMode() const
Definition: navicfg.hxx:68
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: navicfg.cxx:31
sal_Int32 m_nOutlineLevel
Definition: navicfg.hxx:31
void SetRootType(ContentTypeId nSet)
Definition: navicfg.hxx:51
sal_Int32 GetOutlineTracking() const
Definition: navicfg.hxx:104
sal_Int32 m_nSelectedPos
Definition: navicfg.hxx:30
RegionMode
Definition: swcont.hxx:54
sal_Int32 m_nActiveBlock
Definition: navicfg.hxx:33
void SetGlobalActive(bool bSet)
Definition: navicfg.hxx:96
void SetSmall(bool bSet)
Definition: navicfg.hxx:87
sal_Int32 GetOutlineLevel() const
Definition: navicfg.hxx:59
void SetSectionTracking(bool bSet)
Definition: navicfg.hxx:123
void SetRegionMode(RegionMode nSet)
Definition: navicfg.hxx:69
void SetActiveBlock(sal_Int32 nSet)
Definition: navicfg.hxx:78
bool IsSectionTracking() const
Definition: navicfg.hxx:122
bool IsTableTracking() const
Definition: navicfg.hxx:113
bool IsSmall() const
Definition: navicfg.hxx:86