docthemes: Save themes def. to a file when added to ColorSets
[LibreOffice.git] / sw / source / uibase / inc / navicfg.hxx
blobac1c6299c838eb1683ee0617a23a30956568120a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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>
24 #include "swcont.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;
45 public:
46 SwNavigationConfig();
47 virtual ~SwNavigationConfig() override;
49 void Load();
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)
56 SetModified();
57 m_nRootType = nSet;
61 sal_Int32 GetOutlineLevel()const {return m_nOutlineLevel;}
62 void SetOutlineLevel(sal_Int32 nSet){
63 if(m_nOutlineLevel != nSet)
65 SetModified();
66 m_nOutlineLevel = nSet;
70 sal_Int32 GetActiveBlock()const {return m_nActiveBlock;}
71 void SetActiveBlock(sal_Int32 nSet){
72 if(m_nActiveBlock != nSet)
74 SetModified();
75 m_nActiveBlock = nSet;
79 bool IsSmall() const {return m_bIsSmall;}
80 void SetSmall(bool bSet){
81 if(m_bIsSmall != bSet)
83 SetModified();
84 m_bIsSmall = bSet;
88 bool IsGlobalActive() const {return m_bIsGlobalActive;}
89 void SetGlobalActive(bool bSet){
90 if(m_bIsGlobalActive != bSet)
92 SetModified();
93 m_bIsGlobalActive = bSet;
97 sal_Int32 GetOutlineTracking()const {return m_nOutlineTracking;}
98 void SetOutlineTracking(sal_Int32 nSet){
99 if(m_nOutlineTracking != nSet)
101 SetModified();
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)
114 SetModified();
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)
126 SetModified();
127 m_nSortAlphabeticallyBlock = nSet;
132 #endif
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */