Bump version to 6.4-15
[LibreOffice.git] / sc / inc / typedstrdata.hxx
blob5b82478c3385d47a4921e707d02374202be669e8
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 #ifndef INCLUDED_SC_INC_TYPEDSTRDATA_HXX
11 #define INCLUDED_SC_INC_TYPEDSTRDATA_HXX
13 #include <rtl/ustring.hxx>
15 #include <set>
17 class ScTypedStrData
19 public:
20 enum StringType {
21 Value = 0,
22 Standard = 1,
23 Name = 2,
24 DbName = 3,
25 Header = 4
28 ScTypedStrData( const OUString& rStr, double nVal = 0.0,
29 StringType eType = Standard, bool bDate = false );
31 bool IsDate() const { return mbIsDate;}
32 const OUString& GetString() const { return maStrValue;}
33 StringType GetStringType() const { return meStrType;}
34 double GetValue() const { return mfValue; }
36 struct LessCaseSensitive
38 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
41 struct LessCaseInsensitive
43 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
46 struct EqualCaseSensitive
48 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
51 struct EqualCaseInsensitive
53 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
56 bool operator< (const ScTypedStrData& r) const;
58 private:
59 OUString maStrValue;
60 double mfValue;
61 StringType meStrType;
62 bool mbIsDate;
65 class FindTypedStrData
67 ScTypedStrData const maVal;
68 bool const mbCaseSens;
69 public:
70 FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
71 bool operator() (const ScTypedStrData& r) const;
74 typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
76 #endif
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */