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 sal_Int32 m_nActiveBlock
; //ActiveBlock//Expand/CollapsState
32 bool m_bIsSmall
; //ShowListBox
33 bool m_bIsGlobalActive
; //GlobalDocMode// global view for GlobalDoc valid?
34 sal_Int32 m_nOutlineTracking
;
35 bool m_bIsNavigateOnSelect
;
37 o3tl::enumarray
<ContentTypeId
, bool> mContentTypeTrack
;
39 sal_Int32 m_nSortAlphabeticallyBlock
= 0; // persists content type alphabetical sort setting
41 static css::uno::Sequence
<OUString
> GetPropertyNames();
43 virtual void ImplCommit() override
;
47 virtual ~SwNavigationConfig() override
;
50 virtual void Notify( const css::uno::Sequence
< OUString
>& aPropertyNames
) override
;
52 ContentTypeId
GetRootType()const {return m_nRootType
;}
53 void SetRootType(ContentTypeId nSet
){
54 if(m_nRootType
!= nSet
)
61 sal_Int32
GetOutlineLevel()const {return m_nOutlineLevel
;}
62 void SetOutlineLevel(sal_Int32 nSet
){
63 if(m_nOutlineLevel
!= nSet
)
66 m_nOutlineLevel
= nSet
;
70 sal_Int32
GetActiveBlock()const {return m_nActiveBlock
;}
71 void SetActiveBlock(sal_Int32 nSet
){
72 if(m_nActiveBlock
!= nSet
)
75 m_nActiveBlock
= nSet
;
79 bool IsSmall() const {return m_bIsSmall
;}
80 void SetSmall(bool bSet
){
81 if(m_bIsSmall
!= bSet
)
88 bool IsGlobalActive() const {return m_bIsGlobalActive
;}
89 void SetGlobalActive(bool bSet
){
90 if(m_bIsGlobalActive
!= bSet
)
93 m_bIsGlobalActive
= bSet
;
97 sal_Int32
GetOutlineTracking()const {return m_nOutlineTracking
;}
98 void SetOutlineTracking(sal_Int32 nSet
){
99 if(m_nOutlineTracking
!= nSet
)
102 m_nOutlineTracking
= nSet
;
106 bool IsContentTypeTrack(ContentTypeId eCntTypeId
)
108 return mContentTypeTrack
[eCntTypeId
];
110 void SetContentTypeTrack(ContentTypeId eCntTypeId
, const bool bSet
)
112 if (mContentTypeTrack
[eCntTypeId
] != bSet
)
115 mContentTypeTrack
[eCntTypeId
] = bSet
;
119 bool IsNavigateOnSelect() const {return m_bIsNavigateOnSelect
;}
121 sal_Int32
GetSortAlphabeticallyBlock() const {return m_nSortAlphabeticallyBlock
;}
122 void SetSortAlphabeticallyBlock(sal_Int32 nSet
)
124 if(m_nSortAlphabeticallyBlock
!= nSet
)
127 m_nSortAlphabeticallyBlock
= nSet
;
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */