LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sc / inc / typedstrdata.hxx
blobc1a3738ce7fe37f4c2b07cb26ec77b1209169090
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 <rtl/ustring.hxx>
14 #include <set>
16 class ScTypedStrData
18 public:
19 enum StringType {
20 Value,
21 MRU,
22 Standard,
23 Name,
24 DbName,
25 Header
28 ScTypedStrData( const OUString& rStr, double fVal = 0.0, double fRVal = 0.0, StringType eType = Standard,
29 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; }
35 double GetRoundedValue() const { return mfRoundedValue; }
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 double mfRoundedValue; // rounded value by format code
63 StringType meStrType;
64 bool mbIsDate;
67 class FindTypedStrData
69 ScTypedStrData maVal;
70 bool mbCaseSens;
71 public:
72 FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
73 bool operator() (const ScTypedStrData& r) const;
76 typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */