LibreOffice Module sc (master)  1
printopt.hxx
Go to the documentation of this file.
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 <svl/poolitem.hxx>
23 #include <unotools/configitem.hxx>
24 #include "scdllapi.h"
25 
27 {
28 private:
29  bool bSkipEmpty;
30  bool bAllSheets;
32 
33 public:
35 
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; }
42 
43  void SetDefaults();
44 
45  bool operator== ( const ScPrintOptions& rOpt ) const;
46 };
47 
48 // item for the dialog / options page
49 
51 {
52 public:
53  ScTpPrintItem( const ScPrintOptions& rOpt );
54  virtual ~ScTpPrintItem() override;
55 
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
60 
61  virtual bool operator==( const SfxPoolItem& ) const override;
62  virtual ScTpPrintItem* Clone( SfxItemPool *pPool = nullptr ) const override;
63 
64  const ScPrintOptions& GetPrintOptions() const { return theOptions; }
65 
66 private:
68 };
69 
70 // config item
71 
72 class ScPrintCfg final : public ScPrintOptions, public utl::ConfigItem
73 {
74 private:
75  static css::uno::Sequence<OUString> GetPropertyNames();
76 
77  virtual void ImplCommit() override;
78 
79 public:
80  ScPrintCfg();
81 
82  void SetOptions( const ScPrintOptions& rNew );
83 
84  virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
85 };
86 
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:518
virtual void ImplCommit() override
Definition: printopt.cxx:119
virtual bool operator==(const SfxPoolItem &) const =0
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: printopt.cxx:80
SfxPoolItem & operator=(const SfxPoolItem &)=delete
void SetForceBreaks(bool bVal)
Definition: printopt.hxx:41
ScPrintOptions theOptions
Definition: printopt.hxx:67
bool GetForceBreaks() const
Definition: printopt.hxx:40
void SetAllSheets(bool bVal)
Definition: printopt.hxx:39
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: printopt.cxx:150
const ScPrintOptions & GetPrintOptions() const
Definition: printopt.hxx:64
bool GetAllSheets() const
Definition: printopt.hxx:38
void SetSkipEmpty(bool bVal)
Definition: printopt.hxx:37
bool GetSkipEmpty() const
Definition: printopt.hxx:36
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
bool bForceBreaks
Definition: printopt.hxx:31
void SetOptions(const ScPrintOptions &rNew)
Definition: printopt.cxx:144