ofz: Use-of-uninitialized-value
[LibreOffice.git] / sc / inc / filterentries.hxx
blob02110c879b03d3928f611a330b2e855232673d55
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
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 <sal/config.h>
13 #include "typedstrdata.hxx"
14 #include <vector>
15 #include <tools/color.hxx>
17 struct ScFilterEntries
19 std::vector<ScTypedStrData> maStrData;
20 bool mbHasDates;
21 bool mbHasEmpties;
22 std::set<Color> maTextColors;
23 std::set<Color> maBackgroundColors;
25 ScFilterEntries() : mbHasDates(false), mbHasEmpties(false) {}
27 std::vector<ScTypedStrData>::iterator begin() { return maStrData.begin(); }
28 std::vector<ScTypedStrData>::iterator end() { return maStrData.end(); }
29 std::vector<ScTypedStrData>::const_iterator begin() const { return maStrData.begin(); }
30 std::vector<ScTypedStrData>::const_iterator end() const { return maStrData.end(); }
31 std::vector<ScTypedStrData>::size_type size() const { return maStrData.size(); }
32 ScTypedStrData& front() { return maStrData.front(); }
33 const ScTypedStrData& front() const { return maStrData.front(); }
34 bool empty() const { return maStrData.empty(); }
35 void push_back( const ScTypedStrData& r ) { maStrData.push_back(r); }
36 void push_back( ScTypedStrData&& r ) { maStrData.push_back(r); }
37 std::set<Color>& getTextColors() { return maTextColors; };
38 void addTextColor(const Color& aTextColor) { maTextColors.emplace(aTextColor); }
39 std::set<Color>& getBackgroundColors() { return maBackgroundColors; };
40 void addBackgroundColor(const Color& aBackgroundColor)
42 maBackgroundColors.emplace(aBackgroundColor);
46 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */