mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-03-01 00:31:50 +08:00
Compare commits
19 Commits
core-win-6
...
core-linux
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ac71aff74 | |||
| 5ae7acb65c | |||
| 33f07d69ad | |||
| 187bf8823a | |||
| cd7c85967c | |||
| 045b00ad5a | |||
| 9b5784e344 | |||
| 2b6650dde1 | |||
| ff8ecb2d2f | |||
| 5893b93e3a | |||
| c462f522d6 | |||
| 678ec98721 | |||
| c17fa8462d | |||
| 04eda04870 | |||
| 0295ef2d54 | |||
| 797b745b35 | |||
| 37c276b736 | |||
| 41ea42459a | |||
| bc68323506 |
@ -33,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../include/cpdoccore/CPScopedPtr.h"
|
||||
#include "../include/CPScopedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace formulasconvert {
|
||||
|
||||
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
// поиск ближайшего цвета из
|
||||
// Black, Green, White, Blue, Magenta, Yellow, Cyan, Red
|
||||
std::wstring RGBToString(int r, int g, int b);
|
||||
|
||||
// разбор HEX-строки с цветом
|
||||
bool HEXStringToRGB(std::wstring const & str, int &r, int &g, int &b);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
// поиск ближайшего цвета из
|
||||
// Black, Green, White, Blue, Magenta, Yellow, Cyan, Red
|
||||
std::wstring RGBToString(int r, int g, int b);
|
||||
|
||||
// разбор HEX-строки с цветом
|
||||
bool HEXStringToRGB(std::wstring const & str, int &r, int &g, int &b);
|
||||
|
||||
}
|
||||
|
||||
@ -1,40 +1,40 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
typedef ::boost::noncopyable noncopyable;
|
||||
|
||||
} // namespace cpdoccore
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
typedef ::boost::noncopyable noncopyable;
|
||||
|
||||
} // namespace cpdoccore
|
||||
@ -1,48 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/optional/optional_io.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
/// внешнее объявление для Optional, используем boost::optional
|
||||
|
||||
template <class T>
|
||||
struct optional
|
||||
{
|
||||
typedef T Base;
|
||||
typedef boost::optional<T> Type;
|
||||
};
|
||||
|
||||
|
||||
#define _CP_OPT(V) optional<V>::Type
|
||||
|
||||
@ -1,46 +1,46 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct scoped_ptr
|
||||
{
|
||||
typedef ::boost::scoped_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_SCOPED_PTR(T) scoped_ptr< T >::Type
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct scoped_ptr
|
||||
{
|
||||
typedef ::boost::scoped_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_SCOPED_PTR(T) scoped_ptr< T >::Type
|
||||
|
||||
}
|
||||
@ -1,48 +1,48 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct shared_ptr
|
||||
{
|
||||
typedef ::boost::shared_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_PTR(T) shared_ptr< T >::Type
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct shared_ptr
|
||||
{
|
||||
typedef ::boost::shared_ptr<T> Type;
|
||||
};
|
||||
|
||||
#define _CP_PTR(T) shared_ptr< T >::Type
|
||||
|
||||
}
|
||||
|
||||
@ -1,39 +1,39 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
std::string ansi_to_utf8(const std::string & _AnsiString);
|
||||
std::wstring utf8_to_utf16(const std::string & _Utf8String);
|
||||
std::string utf16_to_utf8(const std::wstring & _Utf16String);
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
std::string ansi_to_utf8(const std::string & _AnsiString);
|
||||
std::wstring utf8_to_utf16(const std::string & _Utf8String);
|
||||
std::string utf16_to_utf8(const std::wstring & _Utf16String);
|
||||
}
|
||||
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct weak_ptr
|
||||
{
|
||||
typedef ::boost::weak_ptr<T> Type;
|
||||
};
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <boost/weak_ptr.hpp>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
template <class T>
|
||||
struct weak_ptr
|
||||
{
|
||||
typedef ::boost::weak_ptr<T> Type;
|
||||
};
|
||||
|
||||
}
|
||||
@ -1,76 +1,76 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes;
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
// Базовый класс для элемента, который может быть прочитан sax-reader -ом
|
||||
// Для каждого элемента будут вызваны методы
|
||||
// add_attributes, add_child_element, add_text как колбеки для чтения соответствующих данных
|
||||
|
||||
class read_doc_element
|
||||
{
|
||||
public:
|
||||
bool read_sax( xml::sax * Reader);
|
||||
virtual ~read_doc_element() = 0;
|
||||
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
inline read_doc_element::~read_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes;
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
// Базовый класс для элемента, который может быть прочитан sax-reader -ом
|
||||
// Для каждого элемента будут вызваны методы
|
||||
// add_attributes, add_child_element, add_text как колбеки для чтения соответствующих данных
|
||||
|
||||
class read_doc_element
|
||||
{
|
||||
public:
|
||||
bool read_sax( xml::sax * Reader);
|
||||
virtual ~read_doc_element() = 0;
|
||||
|
||||
virtual void add_child_element ( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name) = 0;
|
||||
private:
|
||||
virtual void add_attributes ( const xml::attributes_wc_ptr & Attributes ) = 0;
|
||||
virtual void add_text (const std::wstring & Text) = 0;
|
||||
|
||||
};
|
||||
|
||||
inline read_doc_element::~read_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,45 +1,45 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include "logging.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
template <class T, class StringT>
|
||||
typename optional<T>::Type read_string( const StringT & Value );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../CPOptional.h"
|
||||
#include "logging.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
template <class T, class StringT>
|
||||
typename optional<T>::Type read_string( const StringT & Value );
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,62 +1,62 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
template <class StringT>
|
||||
class attributes;
|
||||
|
||||
typedef attributes< std::wstring > attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
class write_doc_element {
|
||||
public:
|
||||
virtual std::wostream & write_stream( std::wostream & _Wostream ) = 0;
|
||||
virtual ~write_doc_element() = 0;
|
||||
};
|
||||
|
||||
inline write_doc_element::~write_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
template <class StringT>
|
||||
class attributes;
|
||||
|
||||
typedef attributes< std::wstring > attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
}
|
||||
|
||||
namespace common {
|
||||
|
||||
class write_doc_element {
|
||||
public:
|
||||
virtual std::wostream & write_stream( std::wostream & _Wostream ) = 0;
|
||||
virtual ~write_doc_element() = 0;
|
||||
};
|
||||
|
||||
inline write_doc_element::~write_doc_element()
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,90 +1,90 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPScopedPtr.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml
|
||||
{
|
||||
class sax;
|
||||
}
|
||||
|
||||
namespace oox {
|
||||
class docx_conversion_context;
|
||||
class xlsx_conversion_context;
|
||||
class pptx_conversion_context;
|
||||
}
|
||||
|
||||
namespace odf_reader {
|
||||
|
||||
class odf_read_context;
|
||||
|
||||
class odf_document
|
||||
{
|
||||
public:
|
||||
odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring& Password, const ProgressCallback* CallBack);
|
||||
odf_document(xml::sax * Reader, const std::wstring & TempPath);
|
||||
|
||||
~odf_document();
|
||||
|
||||
odf_read_context & odf_context();
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context);
|
||||
bool xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
bool pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
const std::wstring & get_folder() const;
|
||||
const std::wstring & get_temp_folder() const;
|
||||
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
bool get_error();
|
||||
|
||||
class Impl;
|
||||
Impl * get_impl() { return impl_.get(); }
|
||||
|
||||
bool UpdateProgress(long Complete);
|
||||
|
||||
private:
|
||||
_CP_SCOPED_PTR(Impl) impl_;
|
||||
|
||||
};
|
||||
typedef shared_ptr<odf_document>::Type odf_document_ptr;
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPScopedPtr.h"
|
||||
|
||||
struct ProgressCallback;
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
namespace xml
|
||||
{
|
||||
class sax;
|
||||
}
|
||||
|
||||
namespace oox {
|
||||
class docx_conversion_context;
|
||||
class xlsx_conversion_context;
|
||||
class pptx_conversion_context;
|
||||
}
|
||||
|
||||
namespace odf_reader {
|
||||
|
||||
class odf_read_context;
|
||||
|
||||
class odf_document
|
||||
{
|
||||
public:
|
||||
odf_document(const std::wstring & SrcPath, const std::wstring & TempPath, const std::wstring& Password, const ProgressCallback* CallBack);
|
||||
odf_document(xml::sax * Reader, const std::wstring & TempPath);
|
||||
|
||||
~odf_document();
|
||||
|
||||
odf_read_context & odf_context();
|
||||
|
||||
bool docx_convert(oox::docx_conversion_context & Context);
|
||||
bool xlsx_convert(oox::xlsx_conversion_context & Context);
|
||||
bool pptx_convert(oox::pptx_conversion_context & Context);
|
||||
|
||||
const std::wstring & get_folder() const;
|
||||
const std::wstring & get_temp_folder() const;
|
||||
|
||||
int get_office_mime_type();
|
||||
bool get_encrypted();
|
||||
bool get_error();
|
||||
|
||||
class Impl;
|
||||
Impl * get_impl() { return impl_.get(); }
|
||||
|
||||
bool UpdateProgress(long Complete);
|
||||
|
||||
private:
|
||||
_CP_SCOPED_PTR(Impl) impl_;
|
||||
|
||||
};
|
||||
typedef shared_ptr<odf_document>::Type odf_document_ptr;
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,35 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
#define _CPDOCCORE_ODFFORMAT_H_
|
||||
|
||||
#endif // #ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
#define _CPDOCCORE_ODFFORMAT_H_
|
||||
|
||||
#endif // #ifndef _CPDOCCORE_ODFFORAMT_H_
|
||||
@ -1,34 +1,34 @@
|
||||
// Copyright 2006 Nemanja Trifunovic
|
||||
|
||||
/*
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
|
||||
#include "utf8/checked.h"
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
#endif // header guard
|
||||
// Copyright 2006 Nemanja Trifunovic
|
||||
|
||||
/*
|
||||
Permission is hereby granted, free of charge, to any person or organization
|
||||
obtaining a copy of the software and accompanying documentation covered by
|
||||
this license (the "Software") to use, reproduce, display, distribute,
|
||||
execute, and transmit the Software, and to prepare derivative works of the
|
||||
Software, and to permit third-parties to whom the Software is furnished to
|
||||
do so, all subject to the following:
|
||||
|
||||
The copyright notices in the Software and this entire statement, including
|
||||
the above license grant, this restriction and the following disclaimer,
|
||||
must be included in all copies of the Software, in whole or in part, and
|
||||
all derivative works of the Software, unless such copies or derivative
|
||||
works are solely in the form of machine-executable object code generated by
|
||||
a source language processor.
|
||||
|
||||
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
#define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731
|
||||
|
||||
#include "utf8/checked.h"
|
||||
#include "utf8/unchecked.h"
|
||||
|
||||
#endif // header guard
|
||||
@ -161,12 +161,12 @@ namespace utf8
|
||||
|
||||
template <typename octet_iterator>
|
||||
uint32_t prior(octet_iterator& it, octet_iterator start)
|
||||
{
|
||||
{
|
||||
// can't do much if it == start
|
||||
if (it == start)
|
||||
if (it == start)
|
||||
throw not_enough_room();
|
||||
|
||||
octet_iterator end = it;
|
||||
octet_iterator end = it;
|
||||
// Go back until we hit either a lead octet or start
|
||||
while (internal::is_trail(*(--it)))
|
||||
if (it == start)
|
||||
@ -1,259 +1,259 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../../cpdoccore/CPSharedPtr.h"
|
||||
#include "../../cpdoccore/CPOptional.h"
|
||||
#include "../../cpdoccore/xml/xmlchar.h"
|
||||
|
||||
#include "../../logging.h"
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
namespace odf_reader
|
||||
{
|
||||
struct _property
|
||||
{
|
||||
_property(std::wstring n, std::wstring s) { name_ = n; val_ = s;}
|
||||
_property(std::wstring n, bool b) { name_ = n; val_ = b;}
|
||||
_property(std::wstring n, int i) { name_ = n; val_ = i;}
|
||||
_property(std::wstring n, double d) {name_ = n;val_ = d;}
|
||||
|
||||
std::wstring name_;
|
||||
boost::variant<bool,std::wstring,double,int> val_;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
bool GetProperty(const std::vector<_property> & Heap, const std::wstring Name, T & Val)
|
||||
{
|
||||
typedef typename T::value_type T_value_type;
|
||||
|
||||
Val.reset();
|
||||
for (size_t i = 0 ; i < Heap.size(); i++)
|
||||
{
|
||||
if (Heap[i].name_ == Name )
|
||||
{
|
||||
try
|
||||
{
|
||||
Val = boost::get<T_value_type>(Heap[i].val_);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : incorrect type convert \'" << Name << L"\'\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
namespace xml
|
||||
{
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes
|
||||
{
|
||||
public:
|
||||
typedef optional<std::wstring>::Type value_type;
|
||||
typedef std::pair< std::wstring, std::wstring> key_value;
|
||||
|
||||
public:
|
||||
virtual value_type get(const std::wstring & QualifiedName) const = 0;
|
||||
|
||||
template <class V> typename optional<V>::Type get_val(const std::wstring & QualifiedName);
|
||||
|
||||
virtual const key_value & at(size_t _Pos) const = 0;
|
||||
virtual size_t size() const = 0;
|
||||
size_t length() const ;
|
||||
bool empty() const;
|
||||
|
||||
virtual void reset_check() const = 0;
|
||||
virtual bool check() const = 0;
|
||||
|
||||
virtual ~attributes() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class V>
|
||||
class attributes_get_val_impl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename optional<V>::Type optional_V_type;
|
||||
|
||||
static typename optional<V>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
try
|
||||
{
|
||||
return optional_V_type (boost::lexical_cast<V>( *val ) );
|
||||
//return common::read_string<V>( *val );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : could't read attribute \'" << QualifiedName << L"\'\n";
|
||||
}
|
||||
}
|
||||
|
||||
return optional_V_type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<bool>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef xml::xml_char<wchar_t> xml_char_value_type;
|
||||
|
||||
static optional<bool>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
tmp = XmlUtils::GetLower(tmp);
|
||||
return optional<bool>::Type((tmp == xml_char_value_type::trueVal));
|
||||
}
|
||||
else
|
||||
return optional<bool>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<char>
|
||||
{
|
||||
public:
|
||||
static optional<char>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<char>::Type( (tmp.size() > 0) ? tmp[0] : ' ');
|
||||
}
|
||||
else
|
||||
return optional<char>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<wchar_t>
|
||||
{
|
||||
public:
|
||||
static optional<wchar_t>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<wchar_t>::Type( (tmp.size() > 0) ? tmp[0] : L' ');
|
||||
}
|
||||
else
|
||||
return optional<wchar_t>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template <class V>
|
||||
inline typename optional<V>::Type attributes::get_val(const std::wstring & QualifiedName)
|
||||
{
|
||||
return attributes_get_val_impl<V>::get_val(*this, QualifiedName);
|
||||
}
|
||||
|
||||
inline attributes::~attributes()
|
||||
{}
|
||||
|
||||
inline size_t attributes::length() const
|
||||
{
|
||||
return this->size();
|
||||
}
|
||||
|
||||
inline bool attributes::empty() const
|
||||
{
|
||||
return (this->size() == 0);
|
||||
}
|
||||
|
||||
struct attributes_ptr
|
||||
{
|
||||
typedef shared_ptr< attributes >::Type Type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val)
|
||||
{
|
||||
Val = attr->get_val<typename T::value_type>(QualifiedName);
|
||||
return (!!Val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val, const T & Default)
|
||||
{
|
||||
typedef typename optional<T>::Type type_opt_t;
|
||||
type_opt_t tmp;
|
||||
try
|
||||
{
|
||||
tmp = attr->get_val<T>(QualifiedName);
|
||||
Val = tmp.get_value_or(Default);
|
||||
}catch(...)
|
||||
{
|
||||
}
|
||||
return (!!tmp);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
|
||||
#else
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), ##__VA_ARGS__)
|
||||
#endif
|
||||
attributes_wc_ptr read_attributes(sax * SaxReader);
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "../CPOptional.h"
|
||||
#include "../xml/xmlchar.h"
|
||||
|
||||
#include "../logging.h"
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "../../../../Common/DocxFormat/Source/XML/Utils.h"
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
namespace odf_reader
|
||||
{
|
||||
struct _property
|
||||
{
|
||||
_property(std::wstring n, std::wstring s) { name_ = n; val_ = s;}
|
||||
_property(std::wstring n, bool b) { name_ = n; val_ = b;}
|
||||
_property(std::wstring n, int i) { name_ = n; val_ = i;}
|
||||
_property(std::wstring n, double d) {name_ = n;val_ = d;}
|
||||
|
||||
std::wstring name_;
|
||||
boost::variant<bool,std::wstring,double,int> val_;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
bool GetProperty(const std::vector<_property> & Heap, const std::wstring Name, T & Val)
|
||||
{
|
||||
typedef typename T::value_type T_value_type;
|
||||
|
||||
Val.reset();
|
||||
for (size_t i = 0 ; i < Heap.size(); i++)
|
||||
{
|
||||
if (Heap[i].name_ == Name )
|
||||
{
|
||||
try
|
||||
{
|
||||
Val = boost::get<T_value_type>(Heap[i].val_);
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : incorrect type convert \'" << Name << L"\'\n";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
namespace xml
|
||||
{
|
||||
|
||||
class sax;
|
||||
|
||||
class attributes
|
||||
{
|
||||
public:
|
||||
typedef optional<std::wstring>::Type value_type;
|
||||
typedef std::pair< std::wstring, std::wstring> key_value;
|
||||
|
||||
public:
|
||||
virtual value_type get(const std::wstring & QualifiedName) const = 0;
|
||||
|
||||
template <class V> typename optional<V>::Type get_val(const std::wstring & QualifiedName);
|
||||
|
||||
virtual const key_value & at(size_t _Pos) const = 0;
|
||||
virtual size_t size() const = 0;
|
||||
size_t length() const ;
|
||||
bool empty() const;
|
||||
|
||||
virtual void reset_check() const = 0;
|
||||
virtual bool check() const = 0;
|
||||
|
||||
virtual ~attributes() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <class V>
|
||||
class attributes_get_val_impl
|
||||
{
|
||||
public:
|
||||
|
||||
typedef typename optional<V>::Type optional_V_type;
|
||||
|
||||
static typename optional<V>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
try
|
||||
{
|
||||
return optional_V_type (boost::lexical_cast<V>( *val ) );
|
||||
//return common::read_string<V>( *val );
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
_CP_LOG << L"[warning] : could't read attribute \'" << QualifiedName << L"\'\n";
|
||||
}
|
||||
}
|
||||
|
||||
return optional_V_type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<bool>
|
||||
{
|
||||
public:
|
||||
|
||||
typedef xml::xml_char<wchar_t> xml_char_value_type;
|
||||
|
||||
static optional<bool>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
tmp = XmlUtils::GetLower(tmp);
|
||||
return optional<bool>::Type((tmp == xml_char_value_type::trueVal));
|
||||
}
|
||||
else
|
||||
return optional<bool>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<char>
|
||||
{
|
||||
public:
|
||||
static optional<char>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<char>::Type( (tmp.size() > 0) ? tmp[0] : ' ');
|
||||
}
|
||||
else
|
||||
return optional<char>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class attributes_get_val_impl<wchar_t>
|
||||
{
|
||||
public:
|
||||
static optional<wchar_t>::Type get_val(attributes & attr, const std::wstring & QualifiedName)
|
||||
{
|
||||
attributes::value_type val = attr.get(QualifiedName);
|
||||
if (val)
|
||||
{
|
||||
std::wstring tmp = *val;
|
||||
return optional<wchar_t>::Type( (tmp.size() > 0) ? tmp[0] : L' ');
|
||||
}
|
||||
else
|
||||
return optional<wchar_t>::Type();
|
||||
}
|
||||
};
|
||||
|
||||
template <class V>
|
||||
inline typename optional<V>::Type attributes::get_val(const std::wstring & QualifiedName)
|
||||
{
|
||||
return attributes_get_val_impl<V>::get_val(*this, QualifiedName);
|
||||
}
|
||||
|
||||
inline attributes::~attributes()
|
||||
{}
|
||||
|
||||
inline size_t attributes::length() const
|
||||
{
|
||||
return this->size();
|
||||
}
|
||||
|
||||
inline bool attributes::empty() const
|
||||
{
|
||||
return (this->size() == 0);
|
||||
}
|
||||
|
||||
struct attributes_ptr
|
||||
{
|
||||
typedef shared_ptr< attributes >::Type Type;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef attributes attributes_wc;
|
||||
|
||||
typedef shared_ptr< attributes_wc >::Type attributes_wc_ptr;
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val)
|
||||
{
|
||||
Val = attr->get_val<typename T::value_type>(QualifiedName);
|
||||
return (!!Val);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
static bool _cp_apply_attribute(xml::attributes_wc_ptr attr, const std::wstring & QualifiedName, T & Val, const T & Default)
|
||||
{
|
||||
typedef typename optional<T>::Type type_opt_t;
|
||||
type_opt_t tmp;
|
||||
try
|
||||
{
|
||||
tmp = attr->get_val<T>(QualifiedName);
|
||||
Val = tmp.get_value_or(Default);
|
||||
}catch(...)
|
||||
{
|
||||
}
|
||||
return (!!tmp);
|
||||
}
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), __VA_ARGS__)
|
||||
#else
|
||||
#define CP_APPLY_ATTR(NAME, VAL, ...) _cp_apply_attribute(Attributes, (NAME), (VAL), ##__VA_ARGS__)
|
||||
#endif
|
||||
attributes_wc_ptr read_attributes(sax * SaxReader);
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,55 +1,55 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
enum NodeType
|
||||
{
|
||||
typeNone = 0,
|
||||
typeEOF,
|
||||
typeElement,
|
||||
typeAttribute,
|
||||
typeText,
|
||||
typeCDATA,
|
||||
typeProcessingInstruction,
|
||||
typeComment,
|
||||
typeDocumentType,
|
||||
typeWhitespace,
|
||||
typeEndElement,
|
||||
typeXmlDeclaration
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
enum NodeType
|
||||
{
|
||||
typeNone = 0,
|
||||
typeEOF,
|
||||
typeElement,
|
||||
typeAttribute,
|
||||
typeText,
|
||||
typeCDATA,
|
||||
typeProcessingInstruction,
|
||||
typeComment,
|
||||
typeDocumentType,
|
||||
typeWhitespace,
|
||||
typeEndElement,
|
||||
typeXmlDeclaration
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,114 +1,114 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
typedef _CP_PTR(sax) sax_ptr;
|
||||
|
||||
class sax
|
||||
{
|
||||
public:
|
||||
|
||||
struct error : virtual public std::exception
|
||||
{
|
||||
public:
|
||||
enum Code {
|
||||
no = 0,
|
||||
openFile,
|
||||
createReader,
|
||||
internalErr
|
||||
};
|
||||
|
||||
public:
|
||||
error(Code _code) : code_(_code){};
|
||||
Code code() const { return code_; }
|
||||
|
||||
private:
|
||||
Code code_;
|
||||
};
|
||||
|
||||
public:
|
||||
//virtual std::wstring baseURI() = 0;
|
||||
virtual unsigned int depth() = 0;
|
||||
|
||||
// <p:abc/>, returns "abc".
|
||||
virtual std::wstring nodeLocalName() = 0;
|
||||
|
||||
// <p:abc />, returns "p:abc".
|
||||
virtual std::wstring nodeQualifiedName() = 0;
|
||||
|
||||
// <xyz:abc xmlns:xyz="u://1" />, it returns "xyz".
|
||||
virtual std::wstring namespacePrefix() = 0;
|
||||
|
||||
//// Returns "u://1" for the element <xyz:abc xmlns:xyz="u://1" />.
|
||||
//virtual std::wstring namespaceUri() = 0;
|
||||
|
||||
virtual NodeType nodeType() = 0;
|
||||
virtual std::wstring value() = 0;
|
||||
|
||||
virtual unsigned int attrCount() = 0;
|
||||
//virtual std::wstring value() = 0;
|
||||
virtual bool attrDefault() = 0;
|
||||
|
||||
// <element attribute="123"></element> — false
|
||||
// <element attribute="123"/> - true
|
||||
virtual bool isEmptyElement() = 0;
|
||||
|
||||
virtual bool moveToAttrFirst() = 0;
|
||||
virtual bool moveToAttrNext() = 0;
|
||||
virtual bool moveToAttrOwner() = 0;
|
||||
|
||||
virtual NodeType next(int Depth) = 0;
|
||||
|
||||
virtual ~sax() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline sax::~sax() {};
|
||||
|
||||
sax_ptr create_sax(const wchar_t * FileName);
|
||||
|
||||
} // namespace xml
|
||||
} // namespace cpdoccore
|
||||
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "../CPSharedPtr.h"
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class sax;
|
||||
typedef _CP_PTR(sax) sax_ptr;
|
||||
|
||||
class sax
|
||||
{
|
||||
public:
|
||||
|
||||
struct error : virtual public std::exception
|
||||
{
|
||||
public:
|
||||
enum Code {
|
||||
no = 0,
|
||||
openFile,
|
||||
createReader,
|
||||
internalErr
|
||||
};
|
||||
|
||||
public:
|
||||
error(Code _code) : code_(_code){};
|
||||
Code code() const { return code_; }
|
||||
|
||||
private:
|
||||
Code code_;
|
||||
};
|
||||
|
||||
public:
|
||||
//virtual std::wstring baseURI() = 0;
|
||||
virtual unsigned int depth() = 0;
|
||||
|
||||
// <p:abc/>, returns "abc".
|
||||
virtual std::wstring nodeLocalName() = 0;
|
||||
|
||||
// <p:abc />, returns "p:abc".
|
||||
virtual std::wstring nodeQualifiedName() = 0;
|
||||
|
||||
// <xyz:abc xmlns:xyz="u://1" />, it returns "xyz".
|
||||
virtual std::wstring namespacePrefix() = 0;
|
||||
|
||||
//// Returns "u://1" for the element <xyz:abc xmlns:xyz="u://1" />.
|
||||
//virtual std::wstring namespaceUri() = 0;
|
||||
|
||||
virtual NodeType nodeType() = 0;
|
||||
virtual std::wstring value() = 0;
|
||||
|
||||
virtual unsigned int attrCount() = 0;
|
||||
//virtual std::wstring value() = 0;
|
||||
virtual bool attrDefault() = 0;
|
||||
|
||||
// <element attribute="123"></element> — false
|
||||
// <element attribute="123"/> - true
|
||||
virtual bool isEmptyElement() = 0;
|
||||
|
||||
virtual bool moveToAttrFirst() = 0;
|
||||
virtual bool moveToAttrNext() = 0;
|
||||
virtual bool moveToAttrOwner() = 0;
|
||||
|
||||
virtual NodeType next(int Depth) = 0;
|
||||
|
||||
virtual ~sax() = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
inline sax::~sax() {};
|
||||
|
||||
sax_ptr create_sax(const wchar_t * FileName);
|
||||
|
||||
} // namespace xml
|
||||
} // namespace cpdoccore
|
||||
|
||||
@ -1,326 +1,326 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <cassert>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
|
||||
namespace xml
|
||||
{
|
||||
|
||||
namespace writer
|
||||
{
|
||||
|
||||
template <class T> struct chars { };
|
||||
|
||||
template <>
|
||||
struct chars<char>
|
||||
{
|
||||
static const char eq = '=';
|
||||
static const char quote = '\"';
|
||||
static const char space = ' ';
|
||||
static const char left_brocket = '<';
|
||||
static const char right_brocket = '>';
|
||||
static const char slash = '/';
|
||||
static const char colon = ':';
|
||||
static const char amp = '&';
|
||||
static const char apos = '\'';
|
||||
static const char * cdata_open() { return "<![CDATA["; }
|
||||
static const char * cdata_close() { return "]]>"; }
|
||||
static const char * amp_str(){ return "&"; }
|
||||
static const char * left_brocket_str() { return "<"; }
|
||||
static const char * right_brocket_str() { return ">"; }
|
||||
static const char * apos_str() { return "'"; }
|
||||
static const char * quote_str() { return """; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chars<wchar_t>
|
||||
{
|
||||
static const wchar_t eq = L'=';
|
||||
static const wchar_t quote = L'\"';
|
||||
static const wchar_t space = L' ';
|
||||
static const wchar_t left_brocket = L'<';
|
||||
static const wchar_t right_brocket = L'>';
|
||||
static const wchar_t slash = L'/';
|
||||
static const wchar_t colon = L':';
|
||||
static const wchar_t amp = L'&';
|
||||
static const wchar_t apos = L'\'';
|
||||
static const wchar_t * cdata_open() { return L"<![CDATA["; }
|
||||
static const wchar_t * cdata_close() { return L"]]>"; }
|
||||
static const wchar_t * amp_str(){ return L"&"; }
|
||||
static const wchar_t * left_brocket_str() { return L"<"; }
|
||||
static const wchar_t * right_brocket_str() { return L">"; }
|
||||
static const wchar_t * apos_str() { return L"'"; }
|
||||
static const wchar_t * quote_str() { return L"""; }
|
||||
};
|
||||
|
||||
template <class V>
|
||||
class element;
|
||||
|
||||
//
|
||||
// xml::writer class
|
||||
//
|
||||
template <class T>
|
||||
class writer
|
||||
{
|
||||
public:
|
||||
// writer must be bound to an ostream
|
||||
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
|
||||
~writer(void) { assert(elements_.empty()); }
|
||||
|
||||
private:
|
||||
size_t level_;
|
||||
std::basic_ostream<T>& os_; // output stream
|
||||
bool need_header_; // have we written an XML header yet?
|
||||
std::stack<element<T>*> elements_; // stack of open element tags
|
||||
|
||||
|
||||
// write XML header, if necessary
|
||||
writer& header()
|
||||
{
|
||||
if (need_header_)
|
||||
{
|
||||
// TODO
|
||||
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
need_header_ = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a single character to the output stream
|
||||
writer& putc(T c)
|
||||
{
|
||||
os_.put(c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a string to the output stream
|
||||
writer& puts(const T* str) {
|
||||
os_ << str;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class V>
|
||||
friend class element;
|
||||
};
|
||||
|
||||
//
|
||||
// xml::element class
|
||||
//
|
||||
template <class T>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
// create a new element tag, bound to an xml::writer
|
||||
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
|
||||
{
|
||||
wr_.level_++;
|
||||
check_parent();
|
||||
wr_.header().putc('<').puts(name_.c_str());
|
||||
tagopen_ = true;
|
||||
wr_.elements_.push(this);
|
||||
}
|
||||
|
||||
// close the current element tag
|
||||
~element()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
|
||||
{
|
||||
wr_.elements_.pop();
|
||||
if (tagopen_)
|
||||
wr_.putc(chars<T>::slash)
|
||||
.putc(chars<T>::right_brocket);
|
||||
else
|
||||
wr_.putc(chars<T>::left_brocket)
|
||||
.putc(chars<T>::slash)
|
||||
.puts(name_.c_str())
|
||||
.putc(chars<T>::right_brocket);
|
||||
}
|
||||
wr_.level_--;
|
||||
}
|
||||
|
||||
// write an attribute for the current element
|
||||
element& attr(const T* name, const T* value)
|
||||
{
|
||||
assert(name != 0);
|
||||
assert(value != 0);
|
||||
assert(tagopen_);
|
||||
wr_.putc(chars<T>::space)
|
||||
.puts(name)
|
||||
.putc(chars<T>::eq)
|
||||
.putc(chars<T>::quote);
|
||||
qputs(value);
|
||||
wr_.putc(chars<T>::quote);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// attr() overload for std::string type
|
||||
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
|
||||
{
|
||||
return attr(name, value.c_str());
|
||||
}
|
||||
|
||||
// attr() function template for all streamable types
|
||||
template <class V>
|
||||
element& attr(const T* name, V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
attr(name, ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write text content for the current element
|
||||
element& contents(const T* str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
qputs(str);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// contents() overload for std::string type
|
||||
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return contents(str.c_str());
|
||||
}
|
||||
|
||||
// contents() function template for all streamable types
|
||||
template <class V>
|
||||
element& contents(V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
contents(ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::basic_ostream<T>& stream()
|
||||
{
|
||||
check_parent();
|
||||
return wr_.os_;
|
||||
}
|
||||
|
||||
// write CDATA section
|
||||
element& cdata(const T * str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
wr_.puts(chars<T>::cdata_open());
|
||||
wr_.puts(str);
|
||||
wr_.puts(chars<T>::cdata_close());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// cdata() overload for std::string type
|
||||
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return cdata(str.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
writer<T>& wr_; // bound XML writer
|
||||
//const T* name_; // name of current element
|
||||
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
|
||||
bool tagopen_; // is the element tag for this element still open?
|
||||
|
||||
// write a string quoting characters which have meaning in xml
|
||||
element& qputs(const T* str)
|
||||
{
|
||||
for (; *str; ++str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case chars<T>::amp:
|
||||
wr_.puts(chars<T>::amp_str()); break;
|
||||
|
||||
case chars<T>::left_brocket:
|
||||
wr_.puts(chars<T>::left_brocket_str()); break;
|
||||
|
||||
case chars<T>::right_brocket:
|
||||
wr_.puts(chars<T>::right_brocket_str()); break;
|
||||
|
||||
case chars<T>::apos:
|
||||
wr_.puts(chars<T>::apos_str()); break;
|
||||
|
||||
case chars<T>::quote:
|
||||
wr_.puts(chars<T>::quote_str()); break;
|
||||
|
||||
default:
|
||||
wr_.putc(*str); break;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// check to see if we have a parent tag which needs to be closed
|
||||
void check_parent()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
|
||||
{
|
||||
wr_.putc(chars<T>::right_brocket);
|
||||
wr_.elements_.top()->tagopen_ = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef xml::writer::writer<wchar_t> xml_writer;
|
||||
typedef xml::writer::element<wchar_t> xml_element;
|
||||
|
||||
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
|
||||
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
|
||||
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
|
||||
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
|
||||
#define CP_XML_STREAM() _xml_node_.stream()
|
||||
|
||||
#define CP_GET_XML_NODE() _xml_node_
|
||||
|
||||
#define CP_ATTR_NODE xml_element & _xml_node_
|
||||
|
||||
|
||||
|
||||
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
|
||||
|
||||
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <cassert>
|
||||
|
||||
namespace cpdoccore
|
||||
{
|
||||
|
||||
namespace xml
|
||||
{
|
||||
|
||||
namespace writer
|
||||
{
|
||||
|
||||
template <class T> struct chars { };
|
||||
|
||||
template <>
|
||||
struct chars<char>
|
||||
{
|
||||
static const char eq = '=';
|
||||
static const char quote = '\"';
|
||||
static const char space = ' ';
|
||||
static const char left_brocket = '<';
|
||||
static const char right_brocket = '>';
|
||||
static const char slash = '/';
|
||||
static const char colon = ':';
|
||||
static const char amp = '&';
|
||||
static const char apos = '\'';
|
||||
static const char * cdata_open() { return "<![CDATA["; }
|
||||
static const char * cdata_close() { return "]]>"; }
|
||||
static const char * amp_str(){ return "&"; }
|
||||
static const char * left_brocket_str() { return "<"; }
|
||||
static const char * right_brocket_str() { return ">"; }
|
||||
static const char * apos_str() { return "'"; }
|
||||
static const char * quote_str() { return """; }
|
||||
};
|
||||
|
||||
template <>
|
||||
struct chars<wchar_t>
|
||||
{
|
||||
static const wchar_t eq = L'=';
|
||||
static const wchar_t quote = L'\"';
|
||||
static const wchar_t space = L' ';
|
||||
static const wchar_t left_brocket = L'<';
|
||||
static const wchar_t right_brocket = L'>';
|
||||
static const wchar_t slash = L'/';
|
||||
static const wchar_t colon = L':';
|
||||
static const wchar_t amp = L'&';
|
||||
static const wchar_t apos = L'\'';
|
||||
static const wchar_t * cdata_open() { return L"<![CDATA["; }
|
||||
static const wchar_t * cdata_close() { return L"]]>"; }
|
||||
static const wchar_t * amp_str(){ return L"&"; }
|
||||
static const wchar_t * left_brocket_str() { return L"<"; }
|
||||
static const wchar_t * right_brocket_str() { return L">"; }
|
||||
static const wchar_t * apos_str() { return L"'"; }
|
||||
static const wchar_t * quote_str() { return L"""; }
|
||||
};
|
||||
|
||||
template <class V>
|
||||
class element;
|
||||
|
||||
//
|
||||
// xml::writer class
|
||||
//
|
||||
template <class T>
|
||||
class writer
|
||||
{
|
||||
public:
|
||||
// writer must be bound to an ostream
|
||||
writer(std::basic_ostream<T>& os, bool need_header = false) : level_(0), os_(os), need_header_(need_header) {}
|
||||
~writer(void) { assert(elements_.empty()); }
|
||||
|
||||
private:
|
||||
size_t level_;
|
||||
std::basic_ostream<T>& os_; // output stream
|
||||
bool need_header_; // have we written an XML header yet?
|
||||
std::stack<element<T>*> elements_; // stack of open element tags
|
||||
|
||||
|
||||
// write XML header, if necessary
|
||||
writer& header()
|
||||
{
|
||||
if (need_header_)
|
||||
{
|
||||
// TODO
|
||||
//os_ << "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
|
||||
need_header_ = false;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a single character to the output stream
|
||||
writer& putc(T c)
|
||||
{
|
||||
os_.put(c);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write a string to the output stream
|
||||
writer& puts(const T* str) {
|
||||
os_ << str;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template <class V>
|
||||
friend class element;
|
||||
};
|
||||
|
||||
//
|
||||
// xml::element class
|
||||
//
|
||||
template <class T>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
// create a new element tag, bound to an xml::writer
|
||||
element(writer<T>& wr, std::basic_string<T, std::char_traits<T>, std::allocator<T> > const & name) : wr_(wr), name_(name)
|
||||
{
|
||||
wr_.level_++;
|
||||
check_parent();
|
||||
wr_.header().putc('<').puts(name_.c_str());
|
||||
tagopen_ = true;
|
||||
wr_.elements_.push(this);
|
||||
}
|
||||
|
||||
// close the current element tag
|
||||
~element()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top() == this)
|
||||
{
|
||||
wr_.elements_.pop();
|
||||
if (tagopen_)
|
||||
wr_.putc(chars<T>::slash)
|
||||
.putc(chars<T>::right_brocket);
|
||||
else
|
||||
wr_.putc(chars<T>::left_brocket)
|
||||
.putc(chars<T>::slash)
|
||||
.puts(name_.c_str())
|
||||
.putc(chars<T>::right_brocket);
|
||||
}
|
||||
wr_.level_--;
|
||||
}
|
||||
|
||||
// write an attribute for the current element
|
||||
element& attr(const T* name, const T* value)
|
||||
{
|
||||
assert(name != 0);
|
||||
assert(value != 0);
|
||||
assert(tagopen_);
|
||||
wr_.putc(chars<T>::space)
|
||||
.puts(name)
|
||||
.putc(chars<T>::eq)
|
||||
.putc(chars<T>::quote);
|
||||
qputs(value);
|
||||
wr_.putc(chars<T>::quote);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// attr() overload for std::string type
|
||||
element& attr(const T* name, const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& value)
|
||||
{
|
||||
return attr(name, value.c_str());
|
||||
}
|
||||
|
||||
// attr() function template for all streamable types
|
||||
template <class V>
|
||||
element& attr(const T* name, V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
attr(name, ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// write text content for the current element
|
||||
element& contents(const T* str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
qputs(str);
|
||||
return *this;
|
||||
}
|
||||
|
||||
// contents() overload for std::string type
|
||||
element& contents(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return contents(str.c_str());
|
||||
}
|
||||
|
||||
// contents() function template for all streamable types
|
||||
template <class V>
|
||||
element& contents(V value)
|
||||
{
|
||||
std::basic_stringstream<T, std::char_traits<T>, std::allocator<T> > ss;
|
||||
ss << value;
|
||||
contents(ss.str());
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::basic_ostream<T>& stream()
|
||||
{
|
||||
check_parent();
|
||||
return wr_.os_;
|
||||
}
|
||||
|
||||
// write CDATA section
|
||||
element& cdata(const T * str)
|
||||
{
|
||||
assert(str != 0);
|
||||
check_parent();
|
||||
wr_.puts(chars<T>::cdata_open());
|
||||
wr_.puts(str);
|
||||
wr_.puts(chars<T>::cdata_close());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// cdata() overload for std::string type
|
||||
element& cdata(const std::basic_string<T, std::char_traits<T>, std::allocator<T> >& str)
|
||||
{
|
||||
return cdata(str.c_str());
|
||||
}
|
||||
|
||||
private:
|
||||
writer<T>& wr_; // bound XML writer
|
||||
//const T* name_; // name of current element
|
||||
const std::basic_string<T, std::char_traits<T>, std::allocator<T> > name_;
|
||||
bool tagopen_; // is the element tag for this element still open?
|
||||
|
||||
// write a string quoting characters which have meaning in xml
|
||||
element& qputs(const T* str)
|
||||
{
|
||||
for (; *str; ++str)
|
||||
{
|
||||
switch (*str)
|
||||
{
|
||||
case chars<T>::amp:
|
||||
wr_.puts(chars<T>::amp_str()); break;
|
||||
|
||||
case chars<T>::left_brocket:
|
||||
wr_.puts(chars<T>::left_brocket_str()); break;
|
||||
|
||||
case chars<T>::right_brocket:
|
||||
wr_.puts(chars<T>::right_brocket_str()); break;
|
||||
|
||||
case chars<T>::apos:
|
||||
wr_.puts(chars<T>::apos_str()); break;
|
||||
|
||||
case chars<T>::quote:
|
||||
wr_.puts(chars<T>::quote_str()); break;
|
||||
|
||||
default:
|
||||
wr_.putc(*str); break;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// check to see if we have a parent tag which needs to be closed
|
||||
void check_parent()
|
||||
{
|
||||
if (!wr_.elements_.empty() && wr_.elements_.top()->tagopen_)
|
||||
{
|
||||
wr_.putc(chars<T>::right_brocket);
|
||||
wr_.elements_.top()->tagopen_ = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
typedef xml::writer::writer<wchar_t> xml_writer;
|
||||
typedef xml::writer::element<wchar_t> xml_element;
|
||||
|
||||
#define CP_XML_WRITER(STRM) if (bool _b_ = false) {} else for (xml_writer _xml_wr_((STRM));!_b_;_b_=true)
|
||||
#define CP_XML_NODE(NAME) if (bool _b_ = false) {} else for (xml_element _xml_node_(_xml_wr_, (NAME));!_b_;_b_=true)
|
||||
#define CP_XML_ATTR(NAME, VAL) _xml_node_.attr((NAME),(VAL))
|
||||
#define CP_XML_CONTENT(VAL) _xml_node_.contents((VAL))
|
||||
#define CP_XML_STREAM() _xml_node_.stream()
|
||||
|
||||
#define CP_GET_XML_NODE() _xml_node_
|
||||
|
||||
#define CP_ATTR_NODE xml_element & _xml_node_
|
||||
|
||||
|
||||
|
||||
#define CP_XML_ATTR_OPT(NAME, VAL) if (VAL)CP_XML_ATTR(NAME, (*VAL))
|
||||
|
||||
#define CP_XML_NODE_SIMPLE() std::wstring NS_NAME = std::wstring(ns) + std::wstring(L":") + std::wstring(name); CP_XML_NODE(NS_NAME)
|
||||
|
||||
}
|
||||
@ -1,70 +1,70 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
namespace utils {
|
||||
|
||||
namespace details {
|
||||
std::wstring replace_text_to_xml_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_amp_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplReplace(const std::string & Text);
|
||||
}
|
||||
|
||||
std::wstring replace_text_to_xml(const std::wstring & Text);
|
||||
std::string replace_text_to_xml(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_lt_gt(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_xml_to_text(const std::wstring & Text);
|
||||
std::string replace_xml_to_text(const std::string & Text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
namespace utils {
|
||||
|
||||
namespace details {
|
||||
std::wstring replace_text_to_xml_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplRegEx(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplRegEx(const std::string & Text);
|
||||
|
||||
std::wstring replace_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_amp_text_to_xml_ImplReplace(const std::string & Text);
|
||||
|
||||
std::wstring replace_xml_to_text_ImplReplace(const std::wstring & Text);
|
||||
std::string replace_xml_to_text_ImplReplace(const std::string & Text);
|
||||
}
|
||||
|
||||
std::wstring replace_text_to_xml(const std::wstring & Text);
|
||||
std::string replace_text_to_xml(const std::string & Text);
|
||||
|
||||
std::wstring replace_amp_text_to_xml(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_lt_gt(const std::wstring & Text);
|
||||
|
||||
std::wstring replace_xml_to_text(const std::wstring & Text);
|
||||
std::string replace_xml_to_text(const std::string & Text);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,101 +1,101 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
template <class ElemT>
|
||||
class xml_char
|
||||
{
|
||||
public:
|
||||
//static const ElemT eq;
|
||||
//static const ElemT quote;
|
||||
//static const ElemT space;
|
||||
//static const ElemT left_brocket;
|
||||
//static const ElemT right_brocket;
|
||||
//static const ElemT slash;
|
||||
//static const ElemT colon;
|
||||
//static const ElemT * openTag;
|
||||
//static const ElemT * closeTag;
|
||||
//static const ElemT * endTag;
|
||||
//static const ElemT * trueVal;
|
||||
//static const ElemT * falseVal;
|
||||
};
|
||||
|
||||
template <>
|
||||
class xml_char<char>
|
||||
{
|
||||
public:
|
||||
static const char eq;
|
||||
static const char quote;
|
||||
static const char space;
|
||||
static const char left_brocket;
|
||||
static const char right_brocket;
|
||||
static const char slash;
|
||||
static const char colon;
|
||||
static const char * openTag;
|
||||
static const char * closeTag;
|
||||
static const char * endTag;
|
||||
static const char * trueVal;
|
||||
static const char * falseVal;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <>
|
||||
class xml_char<wchar_t>
|
||||
{
|
||||
public:
|
||||
static const wchar_t eq;
|
||||
static const wchar_t quote;
|
||||
static const wchar_t space;
|
||||
static const wchar_t left_brocket;
|
||||
static const wchar_t right_brocket;
|
||||
static const wchar_t slash;
|
||||
static const wchar_t colon;
|
||||
static const wchar_t * openTag;
|
||||
static const wchar_t * closeTag;
|
||||
static const wchar_t * endTag;
|
||||
static const wchar_t * trueVal;
|
||||
static const wchar_t * falseVal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef xml_char<char> xml_char_c;
|
||||
typedef xml_char<wchar_t> xml_char_wc;
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
template <class ElemT>
|
||||
class xml_char
|
||||
{
|
||||
public:
|
||||
//static const ElemT eq;
|
||||
//static const ElemT quote;
|
||||
//static const ElemT space;
|
||||
//static const ElemT left_brocket;
|
||||
//static const ElemT right_brocket;
|
||||
//static const ElemT slash;
|
||||
//static const ElemT colon;
|
||||
//static const ElemT * openTag;
|
||||
//static const ElemT * closeTag;
|
||||
//static const ElemT * endTag;
|
||||
//static const ElemT * trueVal;
|
||||
//static const ElemT * falseVal;
|
||||
};
|
||||
|
||||
template <>
|
||||
class xml_char<char>
|
||||
{
|
||||
public:
|
||||
static const char eq;
|
||||
static const char quote;
|
||||
static const char space;
|
||||
static const char left_brocket;
|
||||
static const char right_brocket;
|
||||
static const char slash;
|
||||
static const char colon;
|
||||
static const char * openTag;
|
||||
static const char * closeTag;
|
||||
static const char * endTag;
|
||||
static const char * trueVal;
|
||||
static const char * falseVal;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template <>
|
||||
class xml_char<wchar_t>
|
||||
{
|
||||
public:
|
||||
static const wchar_t eq;
|
||||
static const wchar_t quote;
|
||||
static const wchar_t space;
|
||||
static const wchar_t left_brocket;
|
||||
static const wchar_t right_brocket;
|
||||
static const wchar_t slash;
|
||||
static const wchar_t colon;
|
||||
static const wchar_t * openTag;
|
||||
static const wchar_t * closeTag;
|
||||
static const wchar_t * endTag;
|
||||
static const wchar_t * trueVal;
|
||||
static const wchar_t * falseVal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
typedef xml_char<char> xml_char_c;
|
||||
typedef xml_char<wchar_t> xml_char_wc;
|
||||
|
||||
}
|
||||
}
|
||||
@ -1,102 +1,102 @@
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <sstream>
|
||||
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class attributes;
|
||||
|
||||
template <class CharT>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const = 0;
|
||||
virtual const CharT * get_name() const = 0;
|
||||
virtual NodeType get_xml_type() const = 0;
|
||||
|
||||
virtual std::basic_ostream<CharT> & text_to_stream(std::basic_ostream<CharT> & _Wostream) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
virtual std::basic_ostream<CharT> & xml_to_stream(std::basic_ostream<CharT> & _Wostream) const = 0;
|
||||
|
||||
std::basic_string<CharT> text_to_string() const;
|
||||
std::basic_string<CharT> xml_to_string() const;
|
||||
|
||||
virtual ~element() = 0;
|
||||
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline element<CharT>::~element()
|
||||
{}
|
||||
|
||||
typedef element<char> element_c;
|
||||
typedef element<wchar_t> element_wc;
|
||||
|
||||
template <class Element, class CharT = wchar_t>
|
||||
class element_impl : public element<CharT>
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const { return Element::ns; }
|
||||
virtual const CharT * get_name() const { return Element::name; }
|
||||
virtual NodeType get_xml_type() const { return Element::xml_type; };
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::text_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
text_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::xml_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
xml_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
}
|
||||
/*
|
||||
* (c) Copyright Ascensio System SIA 2010-2018
|
||||
*
|
||||
* This program is a free software product. You can redistribute it and/or
|
||||
* modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||
* version 3 as published by the Free Software Foundation. In accordance with
|
||||
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||
* that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||
* of any third-party rights.
|
||||
*
|
||||
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||
*
|
||||
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||
* EU, LV-1021.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of the Program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU AGPL version 3.
|
||||
*
|
||||
* Pursuant to Section 7(b) of the License you must retain the original Product
|
||||
* logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||
* grant you any rights under trademark law for use of our trademarks.
|
||||
*
|
||||
* All the Product's GUI elements, including illustrations and icon sets, as
|
||||
* well as technical writing content are licensed under the terms of the
|
||||
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <sstream>
|
||||
|
||||
#include "nodetype.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace xml {
|
||||
|
||||
class attributes;
|
||||
|
||||
template <class CharT>
|
||||
class element
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const = 0;
|
||||
virtual const CharT * get_name() const = 0;
|
||||
virtual NodeType get_xml_type() const = 0;
|
||||
|
||||
virtual std::basic_ostream<CharT> & text_to_stream(std::basic_ostream<CharT> & _Wostream) const
|
||||
{
|
||||
return _Wostream;
|
||||
}
|
||||
|
||||
virtual std::basic_ostream<CharT> & xml_to_stream(std::basic_ostream<CharT> & _Wostream) const = 0;
|
||||
|
||||
std::basic_string<CharT> text_to_string() const;
|
||||
std::basic_string<CharT> xml_to_string() const;
|
||||
|
||||
virtual ~element() = 0;
|
||||
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline element<CharT>::~element()
|
||||
{}
|
||||
|
||||
typedef element<char> element_c;
|
||||
typedef element<wchar_t> element_wc;
|
||||
|
||||
template <class Element, class CharT = wchar_t>
|
||||
class element_impl : public element<CharT>
|
||||
{
|
||||
public:
|
||||
virtual const CharT * get_ns() const { return Element::ns; }
|
||||
virtual const CharT * get_name() const { return Element::name; }
|
||||
virtual NodeType get_xml_type() const { return Element::xml_type; };
|
||||
// virtual const attributes< std::basic_string<CharT> > * get_attributes() const = 0;
|
||||
};
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::text_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
text_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
template <class CharT>
|
||||
inline std::basic_string<CharT> element<CharT>::xml_to_string() const
|
||||
{
|
||||
std::basic_stringstream<CharT> strm;
|
||||
xml_to_stream(strm);
|
||||
return strm.str();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -557,27 +557,27 @@ HEADERS += \
|
||||
../src/docx/xlsx_utils.h \
|
||||
../src/docx/xlsx_xf.h \
|
||||
../include/logging.h \
|
||||
../include/cpdoccore/CPColorUtils.h \
|
||||
../include/cpdoccore/CPNoncopyable.h \
|
||||
../include/cpdoccore/CPOptional.h \
|
||||
../include/cpdoccore/CPScopedPtr.h \
|
||||
../include/cpdoccore/CPSharedPtr.h \
|
||||
../include/cpdoccore/CPString.h \
|
||||
../include/cpdoccore/CPWeakPtr.h \
|
||||
../include/cpdoccore/common/readdocelement.h \
|
||||
../include/cpdoccore/common/readstring.h \
|
||||
../include/cpdoccore/common/writedocelement.h \
|
||||
../include/cpdoccore/odf/odf_document.h \
|
||||
../include/cpdoccore/odf/odfformat.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/checked.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/core.h \
|
||||
../include/cpdoccore/utf8cpp/utf8/unchecked.h \
|
||||
../include/cpdoccore/utf8cpp/utf8.h \
|
||||
../include/cpdoccore/xml/attributes.h \
|
||||
../include/cpdoccore/xml/nodetype.h \
|
||||
../include/cpdoccore/xml/sax.h \
|
||||
../include/cpdoccore/xml/simple_xml_writer.h \
|
||||
../include/cpdoccore/xml/utils.h \
|
||||
../include/cpdoccore/xml/xmlchar.h \
|
||||
../include/cpdoccore/xml/xmlelement.h
|
||||
../include/CPColorUtils.h \
|
||||
../include/CPNoncopyable.h \
|
||||
../include/CPOptional.h \
|
||||
../include/CPScopedPtr.h \
|
||||
../include/CPSharedPtr.h \
|
||||
../include/CPString.h \
|
||||
../include/CPWeakPtr.h \
|
||||
../include/common/readdocelement.h \
|
||||
../include/common/readstring.h \
|
||||
../include/common/writedocelement.h \
|
||||
../include/odf/odf_document.h \
|
||||
../include/odf/odfformat.h \
|
||||
../include/utf8cpp/utf8/checked.h \
|
||||
../include/utf8cpp/utf8/core.h \
|
||||
../include/utf8cpp/utf8/unchecked.h \
|
||||
../include/utf8cpp/utf8.h \
|
||||
../include/xml/attributes.h \
|
||||
../include/xml/nodetype.h \
|
||||
../include/xml/sax.h \
|
||||
../include/xml/simple_xml_writer.h \
|
||||
../include/xml/utils.h \
|
||||
../include/xml/xmlchar.h \
|
||||
../include/xml/xmlelement.h
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
#include "../src/docx/pptx_conversion_context.h"
|
||||
#include "../src/docx/xlsxconversioncontext.h"
|
||||
|
||||
#include "../include/cpdoccore/odf/odf_document.h"
|
||||
#include "../include/odf/odf_document.h"
|
||||
|
||||
int ConvertOds2Xlsx(cpdoccore::odf_reader::odf_document & inputOdf, const std::wstring & dstPath, const std::wstring & fontsPath)
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "../../include/cpdoccore/CPString.h"
|
||||
#include "../../include/CPString.h"
|
||||
#include "../../../DesktopEditor/common/File.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -30,9 +30,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../include/cpdoccore/common/readdocelement.h"
|
||||
#include "../../include/cpdoccore/xml/attributes.h"
|
||||
#include "../../include/cpdoccore/xml/sax.h"
|
||||
#include "../../include/common/readdocelement.h"
|
||||
#include "../../include/xml/attributes.h"
|
||||
#include "../../include/xml/sax.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace common {
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/attributes.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "docx_content_type.h"
|
||||
#include "namespaces.h"
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/xml/xmlelement.h>
|
||||
#include <xml/xmlelement.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -35,9 +35,9 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/utils.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "docx_conversion_context.h"
|
||||
|
||||
@ -519,7 +519,7 @@ void docx_conversion_context::end_alphabetical_index (const std::wstring &id)
|
||||
output_stream() << L"<w:r><w:fldChar w:fldCharType=\"begin\"/></w:r>";
|
||||
output_stream() << L"<w:r><w:instrText>XE \"";
|
||||
|
||||
odf_reader::ElementType type;
|
||||
ElementType type;
|
||||
for (size_t i = 0; i < pFind->second.size(); i++)
|
||||
{
|
||||
type = pFind->second[i]->get_type();
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "docx_drawing.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/datatypes/custom_shape_types_convert.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include "oox_drawing.h"
|
||||
#include "mediaitems.h"
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
#include "docx_content_type.h"
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "docx_conversion_context.h"
|
||||
#include "logging.h"
|
||||
#include <iostream>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include "../odf/odfcontext.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include "hyperlinks.h"
|
||||
#include "oox_rels.h"
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <boost/regex.hpp>
|
||||
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
#include "../../Common/DocxFormat/Source/Base/Base.h"
|
||||
#include "../../Common/DocxFormat/Source/SystemUtility/File.h"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#include "oox_chart_axis.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_title.h"
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
#include <vector>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
#include "oox_chart_context.h"
|
||||
|
||||
@ -32,10 +32,10 @@
|
||||
#pragma once
|
||||
#include "oox_package.h"
|
||||
|
||||
#include <cpdoccore/CPNoncopyable.h>
|
||||
#include <CPNoncopyable.h>
|
||||
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "oox_title.h"
|
||||
#include "oox_plot_area.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_chart_legend.h"
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
#include "oox_layout.h"
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
#include "xlsx_utils.h"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPOptional.h>
|
||||
#include "../odf/chart_objects.h"
|
||||
|
||||
#include "oox_chart_values.h"
|
||||
|
||||
@ -30,8 +30,8 @@
|
||||
*
|
||||
*/
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_chart_shape.h"
|
||||
#include "oox_drawing.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
#include "../odf/chart_objects.h"
|
||||
#include "oox_drawing_fills.h"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPOptional.h>
|
||||
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
#include "oox_conversion_context.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/utils.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "../odf/odfcontext.h"
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
@ -31,8 +31,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_data_labels.h"
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
@ -36,9 +36,9 @@
|
||||
#include <vector>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
#include "oox_drawing.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "../odf/datatypes/custom_shape_types_convert.h"
|
||||
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include "mediaitems.h"
|
||||
#include "oox_drawing_fills.h"
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "oox_drawing_fills.h"
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "../odf/datatypes/lengthorpercent.h"
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include "oox_layout.h"
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
#include "../odf/chart_objects.h"
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
#include <boost/ref.hpp>
|
||||
|
||||
#include <cpdoccore/utf8cpp/utf8.h>
|
||||
#include <utf8cpp/utf8.h>
|
||||
|
||||
#include "mediaitems.h"
|
||||
#include "../../DesktopEditor/common/File.h"
|
||||
|
||||
@ -33,8 +33,8 @@
|
||||
#define _CPDOCCORE_OOX_PACKAGE_H_75f74d15
|
||||
|
||||
#include <vector>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/CPNoncopyable.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <CPNoncopyable.h>
|
||||
|
||||
#include "docx_content_type.h"
|
||||
#include "oox_rels.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include "oox_plot_area.h"
|
||||
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
#include "oox_types_chart.h"
|
||||
#include "oox_chart_axis.h"
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
|
||||
#include "oox_rels.h"
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <xml/attributes.h>
|
||||
#include "namespaces.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/xml/xmlelement.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <xml/xmlelement.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include "oox_title.h"
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
#include "oox_layout.h"
|
||||
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "oox_types_chart.h"
|
||||
#include "oox_chart_shape.h"
|
||||
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
#include <iosfwd>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "xlsx_color.h"
|
||||
#include "oox_chart_series.h"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "pptx_comments.h"
|
||||
#include <vector>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "oox_rels.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <xml/attributes.h>
|
||||
#include "mediaitems.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include "../odf/datatypes/length.h"
|
||||
#include "xlsx_utils.h"
|
||||
|
||||
//#include <cpdoccore/formulasconvert.h>
|
||||
//#include <formulasconvert.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
|
||||
#include <string>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
|
||||
#include "pptx_comments.h"
|
||||
|
||||
|
||||
@ -34,8 +34,8 @@
|
||||
|
||||
#include "pptx_package.h"
|
||||
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "pptx_drawing.h"
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/datatypes/custom_shape_types_convert.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -33,9 +33,9 @@
|
||||
|
||||
#include <iosfwd>
|
||||
#include <iostream>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include "oox_drawing.h"
|
||||
#include "mediaitems.h"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <xml/attributes.h>
|
||||
#include "mediaitems.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#include <boost/make_shared.hpp>
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "pptx_output_xml.h"
|
||||
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPNoncopyable.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPNoncopyable.h>
|
||||
|
||||
#include "oox_rels.h"
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include "pptx_package.h"
|
||||
#include "pptx_output_xml.h"
|
||||
|
||||
#include <cpdoccore/utf8cpp/utf8.h>
|
||||
#include <utf8cpp/utf8.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "oox_package.h"
|
||||
#include <cpdoccore/CPNoncopyable.h>
|
||||
#include <CPNoncopyable.h>
|
||||
#include "pptx_comments.h"
|
||||
|
||||
namespace NSFonts
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include <xml/utils.h>
|
||||
#include <odf/odf_document.h>
|
||||
|
||||
#include "pptx_drawing.h"
|
||||
#include "pptx_drawings.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include <odf/odf_document.h>
|
||||
|
||||
#include "../odf/odfcontext.h"
|
||||
#include "../odf/draw_common.h"
|
||||
|
||||
@ -37,9 +37,9 @@
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <cpdoccore/odf/odf_document.h>
|
||||
#include <cpdoccore/xml/utils.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include <odf/odf_document.h>
|
||||
#include <xml/utils.h>
|
||||
|
||||
#include "../odf/odfcontext.h"
|
||||
#include "../odf/style_text_properties.h"
|
||||
@ -287,17 +287,17 @@ void pptx_text_context::Impl::ApplyListProperties(odf_reader::paragraph_format_p
|
||||
odf_reader::office_element_ptr elm = text_list_style->get_content()[Level];
|
||||
odf_reader::office_element_ptr elm_list;
|
||||
|
||||
if (elm->get_type() == odf_reader::typeTextListLevelStyleBullet)
|
||||
if (elm->get_type() == typeTextListLevelStyleBullet)
|
||||
{
|
||||
odf_reader::text_list_level_style_bullet* list_bullet = dynamic_cast<odf_reader::text_list_level_style_bullet *>(elm.get());
|
||||
if (list_bullet)elm_list = list_bullet->style_list_level_properties_;
|
||||
}
|
||||
if (elm->get_type() == odf_reader::typeTextListLevelStyleNumber)
|
||||
if (elm->get_type() == typeTextListLevelStyleNumber)
|
||||
{
|
||||
odf_reader::text_list_level_style_number* list_number = dynamic_cast<odf_reader::text_list_level_style_number *>(elm.get());
|
||||
if (list_number)elm_list = list_number->style_list_level_properties_;
|
||||
}
|
||||
if (elm->get_type() == odf_reader::typeTextListLevelStyleImage)
|
||||
if (elm->get_type() == typeTextListLevelStyleImage)
|
||||
{
|
||||
odf_reader::text_list_level_style_image* list_image = dynamic_cast<odf_reader::text_list_level_style_image *>(elm.get());
|
||||
if (list_image)elm_list = list_image->style_list_level_properties_;
|
||||
|
||||
@ -33,10 +33,10 @@
|
||||
|
||||
#include <string>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <xml/attributes.h>
|
||||
|
||||
#include "oox_conversion_context.h"
|
||||
#include "../odf/datatypes/stylefamily.h"
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
#include <ostream>
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPOptional.h>
|
||||
#include <string>
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
|
||||
#include "xlsx_border.h"
|
||||
#include <boost/functional.hpp>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <CPOptional.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
#include "../odf/style_text_properties.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPOptional.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include <boost/foreach.hpp>
|
||||
#include <boost/functional.hpp>
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "xlsx_border.h"
|
||||
#include "../odf/datatypes/length.h"
|
||||
|
||||
@ -32,8 +32,8 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace odf_reader {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
|
||||
#include "xlsx_cell_style.h"
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
#include <iosfwd>
|
||||
#include <string>
|
||||
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <CPOptional.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#include <vector>
|
||||
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
#include "xlsx_cell_styles.h"
|
||||
#include "xlsx_cell_style.h"
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <CPScopedPtr.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPOptional.h>
|
||||
#include <CPOptional.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
#include "oox_rels.h"
|
||||
|
||||
#include <vector>
|
||||
#include <cpdoccore/xml/simple_xml_writer.h>
|
||||
#include <xml/simple_xml_writer.h>
|
||||
|
||||
namespace cpdoccore {
|
||||
namespace oox {
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <iosfwd>
|
||||
#include <cpdoccore/CPScopedPtr.h>
|
||||
#include <cpdoccore/CPSharedPtr.h>
|
||||
#include <cpdoccore/xml/attributes.h>
|
||||
#include <CPScopedPtr.h>
|
||||
#include <CPSharedPtr.h>
|
||||
#include <xml/attributes.h>
|
||||
#include "mediaitems.h"
|
||||
|
||||
namespace cpdoccore {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user