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 {
21  MRU,
26  };
27 
29  OUString&& rStr, double fVal = 0.0, double fRVal = 0.0, StringType nType = Standard, bool bDate = false ) :
30  maStrValue(std::move(rStr)),
31  mfValue(fVal),
32  mfRoundedValue(fRVal),
34  mbIsDate( bDate ) {}
35 
36  ScTypedStrData( const OUString& rStr, double fVal = 0.0, double fRVal = 0.0, StringType eType = Standard,
37  bool bDate = false );
38 
39  bool IsDate() const { return mbIsDate;}
40  const OUString& GetString() const { return maStrValue;}
41  StringType GetStringType() const { return meStrType;}
42  double GetValue() const { return mfValue; }
43  double GetRoundedValue() const { return mfRoundedValue; }
44 
46  {
47  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
48  };
49 
51  {
52  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
53  };
54 
56  {
57  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
58  };
59 
61  {
62  bool operator() (const ScTypedStrData& left, const ScTypedStrData& right) const;
63  };
64 
65  bool operator< (const ScTypedStrData& r) const;
66 
67 private:
68  OUString maStrValue;
69  double mfValue;
70  double mfRoundedValue; // rounded value by format code
72  bool mbIsDate;
73 };
74 
76 {
78  bool mbCaseSens;
79 public:
80  FindTypedStrData(const ScTypedStrData& rVal, bool bCaseSens);
81  bool operator() (const ScTypedStrData& r) const;
82 };
83 
84 typedef std::set<ScTypedStrData, ScTypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
85 
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScTypedStrData(OUString &&rStr, double fVal=0.0, double fRVal=0.0, StringType nType=Standard, bool bDate=false)
sal_uInt64 left
double mfRoundedValue
FindTypedStrData(const ScTypedStrData &rVal, bool bCaseSens)
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const
OUString maStrValue
double GetValue() const
OString right
double GetRoundedValue() const
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
QPRO_FUNC_TYPE nType
Definition: qproform.cxx:398
bool operator()(const ScTypedStrData &r) const
const OUString & GetString() const
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const
bool operator()(const ScTypedStrData &left, const ScTypedStrData &right) const