summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-02-08 21:25:19 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-02-08 21:45:27 -0500
commite8e436771c94f6a58a10818b4eeb5861ddeb5f37 (patch)
tree8222cb1a3e939ca7170d5a39b1b8a2a89d56ca3d /sc/inc
parentcdd5a599be02c1b1cae5344e190aabdb3e7953a7 (diff)
Moved TypedStrData into its own files.
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/collect.hxx65
-rw-r--r--sc/inc/document.hxx2
-rw-r--r--sc/inc/typedstrdata.hxx101
3 files changed, 102 insertions, 66 deletions
diff --git a/sc/inc/collect.hxx b/sc/inc/collect.hxx
index 3dc738fcd85f..608b22a17c04 100644
--- a/sc/inc/collect.hxx
+++ b/sc/inc/collect.hxx
@@ -30,9 +30,6 @@
#define SC_COLLECT_HXX
#include "scdllapi.h"
-#include "rtl/ustring.hxx"
-
-#include <set>
class SC_DLLPUBLIC ScDataObject
{
@@ -71,68 +68,6 @@ public:
ScCollection& operator=( const ScCollection& rCol );
};
-class TypedStrData
-{
-public:
- enum StringType {
- Value = 0,
- Standard = 1,
- Name = 2,
- DbName = 3,
- Header = 4
- };
-
- TypedStrData( const rtl::OUString& rStr, double nVal = 0.0,
- StringType eType = Standard );
-
- TypedStrData( const TypedStrData& rCpy );
-
- bool IsStrData() const;
- SC_DLLPUBLIC const rtl::OUString& GetString() const;
- double GetValue() const;
- StringType GetStringType() const;
-
- struct LessCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool>
- {
- bool operator() (const TypedStrData& left, const TypedStrData& right) const;
- };
-
- struct LessCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool>
- {
- bool operator() (const TypedStrData& left, const TypedStrData& right) const;
- };
-
- struct EqualCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool>
- {
- bool operator() (const TypedStrData& left, const TypedStrData& right) const;
- };
-
- struct EqualCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool>
- {
- bool operator() (const TypedStrData& left, const TypedStrData& right) const;
- };
-
- bool operator== (const TypedStrData& r) const;
- bool operator< (const TypedStrData& r) const;
-
-
-private:
- rtl::OUString maStrValue;
- double mfValue;
- StringType meStrType;
-};
-
-class FindTypedStrData : std::unary_function<TypedStrData, bool>
-{
- TypedStrData maVal;
- bool mbCaseSens;
-public:
- FindTypedStrData(const TypedStrData& rVal, bool bCaseSens);
- bool operator() (const TypedStrData& r) const;
-};
-
-typedef std::set<TypedStrData, TypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 2e89c833dbd5..a796c3294098 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -44,7 +44,7 @@
#include "formula/grammar.hxx"
#include <com/sun/star/chart2/XChartDocument.hpp>
#include "scdllapi.h"
-#include "collect.hxx"
+#include "typedstrdata.hxx"
#include <memory>
#include <map>
diff --git a/sc/inc/typedstrdata.hxx b/sc/inc/typedstrdata.hxx
new file mode 100644
index 000000000000..2e7d28a3fde9
--- /dev/null
+++ b/sc/inc/typedstrdata.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Kohei Yoshida <kohei.yoshida@suse.com>
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef __SC_TYPEDSTRDATA_HXX__
+#define __SC_TYPEDSTRDATA_HXX__
+
+#include "rtl/ustring.hxx"
+#include "scdllapi.h"
+
+#include <set>
+
+class TypedStrData
+{
+public:
+ enum StringType {
+ Value = 0,
+ Standard = 1,
+ Name = 2,
+ DbName = 3,
+ Header = 4
+ };
+
+ TypedStrData( const rtl::OUString& rStr, double nVal = 0.0,
+ StringType eType = Standard );
+
+ TypedStrData( const TypedStrData& rCpy );
+
+ bool IsStrData() const;
+ SC_DLLPUBLIC const rtl::OUString& GetString() const;
+ double GetValue() const;
+ StringType GetStringType() const;
+
+ struct LessCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool>
+ {
+ bool operator() (const TypedStrData& left, const TypedStrData& right) const;
+ };
+
+ struct LessCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool>
+ {
+ bool operator() (const TypedStrData& left, const TypedStrData& right) const;
+ };
+
+ struct EqualCaseSensitive : std::binary_function<TypedStrData, TypedStrData, bool>
+ {
+ bool operator() (const TypedStrData& left, const TypedStrData& right) const;
+ };
+
+ struct EqualCaseInsensitive : std::binary_function<TypedStrData, TypedStrData, bool>
+ {
+ bool operator() (const TypedStrData& left, const TypedStrData& right) const;
+ };
+
+ bool operator== (const TypedStrData& r) const;
+ bool operator< (const TypedStrData& r) const;
+
+
+private:
+ rtl::OUString maStrValue;
+ double mfValue;
+ StringType meStrType;
+};
+
+class FindTypedStrData : std::unary_function<TypedStrData, bool>
+{
+ TypedStrData maVal;
+ bool mbCaseSens;
+public:
+ FindTypedStrData(const TypedStrData& rVal, bool bCaseSens);
+ bool operator() (const TypedStrData& r) const;
+};
+
+typedef std::set<TypedStrData, TypedStrData::LessCaseSensitive> ScTypedCaseStrSet;
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */