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 #ifndef SC_COLUMNSPANSET_HXX
11 #define SC_COLUMNSPANSET_HXX
13 #include "address.hxx"
16 #include <mdds/flat_segment_tree.hpp>
17 #include <boost/noncopyable.hpp>
22 * Structure that stores segments of boolean flags per column, and perform
23 * custom action on those segments.
25 class ColumnSpanSet
: boost::noncopyable
27 typedef mdds::flat_segment_tree
<SCROW
, bool> ColumnSpansType
;
28 typedef std::vector
<ColumnSpansType
*> TableType
;
29 typedef std::vector
<TableType
*> DocType
;
33 ColumnSpansType
& getColumnSpans(SCTAB nTab
, SCCOL nCol
);
39 virtual ~Action() = 0;
40 virtual void startColumn(SCTAB nTab
, SCCOL nCol
);
41 virtual void execute(const ScAddress
& rPos
, SCROW nLength
, bool bVal
) = 0;
46 void set(SCTAB nTab
, SCCOL nCol
, SCROW nRow
, bool bVal
);
47 void set(SCTAB nTab
, SCCOL nCol
, SCROW nRow1
, SCROW nRow2
, bool bVal
);
49 void executeFromTop(Action
& ac
) const;
56 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */