1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_NAVICFG_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_NAVICFG_HXX
22 #include <unotools/configitem.hxx>
23 #include <o3tl/enumarray.hxx>
26 class SwNavigationConfig final
: public utl::ConfigItem
28 ContentTypeId m_nRootType
; //RootType
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
;
36 bool m_bIsNavigateOnSelect
;
38 o3tl::enumarray
<ContentTypeId
, bool> mContentTypeTrack
;
40 static css::uno::Sequence
<OUString
> GetPropertyNames();
42 virtual void ImplCommit() override
;
46 virtual ~SwNavigationConfig() override
;
49 virtual void Notify( const css::uno::Sequence
< OUString
>& aPropertyNames
) override
;
51 ContentTypeId
GetRootType()const {return m_nRootType
;}
52 void SetRootType(ContentTypeId nSet
){
53 if(m_nRootType
!= nSet
)
60 sal_Int32
GetOutlineLevel()const {return m_nOutlineLevel
;}
61 void SetOutlineLevel(sal_Int32 nSet
){
62 if(m_nOutlineLevel
!= nSet
)
65 m_nOutlineLevel
= nSet
;
69 RegionMode
GetRegionMode()const {return m_nRegionMode
;}
70 void SetRegionMode(RegionMode nSet
){
71 if(m_nRegionMode
!= nSet
)
78 sal_Int32
GetActiveBlock()const {return m_nActiveBlock
;}
79 void SetActiveBlock(sal_Int32 nSet
){
80 if(m_nActiveBlock
!= nSet
)
83 m_nActiveBlock
= nSet
;
87 bool IsSmall() const {return m_bIsSmall
;}
88 void SetSmall(bool bSet
){
89 if(m_bIsSmall
!= bSet
)
96 bool IsGlobalActive() const {return m_bIsGlobalActive
;}
97 void SetGlobalActive(bool bSet
){
98 if(m_bIsGlobalActive
!= bSet
)
101 m_bIsGlobalActive
= bSet
;
105 sal_Int32
GetOutlineTracking()const {return m_nOutlineTracking
;}
106 void SetOutlineTracking(sal_Int32 nSet
){
107 if(m_nOutlineTracking
!= nSet
)
110 m_nOutlineTracking
= nSet
;
114 bool IsContentTypeTrack(ContentTypeId eCntTypeId
)
116 return mContentTypeTrack
[eCntTypeId
];
118 void SetContentTypeTrack(ContentTypeId eCntTypeId
, const bool bSet
)
120 if (mContentTypeTrack
[eCntTypeId
] != bSet
)
123 mContentTypeTrack
[eCntTypeId
] = bSet
;
127 bool IsNavigateOnSelect() const {return m_bIsNavigateOnSelect
;}
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */