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 .
22 #include <svl/poolitem.hxx>
23 #include <unotools/configitem.hxx>
26 class SC_DLLPUBLIC ScPrintOptions
36 bool GetSkipEmpty() const { return bSkipEmpty
; }
37 void SetSkipEmpty( bool bVal
) { bSkipEmpty
= bVal
; }
38 bool GetAllSheets() const { return bAllSheets
; }
39 void SetAllSheets( bool bVal
) { bAllSheets
= bVal
; }
40 bool GetForceBreaks() const { return bForceBreaks
; }
41 void SetForceBreaks( bool bVal
) { bForceBreaks
= bVal
; }
45 bool operator== ( const ScPrintOptions
& rOpt
) const;
48 // item for the dialog / options page
50 class SC_DLLPUBLIC ScTpPrintItem final
: public SfxPoolItem
53 ScTpPrintItem( const ScPrintOptions
& rOpt
);
54 virtual ~ScTpPrintItem() override
;
56 ScTpPrintItem(ScTpPrintItem
const &) = default;
57 ScTpPrintItem(ScTpPrintItem
&&) = default;
58 ScTpPrintItem
& operator =(ScTpPrintItem
const &) = delete; // due to SfxPoolItem
59 ScTpPrintItem
& operator =(ScTpPrintItem
&&) = delete; // due to SfxPoolItem
61 virtual bool operator==( const SfxPoolItem
& ) const override
;
62 virtual ScTpPrintItem
* Clone( SfxItemPool
*pPool
= nullptr ) const override
;
64 const ScPrintOptions
& GetPrintOptions() const { return theOptions
; }
67 ScPrintOptions theOptions
;
72 class ScPrintCfg final
: public ScPrintOptions
, public utl::ConfigItem
75 static css::uno::Sequence
<OUString
> GetPropertyNames();
77 virtual void ImplCommit() override
;
82 void SetOptions( const ScPrintOptions
& rNew
);
84 virtual void Notify( const css::uno::Sequence
< OUString
>& aPropertyNames
) override
;
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */