LibreOffice Module sc (master)  1
typedstrdata.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #pragma once
11 
12 #include <rtl/ustring.hxx>
13 
14 #include <set>
15 
17 {
18 public:
19  enum StringType {
20  Value = 0,
21  Standard = 1,
22  Name = 2,
23  DbName = 3,
24  Header = 4
25  };
26 
27  ScTypedStrData( const OUString& rStr, double nVal = 0.0, StringType eType = Standard,
28  bool bDate = false, bool mbIsFormatted = false, bool bDuplicated = false );
29 
30  bool IsDate() const { return mbIsDate;}
31  const OUString& GetString() const { return maStrValue;}
32  StringType GetStringType() const { return meStrType;}
33  double GetValue() const { return mfValue; }
34  bool IsDuplicated() const { return mbIsDuplicated; }
35 
37  {
38  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
39  };
40 
42  {
43  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
44  };
45 
47  {
48  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
49  };
50 
52  {
53  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
54  };
55 
56  bool operator< (const ScTypedStrData& r) const;
57 
58 private:
59  OUString maStrValue;
60  double mfValue;
62  bool mbIsDate;
63  bool mbIsFormatted; // true if the cell value is a formatted filter value
64  bool mbIsDuplicated; // true if the cell has a formatted filter value and has at least one duplicate formatted value.
65 };
66 
68 {
70  bool mbCaseSens;
71 public:
72  FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
73  bool operator() (const ScTypedStrData& r) const;
74 };
75 
76 typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
77 
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_uInt64 left
ScTypedStrData(const OUString &rStr, double nVal=0.0, StringType eType=Standard, bool bDate=false, bool mbIsFormatted=false, bool bDuplicated=false)
FindTypedStrData(const ScTypedStrData &rVal, bool bCaseSens)
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const
OUString maStrValue
double GetValue() const
def right
ScTypedStrData maVal
bool operator<(const ScTypedStrData &r) const
std::set< ScTypedStrData, ScTypedStrData::LessCaseSensitive > ScTypedCaseStrSet
StringType GetStringType() const
StringType meStrType
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const
bool IsDate() const
bool operator()(const ScTypedStrData &r) const
bool IsDuplicated() const
const OUString & GetString() const
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const