2018-01-22 22:38:48 +08:00
|
|
|
// Copyright (c) 2014-2018 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
|
2017-04-21 02:03:03 +08:00
|
|
|
|
2014-05-21 22:20:30 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
|
|
|
|
2017-04-21 02:03:03 +08:00
|
|
|
#include <xlnt/xlnt_config.hpp>
|
2015-11-21 09:41:32 +08:00
|
|
|
#include <xlnt/cell/index_types.hpp>
|
2016-08-03 12:12:18 +08:00
|
|
|
#include <xlnt/utils/path.hpp>
|
2014-05-22 05:48:51 +08:00
|
|
|
|
2014-05-21 22:20:30 +08:00
|
|
|
namespace xlnt {
|
|
|
|
|
2016-10-26 08:21:58 +08:00
|
|
|
struct XLNT_API constants
|
2014-05-21 22:20:30 +08:00
|
|
|
{
|
2016-07-23 08:26:02 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Returns the lowest allowable row index in a worksheet.
|
|
|
|
/// </summary>
|
2016-11-01 08:48:43 +08:00
|
|
|
static row_t min_row();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the largest allowable row index in a worksheet.
|
|
|
|
/// </summary>
|
2016-11-01 08:48:43 +08:00
|
|
|
static row_t max_row();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the lowest allowable column index in a worksheet.
|
|
|
|
/// </summary>
|
|
|
|
static const column_t min_column();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the largest allowable column index in a worksheet.
|
|
|
|
/// </summary>
|
|
|
|
static const column_t max_column();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing package properties.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path package_properties();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing SpreatsheetML package parts.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path package_xl();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing root relationships package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path package_root_rels();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing package themes.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path package_theme();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing package worksheets.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path package_worksheets();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
2016-10-30 04:31:30 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the directory containing package worksheets.
|
|
|
|
/// </summary>
|
|
|
|
static const path package_drawings();
|
|
|
|
|
2016-07-23 08:26:02 +08:00
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the content types package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_content_types();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the core properties package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_core();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the app properties package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_app();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the workbook package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_workbook();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the root relationships package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_root_relationships();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the styles package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_styles();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the theme package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_theme();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the URI of the shared strings package part.
|
|
|
|
/// </summary>
|
2016-08-03 12:12:18 +08:00
|
|
|
static const path part_shared_strings();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns an unordered_map mapping namespace names to namespaces.
|
|
|
|
/// </summary>
|
2016-12-02 21:37:50 +08:00
|
|
|
static const std::unordered_map<std::string, std::string> &namespaces();
|
2016-07-23 08:26:02 +08:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Returns the namespace URI from a namespace name.
|
|
|
|
/// </summary>
|
2017-01-11 09:25:59 +08:00
|
|
|
static const std::string &ns(const std::string &id);
|
2014-05-21 22:20:30 +08:00
|
|
|
};
|
2015-11-01 22:43:01 +08:00
|
|
|
|
2014-05-21 22:20:30 +08:00
|
|
|
} // namespace xlnt
|