LibreOffice Module sc (master)
1
sc
source
ui
sparklines
SparklineData.cxx
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
*/
10
11
#include <
SparklineData.hxx
>
12
13
namespace
sc
14
{
15
RangeOrientation
calculateOrientation
(sal_Int32 nOutputSize,
ScRange
const
& rInputRange)
16
{
17
sal_Int32 nRowSize = rInputRange.
aEnd
.
Row
() - rInputRange.
aStart
.
Row
();
18
sal_Int32 nColSize = rInputRange.
aEnd
.
Col
() - rInputRange.
aStart
.
Col
();
19
20
auto
eInputOrientation =
RangeOrientation::Unknown
;
21
if
(nOutputSize == nRowSize)
22
eInputOrientation =
RangeOrientation::Row
;
23
else
if
(nOutputSize == nColSize)
24
eInputOrientation =
RangeOrientation::Col
;
25
return
eInputOrientation;
26
}
27
28
}
// end sc
29
30
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SparklineData.hxx
ScAddress::Row
SCROW Row() const
Definition:
address.hxx:274
ScAddress::Col
SCCOL Col() const
Definition:
address.hxx:279
ScRange
Definition:
address.hxx:495
ScRange::aEnd
ScAddress aEnd
Definition:
address.hxx:498
ScRange::aStart
ScAddress aStart
Definition:
address.hxx:497
sc
CAUTION! The following defines must be in the same namespace as the respective type.
Definition:
broadcast.cxx:15
sc::RangeOrientation
RangeOrientation
Definition:
SparklineData.hxx:32
sc::RangeOrientation::Col
@ Col
sc::RangeOrientation::Unknown
@ Unknown
sc::RangeOrientation::Row
@ Row
sc::calculateOrientation
RangeOrientation calculateOrientation(sal_Int32 nOutputSize, ScRange const &rInputRange)
Determine the sparkline group orientation for the input data the output size.
Definition:
SparklineData.cxx:15
Generated on Sun Jul 30 2023 04:29:28 for LibreOffice Module sc (master) by
1.9.3