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>
32 class SwAddPrinterTabPage
;
36 class SwContentOptPage
;
37 class SwShdwCursorOptionsTabPage
;
38 enum class SwFillMode
;
40 /// Item for settings dialog - document view
41 class SW_DLLPUBLIC SwDocDisplayItem final
: public SfxPoolItem
43 friend class SwShdwCursorOptionsTabPage
;
44 friend class SwModule
;
46 bool m_bParagraphEnd
:1;
49 bool m_bNonbreakingSpace
:1;
50 bool m_bSoftHyphen
:1;
51 bool m_bCharHiddenText
:1;
53 bool m_bManualBreak
:1;
54 sal_Int32 m_xDefaultAnchor
;
58 SwDocDisplayItem( const SwViewOption
& rVOpt
);
60 virtual SwDocDisplayItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
61 virtual bool operator==( const SfxPoolItem
& ) const override
;
62 void FillViewOptions( SwViewOption
& rVOpt
) const;
66 // Item for settings dialog, element page
67 class SW_DLLPUBLIC SwElemItem final
: public SfxPoolItem
71 bool m_bVertRulerRight
:1;
72 bool m_bSmoothScroll
:1;
80 bool m_bShowInlineTooltips
:1;
81 bool m_bShowOutlineContentVisibilityButton
:1;
82 bool m_bTreatSubOutlineLevelsAsContent
:1;
83 bool m_bShowChangesInMargin
:1;
84 bool m_bFieldHiddenText
:1;
85 bool m_bShowHiddenPara
:1;
87 friend class SwContentOptPage
;
91 SwElemItem(const SwViewOption
& rVOpt
);
93 virtual SwElemItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
94 virtual bool operator==( const SfxPoolItem
& ) const override
;
96 void FillViewOptions( SwViewOption
& rVOpt
) const;
101 // Item for settings dialog - printer/add-ons
102 class SW_DLLPUBLIC SwAddPrinterItem final
: public SfxPoolItem
, public SwPrintData
104 using SwPrintData::operator ==;
108 SwAddPrinterItem( const SwPrintData
& rPrtData
);
110 virtual SwAddPrinterItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
112 virtual bool operator==( const SfxPoolItem
& ) const override
;
115 /// Item for settings dialog, ShadowCursorPage
116 class SW_DLLPUBLIC SwShadowCursorItem final
: public SfxPoolItem
121 SwShadowCursorItem();
122 SwShadowCursorItem( const SwViewOption
& rVOpt
);
124 virtual SwShadowCursorItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
125 virtual bool operator==( const SfxPoolItem
& ) const override
;
127 void FillViewOptions( SwViewOption
& rVOpt
) const;
129 SwFillMode
GetMode() const { return m_eMode
; }
130 bool IsOn() const { return m_bOn
; }
132 void SetMode( SwFillMode eM
) { m_eMode
= eM
; }
133 void SetOn( bool bFlag
) { m_bOn
= bFlag
; }
138 // Item for settings dialog - test settings
139 class SW_DLLPUBLIC SwTestItem final
: public SfxPoolItem
141 friend class SwModule
;
142 friend class SwTestTabPage
;
156 SwTestItem() : SfxPoolItem(FN_PARAM_SWTEST
) {};
158 virtual SwTestItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
159 virtual bool operator==( const SfxPoolItem
& ) const override
;
166 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */