Line data Source code
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_UI_INC_NAVICFG_HXX
20 : #define INCLUDED_SW_SOURCE_UI_INC_NAVICFG_HXX
21 :
22 : #include <unotools/configitem.hxx>
23 :
24 : class SwNavigationConfig : public utl::ConfigItem
25 : {
26 : sal_Int32 nRootType; //RootType
27 : sal_Int32 nSelectedPos; //SelectedPosition
28 : sal_Int32 nOutlineLevel; //OutlineLevel
29 : sal_Int32 nRegionMode; //InsertMode
30 : sal_Int32 nActiveBlock; //ActiveBlock//Expand/CollapsState
31 : sal_Bool bIsSmall; //ShowListBox
32 : sal_Bool bIsGlobalActive; //GlobalDocMode// global view for GlobalDoc valid?
33 :
34 : com::sun::star::uno::Sequence<OUString> GetPropertyNames();
35 :
36 : public:
37 : SwNavigationConfig();
38 : virtual ~SwNavigationConfig();
39 :
40 : virtual void Commit() SAL_OVERRIDE;
41 : virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames ) SAL_OVERRIDE;
42 :
43 0 : sal_Int32 GetRootType()const {return nRootType;}
44 0 : void SetRootType(sal_Int32 nSet){
45 0 : if(nRootType != nSet)
46 : {
47 0 : SetModified();
48 0 : nRootType = nSet;
49 : }
50 0 : }
51 :
52 : sal_Int32 GetSelectedPos()const {return nSelectedPos;}
53 : void SetSelectedPos(sal_Int32 nSet){
54 : if(nSelectedPos != nSet)
55 : {
56 : SetModified();
57 : nSelectedPos = nSet;
58 : }
59 : }
60 :
61 0 : sal_Int32 GetOutlineLevel()const {return nOutlineLevel;}
62 0 : void SetOutlineLevel(sal_Int32 nSet){
63 0 : if(nOutlineLevel != nSet)
64 : {
65 0 : SetModified();
66 0 : nOutlineLevel = nSet;
67 : }
68 0 : }
69 :
70 0 : sal_Int32 GetRegionMode()const {return nRegionMode;}
71 0 : void SetRegionMode(sal_Int32 nSet){
72 0 : if(nRegionMode != nSet)
73 : {
74 0 : SetModified();
75 0 : nRegionMode = nSet;
76 : }
77 0 : }
78 :
79 0 : sal_Int32 GetActiveBlock()const {return nActiveBlock;}
80 0 : void SetActiveBlock(sal_Int32 nSet){
81 0 : if(nActiveBlock != nSet)
82 : {
83 0 : SetModified();
84 0 : nActiveBlock = nSet;
85 : }
86 0 : }
87 :
88 0 : sal_Bool IsSmall() const {return bIsSmall;}
89 0 : void SetSmall(sal_Bool bSet){
90 0 : if(bIsSmall != bSet)
91 : {
92 0 : SetModified();
93 0 : bIsSmall = bSet;
94 : }
95 0 : }
96 :
97 0 : sal_Bool IsGlobalActive() const {return bIsGlobalActive;}
98 0 : void SetGlobalActive(sal_Bool bSet){
99 0 : if(bIsGlobalActive != bSet)
100 : {
101 0 : SetModified();
102 0 : bIsGlobalActive = bSet;
103 : }
104 0 : }
105 : };
106 :
107 : #endif
108 :
109 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|