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>
24#include "scdllapi.h"
25
27{
28private:
32
33public:
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{
52public:
53 ScTpPrintItem( const ScPrintOptions& rOpt );
54 virtual ~ScTpPrintItem() override;
55
56 ScTpPrintItem(ScTpPrintItem const &) = 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
66private:
68};
69
70// config item
71
72class ScPrintCfg final : private ScPrintOptions, public utl::ConfigItem
73{
74private:
75 static css::uno::Sequence<OUString> GetPropertyNames();
76 void ReadCfg();
77 virtual void ImplCommit() override;
78
79public:
80 ScPrintCfg();
81
82 const ScPrintOptions& GetOptions() const { return *this; }
83 void SetOptions( const ScPrintOptions& rNew );
84
85 virtual void Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
86};
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void ReadCfg()
Definition: printopt.cxx:94
void SetOptions(const ScPrintOptions &rNew)
Definition: printopt.cxx:122
static css::uno::Sequence< OUString > GetPropertyNames()
Definition: printopt.cxx:79
const ScPrintOptions & GetOptions() const
Definition: printopt.hxx:82
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: printopt.cxx:129
virtual void ImplCommit() override
Definition: printopt.cxx:110
bool bForceBreaks
Definition: printopt.hxx:31
bool GetSkipEmpty() const
Definition: printopt.hxx:36
void SetSkipEmpty(bool bVal)
Definition: printopt.hxx:37
bool GetForceBreaks() const
Definition: printopt.hxx:40
void SetAllSheets(bool bVal)
Definition: printopt.hxx:39
void SetForceBreaks(bool bVal)
Definition: printopt.hxx:41
bool GetAllSheets() const
Definition: printopt.hxx:38
ScTpPrintItem(ScTpPrintItem const &)=default
ScTpPrintItem(ScTpPrintItem &&)=default
const ScPrintOptions & GetPrintOptions() const
Definition: printopt.hxx:64
ScPrintOptions theOptions
Definition: printopt.hxx:67
css::uno::Reference< css::animations::XAnimationNode > Clone(const css::uno::Reference< css::animations::XAnimationNode > &xSourceNode, const SdPage *pSource=nullptr, const SdPage *pTarget=nullptr)
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
bool operator==(const XclFontData &rLeft, const XclFontData &rRight)
Definition: xlstyle.cxx:519