Coverage Report

Created: 2026-06-30 11:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sd/source/ui/inc/optsitem.hxx
Line
Count
Source
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
20
#pragma once
21
22
#include <unotools/configitem.hxx>
23
#include <tools/solar.h>
24
#include <sfx2/module.hxx>
25
#include <svx/optgrid.hxx>
26
#include <tools/degree.hxx>
27
#include <sddllapi.h>
28
#include <memory>
29
30
class SdOptions;
31
32
namespace sd {
33
class FrameView;
34
}
35
36
class SdOptionsGeneric;
37
38
class SD_DLLPUBLIC SdOptionsItem final : public ::utl::ConfigItem
39
{
40
41
private:
42
43
    const SdOptionsGeneric& mrParent;
44
45
    virtual void            ImplCommit() override;
46
47
public:
48
49
    SdOptionsItem( const SdOptionsGeneric& rParent, const OUString& rSubTree );
50
    virtual ~SdOptionsItem() override;
51
52
0
    SdOptionsItem(SdOptionsItem const &) = default;
53
    SdOptionsItem(SdOptionsItem &&) = default;
54
    SdOptionsItem & operator =(SdOptionsItem const &) = delete; // due to ConfigItem
55
    SdOptionsItem & operator =(SdOptionsItem &&) = delete; // due to ConfigItem
56
57
    virtual void            Notify( const css::uno::Sequence<OUString>& aPropertyNames) override;
58
59
    css::uno::Sequence< css::uno::Any > GetProperties( const css::uno::Sequence< OUString >& rNames );
60
    bool                    PutProperties( const css::uno::Sequence< OUString >& rNames,
61
                                           const css::uno::Sequence< css::uno::Any>& rValues );
62
    using ConfigItem::SetModified;
63
};
64
65
class SD_DLLPUBLIC SdOptionsGeneric
66
{
67
friend class SdOptionsItem;
68
69
private:
70
71
    OUString                maSubTree;
72
    std::unique_ptr<SdOptionsItem>
73
                            mpCfgItem;
74
    bool                    mbImpress;
75
    bool                    mbInit          : 1;
76
    bool                    mbEnableModify  : 1;
77
78
    SAL_DLLPRIVATE void Commit( SdOptionsItem& rCfgItem ) const;
79
80
protected:
81
82
    void                    Init() const;
83
31
    void                    OptionsChanged() { if( mpCfgItem && mbEnableModify ) mpCfgItem->SetModified(); }
84
85
protected:
86
87
    virtual css::uno::Sequence< OUString > GetPropertyNames() const = 0;
88
    virtual bool            ReadData( const css::uno::Any* pValues ) = 0;
89
    virtual bool            WriteData( css::uno::Any* pValues ) const = 0;
90
91
public:
92
93
                            SdOptionsGeneric(bool bImpress, const OUString& rSubTree);
94
                            SdOptionsGeneric(SdOptionsGeneric const &);
95
                            virtual ~SdOptionsGeneric();
96
97
    SdOptionsGeneric&       operator=( SdOptionsGeneric const & );
98
99
25
    bool                    IsImpress() const { return mbImpress; }
100
101
21.4k
    void                    EnableModify( bool bModify ) { mbEnableModify = bModify; }
102
103
    void                    Store();
104
105
    static bool             isMetricSystem();
106
};
107
108
class SD_DLLPUBLIC SdOptionsMisc : public SdOptionsGeneric
109
{
110
private:
111
112
    sal_Int32   nDefaultObjectSizeWidth;
113
    sal_Int32   nDefaultObjectSizeHeight;
114
115
    bool    bStartWithTemplate          : 1;    // Misc/NewDoc/AutoPilot
116
    bool    bMarkedHitMovesAlways       : 1;    // Misc/ObjectMoveable
117
    bool    bMoveOnlyDragging           : 1;    // Currently, not in use !!!
118
    bool    bCrookNoContortion          : 1;    // Misc/NoDistort
119
    bool    bQuickEdit                  : 1;    // Misc/TextObject/QuickEditing
120
    bool    bMasterPageCache            : 1;    // Misc/BackgroundCache
121
    bool    bDragWithCopy               : 1;    // Misc/CopyWhileMoving
122
    bool    bPickThrough                : 1;    // Misc/TextObject/Selectable
123
    bool    bDoubleClickTextEdit        : 1;    // Misc/DclickTextedit
124
    bool    bClickChangeRotation        : 1;    // Misc/RotateClick
125
    bool    bSolidDragging              : 1;    // Misc/ModifyWithAttributes
126
    bool    bSummationOfParagraphs      : 1;    // misc/SummationOfParagraphs
127
    bool    bTabBarVisible              : 1;    // Misc/TabBarVisible
128
    bool    bShowUndoDeleteWarning      : 1;    // Misc/ShowUndoDeleteWarning
129
    // #i75315#
130
    bool    bSlideshowRespectZOrder     : 1;    // Misc/SlideshowRespectZOrder
131
    bool    bShowComments               : 1;    // Misc/ShowComments
132
133
    bool    bPreviewNewEffects;
134
    bool    bPreviewChangedEffects;
135
    bool    bPreviewTransitions;
136
137
    sal_Int32   mnDisplay;
138
139
    sal_Int32 mnPenColor;
140
    double mnPenWidth;
141
142
    /** This value controls the device to use for formatting documents.
143
        The currently supported values are 0 for the current printer or 1
144
        for the printer independent virtual device the can be retrieved from
145
        the modules.
146
    */
147
    sal_uInt16  mnPrinterIndependentLayout;     // Misc/Compatibility/PrinterIndependentLayout
148
149
    /// Minimum mouse move distance for it to register as a drag action
150
    sal_Int32 mnDragThresholdPixels; // Misc/DragThresholdPixels
151
// Misc
152
153
protected:
154
155
    virtual css::uno::Sequence< OUString > GetPropertyNames() const  override;
156
    virtual bool ReadData( const css::uno::Any* pValues ) override;
157
    virtual bool WriteData( css::uno::Any* pValues ) const override;
158
159
public:
160
161
            SdOptionsMisc(bool bImpress, bool bUseConfig);
162
163
    bool    operator==( const SdOptionsMisc& rOpt ) const;
164
165
0
    bool    IsStartWithTemplate() const { Init(); return bStartWithTemplate; }
166
8.07k
    bool    IsMarkedHitMovesAlways() const { Init(); return bMarkedHitMovesAlways; }
167
16.1k
    bool    IsMoveOnlyDragging() const { Init(); return bMoveOnlyDragging; }
168
8.07k
    bool    IsCrookNoContortion() const { Init(); return bCrookNoContortion; }
169
8.07k
    bool    IsQuickEdit() const { Init(); return bQuickEdit; }
170
8.07k
    bool    IsMasterPagePaintCaching() const { Init(); return bMasterPageCache; }
171
8.07k
    bool    IsDragWithCopy() const { Init(); return bDragWithCopy; }
172
8.07k
    bool    IsPickThrough() const { Init(); return bPickThrough; }
173
8.07k
    bool    IsDoubleClickTextEdit() const { Init(); return bDoubleClickTextEdit; }
174
8.07k
    bool    IsClickChangeRotation() const { Init(); return bClickChangeRotation; }
175
8.07k
    bool    IsSolidDragging() const { Init(); return bSolidDragging; }
176
42.8k
    bool    IsSummationOfParagraphs() const { Init(); return bSummationOfParagraphs; };
177
0
    bool    IsTabBarVisible() const { Init(); return bTabBarVisible; };
178
179
    /** Return the currently selected printer independent layout mode.
180
        @return
181
            Returns 1 for printer independent layout enabled and 0 when it
182
            is disabled.  Other values are reserved for future use.
183
    */
184
14.4k
    sal_uInt16  GetPrinterIndependentLayout() const { Init(); return mnPrinterIndependentLayout; };
185
0
    bool    IsShowUndoDeleteWarning() const { Init(); return bShowUndoDeleteWarning; }
186
0
    bool    IsSlideshowRespectZOrder() const { Init(); return bSlideshowRespectZOrder; }
187
0
    sal_Int32   GetDefaultObjectSizeWidth() const { Init(); return nDefaultObjectSizeWidth; }
188
0
    sal_Int32   GetDefaultObjectSizeHeight() const { Init(); return nDefaultObjectSizeHeight; }
189
190
0
    bool    IsPreviewNewEffects() const { Init(); return bPreviewNewEffects; }
191
0
    bool    IsPreviewChangedEffects() const { Init(); return bPreviewChangedEffects; }
192
0
    bool    IsPreviewTransitions() const { Init(); return bPreviewTransitions; }
193
194
    sal_Int32   GetDisplay() const;
195
    void        SetDisplay( sal_Int32 nDisplay );
196
197
0
    sal_Int32 GetPresentationPenColor() const { Init(); return mnPenColor; }
198
0
    void      SetPresentationPenColor( sal_Int32 nPenColor ) { if( mnPenColor != nPenColor ) { OptionsChanged(); mnPenColor = nPenColor; } }
199
200
0
    double    GetPresentationPenWidth() const { Init(); return mnPenWidth; }
201
0
    void      SetPresentationPenWidth( double nPenWidth ) { if( mnPenWidth != nPenWidth ) { OptionsChanged(); mnPenWidth = nPenWidth; } }
202
203
    sal_Int32 GetDragThresholdPixels() const;
204
    void SetDragThreshold(sal_Int32 nDragThresholdPixels);
205
206
0
    void    SetStartWithTemplate( bool bOn ) { if( bStartWithTemplate != bOn ) { OptionsChanged(); bStartWithTemplate = bOn; } }
207
0
    void    SetMarkedHitMovesAlways( bool bOn ) { if( bMarkedHitMovesAlways != bOn ) { OptionsChanged(); bMarkedHitMovesAlways = bOn; } }
208
0
    void    SetMoveOnlyDragging( bool bOn ) { if( bMoveOnlyDragging != bOn ) { OptionsChanged(); bMoveOnlyDragging = bOn; } }
209
0
    void    SetCrookNoContortion( bool bOn ) { if( bCrookNoContortion != bOn ) { OptionsChanged(); bCrookNoContortion = bOn; } }
210
0
    void    SetQuickEdit( bool bOn ) { if( bQuickEdit != bOn ) { OptionsChanged(); bQuickEdit = bOn; } }
211
0
    void    SetMasterPagePaintCaching( bool bOn ) { if( bMasterPageCache != bOn ) { OptionsChanged(); bMasterPageCache = bOn; } }
212
0
    void    SetDragWithCopy( bool bOn ) { if( bDragWithCopy != bOn ) { OptionsChanged(); bDragWithCopy = bOn; } }
213
0
    void    SetPickThrough( bool bOn ) { if( bPickThrough != bOn ) { OptionsChanged(); bPickThrough = bOn; } }
214
0
    void    SetDoubleClickTextEdit( bool bOn ) { if( bDoubleClickTextEdit != bOn ) { OptionsChanged(); bDoubleClickTextEdit = bOn; } }
215
0
    void    SetClickChangeRotation( bool bOn ) { if( bClickChangeRotation != bOn ) { OptionsChanged(); bClickChangeRotation = bOn; } }
216
0
    void    SetSummationOfParagraphs( bool bOn ){ if ( bOn != bSummationOfParagraphs ) { OptionsChanged(); bSummationOfParagraphs = bOn; } }
217
0
    void    SetTabBarVisible( bool bOn ){ if ( bOn != bTabBarVisible ) { OptionsChanged(); bTabBarVisible = bOn; } }
218
    /** Set the printer independent layout mode.
219
        @param nOn
220
            The default value is to switch printer independent layout on,
221
            hence the parameters name.  Use 0 for turning it off.  Other
222
            values are reserved for future use.
223
    */
224
0
    void    SetPrinterIndependentLayout (sal_uInt16 nOn ){ if ( nOn != mnPrinterIndependentLayout ) { OptionsChanged(); mnPrinterIndependentLayout = nOn; } }
225
0
    void    SetSolidDragging( bool bOn ) { if( bSolidDragging != bOn ) { OptionsChanged(); bSolidDragging = bOn; } }
226
0
    void    SetShowUndoDeleteWarning( bool bOn ) { if( bShowUndoDeleteWarning != bOn ) { OptionsChanged(); bShowUndoDeleteWarning = bOn; } }
227
0
    void    SetSlideshowRespectZOrder( bool bOn ) { if( bSlideshowRespectZOrder != bOn ) { OptionsChanged(); bSlideshowRespectZOrder = bOn; } }
228
0
    void    SetDefaultObjectSizeWidth( sal_Int32 nWidth ) { if( nDefaultObjectSizeWidth != nWidth ) { OptionsChanged(); nDefaultObjectSizeWidth = nWidth; } }
229
0
    void    SetDefaultObjectSizeHeight( sal_Int32 nHeight ) { if( nDefaultObjectSizeHeight != nHeight ) { OptionsChanged(); nDefaultObjectSizeHeight = nHeight; } }
230
231
0
    void    SetPreviewNewEffects( bool bOn )  { if( bPreviewNewEffects != bOn ) { OptionsChanged(); bPreviewNewEffects = bOn; } }
232
0
    void    SetPreviewChangedEffects( bool bOn )  { if( bPreviewChangedEffects != bOn ) { OptionsChanged(); bPreviewChangedEffects = bOn; } }
233
0
    void    SetPreviewTransitions( bool bOn )  { if( bPreviewTransitions != bOn ) { OptionsChanged(); bPreviewTransitions = bOn; } }
234
235
0
    bool    IsShowComments() const { Init(); return bShowComments; }
236
0
    void    SetShowComments( bool bShow )  { if( bShowComments != bShow ) { OptionsChanged(); bShowComments = bShow; } }
237
};
238
239
class SD_DLLPUBLIC SdOptionsMiscItem final : public SfxPoolItem
240
{
241
public:
242
243
                            DECLARE_ITEM_TYPE_FUNCTION(SdOptionsMiscItem)
244
                            explicit SdOptionsMiscItem();
245
                            SdOptionsMiscItem( SdOptions const * pOpts, ::sd::FrameView const * pView );
246
247
    virtual SdOptionsMiscItem* Clone( SfxItemPool *pPool = nullptr ) const override;
248
    virtual bool            operator==( const SfxPoolItem& ) const override;
249
250
    void                    SetOptions( SdOptions* pOpts ) const;
251
252
0
    SdOptionsMisc&          GetOptionsMisc() { return maOptionsMisc; }
253
0
    const SdOptionsMisc&    GetOptionsMisc() const { return maOptionsMisc; }
254
private:
255
    SdOptionsMisc           maOptionsMisc;
256
};
257
258
class SdOptionsGrid : public SdOptionsGeneric, public SvxOptionsGrid
259
{
260
protected:
261
262
    virtual css::uno::Sequence< OUString > GetPropertyNames() const  override;
263
    virtual bool ReadData( const css::uno::Any* pValues ) override;
264
    virtual bool WriteData( css::uno::Any* pValues ) const override;
265
266
public:
267
268
    explicit SdOptionsGrid(bool bImpress);
269
    virtual ~SdOptionsGrid() override;
270
271
    void    SetDefaults();
272
273
24.2k
    sal_uInt32  GetFieldDrawX() const { Init(); return SvxOptionsGrid::GetFieldDrawX(); }
274
24.2k
    sal_uInt32  GetFieldDivisionX() const { Init(); return SvxOptionsGrid::GetFieldDivisionX(); }
275
24.2k
    sal_uInt32  GetFieldDrawY() const { Init(); return SvxOptionsGrid::GetFieldDrawY(); }
276
24.2k
    sal_uInt32  GetFieldDivisionY() const { Init(); return SvxOptionsGrid::GetFieldDivisionY(); }
277
8.07k
    bool    IsUseGridSnap() const { Init(); return SvxOptionsGrid::GetUseGridSnap(); }
278
0
    bool    IsSynchronize() const { Init(); return SvxOptionsGrid::GetSynchronize(); }
279
8.07k
    bool    IsGridVisible() const { Init(); return SvxOptionsGrid::GetGridVisible(); }
280
281
5
    void    SetFieldDrawX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDrawX() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDrawX( nSet ); } }
282
5
    void    SetFieldDivisionX( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDivisionX() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDivisionX( nSet ); } }
283
5
    void    SetFieldDrawY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDrawY() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDrawY( nSet ); } }
284
5
    void    SetFieldDivisionY( sal_uInt32 nSet ) { if( nSet != SvxOptionsGrid::GetFieldDivisionY() ) { OptionsChanged(); SvxOptionsGrid::SetFieldDivisionY( nSet ); } }
285
5
    void    SetUseGridSnap( bool bSet ) { if( bSet != SvxOptionsGrid::GetUseGridSnap() ) { OptionsChanged(); SvxOptionsGrid::SetUseGridSnap( bSet ); } }
286
5
    void    SetSynchronize( bool bSet ) { if( bSet != SvxOptionsGrid::GetSynchronize() ) { OptionsChanged(); SvxOptionsGrid::SetSynchronize( bSet ); } }
287
5
    void    SetGridVisible( bool bSet ) { if( bSet != SvxOptionsGrid::GetGridVisible() ) { OptionsChanged(); SvxOptionsGrid::SetGridVisible( bSet ); } }
288
};
289
290
class SdOptionsGridItem final : public SvxGridItem
291
{
292
293
public:
294
    DECLARE_ITEM_TYPE_FUNCTION(SdOptionsGridItem)
295
    explicit                SdOptionsGridItem( SdOptions const * pOpts );
296
297
    void                    SetOptions( SdOptions* pOpts ) const;
298
};
299
300
class SD_DLLPUBLIC SdOptionsPrint : public SdOptionsGeneric
301
{
302
private:
303
304
    bool    bDraw               : 1;    // Print/Content/Drawing
305
    bool    bNotes              : 1;    // Print/Content/Note
306
    bool    bHandout            : 1;    // Print/Content/Handout
307
    bool    bOutline            : 1;    // Print/Content/Outline
308
    bool    bDate               : 1;    // Print/Other/Date
309
    bool    bTime               : 1;    // Print/Other/Time
310
    bool    bPagename           : 1;    // Print/Other/PageName
311
    bool    bHiddenPages        : 1;    // Print/Other/HiddenPage
312
    bool    bPagesize           : 1;    // Print/Page/PageSize
313
    bool    bPagetile           : 1;    // Print/Page/PageTile
314
    bool    bWarningPrinter     : 1;    //  These flags you get
315
    bool    bWarningSize        : 1;    //  from the common options,
316
    bool    bWarningOrientation : 1;    //  currently org.openoffice.Office.Common.xml (class OfaMiscCfg ; sfx2/misccfg.hxx )
317
    bool    bBooklet            : 1;    // Print/Page/Booklet
318
    bool    bFront              : 1;    // Print/Page/BookletFront
319
    bool    bBack               : 1;    // Print/Page/BookletFront
320
    bool    bCutPage            : 1;    // NOT persistent !!!
321
    bool    bPaperbin           : 1;    // Print/Other/FromPrinterSetup
322
    bool    mbHandoutHorizontal : 1;    // Order Page previews on Handout Pages horizontal
323
    sal_uInt16  mnHandoutPages;             // Number of page previews on handout page (only 1/2/4/6/9 are supported)
324
    sal_uInt16  nQuality;                   // Print/Other/Quality
325
326
protected:
327
328
    virtual css::uno::Sequence< OUString > GetPropertyNames() const  override;
329
    virtual bool ReadData( const css::uno::Any* pValues ) override;
330
    virtual bool WriteData( css::uno::Any* pValues ) const override;
331
332
public:
333
334
            SdOptionsPrint(bool bImpress, bool bUseConfig);
335
336
    bool    operator==( const SdOptionsPrint& rOpt ) const;
337
338
14.5k
    bool    IsDraw() const { Init(); return bDraw; }
339
14.5k
    bool    IsNotes() const { Init(); return bNotes; }
340
14.5k
    bool    IsHandout() const { Init(); return bHandout; }
341
14.5k
    bool    IsOutline() const { Init(); return bOutline; }
342
14.6k
    bool    IsDate() const { Init(); return bDate; }
343
14.5k
    bool    IsTime() const { Init(); return bTime; }
344
14.6k
    bool    IsPagename() const { Init(); return bPagename; }
345
14.6k
    bool    IsHiddenPages() const { Init(); return bHiddenPages; }
346
14.6k
    bool    IsPagesize() const { Init(); return bPagesize; }
347
14.6k
    bool    IsPagetile() const { Init(); return bPagetile; }
348
28.9k
    bool    IsWarningPrinter() const { Init(); return bWarningPrinter; }
349
28.9k
    bool    IsWarningSize() const { Init(); return bWarningSize; }
350
28.9k
    bool    IsWarningOrientation() const { Init(); return bWarningOrientation; }
351
14.6k
    bool    IsBooklet() const { Init(); return bBooklet; }
352
14.6k
    bool    IsFrontPage() const { Init(); return bFront; }
353
14.6k
    bool    IsBackPage() const { Init(); return bBack; }
354
14.4k
    bool    IsCutPage() const { Init(); return bCutPage; }
355
14.4k
    bool    IsPaperbin() const { Init(); return bPaperbin; }
356
29.1k
    sal_uInt16  GetOutputQuality() const { Init(); return nQuality; }
357
51
    bool    IsHandoutHorizontal() const { Init(); return mbHandoutHorizontal; }
358
55
    sal_uInt16  GetHandoutPages() const { Init(); return mnHandoutPages; }
359
360
14.4k
    void    SetDraw( bool bOn ) { if( bDraw != bOn ) { OptionsChanged(); bDraw = bOn; } }
361
14.4k
    void    SetNotes( bool bOn ) { if( bNotes != bOn ) { OptionsChanged(); bNotes = bOn; } }
362
14.4k
    void    SetHandout( bool bOn ) { if( bHandout != bOn ) { OptionsChanged(); bHandout = bOn; } }
363
14.4k
    void    SetOutline( bool bOn ) { if( bOutline != bOn ) { OptionsChanged(); bOutline = bOn; } }
364
14.4k
    void    SetDate( bool bOn ) { if( bDate != bOn ) { OptionsChanged(); bDate = bOn; } }
365
14.4k
    void    SetTime( bool bOn ) { if( bTime != bOn ) { OptionsChanged(); bTime = bOn; } }
366
14.4k
    void    SetPagename( bool bOn ) { if( bPagename != bOn ) { OptionsChanged(); bPagename = bOn; } }
367
14.4k
    void    SetHiddenPages( bool bOn ) { if( bHiddenPages != bOn ) { OptionsChanged(); bHiddenPages = bOn; } }
368
14.4k
    void    SetPagesize( bool bOn ) { if( bPagesize != bOn ) { OptionsChanged(); bPagesize = bOn; } }
369
14.4k
    void    SetPagetile( bool bOn ) { if( bPagetile != bOn ) { OptionsChanged(); bPagetile = bOn; } }
370
14.4k
    void    SetWarningPrinter( bool bOn ) { if( bWarningPrinter != bOn ) { OptionsChanged(); bWarningPrinter = bOn; } }
371
14.4k
    void    SetWarningSize( bool bOn ) { if( bWarningSize != bOn ) { OptionsChanged(); bWarningSize = bOn; } }
372
14.4k
    void    SetWarningOrientation( bool bOn) { if( bWarningOrientation != bOn ) { OptionsChanged(); bWarningOrientation = bOn; } }
373
14.4k
    void    SetBooklet( bool bOn ) { if( bBooklet != bOn ) { OptionsChanged(); bBooklet = bOn; } }
374
14.4k
    void    SetFrontPage( bool bOn ) { if( bFront != bOn ) { OptionsChanged(); bFront = bOn; } }
375
14.4k
    void    SetBackPage( bool bOn ) { if( bBack != bOn ) { OptionsChanged(); bBack = bOn; } }
376
14.4k
    void    SetCutPage( bool bOn ) { if( bCutPage != bOn ) { OptionsChanged(); bCutPage = bOn; } }
377
14.4k
    void    SetPaperbin( bool bOn ) { if( bPaperbin != bOn ) { OptionsChanged(); bPaperbin = bOn; } }
378
14.4k
    void    SetOutputQuality( sal_uInt16 nInQuality ) { if( nQuality != nInQuality ) { OptionsChanged(); nQuality = nInQuality; } }
379
0
    void    SetHandoutHorizontal( bool bHandoutHorizontal ) { if( mbHandoutHorizontal != bHandoutHorizontal ) { OptionsChanged(); mbHandoutHorizontal = bHandoutHorizontal; } }
380
1
    void    SetHandoutPages( sal_uInt16 nHandoutPages ) { if( nHandoutPages != mnHandoutPages ) { OptionsChanged(); mnHandoutPages = nHandoutPages; } }
381
};
382
383
class SD_DLLPUBLIC SdOptionsPrintItem final : public SfxPoolItem
384
{
385
public:
386
387
                            DECLARE_ITEM_TYPE_FUNCTION(SdOptionsPrintItem)
388
                            explicit SdOptionsPrintItem();
389
    explicit                SdOptionsPrintItem( SdOptions const * pOpts );
390
391
    virtual SdOptionsPrintItem* Clone( SfxItemPool *pPool = nullptr ) const override;
392
    virtual bool            operator==( const SfxPoolItem& ) const override;
393
394
    void                    SetOptions( SdOptions* pOpts ) const;
395
396
71.6k
    SdOptionsPrint&         GetOptionsPrint() { return maOptionsPrint; }
397
6.92k
    const SdOptionsPrint&   GetOptionsPrint() const { return maOptionsPrint; }
398
private:
399
    SdOptionsPrint  maOptionsPrint;
400
};
401
402
class SdOptions final :
403
                  public SdOptionsMisc,
404
                  public SdOptionsGrid,
405
                  public SdOptionsPrint
406
{
407
public:
408
409
                        explicit SdOptions(bool bImpress);
410
                        virtual ~SdOptions() override;
411
412
    void                StoreConfig();
413
};
414
415
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */