Bump version to 6.4-15
[LibreOffice.git] / sc / inc / printopt.hxx
blob20ed1ede5968b2d425a7eee82ad5f18db6c210eb
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 .
20 #ifndef INCLUDED_SC_INC_PRINTOPT_HXX
21 #define INCLUDED_SC_INC_PRINTOPT_HXX
23 #include <svl/poolitem.hxx>
24 #include <unotools/configitem.hxx>
25 #include "scdllapi.h"
27 class SC_DLLPUBLIC ScPrintOptions
29 private:
30 bool bSkipEmpty;
31 bool bAllSheets;
32 bool bForceBreaks;
34 public:
35 ScPrintOptions();
37 bool GetSkipEmpty() const { return bSkipEmpty; }
38 void SetSkipEmpty( bool bVal ) { bSkipEmpty = bVal; }
39 bool GetAllSheets() const { return bAllSheets; }
40 void SetAllSheets( bool bVal ) { bAllSheets = bVal; }
41 bool GetForceBreaks() const { return bForceBreaks; }
42 void SetForceBreaks( bool bVal ) { bForceBreaks = bVal; }
44 void SetDefaults();
46 bool operator== ( const ScPrintOptions& rOpt ) const;
49 // item for the dialog / options page
51 class SC_DLLPUBLIC ScTpPrintItem final : public SfxPoolItem
53 public:
54 ScTpPrintItem( const ScPrintOptions& rOpt );
55 virtual ~ScTpPrintItem() override;
57 ScTpPrintItem(ScTpPrintItem const &) = default;
58 ScTpPrintItem(ScTpPrintItem &&) = default;
59 ScTpPrintItem & operator =(ScTpPrintItem const &) = delete; // due to SfxPoolItem
60 ScTpPrintItem & operator =(ScTpPrintItem &&) = delete; // due to SfxPoolItem
62 virtual bool operator==( const SfxPoolItem& ) const override;
63 virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
65 const ScPrintOptions& GetPrintOptions() const { return theOptions; }
67 private:
68 ScPrintOptions const theOptions;
71 // config item
73 class ScPrintCfg final : public ScPrintOptions, public utl::ConfigItem
75 private:
76 static css::uno::Sequence<OUString> GetPropertyNames();
78 virtual void ImplCommit() override;
80 public:
81 ScPrintCfg();
83 void SetOptions( const ScPrintOptions& rNew );
85 virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
88 #endif
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */