LibreOffice Module sc (master) 1
prnsave.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 "address.hxx"
23#include <optional>
24#include <memory>
25#include <vector>
26
27namespace tools { class JsonWriter; }
28
30{
31 typedef ::std::vector< ScRange > ScRangeVec;
32
34 std::optional<ScRange> moRepeatCol;
35 std::optional<ScRange> moRepeatRow;
37
38public:
41
42 void SetAreas( ScRangeVec&& rRanges, bool bEntireSheet );
43 void SetRepeat( std::optional<ScRange> oCol, std::optional<ScRange> oRow );
44
45 const ScRangeVec& GetPrintRanges() const { return maPrintRanges; }
46 bool IsEntireSheet() const { return mbEntireSheet; }
47 const std::optional<ScRange>& GetRepeatCol() const { return moRepeatCol; }
48 const std::optional<ScRange>& GetRepeatRow() const { return moRepeatRow; }
49
50 bool operator==( const ScPrintSaverTab& rCmp ) const;
51};
52
54{
56 std::unique_ptr<ScPrintSaverTab[]> pData;
57
58public:
59 ScPrintRangeSaver( SCTAB nCount );
61
62 SCTAB GetTabCount() const { return nTabCount; }
64 const ScPrintSaverTab& GetTabData(SCTAB nTab) const;
65 void GetPrintRangesInfo(tools::JsonWriter& rPrintRanges) const;
66
67 bool operator==( const ScPrintRangeSaver& rCmp ) const;
68};
69
70/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScPrintSaverTab & GetTabData(SCTAB nTab)
Definition: prnsave.cxx:71
void GetPrintRangesInfo(tools::JsonWriter &rPrintRanges) const
Definition: prnsave.cxx:83
std::unique_ptr< ScPrintSaverTab[]> pData
Definition: prnsave.hxx:56
bool operator==(const ScPrintRangeSaver &rCmp) const
Definition: prnsave.cxx:114
ScPrintRangeSaver(SCTAB nCount)
Definition: prnsave.cxx:60
SCTAB GetTabCount() const
Definition: prnsave.hxx:62
ScRangeVec maPrintRanges
Array.
Definition: prnsave.hxx:33
std::optional< ScRange > moRepeatCol
single
Definition: prnsave.hxx:34
std::optional< ScRange > moRepeatRow
single
Definition: prnsave.hxx:35
const std::optional< ScRange > & GetRepeatCol() const
Definition: prnsave.hxx:47
bool IsEntireSheet() const
Definition: prnsave.hxx:46
::std::vector< ScRange > ScRangeVec
Definition: prnsave.hxx:31
bool operator==(const ScPrintSaverTab &rCmp) const
Definition: prnsave.cxx:49
const std::optional< ScRange > & GetRepeatRow() const
Definition: prnsave.hxx:48
const ScRangeVec & GetPrintRanges() const
Definition: prnsave.hxx:45
bool mbEntireSheet
Definition: prnsave.hxx:36
void SetRepeat(std::optional< ScRange > oCol, std::optional< ScRange > oRow)
Definition: prnsave.cxx:43
void SetAreas(ScRangeVec &&rRanges, bool bEntireSheet)
Definition: prnsave.cxx:37
sal_Int16 SCTAB
Definition: types.hxx:22