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_CFGITEMS_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_CFGITEMS_HXX
22 #include <svl/poolitem.hxx>
24 #include <printdata.hxx>
27 #include <sfx2/zoomitem.hxx>
33 class SwAddPrinterTabPage
;
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;
50 bool m_bNonbreakingSpace
:1;
51 bool m_bSoftHyphen
:1;
52 bool m_bCharHiddenText
: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
;
63 DECLARE_ITEM_TYPE_FUNCTION(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;
73 // Item for settings dialog, element page
74 class SW_DLLPUBLIC SwElemItem final
: public SfxPoolItem
78 bool m_bVertRulerRight
:1;
79 bool m_bSmoothScroll
: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
;
100 DECLARE_ITEM_TYPE_FUNCTION(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
; }
121 // Item for settings dialog - printer/add-ons
122 class SW_DLLPUBLIC SwAddPrinterItem final
: public SfxPoolItem
, public SwPrintData
124 using SwPrintData::operator ==;
127 DECLARE_ITEM_TYPE_FUNCTION(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
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
;
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
; }
180 // Item for settings dialog - test settings
181 class SW_DLLPUBLIC SwTestItem final
: public SfxPoolItem
183 friend class SwModule
;
184 friend class SwTestTabPage
;
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
;
209 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */