1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_TYPEDSTRDATA_HXX
11 #define INCLUDED_SC_INC_TYPEDSTRDATA_HXX
13 #include <rtl/ustring.hxx>
29 ScTypedStrData( const OUString
& rStr
, double nVal
= 0.0,
30 StringType eType
= Standard
, bool bDate
= false );
32 ScTypedStrData( const ScTypedStrData
& rCpy
);
34 bool IsDate() const { return mbIsDate
;}
35 const OUString
& GetString() const { return maStrValue
;}
36 StringType
GetStringType() const { return meStrType
;}
37 double GetValue() const { return mfValue
; }
39 struct LessCaseSensitive
: std::binary_function
<ScTypedStrData
, ScTypedStrData
, bool>
41 bool operator() (const ScTypedStrData
& left
, const ScTypedStrData
& right
) const;
44 struct LessCaseInsensitive
: std::binary_function
<ScTypedStrData
, ScTypedStrData
, bool>
46 bool operator() (const ScTypedStrData
& left
, const ScTypedStrData
& right
) const;
49 struct EqualCaseSensitive
: std::binary_function
<ScTypedStrData
, ScTypedStrData
, bool>
51 bool operator() (const ScTypedStrData
& left
, const ScTypedStrData
& right
) const;
54 struct EqualCaseInsensitive
: std::binary_function
<ScTypedStrData
, ScTypedStrData
, bool>
56 bool operator() (const ScTypedStrData
& left
, const ScTypedStrData
& right
) const;
59 bool operator< (const ScTypedStrData
& r
) const;
68 class FindTypedStrData
: public std::unary_function
<ScTypedStrData
, bool>
73 FindTypedStrData(const ScTypedStrData
& rVal
, bool bCaseSens
);
74 bool operator() (const ScTypedStrData
& r
) const;
77 typedef std::set
<ScTypedStrData
, ScTypedStrData::LessCaseSensitive
> ScTypedCaseStrSet
;
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */