2015-12-25 06:10:02 +08:00
|
|
|
// Copyright (c) 2014-2016 Thomas Fussell
|
2015-12-25 04:51:11 +08:00
|
|
|
//
|
|
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
|
|
// in the Software without restriction, including without limitation the rights
|
|
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
|
|
// furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, WRISING FROM,
|
|
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
// THE SOFTWARE
|
|
|
|
//
|
|
|
|
// @license: http://www.opensource.org/licenses/mit-license.php
|
|
|
|
// @author: see AUTHORS file
|
2014-05-31 06:42:25 +08:00
|
|
|
#pragma once
|
|
|
|
|
2015-10-14 04:35:22 +08:00
|
|
|
#include <cstdlib>
|
|
|
|
|
2014-08-14 06:56:34 +08:00
|
|
|
#include <xlnt/cell/cell.hpp>
|
2016-05-12 07:24:53 +08:00
|
|
|
#include <xlnt/cell/text.hpp>
|
2014-08-14 06:56:34 +08:00
|
|
|
#include <xlnt/cell/comment.hpp>
|
2015-11-21 09:41:32 +08:00
|
|
|
#include <xlnt/cell/index_types.hpp>
|
2015-11-11 07:58:54 +08:00
|
|
|
#include <xlnt/utils/exceptions.hpp>
|
2015-11-20 11:54:54 +08:00
|
|
|
#include <xlnt/utils/time.hpp>
|
2015-11-03 21:38:09 +08:00
|
|
|
#include <xlnt/packaging/relationship.hpp>
|
2015-10-19 03:30:46 +08:00
|
|
|
#include <xlnt/styles/number_format.hpp>
|
2014-05-31 06:42:25 +08:00
|
|
|
|
2015-11-11 07:58:54 +08:00
|
|
|
#include "comment_impl.hpp"
|
2015-10-14 01:56:07 +08:00
|
|
|
|
2014-05-31 06:42:25 +08:00
|
|
|
namespace xlnt {
|
|
|
|
|
|
|
|
class style;
|
|
|
|
|
|
|
|
namespace detail {
|
2014-06-06 05:42:15 +08:00
|
|
|
|
|
|
|
struct worksheet_impl;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-05-31 06:42:25 +08:00
|
|
|
struct cell_impl
|
|
|
|
{
|
|
|
|
cell_impl();
|
2015-10-14 01:56:07 +08:00
|
|
|
cell_impl(column_t column, row_t row);
|
|
|
|
cell_impl(worksheet_impl *parent, column_t column, row_t row);
|
2014-06-13 05:04:37 +08:00
|
|
|
cell_impl(const cell_impl &rhs);
|
|
|
|
cell_impl &operator=(const cell_impl &rhs);
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-11-23 01:41:27 +08:00
|
|
|
cell self();
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
cell::type type_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-06-06 05:42:15 +08:00
|
|
|
worksheet_impl *parent_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-07-26 04:39:25 +08:00
|
|
|
column_t column_;
|
|
|
|
row_t row_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2016-05-12 07:24:53 +08:00
|
|
|
text value_text_;
|
2015-10-14 01:56:07 +08:00
|
|
|
long double value_numeric_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-11-11 07:58:54 +08:00
|
|
|
std::string formula_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-06-12 04:41:34 +08:00
|
|
|
bool has_hyperlink_;
|
2015-10-14 01:56:07 +08:00
|
|
|
relationship hyperlink_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
bool is_merged_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2016-05-15 01:57:07 +08:00
|
|
|
bool has_format_;
|
|
|
|
std::size_t format_id_;
|
2016-06-11 01:40:50 +08:00
|
|
|
|
|
|
|
bool has_style_;
|
|
|
|
std::size_t style_id_;
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2015-10-14 01:56:07 +08:00
|
|
|
std::unique_ptr<comment_impl> comment_;
|
2014-05-31 06:42:25 +08:00
|
|
|
};
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-05-31 06:42:25 +08:00
|
|
|
} // namespace detail
|
|
|
|
} // namespace xlnt
|