LibreOffice Module sc (master) 1
columnset.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
10#pragma once
11
12#include "types.hxx"
13
14#include <unordered_set>
15#include <unordered_map>
16#include <vector>
17
18namespace sc
19{
24{
25 typedef std::unordered_set<SCCOL> ColsType;
26 typedef std::unordered_map<SCTAB, ColsType> TabsType;
28
29public:
30 void set(SCTAB nTab, SCCOL nCol);
31 void getColumns(SCTAB nTab, std::vector<SCCOL>& rCols) const;
32 bool hasTab(SCTAB nTab) const;
33 bool empty() const;
34};
35}
36
37/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Simple container to keep track of sheet - column pair.
Definition: columnset.hxx:24
TabsType maTabs
Definition: columnset.hxx:27
std::unordered_set< SCCOL > ColsType
Definition: columnset.hxx:25
std::unordered_map< SCTAB, ColsType > TabsType
Definition: columnset.hxx:26
bool hasTab(SCTAB nTab) const
Definition: columnset.cxx:55
void getColumns(SCTAB nTab, std::vector< SCCOL > &rCols) const
Definition: columnset.cxx:34
bool empty() const
Definition: columnset.cxx:60
void set(SCTAB nTab, SCCOL nCol)
Definition: columnset.cxx:15
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15
sal_Int16 SCTAB
Definition: types.hxx:22
sal_Int16 SCCOL
Definition: types.hxx:21