LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / columnset.hxx
blob2ae8ab01060bec0022fc0ff23949c0a8a0989ce3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
10 #pragma once
12 #include "types.hxx"
14 #include <unordered_set>
15 #include <unordered_map>
16 #include <vector>
18 namespace sc
20 /**
21 * Simple container to keep track of sheet - column pair.
23 class ColumnSet
25 typedef std::unordered_set<SCCOL> ColsType;
26 typedef std::unordered_map<SCTAB, ColsType> TabsType;
27 TabsType maTabs;
29 public:
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;
37 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */