docthemes: Save themes def. to a file when added to ColorSets
[LibreOffice.git] / sw / source / uibase / inc / cfgitems.hxx
blob9102ac6757b688c349bfb1522e3080407af58626
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_CFGITEMS_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CFGITEMS_HXX
22 #include <svl/poolitem.hxx>
23 #include <swdllapi.h>
24 #include <printdata.hxx>
26 #include <cmdid.h>
27 #include <sfx2/zoomitem.hxx>
29 class SwModule;
30 #ifdef DBG_UTIL
31 class SwTestTabPage;
32 #endif
33 class SwAddPrinterTabPage;
34 class SfxPrinter;
35 class SwViewShell;
36 class SwViewOption;
37 class SwContentOptPage;
38 class SwShdwCursorOptionsTabPage;
39 enum class SwFillMode;
41 /// Item for settings dialog - document view
42 class SW_DLLPUBLIC SwDocDisplayItem final : public SfxPoolItem
44 friend class SwShdwCursorOptionsTabPage;
45 friend class SwModule;
47 bool m_bParagraphEnd :1;
48 bool m_bTab :1;
49 bool m_bSpace :1;
50 bool m_bNonbreakingSpace :1;
51 bool m_bSoftHyphen :1;
52 bool m_bCharHiddenText :1;
53 bool m_bBookmarks :1;
54 bool m_bManualBreak :1;
55 bool m_bTextBoundariesFull :1;
56 bool m_bTextBoundaries :1;
57 bool m_bSectionBoundaries :1;
58 bool m_bTableBoundaries :1;
60 sal_Int32 m_xDefaultAnchor;
62 public:
63 DECLARE_ITEM_TYPE_FUNCTION(SwDocDisplayItem)
64 SwDocDisplayItem();
65 SwDocDisplayItem( const SwViewOption& rVOpt );
67 virtual SwDocDisplayItem* Clone( SfxItemPool *pPool = nullptr ) const override;
68 virtual bool operator==( const SfxPoolItem& ) const override;
69 void FillViewOptions( SwViewOption& rVOpt) const;
72 // OS 12.01.95
73 // Item for settings dialog, element page
74 class SW_DLLPUBLIC SwElemItem final : public SfxPoolItem
76 //view
77 bool m_bVertRuler :1;
78 bool m_bVertRulerRight:1;
79 bool m_bSmoothScroll :1;
80 //visual aids
81 bool m_bCrosshair :1;
82 //display
83 bool m_bTable :1;
84 bool m_bGraphic :1;
85 bool m_bDrawing :1;
86 bool m_bNotes :1;
87 bool m_bShowInlineTooltips :1;
88 bool m_bShowOutlineContentVisibilityButton :1;
89 bool m_bTreatSubOutlineLevelsAsContent :1;
90 bool m_bShowChangesInMargin :1;
91 bool m_bFieldHiddenText :1;
92 bool m_bShowHiddenPara :1;
93 bool m_bDefaultZoom :1;
94 SvxZoomType m_eDefaultZoomType;
95 sal_uInt16 m_nDefaultZoomValue;
97 friend class SwContentOptPage;
99 public:
100 DECLARE_ITEM_TYPE_FUNCTION(SwElemItem)
101 SwElemItem();
102 SwElemItem(const SwViewOption& rVOpt);
104 virtual SwElemItem* Clone( SfxItemPool *pPool = nullptr ) const override;
105 virtual bool operator==( const SfxPoolItem& ) const override;
107 void FillViewOptions( SwViewOption& rVOpt) const;
109 bool IsDefaultZoom() const {return m_bDefaultZoom; }
110 void SetDefaultZoom(bool bSet) { m_bDefaultZoom = bSet; }
112 SvxZoomType GetDefaultZoomType() const { return m_eDefaultZoomType; }
113 void SetDefaultZoomType(SvxZoomType eType) { m_eDefaultZoomType = eType; }
115 sal_uInt16 GetDefaultZoomValue() const { return m_nDefaultZoomValue;}
116 void SetDefaultZoomValue(sal_Int16 nValue){ m_nDefaultZoomValue = nValue; }
120 // OS 12.01.95
121 // Item for settings dialog - printer/add-ons
122 class SW_DLLPUBLIC SwAddPrinterItem final : public SfxPoolItem, public SwPrintData
124 using SwPrintData::operator ==;
126 public:
127 DECLARE_ITEM_TYPE_FUNCTION(SwAddPrinterItem)
128 SwAddPrinterItem();
129 SwAddPrinterItem( const SwPrintData& rPrtData );
131 virtual SwAddPrinterItem* Clone( SfxItemPool *pPool = nullptr ) const override;
133 virtual bool operator==( const SfxPoolItem& ) const override;
136 /// Item for settings dialog, ShadowCursorPage
137 class SW_DLLPUBLIC SwShadowCursorItem final : public SfxPoolItem
139 SwFillMode m_eMode;
140 bool m_bOn;
141 public:
142 DECLARE_ITEM_TYPE_FUNCTION(SwShadowCursorItem)
143 SwShadowCursorItem();
144 SwShadowCursorItem( const SwViewOption& rVOpt );
146 virtual SwShadowCursorItem* Clone( SfxItemPool *pPool = nullptr ) const override;
147 virtual bool operator==( const SfxPoolItem& ) const override;
149 void FillViewOptions( SwViewOption& rVOpt) const;
151 SwFillMode GetMode() const { return m_eMode; }
152 bool IsOn() const { return m_bOn; }
154 void SetMode( SwFillMode eM ) { m_eMode = eM; }
155 void SetOn( bool bFlag ) { m_bOn = bFlag; }
158 class SW_DLLPUBLIC SwFmtAidsAutoComplItem final : public SfxPoolItem
160 friend class SwShdwCursorOptionsTabPage;
161 friend class SwModule;
163 bool m_bEncloseWithCharactersOn;
165 public:
166 DECLARE_ITEM_TYPE_FUNCTION(SwFmtAidsAutoComplItem)
167 SwFmtAidsAutoComplItem();
168 SwFmtAidsAutoComplItem(const SwViewOption& rVOpt);
170 virtual SwFmtAidsAutoComplItem* Clone(SfxItemPool* pPool = nullptr) const override;
171 virtual bool operator==(const SfxPoolItem&) const override;
173 bool IsEncloseWithCharactersOn() const { return m_bEncloseWithCharactersOn; }
175 void SetEncloseWithCharactersOn(bool bFlag) { m_bEncloseWithCharactersOn = bFlag; }
178 #ifdef DBG_UTIL
180 // Item for settings dialog - test settings
181 class SW_DLLPUBLIC SwTestItem final : public SfxPoolItem
183 friend class SwModule;
184 friend class SwTestTabPage;
186 bool m_bTest1:1;
187 bool m_bTest2:1;
188 bool m_bTest3:1;
189 bool m_bTest4:1;
190 bool m_bTest5:1;
191 bool m_bTest6:1;
192 bool m_bTest7:1;
193 bool m_bTest8:1;
194 bool m_bTest9:1;
195 bool m_bTest10:1;
197 public:
198 DECLARE_ITEM_TYPE_FUNCTION(SwTestItem)
199 SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST) {};
201 virtual SwTestItem* Clone( SfxItemPool *pPool = nullptr ) const override;
202 virtual bool operator==( const SfxPoolItem& ) const override;
205 #endif
207 #endif
209 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */