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 
28 {
30  sal_Int32 nSelectedPos; //SelectedPosition
31  sal_Int32 nOutlineLevel; //OutlineLevel
32  RegionMode nRegionMode; //InsertMode
33  sal_Int32 nActiveBlock; //ActiveBlock//Expand/CollapsState
34  bool bIsSmall; //ShowListBox
35  bool bIsGlobalActive; //GlobalDocMode// global view for GlobalDoc valid?
36 
37  static css::uno::Sequence<OUString> GetPropertyNames();
38 
39  virtual void ImplCommit() override;
40 
41 public:
43  virtual ~SwNavigationConfig() override;
44 
45  virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
46 
49  if(nRootType != nSet)
50  {
51  SetModified();
52  nRootType = nSet;
53  }
54  }
55 
56  sal_Int32 GetOutlineLevel()const {return nOutlineLevel;}
57  void SetOutlineLevel(sal_Int32 nSet){
58  if(nOutlineLevel != nSet)
59  {
60  SetModified();
61  nOutlineLevel = nSet;
62  }
63  }
64 
67  if(nRegionMode != nSet)
68  {
69  SetModified();
70  nRegionMode = nSet;
71  }
72  }
73 
74  sal_Int32 GetActiveBlock()const {return nActiveBlock;}
75  void SetActiveBlock(sal_Int32 nSet){
76  if(nActiveBlock != nSet)
77  {
78  SetModified();
79  nActiveBlock = nSet;
80  }
81  }
82 
83  bool IsSmall() const {return bIsSmall;}
84  void SetSmall(bool bSet){
85  if(bIsSmall != bSet)
86  {
87  SetModified();
88  bIsSmall = bSet;
89  }
90  }
91 
92  bool IsGlobalActive() const {return bIsGlobalActive;}
93  void SetGlobalActive(bool bSet){
94  if(bIsGlobalActive != bSet)
95  {
96  SetModified();
97  bIsGlobalActive = bSet;
98  }
99  }
100 };
101 
102 #endif
103 
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ContentTypeId
Definition: swcont.hxx:28
bool IsGlobalActive() const
Definition: navicfg.hxx:92
sal_Int32 nOutlineLevel
Definition: navicfg.hxx:31
void SetOutlineLevel(sal_Int32 nSet)
Definition: navicfg.hxx:57
sal_Int32 nActiveBlock
Definition: navicfg.hxx:33
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: navicfg.cxx:128
sal_Int32 GetActiveBlock() const
Definition: navicfg.hxx:74
ContentTypeId GetRootType() const
Definition: navicfg.hxx:47
virtual ~SwNavigationConfig() override
Definition: navicfg.cxx:102
virtual void ImplCommit() override
Definition: navicfg.cxx:106
RegionMode GetRegionMode() const
Definition: navicfg.hxx:65
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: navicfg.cxx:33
void SetRootType(ContentTypeId nSet)
Definition: navicfg.hxx:48
RegionMode
Definition: swcont.hxx:51
void SetGlobalActive(bool bSet)
Definition: navicfg.hxx:93
RegionMode nRegionMode
Definition: navicfg.hxx:32
void SetSmall(bool bSet)
Definition: navicfg.hxx:84
ContentTypeId nRootType
Definition: navicfg.hxx:29
sal_Int32 GetOutlineLevel() const
Definition: navicfg.hxx:56
sal_Int32 nSelectedPos
Definition: navicfg.hxx:30
void SetRegionMode(RegionMode nSet)
Definition: navicfg.hxx:66
void SetActiveBlock(sal_Int32 nSet)
Definition: navicfg.hxx:75
bool IsSmall() const
Definition: navicfg.hxx:83