1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include <cellmergeoption.hxx>
11 #include <address.hxx>
13 ScCellMergeOption::ScCellMergeOption(const ScRange
& rRange
) :
14 mnStartCol(rRange
.aStart
.Col()),
15 mnStartRow(rRange
.aStart
.Row()),
16 mnEndCol(rRange
.aEnd
.Col()),
17 mnEndRow(rRange
.aEnd
.Row()),
20 SCTAB nTab1
= rRange
.aStart
.Tab();
21 SCTAB nTab2
= rRange
.aEnd
.Tab();
22 for (SCTAB i
= nTab1
; i
<= nTab2
; ++i
)
26 ScCellMergeOption::ScCellMergeOption(SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
, bool bCenter
) :
27 mnStartCol(nStartCol
),
28 mnStartRow(nStartRow
),
35 ScRange
ScCellMergeOption::getSingleRange(SCTAB nTab
) const
37 return ScRange(mnStartCol
, mnStartRow
, nTab
, mnEndCol
, mnEndRow
, nTab
);
40 ScRange
ScCellMergeOption::getFirstSingleRange() const
44 nTab
= *maTabs
.begin();
46 return getSingleRange(nTab
);
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */