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