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/.
11 #include "cellmergeoption.hxx"
12 #include "address.hxx"
14 ScCellMergeOption::ScCellMergeOption(const ScRange
& rRange
) :
15 mnStartCol(rRange
.aStart
.Col()),
16 mnStartRow(rRange
.aStart
.Row()),
17 mnEndCol(rRange
.aEnd
.Col()),
18 mnEndRow(rRange
.aEnd
.Row()),
21 SCTAB nTab1
= rRange
.aStart
.Tab();
22 SCTAB nTab2
= rRange
.aEnd
.Tab();
23 for (SCTAB i
= nTab1
; i
<= nTab2
; ++i
)
27 ScCellMergeOption::ScCellMergeOption(SCCOL nStartCol
, SCROW nStartRow
, SCCOL nEndCol
, SCROW nEndRow
, bool bCenter
) :
28 mnStartCol(nStartCol
),
29 mnStartRow(nStartRow
),
36 ScCellMergeOption::ScCellMergeOption(const ScCellMergeOption
& r
) :
38 mnStartCol(r
.mnStartCol
),
39 mnStartRow(r
.mnStartRow
),
46 ScRange
ScCellMergeOption::getSingleRange(SCTAB nTab
) const
48 return ScRange(mnStartCol
, mnStartRow
, nTab
, mnEndCol
, mnEndRow
, nTab
);
51 ScRange
ScCellMergeOption::getFirstSingleRange() const
55 nTab
= *maTabs
.begin();
57 return getSingleRange(nTab
);
60 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */