Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sc / inc / typedstrdata.hxx
blob1572f2eb3dd28b0f88678f1ce9cc045db8fcae22
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>
14 #include "scdllapi.h"
16 #include <set>
18 class ScTypedStrData
20 public:
21 enum StringType {
22 Value = 0,
23 Standard = 1,
24 Name = 2,
25 DbName = 3,
26 Header = 4
29 ScTypedStrData( const OUString& rStr, double nVal = 0.0,
30 StringType eType = Standard, bool bDate = false );
32 bool IsDate() const { return mbIsDate;}
33 const OUString& GetString() const { return maStrValue;}
34 StringType GetStringType() const { return meStrType;}
35 double GetValue() const { return mfValue; }
37 struct LessCaseSensitive
39 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
42 struct LessCaseInsensitive
44 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
47 struct EqualCaseSensitive
49 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
52 struct EqualCaseInsensitive
54 bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
57 bool operator< (const ScTypedStrData& r) const;
59 private:
60 OUString maStrValue;
61 double mfValue;
62 StringType meStrType;
63 bool mbIsDate;
66 class FindTypedStrData
68 ScTypedStrData maVal;
69 bool mbCaseSens;
70 public:
71 FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
72 bool operator() (const ScTypedStrData& r) const;
75 typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */