Compare commits

...

89 Commits

Author SHA1 Message Date
4c9e904d10 . 2023-02-08 09:45:16 +03:00
edeebcc438 . 2023-02-07 17:53:37 +03:00
c14083795f . 2023-02-07 15:22:24 +03:00
62d05c02fb Merge branch 'feature/odf_4' into develop 2023-02-07 11:56:50 +03:00
117edc9c96 fix main_document 2023-02-07 11:54:42 +03:00
ff1e280d7d Merge branch 'develop' into feature/odf_4 2023-02-07 10:22:36 +03:00
000f64267f Merge pull request #1138 from ONLYOFFICE/fix/fix-develop
Fix/fix develop
2023-02-07 10:21:41 +03:00
1e5e533d68 Merge remote-tracking branch 'origin/hotfix/v7.3.3' into fix/fix-develop 2023-02-07 10:20:49 +03:00
52071831de Fix crash on using emdedder data in isolates 2023-02-06 11:36:45 +03:00
a133ce4714 Merge pull request #1136 from ONLYOFFICE/fix/pre7.3.3
Fix/pre7.3.3
2023-02-05 20:04:20 +05:00
608b04ca26 For bug 61014 2023-02-05 11:52:22 +03:00
2b6ad83b36 Fix bug 60433 2023-02-04 23:49:41 +03:00
f121da9f47 Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2023-02-04 17:49:33 +03:00
0b9dc3c296 for bug #60963 (change paragraph place) 2023-02-02 13:08:34 +03:00
47e0ccbe29 fix bug #60963 2023-02-02 12:32:50 +03:00
5d720e75f5 . 2023-02-02 11:03:33 +03:00
ad03ae0390 fix group ole/math_equation in sheets from/to ods 2023-02-01 20:06:57 +03:00
90d709972d Merge pull request #1134 from ONLYOFFICE/fix/v7.3.0-fix-bugs
Fix/v7.3.0 fix bugs
2023-02-01 17:59:43 +03:00
f77d3440f6 Merge pull request #1133 from ONLYOFFICE/feature/pre_7.3.1
Add support tls & no tls in socketio (double code)
2023-01-31 23:01:31 +05:00
1b84274673 Add support tls & no tls in socketio (double code) 2023-01-31 18:07:33 +05:00
f601d95d27 package embedding in binary ms 2023-01-31 11:31:26 +03:00
4e0e0265d0 fix bug #51001 2023-01-30 11:36:01 +03:00
43ebeec93c . 2023-01-23 20:32:21 +03:00
32a851b4e4 Merge commit 'a039a36b8fec3c6060b38aef476d8ce8e1845c76' into feature/odf_4 2023-01-23 19:56:11 +03:00
0f1d473360 [test] Update test 2023-01-15 17:40:51 +03:00
b848c1b828 . 2023-01-13 17:14:51 +03:00
06716f1607 . 2023-01-13 12:07:22 +03:00
996475fca2 . 2023-01-12 22:29:34 +03:00
243214b060 . 2023-01-12 22:14:07 +03:00
7382845517 . 2023-01-12 22:02:50 +03:00
463befcc67 Merge remote-tracking branch 'origin/fix/coderefact' into develop 2023-01-12 16:08:55 +03:00
b1148caaed Merge remote-tracking branch 'origin/fix/bug59621' into develop 2023-01-12 16:08:39 +03:00
c37105e4ae Xlsx refactoring
Correct includes using forward declarations.
x2t compiled(debug/release) and checked.
2023-01-12 15:44:13 +03:00
ec547778b5 Xlsx refactoring
correct includes using forward declarations
2023-01-12 09:26:29 +03:00
c14b1c73bf Xlsx refactoring
correct includes vai forward declarations
2023-01-11 21:53:50 +03:00
24236ed509 Merge branch 'develop' into fix/coderefact 2022-12-30 16:56:59 +03:00
11f645cb2b Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop 2022-12-30 16:54:42 +03:00
dd02f82697 Merge branch 'develop' into fix/coderefact 2022-12-30 16:36:19 +03:00
fba7ca95f8 . 2022-12-30 15:08:19 +03:00
d2a7f573c6 . 2022-12-30 12:38:56 +03:00
b0769432d3 Merge remote-tracking branch 'origin/fix/coderefact' into develop 2022-12-30 12:16:52 +03:00
bd343c88d1 Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-30 12:15:42 +03:00
243d8dd2e1 xls impl separation
current step is needed to compare the implementations of shapes and further merge with pptx
2022-12-30 12:15:40 +03:00
2a8e7667bd xls changes
revert common xls-pptx shapes (required common BaseShape)
2022-12-29 19:27:45 +03:00
4fa275fd55 bindoc: -unused includes 2022-12-29 14:16:08 +03:00
8182c95dfc txt: -unused includes 2022-12-29 08:20:01 +03:00
36a4aaad45 docx: - unused includes 2022-12-28 20:29:38 +03:00
e3e3f8a4e6 upd for #6e14576
ComplexTypes_AdditionConstructors: constructor calls a virtual function
2022-12-28 09:05:05 +03:00
5c46c77beb Merge remote-tracking branch 'origin/fix/coderefact' into develop 2022-12-26 15:43:26 +03:00
975a2409ab Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-26 15:42:48 +03:00
6e14576097 fix: constructor calls a virtual function
docx, pptx
2022-12-26 12:15:47 +03:00
c280e9c829 ppt, xls common shapes
duplicate shapes have been removed
2022-12-21 13:48:44 +03:00
d60d5eca86 ppt shapes (pri impl separation) 2022-12-18 10:02:52 +03:00
6a966c9cb9 xls, ppt, pptx changes
- implicit includes have been resolved
- preparation before common shapes(pri)
- x2t compiled
2022-12-17 14:19:53 +03:00
a637e40bad Merge remote-tracking branch 'origin/fix/coderefact' into develop 2022-12-16 16:01:31 +03:00
cdf3918489 Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-16 15:57:52 +03:00
4d94f248e2 pri for all shapes (ppt + pptx)
x2t compiled and checked.
TODO: _T->L
2022-12-15 12:51:42 +03:00
e91f52ca16 minors
DEFINE_SHAPE_CLASS for ppt & pptx
2022-12-15 09:47:48 +03:00
e77311983a fix build
x2t compiled
2022-12-14 21:44:42 +03:00
c0a833fac6 pptx shapes refact + pri 2022-12-14 21:13:51 +03:00
2093579b77 limits pri 2022-12-14 15:50:01 +03:00
3bd847237b beauty code pptx limits 2022-12-14 00:23:15 +03:00
7aea6bf451 operator= by string problem 2022-12-13 21:00:29 +03:00
db6ab0b003 Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-12 17:43:44 +03:00
2e2258f369 . 2022-12-12 17:39:53 +03:00
fc3f8e61fa Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-12 17:26:03 +03:00
74866e2898 . 2022-12-12 17:19:31 +03:00
14f04509a7 . 2022-12-12 17:18:51 +03:00
6a14a4daad Merge remote-tracking branch 'origin/release/v7.3.0' into develop 2022-12-12 11:37:20 +03:00
7efd8f5962 Merge pull request #1080 from ONLYOFFICE/release/v7.3.0
Fix build
2022-11-24 10:43:55 +03:00
e544845048 Merge pull request #1079 from ONLYOFFICE/release/v7.3.0
Fix build
2022-11-24 10:02:56 +03:00
26c2029300 Merge pull request #1077 from ONLYOFFICE/release/v7.3.0
Release/v7.3.0
2022-11-23 19:25:39 +03:00
3e092303c1 Merge branch 'release/v7.3.0' into develop 2022-11-23 10:47:04 +03:00
d173bfa1be [x2t] For bug 55472 2022-11-07 14:51:50 +03:00
c971cc1199 Change project params 2022-11-05 13:48:47 +03:00
0d95984c2a Change framework version (4.7.5 => 4.5) 2022-11-05 13:42:04 +03:00
e4d8ee832f Merge pull request #1064 from ONLYOFFICE/release/v7.3.0
Release/v7.3.0
2022-11-04 22:20:37 +03:00
76b8b83952 Merge remote-tracking branch 'origin/feature/odf_3' into feature/odf_4 2022-05-30 13:23:27 +03:00
e79c577a14 Fonts 2022-05-30 12:42:47 +04:00
f67c76eef0 Fonts 2022-05-30 12:41:10 +04:00
35b7a817f6 Merge remote-tracking branch 'origin/feature/odf_3' into feature/odf_4 2022-05-25 10:36:43 +03:00
569ef80535 Fonts and size 2022-05-24 18:16:56 +04:00
affd63ee09 Fonts and size 2022-05-13 15:58:14 +04:00
da1f26f028 Fonts and size 2022-05-13 14:00:06 +04:00
230b11a060 colorized log and lim 2022-04-20 17:29:15 +04:00
b3b1b89b1f colorized diacritics 2022-04-14 12:22:24 +04:00
aadea510b0 colorized formulas 2022-04-13 10:20:12 +04:00
dc9db9c4fc colorized math formulas 2022-04-11 21:33:05 +04:00
ddee54c7c5 color styles 2022-04-05 19:54:35 +04:00
1751 changed files with 76127 additions and 52616 deletions

View File

@ -0,0 +1,21 @@
#!/usr/bin/env python
import sys
sys.path.append('../../../../../../build_tools/scripts')
import base
file_path = "./socketio_internal_private_no_tls.h"
if not base.is_file(file_path):
file.delete_file(file_path)
base.copy_file("./socketio_internal_private.h", file_path)
header = "///////////////////////////////////////////////////////////\n"
header += "/// auto generated file. please use generator (make.py) ///\n"
header += "///////////////////////////////////////////////////////////\n"
header += "\n#pragma once"
base.replaceInFile(file_path, "#pragma once", header)
base.replaceInFile(file_path, "/socket.io-client-cpp/src/", "/socket.io-client-cpp/src_no_tls/")
base.replaceInFile(file_path, "sio::", "sio_no_tls::")
base.replaceInFile(file_path, "CIOWebSocket_private_tls", "CIOWebSocket_private_no_tls")

View File

@ -30,149 +30,19 @@
*
*/
#include "socketio_internal.h"
#include <iostream>
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/internal/sio_packet.h"
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/sio_client.h"
#include "../../../../../DesktopEditor/graphics/TemporaryCS.h"
#include "socketio_internal_private.h"
#include "socketio_internal_private_no_tls.h"
namespace NSNetwork
{
namespace NSWebSocket
{
class CIOWebSocket_private
{
public:
sio::client m_socket;
NSCriticalSection::CRITICAL_SECTION m_oCS;
CIOWebSocket* m_base;
public:
CIOWebSocket_private(CIOWebSocket* base)
{
m_base = base;
m_oCS.InitializeCriticalSection();
}
~CIOWebSocket_private()
{
m_socket.close();
m_oCS.DeleteCriticalSection();
}
public:
void event_onConnected()
{
m_base->listener->onOpen();
}
void event_onClose(sio::client::close_reason const& reason)
{
m_base->listener->onClose(0, "");
}
void event_onFail()
{
m_base->listener->onError("");
}
public:
void open(const std::map<std::string, std::string>& query)
{
m_socket.set_open_listener (std::bind(&CIOWebSocket_private::event_onConnected, this));
m_socket.set_close_listener(std::bind(&CIOWebSocket_private::event_onClose, this, std::placeholders::_1));
m_socket.set_fail_listener (std::bind(&CIOWebSocket_private::event_onFail, this));
sio::message::ptr objAuth = sio::object_message::create();
//std::string sAuth;
std::map<std::string, std::string> queryDst = query;
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
if (iterAuth != queryDst.end())
{
objAuth->get_map()["token"] = sio::string_message::create(iterAuth->second);
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
queryDst.erase(iterAuth);
}
//webSocket.connect(url, queryDst, sio::string_message::create(sAuth));
m_socket.connect(m_base->url, queryDst, objAuth);
m_socket.socket()->on("message", [&](sio::event& event){
CTemporaryCS oCS(&m_oCS);
const sio::message::ptr& message = event.get_message();
if (!message)
return;
// TODO: пока только текстовые и json команды
switch (message->get_flag())
{
case sio::message::flag_null:
{
m_base->listener->onMessage("null");
break;
}
case sio::message::flag_integer:
case sio::message::flag_double:
case sio::message::flag_boolean:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_binary:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_array:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_object:
{
sio::packet_manager manager;
std::stringstream ss;
sio::packet packet("/", message);
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
{
ss << *json;
});
manager.reset();
std::string result = ss.str();
std::size_t indexList = result.find('[');
std::size_t indexObject = result.find('{');
std::size_t indexString = result.find('"');
std::size_t index = indexList;
if (indexObject != std::string::npos && indexObject < index)
index = indexObject;
if (indexString != std::string::npos && indexString < index)
index = indexString;
if (index != std::string::npos)
result = result.substr(index);
else
result = "";
m_base->listener->onMessage(result);
break;
}
case sio::message::flag_string:
{
m_base->listener->onMessage(message->get_string());
break;
}
default:
break;
}
});
}
};
CIOWebSocket::CIOWebSocket(const std::string& url, std::shared_ptr<IListener> listener): CWebWorkerBase(url, listener)
{
m_internal = new CIOWebSocket_private(this);
if (0 == url.find("http://"))
m_internal = new CIOWebSocket_private_no_tls(this);
else
m_internal = new CIOWebSocket_private_tls(this);
}
void CIOWebSocket::open(const std::map<std::string, std::string>& query)
@ -182,36 +52,12 @@ namespace NSNetwork
void CIOWebSocket::send(const std::string& message_str)
{
//CTemporaryCS (&m_internal->m_oCS);
// если json -то надо объект
if (0 == message_str.find("{") ||
0 == message_str.find("["))
{
sio::packet_manager manager;
sio::message::ptr message;
manager.set_decode_callback([&](sio::packet const& p)
{
message = p.get_message();
});
// Magic message type / ID
manager.put_payload("42" + message_str);
manager.reset();
m_internal->m_socket.socket()->emit("message", message);
}
else
{
m_internal->m_socket.socket()->emit("message", sio::string_message::create(message_str));
}
m_internal->send(message_str);
}
void CIOWebSocket::close()
{
//CTemporaryCS (&m_internal->m_oCS);
m_internal->m_socket.socket()->off_all();
m_internal->m_socket.close();
m_internal->close();
}
CIOWebSocket::~CIOWebSocket()

View File

@ -34,12 +34,34 @@
#define _IO_WEB_SOCKET_H_
#include "../websocketbase.h"
#include "../../../../../DesktopEditor/graphics/TemporaryCS.h"
namespace NSNetwork
{
namespace NSWebSocket
{
class CIOWebSocket_private;
class CIOWebSocket;
class CIOWebSocket_private
{
protected:
CIOWebSocket* m_base;
NSCriticalSection::CRITICAL_SECTION m_oCS;
public:
CIOWebSocket_private(CIOWebSocket* base)
{
m_base = base;
m_oCS.InitializeCriticalSection();
}
virtual ~CIOWebSocket_private()
{
m_oCS.DeleteCriticalSection();
}
virtual void open(const std::map<std::string, std::string>& query) = 0;
virtual void send(const std::string& message) = 0;
virtual void close() = 0;
};
class CIOWebSocket: public CWebWorkerBase
{
private:
@ -55,6 +77,8 @@ namespace NSNetwork
virtual void close() override;
friend class CIOWebSocket_private;
friend class CIOWebSocket_private_tls;
friend class CIOWebSocket_private_no_tls;
};
}
}

View File

@ -0,0 +1,203 @@
/*
* (c) Copyright Ascensio System SIA 2010-2021
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "socketio_internal.h"
#include <iostream>
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/internal/sio_packet.h"
#include "../../../../3dParty/socketio/socket.io-client-cpp/src/sio_client.h"
namespace NSNetwork
{
namespace NSWebSocket
{
class CIOWebSocket_private_tls : public CIOWebSocket_private
{
public:
sio::client m_socket;
public:
CIOWebSocket_private_tls(CIOWebSocket* base) : CIOWebSocket_private(base)
{
m_base = base;
}
~CIOWebSocket_private_tls()
{
m_socket.close();
}
public:
void event_onConnected()
{
m_base->listener->onOpen();
}
void event_onClose(sio::client::close_reason const& reason)
{
m_base->listener->onClose(0, "");
}
void event_onFail()
{
m_base->listener->onError("");
}
public:
virtual void open(const std::map<std::string, std::string>& query) override
{
m_socket.set_open_listener (std::bind(&CIOWebSocket_private_tls::event_onConnected, this));
m_socket.set_close_listener(std::bind(&CIOWebSocket_private_tls::event_onClose, this, std::placeholders::_1));
m_socket.set_fail_listener (std::bind(&CIOWebSocket_private_tls::event_onFail, this));
sio::message::ptr objAuth = sio::object_message::create();
//std::string sAuth;
std::map<std::string, std::string> queryDst = query;
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
if (iterAuth != queryDst.end())
{
objAuth->get_map()["token"] = sio::string_message::create(iterAuth->second);
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
queryDst.erase(iterAuth);
}
//webSocket.connect(url, queryDst, sio::string_message::create(sAuth));
m_socket.connect(m_base->url, queryDst, objAuth);
m_socket.socket()->on("message", [&](sio::event& event){
CTemporaryCS oCS(&m_oCS);
const sio::message::ptr& message = event.get_message();
if (!message)
return;
// TODO: пока только текстовые и json команды
switch (message->get_flag())
{
case sio::message::flag_null:
{
m_base->listener->onMessage("null");
break;
}
case sio::message::flag_integer:
case sio::message::flag_double:
case sio::message::flag_boolean:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_binary:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_array:
{
m_base->listener->onMessage("");
break;
}
case sio::message::flag_object:
{
sio::packet_manager manager;
std::stringstream ss;
sio::packet packet("/", message);
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
{
ss << *json;
});
manager.reset();
std::string result = ss.str();
std::size_t indexList = result.find('[');
std::size_t indexObject = result.find('{');
std::size_t indexString = result.find('"');
std::size_t index = indexList;
if (indexObject != std::string::npos && indexObject < index)
index = indexObject;
if (indexString != std::string::npos && indexString < index)
index = indexString;
if (index != std::string::npos)
result = result.substr(index);
else
result = "";
m_base->listener->onMessage(result);
break;
}
case sio::message::flag_string:
{
m_base->listener->onMessage(message->get_string());
break;
}
default:
break;
}
});
}
virtual void send(const std::string& message_str) override
{
//CTemporaryCS (&m_internal->m_oCS);
// если json -то надо объект
if (0 == message_str.find("{") ||
0 == message_str.find("["))
{
sio::packet_manager manager;
sio::message::ptr message;
manager.set_decode_callback([&](sio::packet const& p)
{
message = p.get_message();
});
// Magic message type / ID
manager.put_payload("42" + message_str);
manager.reset();
m_socket.socket()->emit("message", message);
}
else
{
m_socket.socket()->emit("message", sio::string_message::create(message_str));
}
}
virtual void close() override
{
//CTemporaryCS (&m_internal->m_oCS);
m_socket.socket()->off_all();
m_socket.close();
}
};
}
}

View File

@ -0,0 +1,207 @@
/*
* (c) Copyright Ascensio System SIA 2010-2021
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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
*
*/
///////////////////////////////////////////////////////////
/// auto generated file. please use generator (make.py) ///
///////////////////////////////////////////////////////////
#pragma once
#include "socketio_internal.h"
#include <iostream>
#include "../../../../3dParty/socketio/socket.io-client-cpp/src_no_tls/internal/sio_packet.h"
#include "../../../../3dParty/socketio/socket.io-client-cpp/src_no_tls/sio_client.h"
namespace NSNetwork
{
namespace NSWebSocket
{
class CIOWebSocket_private_no_tls : public CIOWebSocket_private
{
public:
sio_no_tls::client m_socket;
public:
CIOWebSocket_private_no_tls(CIOWebSocket* base) : CIOWebSocket_private(base)
{
m_base = base;
}
~CIOWebSocket_private_no_tls()
{
m_socket.close();
}
public:
void event_onConnected()
{
m_base->listener->onOpen();
}
void event_onClose(sio_no_tls::client::close_reason const& reason)
{
m_base->listener->onClose(0, "");
}
void event_onFail()
{
m_base->listener->onError("");
}
public:
virtual void open(const std::map<std::string, std::string>& query) override
{
m_socket.set_open_listener (std::bind(&CIOWebSocket_private_no_tls::event_onConnected, this));
m_socket.set_close_listener(std::bind(&CIOWebSocket_private_no_tls::event_onClose, this, std::placeholders::_1));
m_socket.set_fail_listener (std::bind(&CIOWebSocket_private_no_tls::event_onFail, this));
sio_no_tls::message::ptr objAuth = sio_no_tls::object_message::create();
//std::string sAuth;
std::map<std::string, std::string> queryDst = query;
std::map<std::string, std::string>::iterator iterAuth = queryDst.find("token");
if (iterAuth != queryDst.end())
{
objAuth->get_map()["token"] = sio_no_tls::string_message::create(iterAuth->second);
//sAuth = "{\"token\":\"" + iterAuth->second + "\"}";
queryDst.erase(iterAuth);
}
//webSocket.connect(url, queryDst, sio_no_tls::string_message::create(sAuth));
m_socket.connect(m_base->url, queryDst, objAuth);
m_socket.socket()->on("message", [&](sio_no_tls::event& event){
CTemporaryCS oCS(&m_oCS);
const sio_no_tls::message::ptr& message = event.get_message();
if (!message)
return;
// TODO: пока только текстовые и json команды
switch (message->get_flag())
{
case sio_no_tls::message::flag_null:
{
m_base->listener->onMessage("null");
break;
}
case sio_no_tls::message::flag_integer:
case sio_no_tls::message::flag_double:
case sio_no_tls::message::flag_boolean:
{
m_base->listener->onMessage("");
break;
}
case sio_no_tls::message::flag_binary:
{
m_base->listener->onMessage("");
break;
}
case sio_no_tls::message::flag_array:
{
m_base->listener->onMessage("");
break;
}
case sio_no_tls::message::flag_object:
{
sio_no_tls::packet_manager manager;
std::stringstream ss;
sio_no_tls::packet packet("/", message);
manager.encode( packet, [&](bool isBinary, std::shared_ptr<const std::string> const& json)
{
ss << *json;
});
manager.reset();
std::string result = ss.str();
std::size_t indexList = result.find('[');
std::size_t indexObject = result.find('{');
std::size_t indexString = result.find('"');
std::size_t index = indexList;
if (indexObject != std::string::npos && indexObject < index)
index = indexObject;
if (indexString != std::string::npos && indexString < index)
index = indexString;
if (index != std::string::npos)
result = result.substr(index);
else
result = "";
m_base->listener->onMessage(result);
break;
}
case sio_no_tls::message::flag_string:
{
m_base->listener->onMessage(message->get_string());
break;
}
default:
break;
}
});
}
virtual void send(const std::string& message_str) override
{
//CTemporaryCS (&m_internal->m_oCS);
// если json -то надо объект
if (0 == message_str.find("{") ||
0 == message_str.find("["))
{
sio_no_tls::packet_manager manager;
sio_no_tls::message::ptr message;
manager.set_decode_callback([&](sio_no_tls::packet const& p)
{
message = p.get_message();
});
// Magic message type / ID
manager.put_payload("42" + message_str);
manager.reset();
m_socket.socket()->emit("message", message);
}
else
{
m_socket.socket()->emit("message", sio_no_tls::string_message::create(message_str));
}
}
virtual void close() override
{
//CTemporaryCS (&m_internal->m_oCS);
m_socket.socket()->off_all();
m_socket.close();
}
};
}
}

View File

@ -35,6 +35,19 @@ libsocketio {
$$SOCKET_IO_LIB/src/sio_socket.cpp \
$$SOCKET_IO_LIB/src/sio_client.cpp
HEADERS += \
$$SOCKET_IO_LIB/src_no_tls/internal/sio_client_impl.h \
$$SOCKET_IO_LIB/src_no_tls/internal/sio_packet.h \
$$SOCKET_IO_LIB/src_no_tls/sio_message.h \
$$SOCKET_IO_LIB/src_no_tls/sio_socket.h \
$$SOCKET_IO_LIB/src_no_tls/sio_client.h
SOURCES += \
$$SOCKET_IO_LIB/src_no_tls/internal/sio_client_impl.cpp \
$$SOCKET_IO_LIB/src_no_tls/internal/sio_packet.cpp \
$$SOCKET_IO_LIB/src_no_tls/sio_socket.cpp \
$$SOCKET_IO_LIB/src_no_tls/sio_client.cpp
DEFINES += \
BOOST_DATE_TIME_NO_LIB \
BOOST_REGEX_NO_LIB \
@ -45,13 +58,18 @@ libsocketio {
_WEBSOCKETPP_CPP11_TYPE_TRAITS_ \
_WEBSOCKETPP_CPP11_CHRONO_ \
\
"SIO_TLS=1"
"SIO_TLS=1" \
"SIO_TLS_NO=0"
include($$PWD/../../3dParty/boost/boost.pri)
DEFINES += USE_IOWEBSOCKET
HEADERS += $$PWD/src/socketio/socketio_internal.h
HEADERS += \
$$PWD/src/socketio/socketio_internal.h \
$$PWD/src/socketio/socketio_internal_private.h \
$$PWD/src/socketio/socketio_internal_private_no_tls.h
SOURCES += $$PWD/src/socketio/socketio_internal.cpp
}

View File

@ -103,7 +103,7 @@ std::shared_ptr<CFStream> CFStorage::GetStream(const std::wstring& streamName)
}
else
{
throw CFItemNotFound(L"Cannot find item [" + streamName + L"] within the current storage");
return std::shared_ptr<CFStream>();
}
}

View File

@ -20,11 +20,10 @@
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{10124551-28B8-4CA0-8FBA-420CF9602CF3}</ProjectGuid>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>doctrendererwrapper</RootNamespace>
<ProjectName>docbuilder.net</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">

View File

@ -76,8 +76,8 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
{
LOGGER_SPEED_START
if (retValue)
retValue->Clear();
if (retValue)
retValue->Clear();
std::string commandA = U_TO_UTF8(command);
//commandA = "Api." + commandA;
@ -87,7 +87,7 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
LOGGER_SPEED_LAP("compile_command")
JSSmart<CJSValue> retNativeVal = m_context->runScript(commandA, try_catch);
JSSmart<CJSValue> retNativeVal = m_context->runScript(commandA, try_catch);
if(try_catch->Check())
return false;
@ -100,7 +100,7 @@ bool CV8RealTimeWorker::ExecuteCommand(const std::wstring& command, NSDoctRender
LOGGER_SPEED_LAP("run_command")
return true;
return true;
}
std::string CV8RealTimeWorker::GetGlobalVariable()
@ -139,7 +139,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
{
LOGGER_SPEED_START
JSSmart<CJSContextScope> context_scope = m_context->CreateContextScope();
JSSmart<CJSContextScope> context_scope = m_context->CreateContextScope();
JSSmart<CJSTryCatch> try_catch = m_context->GetExceptions();
LOGGER_SPEED_LAP("compile");
@ -150,7 +150,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
LOGGER_SPEED_LAP("run")
if (true)
if (true)
{
std::string sArg = m_sUtf8ArgumentJSON;
if (sArg.empty())
@ -249,7 +249,7 @@ bool CV8RealTimeWorker::OpenFile(const std::wstring& sBasePath, const std::wstri
LOGGER_SPEED_LAP("open")
return !bIsBreak;
return !bIsBreak;
}
bool CV8RealTimeWorker::SaveFileWithChanges(int type, const std::wstring& _path, const std::wstring& sJsonParams)

View File

@ -890,7 +890,7 @@ namespace NSDoctRenderer
LOGGER_SPEED_START
CheckFileDir();
CheckFileDir();
NSDirectory::CreateDirectory(m_sFileDir + L"/changes");
std::wstring sExtCopy = GetFileCopyExt(path);
@ -912,8 +912,8 @@ namespace NSDoctRenderer
LOGGER_SPEED_LAP("open_convert")
if (0 == nReturnCode)
return 0;
if (0 == nReturnCode)
return 0;
NSDirectory::DeleteDirectory(m_sFileDir);
m_sFileDir = L"";

View File

@ -14,8 +14,8 @@
-(JSValue*) CheckNextChange;
-(JSValue*) GetCountChanges;
-(JSValue*) GetChangesFile : (JSValue*)index;
-(JSValue*) Save_AllocNative : (JSValue*)len;
-(JSValue*) Save_ReAllocNative : (JSValue*)pos : (JSValue*)len;
//-(JSValue*) Save_AllocNative : (JSValue*)len;
//-(JSValue*) Save_ReAllocNative : (JSValue*)pos : (JSValue*)len;
-(JSValue*) Save_End : (JSValue*)pos : (JSValue*)len;
-(JSValue*) AddImageInChanges : (JSValue*)img;
-(JSValue*) ConsoleLog : (JSValue*)message;
@ -54,8 +54,8 @@ FUNCTION_WRAPPER_JS(GetEditorType, GetEditorType)
FUNCTION_WRAPPER_JS(CheckNextChange, CheckNextChange)
FUNCTION_WRAPPER_JS(GetCountChanges, GetCountChanges)
FUNCTION_WRAPPER_JS_1(GetChangesFile, GetChangesFile)
FUNCTION_WRAPPER_JS_1(Save_AllocNative, Save_AllocNative)
FUNCTION_WRAPPER_JS_2(Save_ReAllocNative, Save_ReAllocNative)
//FUNCTION_WRAPPER_JS_1(Save_AllocNative, Save_AllocNative)
//FUNCTION_WRAPPER_JS_2(Save_ReAllocNative, Save_ReAllocNative)
FUNCTION_WRAPPER_JS_2(Save_End, Save_End)
FUNCTION_WRAPPER_JS_1(AddImageInChanges, AddImageInChanges)
FUNCTION_WRAPPER_JS_1(ConsoleLog, ConsoleLog)

View File

@ -3,147 +3,159 @@
namespace NSNativeControl
{
#define CURRENTWRAPPER CNativeControlEmbed
#define CURRENTWRAPPER CNativeControlEmbed
FUNCTION_WRAPPER_V8(_GetFilePath, GetFilePath)
FUNCTION_WRAPPER_V8_1(_SetFilePath, SetFilePath)
FUNCTION_WRAPPER_V8(_GetFileId, GetFileId)
FUNCTION_WRAPPER_V8_1(_SetFileId, SetFileId)
FUNCTION_WRAPPER_V8_1(_GetFileArrayBuffer, GetFileBinary)
FUNCTION_WRAPPER_V8_1(_GetFontArrayBuffer, GetFontBinary)
FUNCTION_WRAPPER_V8(_GetFontsDirectory, GetFontsDirectory)
FUNCTION_WRAPPER_V8_1(_GetFileString, GetFileString)
FUNCTION_WRAPPER_V8(_GetEditorType, GetEditorType)
FUNCTION_WRAPPER_V8(_CheckNextChange, CheckNextChange)
FUNCTION_WRAPPER_V8(_GetChangesCount, GetCountChanges)
FUNCTION_WRAPPER_V8_1(_GetChangesFile, GetChangesFile)
FUNCTION_WRAPPER_V8_1(_Save_AllocNative, Save_AllocNative)
FUNCTION_WRAPPER_V8_2(_Save_ReAllocNative, Save_ReAllocNative)
FUNCTION_WRAPPER_V8_2(_Save_End, Save_End)
FUNCTION_WRAPPER_V8_1(_AddImageInChanges, AddImageInChanges)
FUNCTION_WRAPPER_V8_1(_ConsoleLog, ConsoleLog)
FUNCTION_WRAPPER_V8_3(_SaveChanges, SaveChanges)
FUNCTION_WRAPPER_V8_1(_zipOpenFile, zipOpenFile)
FUNCTION_WRAPPER_V8_1(_zipOpenFileBase64, zipOpenFileBase64)
FUNCTION_WRAPPER_V8_1(_zipGetFileAsString, zipGetFileAsString)
FUNCTION_WRAPPER_V8_1(_zipGetFileAsBinary, zipGetFileAsBinary)
FUNCTION_WRAPPER_V8(_zipCloseFile, zipCloseFile)
FUNCTION_WRAPPER_V8_1(_GetImageUrl, GetImageUrl)
FUNCTION_WRAPPER_V8_1(_GetImageOriginalSize, GetImageOriginalSize)
FUNCTION_WRAPPER_V8(_GetImagesPath, GetImagesPath)
FUNCTION_WRAPPER_V8(_GetFilePath, GetFilePath)
FUNCTION_WRAPPER_V8_1(_SetFilePath, SetFilePath)
FUNCTION_WRAPPER_V8(_GetFileId, GetFileId)
FUNCTION_WRAPPER_V8_1(_SetFileId, SetFileId)
FUNCTION_WRAPPER_V8_1(_GetFileArrayBuffer, GetFileBinary)
FUNCTION_WRAPPER_V8_1(_GetFontArrayBuffer, GetFontBinary)
FUNCTION_WRAPPER_V8(_GetFontsDirectory, GetFontsDirectory)
FUNCTION_WRAPPER_V8_1(_GetFileString, GetFileString)
FUNCTION_WRAPPER_V8(_GetEditorType, GetEditorType)
FUNCTION_WRAPPER_V8(_CheckNextChange, CheckNextChange)
FUNCTION_WRAPPER_V8(_GetChangesCount, GetCountChanges)
FUNCTION_WRAPPER_V8_1(_GetChangesFile, GetChangesFile)
FUNCTION_WRAPPER_V8_1(_Save_AllocNative, Save_AllocNative)
FUNCTION_WRAPPER_V8_2(_Save_ReAllocNative, Save_ReAllocNative)
FUNCTION_WRAPPER_V8_2(_Save_End, Save_End)
FUNCTION_WRAPPER_V8_1(_AddImageInChanges, AddImageInChanges)
FUNCTION_WRAPPER_V8_1(_ConsoleLog, ConsoleLog)
FUNCTION_WRAPPER_V8_3(_SaveChanges, SaveChanges)
FUNCTION_WRAPPER_V8_1(_zipOpenFile, zipOpenFile)
FUNCTION_WRAPPER_V8_1(_zipOpenFileBase64, zipOpenFileBase64)
FUNCTION_WRAPPER_V8_1(_zipGetFileAsString, zipGetFileAsString)
FUNCTION_WRAPPER_V8_1(_zipGetFileAsBinary, zipGetFileAsBinary)
FUNCTION_WRAPPER_V8(_zipCloseFile, zipCloseFile)
FUNCTION_WRAPPER_V8_1(_GetImageUrl, GetImageUrl)
FUNCTION_WRAPPER_V8_1(_GetImageOriginalSize, GetImageOriginalSize)
FUNCTION_WRAPPER_V8(_GetImagesPath, GetImagesPath)
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplate(v8::Isolate* isolate)
{
v8::EscapableHandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplate(v8::Isolate* isolate)
{
v8::EscapableHandleScope handle_scope(isolate);
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
result->SetInternalFieldCount(1);
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
result->SetInternalFieldCount(1);
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
NSV8Objects::Template_Set(result, "SaveChanges", _SaveChanges);
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
//NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
//NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
NSV8Objects::Template_Set(result, "SaveChanges", _SaveChanges);
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
return handle_scope.Escape(result);
}
return handle_scope.Escape(result);
}
// Без SaveChanges
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplateBuilder(v8::Isolate* isolate)
{
v8::EscapableHandleScope handle_scope(isolate);
// Без SaveChanges
v8::Handle<v8::ObjectTemplate> CreateNativeControlTemplateBuilder(v8::Isolate* isolate)
{
v8::EscapableHandleScope handle_scope(isolate);
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
result->SetInternalFieldCount(1);
v8::Local<v8::ObjectTemplate> result = v8::ObjectTemplate::New(V8IsolateOneArg);
result->SetInternalFieldCount(1);
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
NSV8Objects::Template_Set(result, "SetFilePath", _SetFilePath);
NSV8Objects::Template_Set(result, "GetFilePath", _GetFilePath);
NSV8Objects::Template_Set(result, "SetFileId", _SetFileId);
NSV8Objects::Template_Set(result, "GetFileId", _GetFileId);
NSV8Objects::Template_Set(result, "GetFileBinary", _GetFileArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontBinary", _GetFontArrayBuffer);
NSV8Objects::Template_Set(result, "GetFontsDirectory", _GetFontsDirectory);
NSV8Objects::Template_Set(result, "GetFileString", _GetFileString);
NSV8Objects::Template_Set(result, "GetEditorType", _GetEditorType);
NSV8Objects::Template_Set(result, "CheckNextChange", _CheckNextChange);
NSV8Objects::Template_Set(result, "GetCountChanges", _GetChangesCount);
NSV8Objects::Template_Set(result, "GetChangesFile", _GetChangesFile);
//NSV8Objects::Template_Set(result, "Save_AllocNative", _Save_AllocNative);
//NSV8Objects::Template_Set(result, "Save_ReAllocNative", _Save_ReAllocNative);
NSV8Objects::Template_Set(result, "Save_End", _Save_End);
NSV8Objects::Template_Set(result, "AddImageInChanges", _AddImageInChanges);
NSV8Objects::Template_Set(result, "ConsoleLog", _ConsoleLog);
NSV8Objects::Template_Set(result, "ZipOpen", _zipOpenFile);
NSV8Objects::Template_Set(result, "ZipOpenBase64", _zipOpenFileBase64);
NSV8Objects::Template_Set(result, "ZipFileAsString", _zipGetFileAsString);
NSV8Objects::Template_Set(result, "ZipFileAsBinary", _zipGetFileAsBinary);
NSV8Objects::Template_Set(result, "ZipClose", _zipCloseFile);
NSV8Objects::Template_Set(result, "getImageUrl", _GetImageUrl);
NSV8Objects::Template_Set(result, "getImagesDirectory", _GetImagesPath);
NSV8Objects::Template_Set(result, "GetImageOriginalSize", _GetImageOriginalSize);
return handle_scope.Escape(result);
}
return handle_scope.Escape(result);
}
void CreateNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
void CreateNativeObject(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplate(isolate);
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
if (CIsolateAdditionalData::CheckSingletonType(isolate, CIsolateAdditionalData::iadtSingletonNative))
{
args.GetReturnValue().Set(v8::Undefined(isolate));
return;
}
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplate(isolate);
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
args.GetReturnValue().Set(obj);
}
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
// Без SaveChanges
void CreateNativeObjectBuilder(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
args.GetReturnValue().Set(obj);
}
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplateBuilder(isolate);
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
// Без SaveChanges
void CreateNativeObjectBuilder(const v8::FunctionCallbackInfo<v8::Value>& args)
{
v8::Isolate* isolate = args.GetIsolate();
v8::HandleScope scope(isolate);
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
if (CIsolateAdditionalData::CheckSingletonType(isolate, CIsolateAdditionalData::iadtSingletonNative))
{
args.GetReturnValue().Set(v8::Undefined(isolate));
return;
}
args.GetReturnValue().Set(obj);
}
v8::Handle<v8::ObjectTemplate> NativeObjectTemplate = CreateNativeControlTemplateBuilder(isolate);
CNativeControlEmbed* pNativeObject = new CNativeControlEmbed();
v8::Local<v8::Object> obj = NativeObjectTemplate->NewInstance(isolate->GetCurrentContext()).ToLocalChecked();
obj->SetInternalField(0, v8::External::New(CV8Worker::GetCurrent(), pNativeObject));
args.GetReturnValue().Set(obj);
}
}
void CNativeControlEmbed::CreateObjectInContext(const std::string& name, JSSmart<CJSContext> context)
{
v8::Isolate* current = CV8Worker::GetCurrent();
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObject));
v8::Isolate* current = CV8Worker::GetCurrent();
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObject));
}
void CNativeControlEmbed::CreateObjectBuilderInContext(const std::string& name, JSSmart<CJSContext> context)
{
v8::Isolate* current = CV8Worker::GetCurrent();
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObjectBuilder));
v8::Isolate* current = CV8Worker::GetCurrent();
context->m_internal->m_global->Set(current, name.c_str(), v8::FunctionTemplate::New(current, NSNativeControl::CreateNativeObjectBuilder));
}

View File

@ -219,6 +219,17 @@ namespace NSJSBase
#ifdef V8_INSPECTOR
v8_debug::disposeInspector(m_internal->m_context);
#endif
unsigned int nEmbedDataCount = m_internal->m_isolate->GetNumberOfDataSlots();
if (nEmbedDataCount > 0)
{
void* pSingletonData = m_internal->m_isolate->GetData(0);
if (NULL != pSingletonData)
{
CIsolateAdditionalData* pData = (CIsolateAdditionalData*)pSingletonData;
delete pData;
}
}
m_internal->m_isolate->Dispose();
m_internal->m_isolate = NULL;
}

View File

@ -72,6 +72,44 @@ public:
};
#endif
class CIsolateAdditionalData
{
public:
enum IsolateAdditionlDataType {
iadtSingletonNative = 0,
iadtUndefined = 255
};
IsolateAdditionlDataType m_eType;
public:
CIsolateAdditionalData(const IsolateAdditionlDataType& type = iadtUndefined) { m_eType = type; }
virtual ~CIsolateAdditionalData() {}
static bool CheckSingletonType(v8::Isolate* isolate, const IsolateAdditionlDataType& type, const bool& isAdd = true)
{
unsigned int nCount = isolate->GetNumberOfDataSlots();
if (nCount == 0)
return false;
void* pSingletonData = isolate->GetData(0);
if (NULL != pSingletonData)
{
CIsolateAdditionalData* pData = (CIsolateAdditionalData*)pSingletonData;
if (pData->m_eType == type)
return true;
return false;
}
if (isAdd)
{
isolate->SetData(0, (void*)(new CIsolateAdditionalData(type)));
}
return false;
}
};
class CV8Initializer
{
private:

View File

@ -69,6 +69,8 @@ namespace Aggplus
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
m_nBlendMode = agg::comp_op_src_over;
m_bIs0PenWidthAs1px = false;
}
CGraphics::CGraphics(int dwWidth, int dwHeight, int stride, BYTE* pBuffer) : m_dwConfigFlags(0)
@ -103,6 +105,8 @@ namespace Aggplus
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
m_nBlendMode = agg::comp_op_src_over;
m_bIs0PenWidthAs1px = false;
}
CGraphics::CGraphics(CImage* pImage) : m_dwConfigFlags(0)
@ -142,6 +146,8 @@ namespace Aggplus
m_nTextRenderMode = FT_RENDER_MODE_NORMAL;
m_nBlendMode = agg::comp_op_src_over;
m_bIs0PenWidthAs1px = false;
}
CGraphics::~CGraphics()
@ -609,7 +615,8 @@ namespace Aggplus
if ((0 == dWidth && !m_bIntegerGrid) || dWidth < dWidthMinSize)
{
//dWidth = dWidthMinSize;
if (m_bIs0PenWidthAs1px)
dWidth = dWidthMinSize;
}
double dblMiterLimit = pPen->MiterLimit;

View File

@ -309,6 +309,8 @@ public:
int m_nTextRenderMode;
unsigned int m_nBlendMode;
bool m_bIs0PenWidthAs1px;
public:
CGraphics();

View File

@ -1158,6 +1158,9 @@ HRESULT CGraphicsRenderer::CommandLong(const LONG& lType, const LONG& lCommand)
m_pRenderer->m_bIsDarkMode = (1 == lCommand);
if (c_nUseDictionaryFonts == lType && m_pFontManager)
m_pFontManager->SetUseCorrentFontByName((1 == lCommand) ? true : false);
if (c_nPenWidth0As1px == lType && m_pRenderer)
m_pRenderer->m_bIs0PenWidthAs1px = (1 == lCommand) ? true : false;
return S_OK;
}
HRESULT CGraphicsRenderer::CommandDouble(const LONG& lType, const double& dCommand)

View File

@ -107,6 +107,7 @@ const long c_nParamFlipY = 0x0002;
const long c_nFlipNextRotate = 0x0004;
const long c_nDarkMode = 0x0008;
const long c_nUseDictionaryFonts = 0x0010;
const long c_nPenWidth0As1px = 0x0020;
// типы рендерера
const long c_nUnknownRenderer = 0x0000;

View File

@ -0,0 +1,111 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BaseShape.h"
#include "CustomShape.h"
namespace NSCustomShapesConvert
{
CHandle_::CHandle_()
{
position = _T("");
xrange = _T("");
yrange = _T("");
switchHandle = _T("");
polar = _T("");
radiusrange = _T("");
}
CHandle_& CHandle_::operator =(const CHandle_& oSrc)
{
position = oSrc.position;
xrange = oSrc.xrange;
yrange = oSrc.yrange;
switchHandle = oSrc.switchHandle;
polar = oSrc.polar;
radiusrange = oSrc.radiusrange;
return (*this);
}
CBaseShape::CBaseShape()
{
}
CBaseShape* CBaseShape::CreateByType( int ShapeType)
{
return CCustomShape::CreateByType((oox::MSOSPT)ShapeType);
}
bool CBaseShape::SetType( int ShapeType)
{
return ((CCustomShape*)this)->SetShapeType((oox::MSOSPT)ShapeType);
}
bool CBaseShape::SetProperties(CBaseShape* Shape)
{
if( Shape == NULL)
return false;
m_oPath = Shape->m_oPath;
m_strPath = Shape->m_strPath;
m_strRect = Shape->m_strRect;
m_arAdjustments.clear();
for(size_t i = 0; i < Shape->m_arAdjustments.size(); i++)
m_arAdjustments.push_back(Shape->m_arAdjustments[i]);
m_arGuides.clear();
for(size_t i = 0; i < Shape->m_arGuides.size(); i++)
m_arGuides.push_back(Shape->m_arGuides[i]);
m_eJoin = Shape->m_eJoin;
m_bConcentricFill = Shape->m_bConcentricFill;
m_arConnectors.clear();
for(size_t i = 0; i < Shape->m_arConnectors.size(); i++)
m_arConnectors.push_back(Shape->m_arConnectors[i]);
m_arConnectorAngles.clear();
for(size_t i = 0; i < Shape->m_arConnectorAngles.size(); i++)
m_arConnectorAngles.push_back(Shape->m_arConnectorAngles[i]);
m_arTextRects.clear();
for(size_t i = 0; i < Shape->m_arTextRects.size(); i++)
m_arTextRects.push_back(Shape->m_arTextRects[i]);
m_arHandles.clear();
for(size_t i = 0; i < Shape->m_arHandles.size(); i++)
m_arHandles.push_back(Shape->m_arHandles[i]);
m_strRect = Shape->m_strRect;
m_strTransformXml = Shape->m_strTransformXml;
return true;
}
}

View File

@ -47,25 +47,9 @@ public:
std::wstring radiusrange;
public:
CHandle_()
{
position = _T("");
xrange = _T("");
yrange = _T("");
switchHandle = _T("");
polar = _T("");
radiusrange = _T("");
}
CHandle_& operator =(const CHandle_& oSrc)
{
position = oSrc.position;
xrange = oSrc.xrange;
yrange = oSrc.yrange;
switchHandle = oSrc.switchHandle;
polar = oSrc.polar;
radiusrange = oSrc.radiusrange;
return (*this);
}
CHandle_();
CHandle_& operator =(const CHandle_& oSrc);
};
class CBaseShape
@ -93,10 +77,9 @@ public:
LONG m_lLimoY;
CPath m_oPath;
public:
CBaseShape()
{
}
CBaseShape();
virtual bool LoadTextRect(const std::wstring& xml) = 0;
virtual bool LoadPathList(const std::wstring& xml) = 0;
@ -105,47 +88,7 @@ public:
bool SetType(int ShapeType);
virtual bool SetProperties(CBaseShape* Shape)
{
if( Shape == NULL)
return false;
m_oPath = Shape->m_oPath;
m_strPath = Shape->m_strPath;
m_strRect = Shape->m_strRect;
m_arAdjustments.clear();
for(size_t i = 0; i < Shape->m_arAdjustments.size(); i++)
m_arAdjustments.push_back(Shape->m_arAdjustments[i]);
m_arGuides.clear();
for(size_t i = 0; i < Shape->m_arGuides.size(); i++)
m_arGuides.push_back(Shape->m_arGuides[i]);
m_eJoin = Shape->m_eJoin;
m_bConcentricFill = Shape->m_bConcentricFill;
m_arConnectors.clear();
for(size_t i = 0; i < Shape->m_arConnectors.size(); i++)
m_arConnectors.push_back(Shape->m_arConnectors[i]);
m_arConnectorAngles.clear();
for(size_t i = 0; i < Shape->m_arConnectorAngles.size(); i++)
m_arConnectorAngles.push_back(Shape->m_arConnectorAngles[i]);
m_arTextRects.clear();
for(size_t i = 0; i < Shape->m_arTextRects.size(); i++)
m_arTextRects.push_back(Shape->m_arTextRects[i]);
m_arHandles.clear();
for(size_t i = 0; i < Shape->m_arHandles.size(); i++)
m_arHandles.push_back(Shape->m_arHandles[i]);
m_strRect = Shape->m_strRect;
m_strTransformXml = Shape->m_strTransformXml;
return true;
}
virtual bool SetProperties(CBaseShape* Shape);
//virtual bool SetToDublicate(CBaseShape* Shape)
//{

View File

@ -0,0 +1,365 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "CustomGeomShape.h"
namespace NSCustomShapesConvert
{
CSegment::CSegment(RulesType eType, WORD nCount)
{
m_eRuler = eType;
m_nCount = nCount;
}
CSegment::CSegment(const CSegment& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_nCount = oSrc.m_nCount;
}
CSegment& CSegment::operator=(const CSegment& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_nCount = oSrc.m_nCount;
return (*this);
}
CSegment::~CSegment()
{
}
CGuide::CGuide()
{
m_eType = ftVal;
m_param_type1 = 0;
m_param_type2 = 0;
m_param_type3 = 0;
m_param_value1 = 0;
m_param_value2 = 0;
m_param_value3 = 0;
}
CGuide::CGuide(const CGuide& oSrc)
{
*this = oSrc;
}
CGuide& CGuide::operator=(const CGuide& oSrc)
{
m_eType = oSrc.m_eType;
m_param_type1 = oSrc.m_param_type1;
m_param_type2 = oSrc.m_param_type2;
m_param_type3 = oSrc.m_param_type3;
m_param_value1 = oSrc.m_param_value1;
m_param_value2 = oSrc.m_param_value2;
m_param_value3 = oSrc.m_param_value3;
return *this;
}
void CGuide::SetToFormula(NSCustomShapesConvert::CFormula& oFormula)
{
oFormula.m_eFormulaType = m_eType;
SetParam(m_param_type1, m_param_value1, oFormula.m_eType1, oFormula.m_lParam1);
SetParam(m_param_type2, m_param_value2, oFormula.m_eType2, oFormula.m_lParam2);
SetParam(m_param_type3, m_param_value3, oFormula.m_eType3, oFormula.m_lParam3);
}
void CGuide::SetParam(BYTE type, WORD param, ParamType& param_type, LONG& param_value)
{
if (0 == type)
{
param_type = ptValue;
param_value = (LONG)param;
}
if (0x0140 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML / 2;
return;
}
if (0x0141 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML / 2;
return;
}
if (0x0142 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML;
return;
}
if (0x0143 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML;
return;
}
if ((0x0147 <= param) && (param <= 0x014E))
{
param_type = ptAdjust;
param_value = (LONG)(param - 0x0147);
return;
}
if ((0x0400 <= param) && (param <= 0x047F))
{
param_type = ptFormula;
param_value = (LONG)(param - 0x0400);
return;
}
param_type = ptValue;
param_value = ShapeSizeVML;
}
CCustomVML::CCustomVML() : m_arVertices(), m_arSegments(), m_arGuides(), m_pAdjustValues(NULL)
{
m_ePath = rtCurveTo/*rtLineTo*/;
m_bIsPathPresent = false;
}
CCustomVML::CCustomVML(const CCustomVML& oSrc)
{
*this = oSrc;
}
CCustomVML& CCustomVML::operator=(const CCustomVML& oSrc)
{
m_ePath = oSrc.m_ePath;
m_arVertices.clear();
m_arVertices.insert(m_arVertices.end(), oSrc.m_arVertices.begin(), oSrc.m_arVertices.end());
m_arSegments.clear();
m_arSegments.insert(m_arSegments.end(), oSrc.m_arSegments.begin(), oSrc.m_arSegments.end());
m_arGuides.clear();
m_arGuides.insert(m_arGuides.end(), oSrc.m_arGuides.begin(), oSrc.m_arGuides.end());
m_pAdjustValues = oSrc.m_pAdjustValues;
m_bIsPathPresent = oSrc.m_bIsPathPresent;
return *this;
}
CCustomVML::~CCustomVML()
{
}
bool CCustomVML::IsCustom()
{
return (!m_arVertices.empty() && (m_bIsPathPresent || !m_arSegments.empty()));
}
void CCustomVML::SetPath(RulesType ePath)
{
m_ePath = ePath;
m_bIsPathPresent = true;
}
void CCustomVML::LoadAHs(unsigned char* buffer, int buffer_size)
{
}
void CCustomVML::addSegment(RulesType eRuler, _UINT16 nCount)
{
CSegment oInfo(eRuler, nCount);
m_arSegments.push_back(oInfo);
}
void CCustomVML::addGuide(CGuide & oInfo)
{
m_arGuides.push_back(oInfo);
}
void CCustomVML::addAdjust(int lIndex, int lValue)
{
if (NULL == m_pAdjustValues)
return;
int lCount = m_pAdjustValues->size();
while (lCount <= lIndex)
{
m_pAdjustValues->push_back(0);
lCount = m_pAdjustValues->size();
}
(*m_pAdjustValues)[lIndex] = lValue;
}
void CCustomVML::SetAdjusts(std::vector<LONG>* pList)
{
m_pAdjustValues = pList;
}
void CCustomVML::ToCustomShape(CBaseShape* pShape, NSCustomShapesConvert::CFormulasManager& oManager)
{
if ((NULL == pShape) || (!IsCustom()))
return;
oManager.Clear();
// сначала заполним формулы
for (size_t nIndex = 0; nIndex < m_arGuides.size(); ++nIndex)
{
NSCustomShapesConvert::CFormula oF;
m_arGuides[nIndex].SetToFormula(oF);
oManager.AddFormula(oF);
}
oManager.Clear(m_pAdjustValues);
std::wstring strPath = _T("");
bool bBreak = false;
long lMinF = (_INT32)0x80000000;
long lMaxF = (_INT32)0x8000007F;
int nGuideIndex_x , nGuideIndex_y;
if (0 == m_arSegments.size())
{
strPath = GetRulerVML(m_ePath);
for (size_t nIndex = 0; nIndex < m_arVertices.size(); ++nIndex)
{
nGuideIndex_x = nGuideIndex_y = -1;
if (lMaxF > m_arVertices[nIndex].x ) nGuideIndex_x = (DWORD)m_arVertices[nIndex].x - (DWORD)lMinF;
if (lMaxF > m_arVertices[nIndex].y ) nGuideIndex_y = (DWORD)m_arVertices[nIndex].y - (DWORD)lMinF;
if (nGuideIndex_x >= 0 && nGuideIndex_x < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_x].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nIndex].x) + L",";
}
if (nGuideIndex_y >= 0 && nGuideIndex_y < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_y].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nIndex].y) + L",";
}
}
strPath.erase(strPath.length() - 1);
}
else
{
size_t nStart = 0;
size_t nEnd = 0;
for (size_t nS = 0; nS < m_arSegments.size(); ++nS)
{
if (bBreak)
{
if ((rtEnd != m_arSegments[nS].m_eRuler) &&
(rtNoFill != m_arSegments[nS].m_eRuler) &&
(rtNoStroke != m_arSegments[nS].m_eRuler) &&
(rtClose != m_arSegments[nS].m_eRuler))
{
strPath += _T("e");
break;
}
}
if ((rtFillColor == m_arSegments[nS].m_eRuler) || (rtLineColor == m_arSegments[nS].m_eRuler))
{
if (nStart < m_arVertices.size())
{
if (rtFillColor == m_arSegments[nS].m_eRuler)
{
//m_oBrush.Color1 = (DWORD)m_arVertices[nStart].x; todooooo
//m_oBrush.Color2 = (DWORD)m_arVertices[nStart].y;
}
else
{
//m_oPen.Color = (DWORD)m_arVertices[nStart].x; todooooo
}
}
nEnd = nStart + m_arSegments[nS].m_nCount;
if (nEnd > m_arVertices.size())
nEnd = m_arVertices.size();
nStart = nEnd;
if (nEnd == m_arVertices.size())
{
bBreak = true;
}
continue;
}
strPath += GetRulerVML(m_arSegments[nS].m_eRuler);
nEnd = nStart + m_arSegments[nS].m_nCount;
if (nEnd > m_arVertices.size())
nEnd = m_arVertices.size();
for (size_t nV = nStart; nV < nEnd; ++nV)
{
nGuideIndex_x = nGuideIndex_y = -1;
if (lMaxF > m_arVertices[nV].x ) nGuideIndex_x = (DWORD)m_arVertices[nV].x - (DWORD)lMinF;
if (lMaxF > m_arVertices[nV].y ) nGuideIndex_y = (DWORD)m_arVertices[nV].y - (DWORD)lMinF;
if (nGuideIndex_x >= 0 && nGuideIndex_x < (int)m_arGuides.size() )
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_x].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nV].x) + L",";
}
if (nGuideIndex_y >= 0 && nGuideIndex_y < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_y].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nV].y) + L",";
}
}
if (nEnd != nStart)
{
strPath.erase(strPath.length() - 1);
}
nStart = nEnd;
if (nEnd == m_arVertices.size())
{
bBreak = true;
}
}
}
oManager.CalculateResults();
pShape->LoadPathList(strPath);
}
}

View File

@ -31,9 +31,7 @@
*/
#pragma once
#include "BaseShape.h"
#include "FormulaShape.h"
#include "../../../OOXML/SystemUtility/File.h"
@ -46,29 +44,10 @@ namespace NSCustomShapesConvert
RulesType m_eRuler;
WORD m_nCount;
CSegment(RulesType eType = rtMoveTo, WORD nCount = 2)
{
m_eRuler = eType;
m_nCount = nCount;
}
CSegment(const CSegment& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_nCount = oSrc.m_nCount;
}
CSegment& operator=(const CSegment& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_nCount = oSrc.m_nCount;
return (*this);
}
~CSegment()
{
}
CSegment(RulesType eType = rtMoveTo, WORD nCount = 2);
CSegment(const CSegment& oSrc);
CSegment& operator=(const CSegment& oSrc);
~CSegment();
};
class CGuide
@ -84,100 +63,14 @@ namespace NSCustomShapesConvert
WORD m_param_value2;
WORD m_param_value3;
CGuide()
{
m_eType = ftVal;
CGuide();
CGuide(const CGuide& oSrc);
m_param_type1 = 0;
m_param_type2 = 0;
m_param_type3 = 0;
m_param_value1 = 0;
m_param_value2 = 0;
m_param_value3 = 0;
}
CGuide(const CGuide& oSrc)
{
*this = oSrc;
}
CGuide& operator=(const CGuide& oSrc)
{
m_eType = oSrc.m_eType;
m_param_type1 = oSrc.m_param_type1;
m_param_type2 = oSrc.m_param_type2;
m_param_type3 = oSrc.m_param_type3;
m_param_value1 = oSrc.m_param_value1;
m_param_value2 = oSrc.m_param_value2;
m_param_value3 = oSrc.m_param_value3;
return *this;
}
void SetToFormula(NSCustomShapesConvert::CFormula& oFormula)
{
oFormula.m_eFormulaType = m_eType;
SetParam(m_param_type1, m_param_value1, oFormula.m_eType1, oFormula.m_lParam1);
SetParam(m_param_type2, m_param_value2, oFormula.m_eType2, oFormula.m_lParam2);
SetParam(m_param_type3, m_param_value3, oFormula.m_eType3, oFormula.m_lParam3);
}
CGuide& operator=(const CGuide& oSrc);
void SetToFormula(NSCustomShapesConvert::CFormula& oFormula);
private:
void SetParam(BYTE type, WORD param, ParamType& param_type, LONG& param_value)
{
if (0 == type)
{
param_type = ptValue;
param_value = (LONG)param;
}
if (0x0140 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML / 2;
return;
}
if (0x0141 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML / 2;
return;
}
if (0x0142 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML;
return;
}
if (0x0143 == param)
{
param_type = ptValue;
param_value = ShapeSizeVML;
return;
}
if ((0x0147 <= param) && (param <= 0x014E))
{
param_type = ptAdjust;
param_value = (LONG)(param - 0x0147);
return;
}
if ((0x0400 <= param) && (param <= 0x047F))
{
param_type = ptFormula;
param_value = (LONG)(param - 0x0400);
return;
}
param_type = ptValue;
param_value = ShapeSizeVML;
}
void SetParam(BYTE type, WORD param, ParamType& param_type, LONG& param_value);
};
class CCustomVML
@ -192,229 +85,21 @@ namespace NSCustomShapesConvert
bool m_bIsPathPresent;
CCustomVML() : m_arVertices(), m_arSegments(), m_arGuides(), m_pAdjustValues(NULL)
{
m_ePath = rtCurveTo/*rtLineTo*/;
m_bIsPathPresent = false;
}
CCustomVML(const CCustomVML& oSrc)
{
*this = oSrc;
}
CCustomVML();
CCustomVML(const CCustomVML& oSrc);
CCustomVML& operator=(const CCustomVML& oSrc);
~CCustomVML();
CCustomVML& operator=(const CCustomVML& oSrc)
{
m_ePath = oSrc.m_ePath;
bool IsCustom();
m_arVertices.clear();
m_arVertices.insert(m_arVertices.end(), oSrc.m_arVertices.begin(), oSrc.m_arVertices.end());
void SetPath(RulesType ePath);
void LoadAHs(unsigned char* buffer, int buffer_size);
m_arSegments.clear();
m_arSegments.insert(m_arSegments.end(), oSrc.m_arSegments.begin(), oSrc.m_arSegments.end());
void addSegment(RulesType eRuler, _UINT16 nCount);
void addGuide(CGuide & oInfo);
void addAdjust(int lIndex, int lValue);
m_arGuides.clear();
m_arGuides.insert(m_arGuides.end(), oSrc.m_arGuides.begin(), oSrc.m_arGuides.end());
m_pAdjustValues = oSrc.m_pAdjustValues;
m_bIsPathPresent = oSrc.m_bIsPathPresent;
return *this;
}
~CCustomVML()
{
}
bool IsCustom()
{
return (!m_arVertices.empty() && (m_bIsPathPresent || !m_arSegments.empty()));
}
void SetPath(RulesType ePath)
{
m_ePath = ePath;
m_bIsPathPresent = true;
}
void LoadAHs(unsigned char* buffer, int buffer_size)
{
}
void addSegment(RulesType eRuler, _UINT16 nCount)
{
CSegment oInfo(eRuler, nCount);
m_arSegments.push_back(oInfo);
}
void addGuide(CGuide & oInfo)
{
m_arGuides.push_back(oInfo);
}
void addAdjust(int lIndex, int lValue)
{
if (NULL == m_pAdjustValues)
return;
int lCount = m_pAdjustValues->size();
while (lCount <= lIndex)
{
m_pAdjustValues->push_back(0);
lCount = m_pAdjustValues->size();
}
(*m_pAdjustValues)[lIndex] = lValue;
}
void SetAdjusts(std::vector<LONG>* pList)
{
m_pAdjustValues = pList;
}
void ToCustomShape(CBaseShape* pShape, NSCustomShapesConvert::CFormulasManager& oManager)
{
if ((NULL == pShape) || (!IsCustom()))
return;
oManager.Clear();
// сначала заполним формулы
for (size_t nIndex = 0; nIndex < m_arGuides.size(); ++nIndex)
{
NSCustomShapesConvert::CFormula oF;
m_arGuides[nIndex].SetToFormula(oF);
oManager.AddFormula(oF);
}
oManager.Clear(m_pAdjustValues);
std::wstring strPath = _T("");
bool bBreak = false;
long lMinF = (_INT32)0x80000000;
long lMaxF = (_INT32)0x8000007F;
int nGuideIndex_x , nGuideIndex_y;
if (0 == m_arSegments.size())
{
strPath = GetRulerVML(m_ePath);
for (size_t nIndex = 0; nIndex < m_arVertices.size(); ++nIndex)
{
nGuideIndex_x = nGuideIndex_y = -1;
if (lMaxF > m_arVertices[nIndex].x ) nGuideIndex_x = (DWORD)m_arVertices[nIndex].x - (DWORD)lMinF;
if (lMaxF > m_arVertices[nIndex].y ) nGuideIndex_y = (DWORD)m_arVertices[nIndex].y - (DWORD)lMinF;
if (nGuideIndex_x >= 0 && nGuideIndex_x < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_x].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nIndex].x) + L",";
}
if (nGuideIndex_y >= 0 && nGuideIndex_y < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_y].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nIndex].y) + L",";
}
}
strPath.erase(strPath.length() - 1);
}
else
{
size_t nStart = 0;
size_t nEnd = 0;
for (size_t nS = 0; nS < m_arSegments.size(); ++nS)
{
if (bBreak)
{
if ((rtEnd != m_arSegments[nS].m_eRuler) &&
(rtNoFill != m_arSegments[nS].m_eRuler) &&
(rtNoStroke != m_arSegments[nS].m_eRuler) &&
(rtClose != m_arSegments[nS].m_eRuler))
{
strPath += _T("e");
break;
}
}
if ((rtFillColor == m_arSegments[nS].m_eRuler) || (rtLineColor == m_arSegments[nS].m_eRuler))
{
if (nStart < m_arVertices.size())
{
if (rtFillColor == m_arSegments[nS].m_eRuler)
{
//m_oBrush.Color1 = (DWORD)m_arVertices[nStart].x; todooooo
//m_oBrush.Color2 = (DWORD)m_arVertices[nStart].y;
}
else
{
//m_oPen.Color = (DWORD)m_arVertices[nStart].x; todooooo
}
}
nEnd = nStart + m_arSegments[nS].m_nCount;
if (nEnd > m_arVertices.size())
nEnd = m_arVertices.size();
nStart = nEnd;
if (nEnd == m_arVertices.size())
{
bBreak = true;
}
continue;
}
strPath += GetRulerVML(m_arSegments[nS].m_eRuler);
nEnd = nStart + m_arSegments[nS].m_nCount;
if (nEnd > m_arVertices.size())
nEnd = m_arVertices.size();
for (size_t nV = nStart; nV < nEnd; ++nV)
{
nGuideIndex_x = nGuideIndex_y = -1;
if (lMaxF > m_arVertices[nV].x ) nGuideIndex_x = (DWORD)m_arVertices[nV].x - (DWORD)lMinF;
if (lMaxF > m_arVertices[nV].y ) nGuideIndex_y = (DWORD)m_arVertices[nV].y - (DWORD)lMinF;
if (nGuideIndex_x >= 0 && nGuideIndex_x < (int)m_arGuides.size() )
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_x].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nV].x) + L",";
}
if (nGuideIndex_y >= 0 && nGuideIndex_y < (int)m_arGuides.size())
{
strPath += std::to_wstring(m_arGuides[nGuideIndex_y].m_param_value1) + L",";
}
else
{
strPath += std::to_wstring(m_arVertices[nV].y) + L",";
}
}
if (nEnd != nStart)
{
strPath.erase(strPath.length() - 1);
}
nStart = nEnd;
if (nEnd == m_arVertices.size())
{
bBreak = true;
}
}
}
oManager.CalculateResults();
pShape->LoadPathList(strPath);
}
void SetAdjusts(std::vector<LONG>* pList);
void ToCustomShape(CBaseShape* pShape, NSCustomShapesConvert::CFormulasManager& oManager);
};
}

View File

@ -41,23 +41,117 @@
//-------------------------------------------------------------------------------
#define CREATE_BY_SPT(SHAPE_TYPE, CLASS_SHAPE_NAME) \
case SHAPE_TYPE: { pShape = new CLASS_SHAPE_NAME(); break; } \
//-------------------------------------------------------------------------------
//-------------------------------------------------------------------------------
using namespace ODRAW;
namespace NSCustomShapesConvert
{
CCustomShape::CCustomShape() : CBaseShape()
{
m_eType = oox::msosptNotPrimitive;
}
CCustomShape::~CCustomShape()
{
}
void CCustomShape::AddGuide(const std::wstring& strGuide)
{
m_oManager.AddFormula(strGuide);
}
bool CCustomShape::LoadAdjustHandlesList(const std::wstring& xml)
{
return true;
}
bool CCustomShape::LoadConnectorsList(const std::wstring& xml)
{
return true;
}
bool CCustomShape::LoadTextRect(const std::wstring& xml)
{
std::vector<std::wstring> oArray;
NSStringUtils::ParseString(_T(";"), xml, oArray);
LONG lCount = (LONG)oArray.size();
if (lCount <= 0)
return true;
m_arStringTextRects.clear();
for (LONG i = 0; i < lCount; ++i)
{
m_arStringTextRects.push_back(oArray[i]);
}
return true;
}
bool CCustomShape::LoadPathList(const std::wstring& xml)
{
m_strPath = xml;
m_oPath.FromXML(xml, m_oManager);
return true;
}
bool CCustomShape::SetAdjustment(long index, long value)
{
if (index < (long)m_arAdjustments.size() && index >= 0)
{
m_arAdjustments[index] = value;
return TRUE;
}
return FALSE;
}
void CCustomShape::ReCalculate()
{
m_oManager.Clear(&m_arAdjustments);
m_oManager.CalculateResults();
if (_T("") == m_strPath)
return;
LoadPathList(m_strPath);
}
bool CCustomShape::SetProperties(CBaseShape* Shape)
{
if(Shape == NULL)
return false;
m_oManager = ((CCustomShape*)Shape)->m_oManager;
//m_strPathLimoX = ((CCustomShape*)Shape)->m_strPathLimoX;
//m_strPathLimoY = ((CCustomShape*)Shape)->m_strPathLimoY;
//m_arStringTextRects.clear();
//m_arStringTextRects.insert(m_arStringTextRects.end(), ((CCustomShape*)Shape)->m_arStringTextRects.begin(), ((CCustomShape*)Shape)->m_arStringTextRects.end());
return CBaseShape::SetProperties(Shape);
}
bool CCustomShape::SetShapeType(oox::MSOSPT type)
{
CCustomShape* l_pShape = CreateByType(type);
if(l_pShape != NULL)
{
m_eType = type;
SetProperties(l_pShape);
delete l_pShape;
return true;
}
m_eType = oox::msosptNotPrimitive;
return false;
}
CCustomShape* CCustomShape::CreateByType(oox::MSOSPT type)
{
CCustomShape* pShape = NULL;
switch (type)
{
// msosptNotchedCircularArrow 0x00000064 A value that SHOULD NOT be used.
// msosptHostControl 0x000000C9 A value that SHOULD NOT be used.
// msosptNotchedCircularArrow 0x00000064 A value that SHOULD NOT be used.
// msosptHostControl 0x000000C9 A value that SHOULD NOT be used.
case sptNotchedCircularArrow:
case sptHostControl:
case 0: { pShape = new CRectangleType(); break; }
case sptNotchedCircularArrow:
case sptHostControl:
case 0: { pShape = new CRectangleType(); break; }
//CREATE_BY_SPT(sptMin, CLineType)
CREATE_BY_SPT(sptAccentBorderCallout90, CAccentBorderCallout90Type)
@ -92,7 +186,7 @@ CCustomShape* CCustomShape::CreateByType(oox::MSOSPT type)
CREATE_BY_SPT(sptActionButtonDocument, CActionButtonDocType)
CREATE_BY_SPT(sptActionButtonSound, CActionButtonSoundType)
CREATE_BY_SPT(sptActionButtonMovie, CActionButtonMovieType)
CREATE_BY_SPT(sptArc, CArcType)
CREATE_BY_SPT(sptLine, CLineType)
@ -102,7 +196,7 @@ CCustomShape* CCustomShape::CreateByType(oox::MSOSPT type)
CREATE_BY_SPT(sptBlockArc, CBlockArcType)
CREATE_BY_SPT(sptBracePair, CBracePairType)
CREATE_BY_SPT(sptBracketPair, CBracketPairType)
CREATE_BY_SPT(sptCan, CCanType)
CREATE_BY_SPT(sptChevron, CChevronType)
CREATE_BY_SPT(sptCircularArrow, CCircularArrowType)
@ -226,61 +320,61 @@ CCustomShape* CCustomShape::CreateByType(oox::MSOSPT type)
CREATE_BY_SPT(sptDoubleWave, CWaveDoubleType)
case sptBentConnector2:
case sptBentConnector3:
case sptBentConnector3:
case sptBentConnector4:
case sptBentConnector5:
{
pShape = new CBentConnectorType();
break;
}
{
pShape = new CBentConnectorType();
break;
}
case sptCurvedConnector2:
case sptCurvedConnector3:
case sptCurvedConnector3:
case sptCurvedConnector4:
case sptCurvedConnector5:
{
pShape = new CCurvedConnectorType();
break;
}
{
pShape = new CCurvedConnectorType();
break;
}
case sptTextPlainText:
case sptTextStop:
case sptTextTriangle:
case sptTextPlainText:
case sptTextStop:
case sptTextTriangle:
case sptTextTriangleInverted:
case sptTextChevron:
case sptTextChevronInverted:
case sptTextRingInside:
case sptTextRingOutside:
case sptTextArchUpCurve:
case sptTextArchDownCurve:
case sptTextCircleCurve:
case sptTextButtonCurve:
case sptTextArchUpPour:
case sptTextArchDownPour:
case sptTextArchUpCurve:
case sptTextArchDownCurve:
case sptTextCircleCurve:
case sptTextButtonCurve:
case sptTextArchUpPour:
case sptTextArchDownPour:
case sptTextCirclePour:
case sptTextButtonPour:
case sptTextCurveUp:
case sptTextCurveDown:
case sptTextCascadeUp:
case sptTextButtonPour:
case sptTextCurveUp:
case sptTextCurveDown:
case sptTextCascadeUp:
case sptTextCascadeDown:
case sptTextWave1:
case sptTextWave2:
case sptTextWave3:
case sptTextWave4:
case sptTextInflate:
case sptTextDeflate:
case sptTextInflateBottom:
case sptTextDeflateBottom:
case sptTextWave1:
case sptTextWave2:
case sptTextWave3:
case sptTextWave4:
case sptTextInflate:
case sptTextDeflate:
case sptTextInflateBottom:
case sptTextDeflateBottom:
case sptTextInflateTop:
case sptTextDeflateTop:
case sptTextDeflateInflate:
case sptTextDeflateTop:
case sptTextDeflateInflate:
case sptTextDeflateInflateDeflate:
case sptTextFadeRight:
case sptTextFadeLeft:
case sptTextFadeUp:
case sptTextFadeDown:
case sptTextSlantUp:
case sptTextSlantDown:
case sptTextCanUp:
case sptTextFadeRight:
case sptTextFadeLeft:
case sptTextFadeUp:
case sptTextFadeDown:
case sptTextSlantUp:
case sptTextSlantDown:
case sptTextCanUp:
case sptTextCanDown:
{
pShape = new CTextboxType();
@ -290,9 +384,8 @@ CCustomShape* CCustomShape::CreateByType(oox::MSOSPT type)
};
if (NULL != pShape)
pShape->m_eType = type;
pShape->m_eType = type;
return pShape;
}
}

View File

@ -38,125 +38,35 @@
namespace NSCustomShapesConvert
{
class CCustomShape : public NSCustomShapesConvert::CBaseShape
{
public:
oox::MSOSPT m_eType;
NSCustomShapesConvert::CFormulasManager m_oManager;
NSCustomShapesConvert::CCustomVML m_oCustomVML;
std::wstring m_strPathLimoX;
std::wstring m_strPathLimoY;
std::vector<std::wstring> m_arStringTextRects;
CCustomShape() : CBaseShape()
class CCustomShape : public NSCustomShapesConvert::CBaseShape
{
m_eType = oox::msosptNotPrimitive;
}
public:
oox::MSOSPT m_eType;
NSCustomShapesConvert::CFormulasManager m_oManager;
~CCustomShape()
{
}
NSCustomShapesConvert::CCustomVML m_oCustomVML;
virtual void AddGuide(const std::wstring& strGuide)
{
m_oManager.AddFormula(strGuide);
}
std::wstring m_strPathLimoX;
std::wstring m_strPathLimoY;
virtual bool LoadAdjustHandlesList(const std::wstring& xml)
{
return true;
}
std::vector<std::wstring> m_arStringTextRects;
virtual bool LoadConnectorsList(const std::wstring& xml)
{
return true;
}
CCustomShape();
~CCustomShape();
virtual bool LoadTextRect(const std::wstring& xml)
{
std::vector<std::wstring> oArray;
NSStringUtils::ParseString(_T(";"), xml, oArray);
virtual void AddGuide(const std::wstring& strGuide);
LONG lCount = (LONG)oArray.size();
virtual bool LoadAdjustHandlesList(const std::wstring& xml);
virtual bool LoadConnectorsList(const std::wstring& xml);
virtual bool LoadTextRect(const std::wstring& xml);
virtual bool LoadPathList(const std::wstring& xml);
if (lCount <= 0)
return true;
virtual bool SetAdjustment(long index, long value);
virtual void ReCalculate();
m_arStringTextRects.clear();
for (LONG i = 0; i < lCount; ++i)
{
m_arStringTextRects.push_back(oArray[i]);
}
return true;
}
static CCustomShape* CreateByType(oox::MSOSPT type);
virtual bool LoadPathList(const std::wstring& xml)
{
m_strPath = xml;
m_oPath.FromXML(xml, m_oManager);
return true;
}
virtual bool SetAdjustment(long index, long value)
{
if (index < (long)m_arAdjustments.size() && index >= 0)
{
m_arAdjustments[index] = value;
return TRUE;
}
return FALSE;
}
virtual void ReCalculate()
{
m_oManager.Clear(&m_arAdjustments);
m_oManager.CalculateResults();
if (_T("") == m_strPath)
return;
LoadPathList(m_strPath);
}
static CCustomShape* CreateByType(oox::MSOSPT type);
virtual bool SetProperties(CBaseShape* Shape)
{
if(Shape == NULL)
return false;
m_oManager = ((CCustomShape*)Shape)->m_oManager;
//m_strPathLimoX = ((CCustomShape*)Shape)->m_strPathLimoX;
//m_strPathLimoY = ((CCustomShape*)Shape)->m_strPathLimoY;
//m_arStringTextRects.clear();
//m_arStringTextRects.insert(m_arStringTextRects.end(), ((CCustomShape*)Shape)->m_arStringTextRects.begin(), ((CCustomShape*)Shape)->m_arStringTextRects.end());
return CBaseShape::SetProperties(Shape);
}
bool SetShapeType(oox::MSOSPT type)
{
CCustomShape* l_pShape = CreateByType(type);
if(l_pShape != NULL)
{
m_eType = type;
SetProperties(l_pShape);
delete l_pShape;
return true;
}
m_eType = oox::msosptNotPrimitive;
return false;
}
};
virtual bool SetProperties(CBaseShape* Shape);
bool SetShapeType(oox::MSOSPT type);
};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,134 +33,267 @@
#include "FormulaShape.h"
LONG NSCustomShapesConvert::CFormula::CalculateFormula(NSCustomShapesConvert::CFormulasManager* pManager)
namespace NSCustomShapesConvert
{
if ((0 > m_lIndex) || (m_lIndex >= pManager->m_arResults.size()))
return 0;
if (0xFFFFFFFF != pManager->m_arResults[m_lIndex])
CFormula::CFormula()
{
return pManager->m_arResults[m_lIndex];
}
LONG lResult = 0;
m_eFormulaType = ftSum;
m_lIndex = 0;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
LONG lGuidesCount = pManager->m_arFormulas.size();
LONG lAdjCount = pManager->m_pAdjustments->size();
LONG a1 = m_lParam1;
if (ptFormula == m_eType1)
{
a1 = (m_lParam1 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam1].CalculateFormula(pManager);
m_lCountRecurs = 0;
}
else if (ptAdjust == m_eType1)
CFormula::CFormula(int nIndex)
{
a1 = (m_lParam1 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam1];
}
m_eFormulaType = ftSum;
m_lIndex = nIndex;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
LONG b1 = m_lParam2;
if (ptFormula == m_eType2)
{
b1 = (m_lParam2 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam2].CalculateFormula(pManager);
m_lCountRecurs = 0;
}
else if (ptAdjust == m_eType2)
CFormula& CFormula::operator =(const CFormula& oSrc)
{
b1 = (m_lParam2 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam2];
m_eFormulaType = oSrc.m_eFormulaType;
m_lIndex = oSrc.m_lIndex;
m_lParam1 = oSrc.m_lParam1;
m_eType1 = oSrc.m_eType1;
m_lParam2 = oSrc.m_lParam2;
m_eType2 = oSrc.m_eType2;
m_lParam3 = oSrc.m_lParam3;
m_eType3 = oSrc.m_eType3;
m_lCountRecurs = 0;
return (*this);
}
LONG c1 = m_lParam3;
if (ptFormula == m_eType3)
void CFormula::FromString(std::wstring strFormula, long lShapeWidth, long lShapeHeight)
{
c1 = (m_lParam3 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam3].CalculateFormula(pManager);
}
else if (ptAdjust == m_eType3)
{
c1 = (m_lParam3 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam3];
}
std::vector<std::wstring> oArrayParams;
NSStringUtils::ParseString(_T(" "), strFormula, oArrayParams);
size_t nCount = oArrayParams.size();
if (nCount == 0)
return;
double a = (double)a1;
double b = (double)b1;
double c = (double)c1;
bool bRes = true;
m_eFormulaType = GetFormula(oArrayParams[0], bRes);
double dRes = 0.0;
try
{
// теперь нужно просто посчитать
switch (m_eFormulaType)
ParamType ptType = ptValue;
if (1 < nCount)
{
case ftSum: { dRes = a + b - c; break; }
case ftProduct: {
if (0 == c)
c = 1;
dRes = a * b / c;
break;
}
case ftMid: { dRes = (a + b) / 2.0; break; }
case ftAbsolute: { dRes = abs(a); break; }
case ftMin: { dRes = (std::min)(a, b); break; }
case ftMax: { dRes = (std::max)(a, b); break; }
case ftIf: { dRes = (a > 0) ? b : c; break; }
case ftSqrt: { dRes = sqrt(a); break; }
case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; }
case ftSin: {
//dRes = a * sin(b);
//dRes = a * sin(b / pow2_16);
dRes = a * sin(M_PI * b / (pow2_16 * 180));
break;
}
case ftCos: {
//dRes = a * cos(b);
//dRes = a * cos(b / pow2_16);
dRes = a * cos(M_PI * b / (pow2_16 * 180));
break;
}
case ftTan: {
//dRes = a * tan(b);
dRes = a * tan(M_PI * b / (pow2_16 * 180));
break;
}
case ftAtan2: {
dRes = 180 * pow2_16 * atan2(b,a) / M_PI;
break;
}
case ftSinatan2: { dRes = a * sin(atan2(c,b)); break; }
case ftCosatan2: { dRes = a * cos(atan2(c,b)); break; }
case ftSumangle: {
//dRes = a + b - c;
dRes = a + b * pow2_16 - c * pow2_16;
/*while (23592960 < dRes)
{
dRes -= 23592960;
}
while (-23592960 > dRes)
{
dRes += 23592960;
}*/
break;
}
case ftEllipse: {
if (0 == b)
b = 1;
dRes = c * sqrt(1-(a*a/(b*b)));
break;
}
case ftVal: { dRes = a; break; }
default: break;
};
m_lParam1 = GetValue(oArrayParams[1], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType1 = ptType;
}
if (2 < nCount)
{
m_lParam2 = GetValue(oArrayParams[2], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType2 = ptType;
}
if (3 < nCount)
{
m_lParam3 = GetValue(oArrayParams[3], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType3 = ptType;
}
}
catch (...)
LONG CFormula::CalculateFormula(NSCustomShapesConvert::CFormulasManager* pManager)
{
dRes = 0;
if ((0 > m_lIndex) || (m_lIndex >= pManager->m_arResults.size()))
return 0;
if (0xFFFFFFFF != pManager->m_arResults[m_lIndex])
{
return pManager->m_arResults[m_lIndex];
}
LONG lResult = 0;
LONG lGuidesCount = pManager->m_arFormulas.size();
LONG lAdjCount = pManager->m_pAdjustments->size();
LONG a1 = m_lParam1;
if (ptFormula == m_eType1)
{
a1 = (m_lParam1 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam1].CalculateFormula(pManager);
}
else if (ptAdjust == m_eType1)
{
a1 = (m_lParam1 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam1];
}
LONG b1 = m_lParam2;
if (ptFormula == m_eType2)
{
b1 = (m_lParam2 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam2].CalculateFormula(pManager);
}
else if (ptAdjust == m_eType2)
{
b1 = (m_lParam2 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam2];
}
LONG c1 = m_lParam3;
if (ptFormula == m_eType3)
{
c1 = (m_lParam3 >= lGuidesCount) ? 0 : pManager->m_arFormulas[m_lParam3].CalculateFormula(pManager);
}
else if (ptAdjust == m_eType3)
{
c1 = (m_lParam3 >= lAdjCount) ? 0 : (*(pManager->m_pAdjustments))[m_lParam3];
}
double a = (double)a1;
double b = (double)b1;
double c = (double)c1;
double dRes = 0.0;
try
{
// теперь нужно просто посчитать
switch (m_eFormulaType)
{
case ftSum: { dRes = a + b - c; break; }
case ftProduct: {
if (0 == c)
c = 1;
dRes = a * b / c;
break;
}
case ftMid: { dRes = (a + b) / 2.0; break; }
case ftAbsolute: { dRes = abs(a); break; }
case ftMin: { dRes = (std::min)(a, b); break; }
case ftMax: { dRes = (std::max)(a, b); break; }
case ftIf: { dRes = (a > 0) ? b : c; break; }
case ftSqrt: { dRes = sqrt(a); break; }
case ftMod: { dRes = sqrt(a*a + b*b + c*c); break; }
case ftSin: {
//dRes = a * sin(b);
//dRes = a * sin(b / pow2_16);
dRes = a * sin(M_PI * b / (pow2_16 * 180));
break;
}
case ftCos: {
//dRes = a * cos(b);
//dRes = a * cos(b / pow2_16);
dRes = a * cos(M_PI * b / (pow2_16 * 180));
break;
}
case ftTan: {
//dRes = a * tan(b);
dRes = a * tan(M_PI * b / (pow2_16 * 180));
break;
}
case ftAtan2: {
dRes = 180 * pow2_16 * atan2(b,a) / M_PI;
break;
}
case ftSinatan2: { dRes = a * sin(atan2(c,b)); break; }
case ftCosatan2: { dRes = a * cos(atan2(c,b)); break; }
case ftSumangle: {
//dRes = a + b - c;
dRes = a + b * pow2_16 - c * pow2_16;
/*while (23592960 < dRes)
{
dRes -= 23592960;
}
while (-23592960 > dRes)
{
dRes += 23592960;
}*/
break;
}
case ftEllipse: {
if (0 == b)
b = 1;
dRes = c * sqrt(1-(a*a/(b*b)));
break;
}
case ftVal: { dRes = a; break; }
default: break;
};
}
catch (...)
{
dRes = 0;
}
lResult = (LONG)dRes;
pManager->m_arResults[m_lIndex] = lResult;
return lResult;
}
lResult = (LONG)dRes;
pManager->m_arResults[m_lIndex] = lResult;
return lResult;
CFormulasManager::CFormulasManager() : m_arFormulas(), m_arResults()
{
m_pAdjustments = NULL;
m_lShapeWidth = ShapeSizeVML;
m_lShapeHeight = ShapeSizeVML;
}
CFormulasManager& CFormulasManager::operator =(const CFormulasManager& oSrc)
{
m_pAdjustments = oSrc.m_pAdjustments;
m_lShapeWidth = oSrc.m_lShapeWidth;
m_lShapeHeight = oSrc.m_lShapeHeight;
m_arResults.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arResults.size(); ++nIndex)
{
m_arResults.push_back(oSrc.m_arResults[nIndex]);
}
m_arFormulas.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arFormulas.size(); ++nIndex)
{
m_arFormulas.push_back(oSrc.m_arFormulas[nIndex]);
}
return (*this);
}
void CFormulasManager::Clear()
{
m_pAdjustments = NULL;
m_arFormulas.clear();
m_arResults.clear();
}
void CFormulasManager::Clear(std::vector<LONG>* pAdjusts)
{
m_pAdjustments = pAdjusts;
//m_arFormulas.clear();
//m_arResults.clear();
for (size_t nIndex = 0; nIndex < m_arResults.size(); ++nIndex)
{
m_arResults[nIndex] = 0xFFFFFFFF;
}
}
void CFormulasManager::AddFormula(std::wstring strFormula)
{
CFormula oFormula((int)m_arFormulas.size());
oFormula.FromString(strFormula, m_lShapeWidth, m_lShapeHeight);
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void CFormulasManager::AddFormula(CFormula oFormula)
{
oFormula.m_lIndex = (int)m_arFormulas.size();
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void CFormulasManager::CalculateResults()
{
for (size_t index = 0; index < m_arFormulas.size(); ++index)
{
LONG lResult = m_arFormulas[index].CalculateFormula(this);
}
}
}

View File

@ -214,27 +214,26 @@ namespace NSCustomShapesConvert
struct SHandle
{
Aggplus::POINT gdRef;
SPointType gdRefType;
SPointExist bRefExist;
SPointExist bRefPolarExist;
Aggplus::POINT gdRef;
SPointType gdRefType;
SPointExist bRefExist;
SPointExist bRefPolarExist;
Aggplus::POINT Max;
SPointType MaxType;
SPointExist bMaxExist;
SPointExist bMaxPolarExist;
Aggplus::POINT Max;
SPointType MaxType;
SPointExist bMaxExist;
SPointExist bMaxPolarExist;
Aggplus::POINT Min;
SPointType MinType;
SPointExist bMinExist;
SPointExist bMinPolarExist;
Aggplus::POINT Min;
SPointType MinType;
SPointExist bMinExist;
SPointExist bMinPolarExist;
Aggplus::POINT Pos;
SPointType PosType;
Aggplus::POINT PolarCentre;
SPointType PolarCentreType;
Aggplus::POINT Pos;
SPointType PosType;
Aggplus::POINT PolarCentre;
SPointType PolarCentreType;
};
class CFormulasManager;
class CFormula
@ -256,74 +255,12 @@ private:
long m_lCountRecurs;
public:
CFormula()
{
m_eFormulaType = ftSum;
m_lIndex = 0;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
CFormula();
CFormula(int nIndex);
m_lCountRecurs = 0;
}
CFormula& operator =(const CFormula& oSrc);
CFormula(int nIndex)
{
m_eFormulaType = ftSum;
m_lIndex = nIndex;
m_lParam1 = 0; m_eType1 = ptValue;
m_lParam2 = 0; m_eType2 = ptValue;
m_lParam3 = 0; m_eType3 = ptValue;
m_lCountRecurs = 0;
}
CFormula& operator =(const CFormula& oSrc)
{
m_eFormulaType = oSrc.m_eFormulaType;
m_lIndex = oSrc.m_lIndex;
m_lParam1 = oSrc.m_lParam1;
m_eType1 = oSrc.m_eType1;
m_lParam2 = oSrc.m_lParam2;
m_eType2 = oSrc.m_eType2;
m_lParam3 = oSrc.m_lParam3;
m_eType3 = oSrc.m_eType3;
m_lCountRecurs = 0;
return (*this);
}
void FromString(std::wstring strFormula, long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
{
std::vector<std::wstring> oArrayParams;
NSStringUtils::ParseString(_T(" "), strFormula, oArrayParams);
size_t nCount = oArrayParams.size();
if (nCount == 0)
return;
bool bRes = true;
m_eFormulaType = GetFormula(oArrayParams[0], bRes);
ParamType ptType = ptValue;
if (1 < nCount)
{
m_lParam1 = GetValue(oArrayParams[1], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType1 = ptType;
}
if (2 < nCount)
{
m_lParam2 = GetValue(oArrayParams[2], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType2 = ptType;
}
if (3 < nCount)
{
m_lParam3 = GetValue(oArrayParams[3], ptType, bRes, lShapeWidth, lShapeHeight);
m_eType3 = ptType;
}
}
void FromString(std::wstring strFormula, long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML);
LONG CalculateFormula(CFormulasManager* pManager);
};
@ -339,71 +276,15 @@ private:
long m_lShapeHeight;
public:
CFormulasManager() : m_arFormulas(), m_arResults()
{
m_pAdjustments = NULL;
m_lShapeWidth = ShapeSizeVML;
m_lShapeHeight = ShapeSizeVML;
}
CFormulasManager& operator =(const CFormulasManager& oSrc)
{
m_pAdjustments = oSrc.m_pAdjustments;
m_lShapeWidth = oSrc.m_lShapeWidth;
m_lShapeHeight = oSrc.m_lShapeHeight;
CFormulasManager();
CFormulasManager& operator =(const CFormulasManager& oSrc);
m_arResults.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arResults.size(); ++nIndex)
{
m_arResults.push_back(oSrc.m_arResults[nIndex]);
}
m_arFormulas.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arFormulas.size(); ++nIndex)
{
m_arFormulas.push_back(oSrc.m_arFormulas[nIndex]);
}
return (*this);
}
void Clear();
void Clear(std::vector<LONG>* pAdjusts);
void Clear()
{
m_pAdjustments = NULL;
void AddFormula(std::wstring strFormula);
void AddFormula(CFormula oFormula);
m_arFormulas.clear();
m_arResults.clear();
}
void Clear(std::vector<LONG>* pAdjusts)
{
m_pAdjustments = pAdjusts;
//m_arFormulas.clear();
//m_arResults.clear();
for (size_t nIndex = 0; nIndex < m_arResults.size(); ++nIndex)
{
m_arResults[nIndex] = 0xFFFFFFFF;
}
}
void AddFormula(std::wstring strFormula)
{
CFormula oFormula((int)m_arFormulas.size());
oFormula.FromString(strFormula, m_lShapeWidth, m_lShapeHeight);
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void AddFormula(CFormula oFormula)
{
oFormula.m_lIndex = (int)m_arFormulas.size();
m_arFormulas.push_back(oFormula);
m_arResults.push_back(0xFFFFFFFF);
}
void CalculateResults()
{
for (size_t index = 0; index < m_arFormulas.size(); ++index)
{
LONG lResult = m_arFormulas[index].CalculateFormula(this);
}
}
void CalculateResults();
};
}

View File

@ -0,0 +1,702 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "GraphicsPath.h"
namespace NSCustomShapesConvert
{
CDoubleRect::CDoubleRect()
{
left = 0;
top = 0;
right = 0;
bottom = 0;
}
CDoubleRect& CDoubleRect::operator=(const CDoubleRect& oSrc)
{
left = oSrc.left;
top = oSrc.top;
right = oSrc.right;
bottom = oSrc.bottom;
return *this;
}
CDoubleRect::CDoubleRect(const CDoubleRect& oSrc)
{
*this = oSrc;
}
CGeomShapeInfo::CPointD::CPointD()
{
dX = 0;
dY = 0;
}
CGeomShapeInfo::CPointD& CGeomShapeInfo::CPointD::operator= (const CPointD& oSrc)
{
dX = oSrc.dX;
dY = oSrc.dY;
return *this;
}
CGeomShapeInfo::CPointD::CPointD(const CPointD& oSrc)
{
*this = oSrc;
}
CGeomShapeInfo::CGeomShapeInfo()
{
m_dLeft = 0;
m_dTop = 0;
m_dWidth = 720;
m_dHeight = 576;
m_dLimoX = 0;
m_dLimoY = 0;
m_oCurPoint.dX = 0;
m_oCurPoint.dY = 0;
m_dRotate = 0.0;
m_bFlipH = false;
m_bFlipV = false;
m_lOriginalWidth = 0;
m_lOriginalHeight = 0;
}
CGeomShapeInfo::~CGeomShapeInfo()
{
}
CGeomShapeInfo& CGeomShapeInfo::operator =(const CGeomShapeInfo& oSrc)
{
m_dLeft = oSrc.m_dLeft;
m_dTop = oSrc.m_dTop;
m_dWidth = oSrc.m_dWidth;
m_dHeight = oSrc.m_dHeight;
m_dLimoX = oSrc.m_dLimoX;
m_dLimoY = oSrc.m_dLimoY;
m_oCurPoint = oSrc.m_oCurPoint;
m_dRotate = oSrc.m_dRotate;
m_bFlipH = oSrc.m_bFlipH;
m_bFlipV = oSrc.m_bFlipV;
m_lOriginalWidth = oSrc.m_lOriginalWidth;
m_lOriginalHeight = oSrc.m_lOriginalHeight;
return (*this);
}
CDoublePoint::CDoublePoint()
{
dX = 0;
dY = 0;
}
CDoublePoint& CDoublePoint::operator= (const CDoublePoint& oSrc)
{
dX = oSrc.dX;
dY = oSrc.dY;
return *this;
}
CDoublePoint::CDoublePoint(const CDoublePoint& oSrc)
{
*this = oSrc;
}
void CGraphicPath::InternalClear()
{
m_lFlags = 0;
}
CGraphicPath::CGraphicPath()
{
InternalClear();
}
CGraphicPath::CPart::CPart() : m_eType(rtMoveTo), m_arPoints()
{
}
CGraphicPath::CPart& CGraphicPath::CPart::operator=(const CPart& oSrc)
{
m_eType = oSrc.m_eType;
this->m_arPoints.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arPoints.size(); ++nIndex)
{
this->m_arPoints.push_back(oSrc.m_arPoints[nIndex]);
}
return (*this);
}
CGraphicPath::CPart::~CPart()
{
this->m_arPoints.clear();
}
void CGraphicPath::CPart::ParseString(std::wstring strDelimeters, std::wstring strSource,
std::vector<std::wstring>& pArrayResults, bool bIsCleared)
{
if (bIsCleared)
pArrayResults.clear();
std::wstring resToken;
int curPos= 0;
boost::algorithm::split(pArrayResults, strSource, boost::algorithm::is_any_of(strDelimeters), boost::algorithm::token_compress_on);
}
void CGraphicPath::CPart::CheckLastPoint(IRenderer* pRenderer, CDoublePoint& pointCur)
{
if (NULL == pRenderer)
return;
pRenderer->PathCommandGetCurrentPoint(&pointCur.dX, &pointCur.dY);
}
double CGraphicPath::CPart::GetAngle(double fCentreX, double fCentreY, double fX, double fY)
{
// - + (.. )
double dX = fX - fCentreX;
double dY = fY - fCentreY;
double modDX = abs(dX);
double modDY = abs(dY);
if ((modDX < 0.01) && (modDY < 0.01))
{
return 0;
}
if ((modDX < 0.01) && (dY < 0))
{
return -90;
}
else if (modDX < 0.01)
{
return 90;
}
if ((modDY < 0.01) && (dX < 0))
{
return 180;
}
else if (modDY < 0.01)
{
return 0;
}
double fAngle = atan(dY / dX);
fAngle *= double(180 / M_PI);
if (dX > 0 && dY > 0)
{
return fAngle;
}
else if (dX > 0 && dY < 0)
{
return fAngle;
}
else if (dX < 0 && dY > 0)
{
//return fAngle + 180;
return 180 + fAngle;
}
else
{
//return fAngle + 180;
return fAngle - 180;
}
}
void CGraphicPath::CPart::ApplyElliptical(bool& bIsX, double& angleStart, double& angleSweet,
double& Left, double& Top, double& Width, double& Height, const CDoublePoint& pointCur)
{
// (x - y - x...)
if (bIsX)
{
angleStart = -90;
angleSweet = 90;
if ((Width < 0) && (Height < 0))
{
angleStart = 90;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = -90;
angleSweet = -90;
Width *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 90;
angleSweet = -90;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else
{
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
}
else
{
angleStart = 180;
angleSweet = -90;
if ((Width < 0) && (Height < 0))
{
angleStart = 0;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = 0;
angleSweet = 90;
Width *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 180;
angleSweet = 90;
Height *= -1;
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
else
{
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
}
bIsX = !bIsX;
}
void CGraphicPath::CPart::GetSafearrayPoints(IRenderer* pRenderer, double** ppArray, size_t& nCountOut, CDoublePoint& pointCur, bool bR)
{
if (NULL == ppArray)
return;
size_t nCount = this->m_arPoints.size();
nCountOut = 2 * (nCount + 1);
double* pArray = new double [nCountOut];
double* pBuffer = pArray;
memset (pBuffer, 0, nCountOut * sizeof(double));
*pBuffer = pointCur.dX; ++pBuffer;
*pBuffer = pointCur.dY; ++pBuffer;
if (bR)
{
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
*pBuffer = (this->m_arPoints[nIndex].dX + pointCur.dX); ++pBuffer;
*pBuffer = (this->m_arPoints[nIndex].dY + pointCur.dY); ++pBuffer;
if (nIndex == (nCount - 1))
{
pointCur.dX += this->m_arPoints[nIndex].dX;
pointCur.dY += this->m_arPoints[nIndex].dY;
}
}
}
else
{
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
*pBuffer = this->m_arPoints[nIndex].dX; ++pBuffer;
*pBuffer = this->m_arPoints[nIndex].dY; ++pBuffer;
if (nIndex == (nCount - 1))
{
pointCur.dX = this->m_arPoints[nIndex].dX;
pointCur.dY = this->m_arPoints[nIndex].dY;
}
}
}
*ppArray = pArray;
}
void CGraphicPath::CPart::Draw(IRenderer* pRenderer, CDoublePoint& pointCur)
{
switch (m_eType)
{
case rtMoveTo:
{
if (0 < this->m_arPoints.size())
{
pointCur.dX = this->m_arPoints[0].dX;
pointCur.dY = this->m_arPoints[0].dY;
pRenderer->PathCommandMoveTo(this->m_arPoints[0].dX, this->m_arPoints[0].dY);
}
break;
}
case rtLineTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount /*this->m_arPoints.size()*/);
}
break;
}
case rtCurveTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur);
if (NULL != pArray)
{
pRenderer->PathCommandCurvesTo (pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtClose:
{
pRenderer->PathCommandClose();
break;
}
case rtRMoveTo:
{
if (0 < this->m_arPoints.size())
{
pointCur.dX = this->m_arPoints[0].dX + pointCur.dX;
pointCur.dY = this->m_arPoints[0].dY + pointCur.dY;
pRenderer->PathCommandMoveTo(pointCur.dX, pointCur.dY);
}
break;
}
case rtRLineTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtRCurveTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandCurvesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtAngleEllipseTo:
{
int nFigure = 0;
while ((nFigure + 3) <= (int)this->m_arPoints.size())
{
double nLeft = this->m_arPoints[nFigure].dX - this->m_arPoints[nFigure + 1].dX / 2;
double nTop = this->m_arPoints[nFigure].dY - this->m_arPoints[nFigure + 1].dY / 2;
pRenderer->PathCommandArcTo(nLeft, nTop,
this->m_arPoints[nFigure + 1].dX, this->m_arPoints[nFigure + 1].dY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
nFigure += 3;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtAngleEllipse:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 3) <= (int)this->m_arPoints.size())
{
double nLeft = this->m_arPoints[nFigure].dX - this->m_arPoints[nFigure + 1].dX / 2;
double nTop = this->m_arPoints[nFigure].dY - this->m_arPoints[nFigure + 1].dY / 2;
pRenderer->PathCommandArcTo(nLeft, nTop,
this->m_arPoints[nFigure + 1].dX, this->m_arPoints[nFigure + 1].dY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
nFigure += 3;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtArc:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtArcTo:
{
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtClockwiseArcTo:
{
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, 360 + GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtClockwiseArc:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, 360 + GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtEllipticalQuadrX:
{
bool bIsX = true;
CheckLastPoint(pRenderer, pointCur);
size_t nCount = this->m_arPoints.size();
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
double x1 = pointCur.dX;
double y1 = pointCur.dY;
double x2 = this->m_arPoints[nIndex].dX;
double y2 = this->m_arPoints[nIndex].dY;
double dRadX = fabs(x1 - x2);
double dRadY = fabs(y1 - y2);
AddEllipticalQuadr(pRenderer, bIsX, x1, y1, x2, y2, dRadX, dRadY);
pointCur.dX = x2;
pointCur.dY = y2;
}
break;
}
case rtEllipticalQuadrY:
{
bool bIsX = false;
CheckLastPoint(pRenderer, pointCur);
size_t nCount = this->m_arPoints.size();
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
double x1 = pointCur.dX;
double y1 = pointCur.dY;
double x2 = this->m_arPoints[nIndex].dX;
double y2 = this->m_arPoints[nIndex].dY;
double dRadX = fabs(x1 - x2);
double dRadY = fabs(y1 - y2);
AddEllipticalQuadr(pRenderer, bIsX, x1, y1, x2, y2, dRadX, dRadY);
pointCur.dX = x2;
pointCur.dY = y2;
}
break;
}
case rtQuadrBesier:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
CheckLastPoint(pRenderer, pointCur);
break;
}
default: break;
};
}
void CGraphicPath::CPart::AddEllipticalQuadr(IRenderer*& pRenderer, bool& bIsX, double& x1, double& y1, double& x2, double& y2, double& dRadX, double& dRadY)
{
if (bIsX)
{
if ((x2 >= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1, 2 * dRadX, 2 * dRadY, -90, 90);
else if ((x2 >= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1 - 2 * dRadY, 2 * dRadX, 2 * dRadY, 90, -90);
else if ((x2 <= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1, 2 * dRadX, 2 * dRadY, -90, -90);
else if ((x2 <= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1 - 2 * dRadY, 2 * dRadX, 2 * dRadY, 90, 90);
}
else
{
if ((x2 >= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1, y1 - dRadY, 2 * dRadX, 2 * dRadY, 180, -90);
else if ((x2 >= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1, y1 - dRadY, 2 * dRadX, 2 * dRadY, 180, 90);
else if ((x2 <= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - 2 * dRadX, y1 - dRadY, 2 * dRadX, 2 * dRadY, 0, 90);
else if ((x2 <= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - 2 * dRadX, y1 - dRadY, 2 * dRadX, 2 * dRadY, 0, -90);
}
bIsX = !bIsX;
}
void CGraphicPath::AddRuler(const RulesType& eType)
{
size_t lCount = m_arParts.size();
CPart oPart;
oPart.m_eType = eType;
m_arParts.push_back(oPart);
}
void CGraphicPath::AddPoint(const double& x, const double& y)
{
size_t lCount = m_arParts.size();
if (0 != lCount)
{
CDoublePoint point;
point.dX = x;
point.dY = y;
m_arParts[lCount - 1].m_arPoints.push_back(point);
}
}
void CGraphicPath::Clear()
{
m_arParts.clear();
}
}

View File

@ -55,32 +55,15 @@ namespace NSCustomShapesConvert
double bottom;
public:
CDoubleRect()
{
left = 0;
top = 0;
right = 0;
bottom = 0;
}
CDoubleRect& operator=(const CDoubleRect& oSrc)
{
left = oSrc.left;
top = oSrc.top;
right = oSrc.right;
bottom = oSrc.bottom;
CDoubleRect();
CDoubleRect& operator=(const CDoubleRect& oSrc);
CDoubleRect(const CDoubleRect& oSrc);
return *this;
}
CDoubleRect(const CDoubleRect& oSrc)
{
*this = oSrc;
}
inline bool IsEqual(const CDoubleRect& oSrc, double dEps = 0.01)
{
return ((fabs(left - oSrc.left) < dEps) && (fabs(top - oSrc.top) < dEps) &&
(fabs(right - oSrc.right) < dEps) && (fabs(bottom - oSrc.bottom) < dEps));
}
inline double GetWidth() const
{
return right - left;
@ -106,25 +89,11 @@ namespace NSCustomShapesConvert
public:
double dX;
double dY;
public:
CPointD()
{
dX = 0;
dY = 0;
}
CPointD& operator= (const CPointD& oSrc)
{
dX = oSrc.dX;
dY = oSrc.dY;
return *this;
}
CPointD(const CPointD& oSrc)
{
*this = oSrc;
}
CPointD();
CPointD& operator= (const CPointD& oSrc);
CPointD(const CPointD& oSrc);
};
public:
@ -147,51 +116,9 @@ namespace NSCustomShapesConvert
LONG m_lOriginalHeight;
public:
CGeomShapeInfo()
{
m_dLeft = 0;
m_dTop = 0;
m_dWidth = 720;
m_dHeight = 576;
m_dLimoX = 0;
m_dLimoY = 0;
m_oCurPoint.dX = 0;
m_oCurPoint.dY = 0;
m_dRotate = 0.0;
m_bFlipH = false;
m_bFlipV = false;
m_lOriginalWidth = 0;
m_lOriginalHeight = 0;
}
~CGeomShapeInfo()
{
}
CGeomShapeInfo& operator =(const CGeomShapeInfo& oSrc)
{
m_dLeft = oSrc.m_dLeft;
m_dTop = oSrc.m_dTop;
m_dWidth = oSrc.m_dWidth;
m_dHeight = oSrc.m_dHeight;
m_dLimoX = oSrc.m_dLimoX;
m_dLimoY = oSrc.m_dLimoY;
m_oCurPoint = oSrc.m_oCurPoint;
m_dRotate = oSrc.m_dRotate;
m_bFlipH = oSrc.m_bFlipH;
m_bFlipV = oSrc.m_bFlipV;
m_lOriginalWidth = oSrc.m_lOriginalWidth;
m_lOriginalHeight = oSrc.m_lOriginalHeight;
return (*this);
}
CGeomShapeInfo();
~CGeomShapeInfo();
CGeomShapeInfo& operator =(const CGeomShapeInfo& oSrc);
inline void SetBounds(const CDoubleRect& oRect)
{
@ -217,25 +144,11 @@ namespace NSCustomShapesConvert
public:
double dX;
double dY;
public:
CDoublePoint()
{
dX = 0;
dY = 0;
}
CDoublePoint& operator= (const CDoublePoint& oSrc)
{
dX = oSrc.dX;
dY = oSrc.dY;
return *this;
}
CDoublePoint(const CDoublePoint& oSrc)
{
*this = oSrc;
}
CDoublePoint();
CDoublePoint& operator= (const CDoublePoint& oSrc);
CDoublePoint(const CDoublePoint& oSrc);
};
enum RulesType
@ -286,14 +199,10 @@ namespace NSCustomShapesConvert
class CGraphicPath
{
public:
virtual void InternalClear()
{
m_lFlags = 0;
}
CGraphicPath()
{
InternalClear();
}
virtual void InternalClear();
CGraphicPath();
class CPart
{
public:
@ -301,23 +210,10 @@ namespace NSCustomShapesConvert
std::vector<CDoublePoint> m_arPoints;
public:
CPart() : m_eType(rtMoveTo), m_arPoints()
{
}
CPart& operator=(const CPart& oSrc)
{
m_eType = oSrc.m_eType;
this->m_arPoints.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arPoints.size(); ++nIndex)
{
this->m_arPoints.push_back(oSrc.m_arPoints[nIndex]);
}
return (*this);
}
~CPart()
{
this->m_arPoints.clear();
}
CPart();
CPart& operator=(const CPart& oSrc);
~CPart();
//void FromXmlNode(XmlUtils::CXmlNode& oNode)
//{
// std::wstring strName = oNode.GetAttribute(_T("name"));
@ -364,76 +260,10 @@ namespace NSCustomShapesConvert
// }
//}
void ParseString(std::wstring strDelimeters, std::wstring strSource,
std::vector<std::wstring>& pArrayResults, bool bIsCleared = true)
{
if (bIsCleared)
pArrayResults.clear();
std::vector<std::wstring>& pArrayResults, bool bIsCleared = true);
std::wstring resToken;
int curPos= 0;
boost::algorithm::split(pArrayResults, strSource, boost::algorithm::is_any_of(strDelimeters), boost::algorithm::token_compress_on);
}
void CheckLastPoint(IRenderer* pRenderer, CDoublePoint& pointCur)
{
if (NULL == pRenderer)
return;
pRenderer->PathCommandGetCurrentPoint(&pointCur.dX, &pointCur.dY);
}
double GetAngle(double fCentreX, double fCentreY, double fX, double fY)
{
// - + (.. )
double dX = fX - fCentreX;
double dY = fY - fCentreY;
double modDX = abs(dX);
double modDY = abs(dY);
if ((modDX < 0.01) && (modDY < 0.01))
{
return 0;
}
if ((modDX < 0.01) && (dY < 0))
{
return -90;
}
else if (modDX < 0.01)
{
return 90;
}
if ((modDY < 0.01) && (dX < 0))
{
return 180;
}
else if (modDY < 0.01)
{
return 0;
}
double fAngle = atan(dY / dX);
fAngle *= double(180 / M_PI);
if (dX > 0 && dY > 0)
{
return fAngle;
}
else if (dX > 0 && dY < 0)
{
return fAngle;
}
else if (dX < 0 && dY > 0)
{
//return fAngle + 180;
return 180 + fAngle;
}
else
{
//return fAngle + 180;
return fAngle - 180;
}
}
void CheckLastPoint(IRenderer* pRenderer, CDoublePoint& pointCur);
double GetAngle(double fCentreX, double fCentreY, double fX, double fY);
inline double GetSweepAngle(const double& angleStart, const double& angleEnd)
{
@ -444,475 +274,21 @@ namespace NSCustomShapesConvert
}
void ApplyElliptical(bool& bIsX, double& angleStart, double& angleSweet,
double& Left, double& Top, double& Width, double& Height, const CDoublePoint& pointCur)
{
// (x - y - x...)
if (bIsX)
{
angleStart = -90;
angleSweet = 90;
double& Left, double& Top, double& Width, double& Height, const CDoublePoint& pointCur);
if ((Width < 0) && (Height < 0))
{
angleStart = 90;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = -90;
angleSweet = -90;
Width *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 90;
angleSweet = -90;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else
{
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
}
else
{
angleStart = 180;
angleSweet = -90;
void GetSafearrayPoints(IRenderer* pRenderer, double** ppArray, size_t& nCountOut, CDoublePoint& pointCur, bool bR = false);
if ((Width < 0) && (Height < 0))
{
angleStart = 0;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = 0;
angleSweet = 90;
Width *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 180;
angleSweet = 90;
Height *= -1;
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
else
{
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
}
bIsX = !bIsX;
}
void Draw(IRenderer* pRenderer, CDoublePoint& pointCur);
void GetSafearrayPoints(IRenderer* pRenderer, double** ppArray, size_t& nCountOut, CDoublePoint& pointCur, bool bR = false)
{
if (NULL == ppArray)
return;
size_t nCount = this->m_arPoints.size();
nCountOut = 2 * (nCount + 1);
double* pArray = new double [nCountOut];
double* pBuffer = pArray;
memset (pBuffer, 0, nCountOut * sizeof(double));
*pBuffer = pointCur.dX; ++pBuffer;
*pBuffer = pointCur.dY; ++pBuffer;
if (bR)
{
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
*pBuffer = (this->m_arPoints[nIndex].dX + pointCur.dX); ++pBuffer;
*pBuffer = (this->m_arPoints[nIndex].dY + pointCur.dY); ++pBuffer;
if (nIndex == (nCount - 1))
{
pointCur.dX += this->m_arPoints[nIndex].dX;
pointCur.dY += this->m_arPoints[nIndex].dY;
}
}
}
else
{
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
*pBuffer = this->m_arPoints[nIndex].dX; ++pBuffer;
*pBuffer = this->m_arPoints[nIndex].dY; ++pBuffer;
if (nIndex == (nCount - 1))
{
pointCur.dX = this->m_arPoints[nIndex].dX;
pointCur.dY = this->m_arPoints[nIndex].dY;
}
}
}
*ppArray = pArray;
}
void Draw(IRenderer* pRenderer, CDoublePoint& pointCur)
{
switch (m_eType)
{
case rtMoveTo:
{
if (0 < this->m_arPoints.size())
{
pointCur.dX = this->m_arPoints[0].dX;
pointCur.dY = this->m_arPoints[0].dY;
pRenderer->PathCommandMoveTo(this->m_arPoints[0].dX, this->m_arPoints[0].dY);
}
break;
}
case rtLineTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount /*this->m_arPoints.size()*/);
}
break;
}
case rtCurveTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur);
if (NULL != pArray)
{
pRenderer->PathCommandCurvesTo (pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtClose:
{
pRenderer->PathCommandClose();
break;
}
case rtRMoveTo:
{
if (0 < this->m_arPoints.size())
{
pointCur.dX = this->m_arPoints[0].dX + pointCur.dX;
pointCur.dY = this->m_arPoints[0].dY + pointCur.dY;
pRenderer->PathCommandMoveTo(pointCur.dX, pointCur.dY);
}
break;
}
case rtRLineTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtRCurveTo:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandCurvesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
break;
}
case rtAngleEllipseTo:
{
int nFigure = 0;
while ((nFigure + 3) <= (int)this->m_arPoints.size())
{
double nLeft = this->m_arPoints[nFigure].dX - this->m_arPoints[nFigure + 1].dX / 2;
double nTop = this->m_arPoints[nFigure].dY - this->m_arPoints[nFigure + 1].dY / 2;
pRenderer->PathCommandArcTo(nLeft, nTop,
this->m_arPoints[nFigure + 1].dX, this->m_arPoints[nFigure + 1].dY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
nFigure += 3;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtAngleEllipse:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 3) <= (int)this->m_arPoints.size())
{
double nLeft = this->m_arPoints[nFigure].dX - this->m_arPoints[nFigure + 1].dX / 2;
double nTop = this->m_arPoints[nFigure].dY - this->m_arPoints[nFigure + 1].dY / 2;
pRenderer->PathCommandArcTo(nLeft, nTop,
this->m_arPoints[nFigure + 1].dX, this->m_arPoints[nFigure + 1].dY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
nFigure += 3;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtArc:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtArcTo:
{
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtClockwiseArcTo:
{
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, 360 + GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtClockwiseArc:
{
pRenderer->PathCommandStart();
int nFigure = 0;
while ((nFigure + 4) <= (int)this->m_arPoints.size())
{
double nCentreX = (this->m_arPoints[nFigure].dX + this->m_arPoints[nFigure + 1].dX) / 2;
double nCentreY = (this->m_arPoints[nFigure].dY + this->m_arPoints[nFigure + 1].dY) / 2;
double angleStart = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 2].dX, this->m_arPoints[nFigure + 2].dY);
double angleEnd = GetAngle(nCentreX, nCentreY,
this->m_arPoints[nFigure + 3].dX, this->m_arPoints[nFigure + 3].dY);
pRenderer->PathCommandArcTo(this->m_arPoints[nFigure].dX, this->m_arPoints[nFigure].dY,
this->m_arPoints[nFigure + 1].dX - this->m_arPoints[nFigure].dX,
this->m_arPoints[nFigure + 1].dY - this->m_arPoints[nFigure].dY,
angleStart, 360 + GetSweepAngle(angleStart, angleEnd));
nFigure += 4;
}
CheckLastPoint(pRenderer, pointCur);
break;
}
case rtEllipticalQuadrX:
{
bool bIsX = true;
CheckLastPoint(pRenderer, pointCur);
size_t nCount = this->m_arPoints.size();
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
double x1 = pointCur.dX;
double y1 = pointCur.dY;
double x2 = this->m_arPoints[nIndex].dX;
double y2 = this->m_arPoints[nIndex].dY;
double dRadX = fabs(x1 - x2);
double dRadY = fabs(y1 - y2);
AddEllipticalQuadr(pRenderer, bIsX, x1, y1, x2, y2, dRadX, dRadY);
pointCur.dX = x2;
pointCur.dY = y2;
}
break;
}
case rtEllipticalQuadrY:
{
bool bIsX = false;
CheckLastPoint(pRenderer, pointCur);
size_t nCount = this->m_arPoints.size();
for (size_t nIndex = 0; nIndex < nCount; ++nIndex)
{
double x1 = pointCur.dX;
double y1 = pointCur.dY;
double x2 = this->m_arPoints[nIndex].dX;
double y2 = this->m_arPoints[nIndex].dY;
double dRadX = fabs(x1 - x2);
double dRadY = fabs(y1 - y2);
AddEllipticalQuadr(pRenderer, bIsX, x1, y1, x2, y2, dRadX, dRadY);
pointCur.dX = x2;
pointCur.dY = y2;
}
break;
}
case rtQuadrBesier:
{
double* pArray = NULL;
size_t nCount = 0;
GetSafearrayPoints(pRenderer, &pArray, nCount, pointCur, TRUE);
if (NULL != pArray)
{
pRenderer->PathCommandLinesTo(pArray, (int)nCount/*this->m_arPoints.size()*/);
}
CheckLastPoint(pRenderer, pointCur);
break;
}
default: break;
};
}
inline void AddEllipticalQuadr(IRenderer*& pRenderer, bool& bIsX, double& x1, double& y1, double& x2, double& y2, double& dRadX, double& dRadY)
{
if (bIsX)
{
if ((x2 >= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1, 2 * dRadX, 2 * dRadY, -90, 90);
else if ((x2 >= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1 - 2 * dRadY, 2 * dRadX, 2 * dRadY, 90, -90);
else if ((x2 <= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1, 2 * dRadX, 2 * dRadY, -90, -90);
else if ((x2 <= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - dRadX, y1 - 2 * dRadY, 2 * dRadX, 2 * dRadY, 90, 90);
}
else
{
if ((x2 >= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1, y1 - dRadY, 2 * dRadX, 2 * dRadY, 180, -90);
else if ((x2 >= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1, y1 - dRadY, 2 * dRadX, 2 * dRadY, 180, 90);
else if ((x2 <= x1) && (y2 >= y1))
pRenderer->PathCommandArcTo(x1 - 2 * dRadX, y1 - dRadY, 2 * dRadX, 2 * dRadY, 0, 90);
else if ((x2 <= x1) && (y2 <= y1))
pRenderer->PathCommandArcTo(x1 - 2 * dRadX, y1 - dRadY, 2 * dRadX, 2 * dRadY, 0, -90);
}
bIsX = !bIsX;
}
void AddEllipticalQuadr(IRenderer*& pRenderer, bool& bIsX, double& x1, double& y1, double& x2, double& y2, double& dRadX, double& dRadY);
};
void AddRuler(const RulesType& eType)
{
size_t lCount = m_arParts.size();
CPart oPart;
oPart.m_eType = eType;
m_arParts.push_back(oPart);
}
void AddPoint(const double& x, const double& y)
{
size_t lCount = m_arParts.size();
if (0 != lCount)
{
CDoublePoint point;
point.dX = x;
point.dY = y;
m_arParts[lCount - 1].m_arPoints.push_back(point);
}
}
void AddRuler(const RulesType& eType);
void AddPoint(const double& x, const double& y);
void Clear();
void Clear()
{
m_arParts.clear();
}
std::vector<CPart> m_arParts;
int m_lFlags;
};
}

View File

@ -0,0 +1,420 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "PathShape.h"
namespace NSCustomShapesConvert
{
CSlice::CSlice(RulesType eType /*, LONG x = 0, LONG y = 0*/)
{
m_eRuler = eType;
m_nCountElementsPoint = 0;
//m_lX = x;
//m_lY = y;
}
void CSlice::AddParam(LONG lParam)
{
long lPoint = m_nCountElementsPoint % 2;
if (0 == lPoint)
{
Aggplus::POINT point;
point.x = lParam/* - m_lX*/;
point.y = 0;
m_arPoints.push_back(point);
}
else
{
m_arPoints[m_arPoints.size() - 1].y = lParam/* - m_lY*/;
}
++m_nCountElementsPoint;
}
CSlice& CSlice::operator =(const CSlice& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_arPoints.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arPoints.size(); ++nIndex)
{
m_arPoints.push_back(oSrc.m_arPoints[nIndex]);
}
return (*this);
}
double CSlice::GetAngle(double fCentreX, double fCentreY, double fX, double fY)
{
// - + (.. )
double dX = fX - fCentreX;
double dY = fY - fCentreY;
double modDX = abs(dX);
double modDY = abs(dY);
if ((modDX < 0.01) && (modDY < 0.01))
{
return 0;
}
if ((modDX < 0.01) && (dY < 0))
{
return -90;
}
else if (modDX < 0.01)
{
return 90;
}
if ((modDY < 0.01) && (dX < 0))
{
return 180;
}
else if (modDY < 0.01)
{
return 0;
}
double fAngle = atan(dY / dX);
fAngle *= (180 / M_PI);
if (dX > 0 && dY > 0)
{
return fAngle;
}
else if (dX > 0 && dY < 0)
{
return fAngle;
}
else if (dX < 0 && dY > 0)
{
//return fAngle + 180;
return 180 + fAngle;
}
else
{
//return fAngle + 180;
return fAngle - 180;
}
}
double CSlice::GetSweepAngle(const double& angleStart, const double& angleEnd)
{
if (angleStart >= angleEnd)
return angleEnd - angleStart;
else
return angleEnd - angleStart - 360;
}
void CSlice::ApplyElliptical(bool& bIsX, double& angleStart, double& angleSweet,
double& Left, double& Top, double& Width, double& Height, const CGeomShapeInfo::CPointD& pointCur)
{
// (x - y - x...)
if (bIsX)
{
angleStart = -90;
angleSweet = 90;
if ((Width < 0) && (Height < 0))
{
angleStart = 90;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = -90;
angleSweet = -90;
Width *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 90;
angleSweet = -90;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else
{
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
}
else
{
angleStart = 180;
angleSweet = -90;
if ((Width < 0) && (Height < 0))
{
angleStart = 0;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = 0;
angleSweet = 90;
Width *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 180;
angleSweet = 90;
Height *= -1;
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
else
{
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
}
bIsX = !bIsX;
}
void CSlice::ApplyLimo(CGeomShapeInfo& pGeomInfo, double& lX, double& lY)
{
if ((0 == pGeomInfo.m_dLimoX) || (0 == pGeomInfo.m_dLimoY))
return;
double dAspect = (double)pGeomInfo.m_dLimoX / pGeomInfo.m_dLimoY;
double lWidth = (dAspect * pGeomInfo.m_dHeight);
if (lWidth < pGeomInfo.m_dWidth)
{
// LimoX
double lXc = pGeomInfo.m_dLeft + pGeomInfo.m_dWidth / 2;
if ((lX > lXc) || ((lX == lXc) && (pGeomInfo.m_oCurPoint.dX >= lXc)))
{
double lXNew = pGeomInfo.m_dLeft + ((lWidth / pGeomInfo.m_dWidth) * (lX - pGeomInfo.m_dLeft));
lXNew += (pGeomInfo.m_dWidth - lWidth);
lX = lXNew;
}
//if (lX >= lXc)
//{
// LONG lXNew = pGeomInfo->m_lLeft + (LONG)(((double)lWidth / pGeomInfo->m_lWidth) * (lX - pGeomInfo->m_lLeft));
// if (pGeomInfo->m_oCurPoint.x >= lXc)
// {
// lXNew += (pGeomInfo->m_lWidth - lWidth);
// }
// lX = lXNew;
//}
}
else if (lWidth != pGeomInfo.m_dWidth)
{
// LimoY
double lHeight = (pGeomInfo.m_dWidth / dAspect);
double lYc = pGeomInfo.m_dTop + pGeomInfo.m_dHeight / 2;
if ((lY > lYc) || ((lY == lYc) && (pGeomInfo.m_oCurPoint.dY >= lYc)))
{
double lYNew = pGeomInfo.m_dTop + ((lHeight / pGeomInfo.m_dHeight) * (lY - pGeomInfo.m_dTop));
lYNew += (pGeomInfo.m_dHeight - lHeight);
lY = lYNew;
}
}
}
void CSlice::Bez2_3(std::vector<CGeomShapeInfo::CPointD>& oArray, RulesType& eType)
{
if (rtQuadrBesier == eType)
{
eType = rtCurveTo;
}
else if (rtOOXMLQuadBezTo == eType)
{
eType = rtOOXMLCubicBezTo;
}
else
{
return;
}
std::vector<CGeomShapeInfo::CPointD> arOld;
arOld.insert(arOld.end(),oArray.begin(), oArray.end());
oArray.clear();
size_t nStart = 0;
size_t nEnd = 2;
size_t nCount = arOld.size();
while (nStart < (nCount - 1))
{
if (2 >= (nCount - nStart))
{
// по идее такого быть не может
for (size_t i = nStart; i < nCount; ++i)
{
oArray.push_back(arOld[i]);
}
nStart = nCount;
break;
}
if (4 == (nCount - nStart))
{
// ничего не поделаешь... делаем кривую третьего порядка
oArray.push_back(arOld[nStart]);
oArray.push_back(arOld[nStart + 1]);
oArray.push_back(arOld[nStart + 2]);
oArray.push_back(arOld[nStart + 3]);
nStart += 4;
break;
}
// значит есть еще
CGeomShapeInfo::CPointD mem1;
mem1.dX = (arOld[nStart].dX + 2 * arOld[nStart + 1].dX) / 3.0;
mem1.dY = (arOld[nStart].dY + 2 * arOld[nStart + 1].dY) / 3.0;
CGeomShapeInfo::CPointD mem2;
mem2.dX = (2 * arOld[nStart + 1].dX + arOld[nStart + 2].dX) / 3.0;
mem2.dY = (2 * arOld[nStart + 1].dY + arOld[nStart + 2].dY) / 3.0;
oArray.push_back(mem1);
oArray.push_back(mem2);
oArray.push_back(arOld[nStart + 2]);
nStart += 2;
}
}
CPartPath::CPartPath() : m_arSlices()
{
m_bFill = true;
m_bStroke = true;
width = ShapeSizeVML;
height = ShapeSizeVML; //43200?
}
void CPartPath::FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager)
{
NSStringUtils::CheckPathOn_Fill_Stroke(strPath, m_bFill, m_bStroke);
std::vector<std::wstring> oArray;
NSStringUtils::ParsePath2(strPath, &oArray);
ParamType eParamType = ptValue;
RulesType eRuler = rtEnd;
LONG lValue;
bool bRes = true;
for (size_t nIndex = 0; nIndex < oArray.size(); ++nIndex)
{
lValue = GetValue(oArray[nIndex], eParamType, bRes);
if (bRes)
{
switch (eParamType)
{
case ptFormula: { lValue = pManager.m_arResults[lValue]; break; }
case ptAdjust: { lValue = (*(pManager.m_pAdjustments))[lValue]; break; }
default: break;
};
if (0 != m_arSlices.size())
{
m_arSlices[m_arSlices.size() - 1].AddParam(lValue);
}
}
else
{
eRuler = GetRuler(oArray[nIndex], bRes);
if (bRes)
{
if (rtNoFill == eRuler)
{
m_bFill = false;
}
else if (rtNoStroke == eRuler)
{
m_bStroke = false;
}
else
{
CSlice oSlice(eRuler);
m_arSlices.push_back(oSlice);
}
}
}
}
}
CPartPath& CPartPath::operator =(const CPartPath& oSrc)
{
m_bFill = oSrc.m_bFill;
m_bStroke = oSrc.m_bStroke;
width = oSrc.width;
height = oSrc.height;
m_arSlices.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arSlices.size(); ++nIndex)
{
m_arSlices.push_back(oSrc.m_arSlices[nIndex]);
}
return (*this);
}
void CPath::FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager)
{
m_arParts.clear();
std::vector<std::wstring> oArray;
NSStringUtils::ParseString(_T("e"), strPath, oArray);
for (size_t nIndex = 0; nIndex < oArray.size(); ++nIndex)
{
CPartPath oPath;
m_arParts.push_back(oPath);
m_arParts.back().FromXML(oArray[nIndex], pManager);
}
}
CPath& CPath::operator =(const CPath& oSrc)
{
m_arParts.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arParts.size(); ++nIndex)
{
m_arParts.push_back(oSrc.m_arParts[nIndex]);
}
return (*this);
}
void CPath::SetCoordsize(LONG lWidth, LONG lHeight)
{
for (size_t nIndex = 0; nIndex < m_arParts.size(); ++nIndex)
{
m_arParts[nIndex].width = lWidth;
m_arParts[nIndex].height = lHeight;
}
}
}

View File

@ -237,287 +237,22 @@ namespace NSCustomShapesConvert
//LONG m_lX;
//LONG m_lY;
CSlice(RulesType eType = rtMoveTo/*, LONG x = 0, LONG y = 0*/)
{
m_eRuler = eType;
m_nCountElementsPoint = 0;
//m_lX = x;
//m_lY = y;
}
CSlice(RulesType eType = rtMoveTo/*, LONG x = 0, LONG y = 0*/);
void AddParam(LONG lParam);
CSlice& operator =(const CSlice& oSrc);
void AddParam(LONG lParam)
{
long lPoint = m_nCountElementsPoint % 2;
if (0 == lPoint)
{
Aggplus::POINT point;
point.x = lParam/* - m_lX*/;
point.y = 0;
m_arPoints.push_back(point);
}
else
{
m_arPoints[m_arPoints.size() - 1].y = lParam/* - m_lY*/;
}
++m_nCountElementsPoint;
}
CSlice& operator =(const CSlice& oSrc)
{
m_eRuler = oSrc.m_eRuler;
m_arPoints.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arPoints.size(); ++nIndex)
{
m_arPoints.push_back(oSrc.m_arPoints[nIndex]);
}
return (*this);
}
protected:
double GetAngle(double fCentreX, double fCentreY, double fX, double fY)
{
// - + (.. )
double dX = fX - fCentreX;
double dY = fY - fCentreY;
double GetAngle(double fCentreX, double fCentreY, double fX, double fY);
double modDX = abs(dX);
double modDY = abs(dY);
if ((modDX < 0.01) && (modDY < 0.01))
{
return 0;
}
if ((modDX < 0.01) && (dY < 0))
{
return -90;
}
else if (modDX < 0.01)
{
return 90;
}
if ((modDY < 0.01) && (dX < 0))
{
return 180;
}
else if (modDY < 0.01)
{
return 0;
}
double fAngle = atan(dY / dX);
fAngle *= (180 / M_PI);
if (dX > 0 && dY > 0)
{
return fAngle;
}
else if (dX > 0 && dY < 0)
{
return fAngle;
}
else if (dX < 0 && dY > 0)
{
//return fAngle + 180;
return 180 + fAngle;
}
else
{
//return fAngle + 180;
return fAngle - 180;
}
}
inline double GetSweepAngle(const double& angleStart, const double& angleEnd)
{
if (angleStart >= angleEnd)
return angleEnd - angleStart;
else
return angleEnd - angleStart - 360;
}
double GetSweepAngle(const double& angleStart, const double& angleEnd);
void ApplyElliptical(bool& bIsX, double& angleStart, double& angleSweet,
double& Left, double& Top, double& Width, double& Height, const CGeomShapeInfo::CPointD& pointCur)
{
// (x - y - x...)
if (bIsX)
{
angleStart = -90;
angleSweet = 90;
double& Left, double& Top, double& Width, double& Height, const CGeomShapeInfo::CPointD& pointCur);
if ((Width < 0) && (Height < 0))
{
angleStart = 90;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = -90;
angleSweet = -90;
Width *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 90;
angleSweet = -90;
Height *= -1;
Left = pointCur.dX - Width / 2;
Top = pointCur.dY - Height;
}
else
{
Left = pointCur.dX - Width / 2;
Top = pointCur.dY;
}
}
else
{
angleStart = 180;
angleSweet = -90;
void ApplyLimo(CGeomShapeInfo& pGeomInfo, double& lX, double& lY);
if ((Width < 0) && (Height < 0))
{
angleStart = 0;
Width *= -1;
Height *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width < 0) && (Height > 0))
{
angleStart = 0;
angleSweet = 90;
Width *= -1;
Left = pointCur.dX - Width;
Top = pointCur.dY - Height / 2;
}
else if ((Width > 0) && (Height < 0))
{
angleStart = 180;
angleSweet = 90;
Height *= -1;
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
else
{
Left = pointCur.dX;
Top = pointCur.dY - Height / 2;
}
}
bIsX = !bIsX;
}
void ApplyLimo(CGeomShapeInfo& pGeomInfo, double& lX, double& lY)
{
if ((0 == pGeomInfo.m_dLimoX) || (0 == pGeomInfo.m_dLimoY))
return;
double dAspect = (double)pGeomInfo.m_dLimoX / pGeomInfo.m_dLimoY;
double lWidth = (dAspect * pGeomInfo.m_dHeight);
if (lWidth < pGeomInfo.m_dWidth)
{
// LimoX
double lXc = pGeomInfo.m_dLeft + pGeomInfo.m_dWidth / 2;
if ((lX > lXc) || ((lX == lXc) && (pGeomInfo.m_oCurPoint.dX >= lXc)))
{
double lXNew = pGeomInfo.m_dLeft + ((lWidth / pGeomInfo.m_dWidth) * (lX - pGeomInfo.m_dLeft));
lXNew += (pGeomInfo.m_dWidth - lWidth);
lX = lXNew;
}
//if (lX >= lXc)
//{
// LONG lXNew = pGeomInfo->m_lLeft + (LONG)(((double)lWidth / pGeomInfo->m_lWidth) * (lX - pGeomInfo->m_lLeft));
// if (pGeomInfo->m_oCurPoint.x >= lXc)
// {
// lXNew += (pGeomInfo->m_lWidth - lWidth);
// }
// lX = lXNew;
//}
}
else if (lWidth != pGeomInfo.m_dWidth)
{
// LimoY
double lHeight = (pGeomInfo.m_dWidth / dAspect);
double lYc = pGeomInfo.m_dTop + pGeomInfo.m_dHeight / 2;
if ((lY > lYc) || ((lY == lYc) && (pGeomInfo.m_oCurPoint.dY >= lYc)))
{
double lYNew = pGeomInfo.m_dTop + ((lHeight / pGeomInfo.m_dHeight) * (lY - pGeomInfo.m_dTop));
lYNew += (pGeomInfo.m_dHeight - lHeight);
lY = lYNew;
}
}
}
void Bez2_3(std::vector<CGeomShapeInfo::CPointD>& oArray, RulesType& eType)
{
if (rtQuadrBesier == eType)
{
eType = rtCurveTo;
}
else if (rtOOXMLQuadBezTo == eType)
{
eType = rtOOXMLCubicBezTo;
}
else
{
return;
}
std::vector<CGeomShapeInfo::CPointD> arOld;
arOld.insert(arOld.end(),oArray.begin(), oArray.end());
oArray.clear();
size_t nStart = 0;
size_t nEnd = 2;
size_t nCount = arOld.size();
while (nStart < (nCount - 1))
{
if (2 >= (nCount - nStart))
{
// по идее такого быть не может
for (size_t i = nStart; i < nCount; ++i)
{
oArray.push_back(arOld[i]);
}
nStart = nCount;
break;
}
if (4 == (nCount - nStart))
{
// ничего не поделаешь... делаем кривую третьего порядка
oArray.push_back(arOld[nStart]);
oArray.push_back(arOld[nStart + 1]);
oArray.push_back(arOld[nStart + 2]);
oArray.push_back(arOld[nStart + 3]);
nStart += 4;
break;
}
// значит есть еще
CGeomShapeInfo::CPointD mem1;
mem1.dX = (arOld[nStart].dX + 2 * arOld[nStart + 1].dX) / 3.0;
mem1.dY = (arOld[nStart].dY + 2 * arOld[nStart + 1].dY) / 3.0;
CGeomShapeInfo::CPointD mem2;
mem2.dX = (2 * arOld[nStart + 1].dX + arOld[nStart + 2].dX) / 3.0;
mem2.dY = (2 * arOld[nStart + 1].dY + arOld[nStart + 2].dY) / 3.0;
oArray.push_back(mem1);
oArray.push_back(mem2);
oArray.push_back(arOld[nStart + 2]);
nStart += 2;
}
}
void Bez2_3(std::vector<CGeomShapeInfo::CPointD>& oArray, RulesType& eType);
};
class CPartPath
@ -530,81 +265,10 @@ namespace NSCustomShapesConvert
std::vector<CSlice> m_arSlices;
public:
CPartPath() : m_arSlices()
{
m_bFill = true;
m_bStroke = true;
width = ShapeSizeVML;
height = ShapeSizeVML; //43200?
}
void FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager)
{
NSStringUtils::CheckPathOn_Fill_Stroke(strPath, m_bFill, m_bStroke);
std::vector<std::wstring> oArray;
CPartPath();
NSStringUtils::ParsePath2(strPath, &oArray);
ParamType eParamType = ptValue;
RulesType eRuler = rtEnd;
LONG lValue;
bool bRes = true;
for (size_t nIndex = 0; nIndex < oArray.size(); ++nIndex)
{
lValue = GetValue(oArray[nIndex], eParamType, bRes);
if (bRes)
{
switch (eParamType)
{
case ptFormula: { lValue = pManager.m_arResults[lValue]; break; }
case ptAdjust: { lValue = (*(pManager.m_pAdjustments))[lValue]; break; }
default: break;
};
if (0 != m_arSlices.size())
{
m_arSlices[m_arSlices.size() - 1].AddParam(lValue);
}
}
else
{
eRuler = GetRuler(oArray[nIndex], bRes);
if (bRes)
{
if (rtNoFill == eRuler)
{
m_bFill = false;
}
else if (rtNoStroke == eRuler)
{
m_bStroke = false;
}
else
{
CSlice oSlice(eRuler);
m_arSlices.push_back(oSlice);
}
}
}
}
}
CPartPath& operator =(const CPartPath& oSrc)
{
m_bFill = oSrc.m_bFill;
m_bStroke = oSrc.m_bStroke;
width = oSrc.width;
height = oSrc.height;
m_arSlices.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arSlices.size(); ++nIndex)
{
m_arSlices.push_back(oSrc.m_arSlices[nIndex]);
}
return (*this);
}
void FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager);
CPartPath& operator =(const CPartPath& oSrc);
};
class CPath
@ -612,39 +276,9 @@ namespace NSCustomShapesConvert
public:
std::vector<CPartPath> m_arParts;
void FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager)
{
m_arParts.clear();
std::vector<std::wstring> oArray;
void FromXML(std::wstring strPath, NSCustomShapesConvert::CFormulasManager& pManager);
NSStringUtils::ParseString(_T("e"), strPath, oArray);
for (size_t nIndex = 0; nIndex < oArray.size(); ++nIndex)
{
CPartPath oPath;
m_arParts.push_back(oPath);
m_arParts.back().FromXML(oArray[nIndex], pManager);
}
}
CPath& operator =(const CPath& oSrc)
{
m_arParts.clear();
for (size_t nIndex = 0; nIndex < oSrc.m_arParts.size(); ++nIndex)
{
m_arParts.push_back(oSrc.m_arParts[nIndex]);
}
return (*this);
}
void SetCoordsize(LONG lWidth, LONG lHeight)
{
for (size_t nIndex = 0; nIndex < m_arParts.size(); ++nIndex)
{
m_arParts[nIndex].width = lWidth;
m_arParts[nIndex].height = lHeight;
}
}
CPath& operator =(const CPath& oSrc);
void SetCoordsize(LONG lWidth, LONG lHeight);
};
}

View File

@ -0,0 +1,274 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "XmlWriter.h"
namespace NSCustomShapesConvert
{
CXmlWriter::CXmlWriter() : m_oWriter()
{
}
CXmlWriter::~CXmlWriter()
{
}
std::wstring CXmlWriter::GetXmlString()
{
return m_oWriter.GetData();
}
void CXmlWriter::ClearNoAttack()
{
m_oWriter.ClearNoAttack();
}
int CXmlWriter::GetSize()
{
return (int)m_oWriter.GetCurSize();
}
// write value
void CXmlWriter::WriteString(const std::wstring& strValue)
{
m_oWriter.WriteString(strValue);
}
void CXmlWriter::WriteStringXML(std::wstring strValue)
{
m_oWriter.WriteEncodeXmlString(strValue);
}
void CXmlWriter::WriteDouble(const double& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteLONG(const long& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteINT(const int& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteDWORD(const DWORD& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteDWORD_hex(const DWORD& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteBool(const bool& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const std::wstring& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
m_oWriter.WriteString(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute2(const std::wstring& strAttributeName, const std::wstring& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
m_oWriter.WriteEncodeXmlString(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const double& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDouble(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const int& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteINT(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const bool& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteBool(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const LONG& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteLONG(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttribute(const std::wstring& strAttributeName, const DWORD& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDWORD(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void CXmlWriter::WriteAttributeDWORD_hex(const std::wstring& strAttributeName, const DWORD& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDWORD_hex(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
// document methods
void CXmlWriter::WriteNodeBegin(std::wstring strNodeName, bool bAttributed)
{
m_oWriter.WriteString(g_bstr_nodeopen);
m_oWriter.WriteString(strNodeName);
if (!bAttributed)
m_oWriter.WriteString(g_bstr_nodeclose);
}
void CXmlWriter::WriteNodeEnd(std::wstring strNodeName, bool bEmptyNode, bool bEndNode)
{
if (bEmptyNode)
{
if (bEndNode)
m_oWriter.WriteString(g_bstr_nodeclose_slash);
else
m_oWriter.WriteString(g_bstr_nodeclose);
}
else
{
m_oWriter.WriteString(g_bstr_nodeopen_slash);
m_oWriter.WriteString(strNodeName);
m_oWriter.WriteString(g_bstr_nodeclose);
}
}
// write node values
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const std::wstring& val)
{
WriteNodeBegin(strNodeName);
WriteString(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const bool& val)
{
WriteNodeBegin(strNodeName);
if (val)
WriteString(_T("1"));
else
WriteString(_T("0"));
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const double& val)
{
WriteNodeBegin(strNodeName);
WriteDouble(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const LONG& val)
{
WriteNodeBegin(strNodeName);
WriteLONG(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const int& val)
{
WriteNodeBegin(strNodeName);
WriteINT(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValue(const std::wstring& strNodeName, const DWORD& val)
{
WriteNodeBegin(strNodeName);
WriteDWORD(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::WriteNodeValueDWORD_hex(const std::wstring& strNodeName, const DWORD& val)
{
WriteNodeBegin(strNodeName);
WriteDWORD_hex(val);
WriteNodeEnd(strNodeName);
}
void CXmlWriter::StartNode(const std::wstring& name)
{
m_oWriter.WriteString(g_bstr_nodeopen);
m_oWriter.WriteString(name);
}
void CXmlWriter::StartAttributes()
{
// none
}
void CXmlWriter::EndAttributes()
{
m_oWriter.WriteString(g_bstr_nodeclose);
}
void CXmlWriter::EndNode(const std::wstring& name)
{
m_oWriter.WriteString(g_bstr_nodeopen_slash);
m_oWriter.WriteString(name);
m_oWriter.WriteString(g_bstr_nodeclose);
}
void CXmlWriter::ReplaceString(std::wstring from, std::wstring to)
{
// ужасная функция. вызывать ее не надо. не для этого класс писался.
std::wstring sCur = m_oWriter.GetData();
size_t start_pos = 0;
while((start_pos = sCur .find(from, start_pos)) != std::wstring::npos)
{
sCur .replace(start_pos, from.length(), to);
start_pos += to.length();
}
ClearNoAttack();
WriteString(sCur);
}
}

View File

@ -60,230 +60,47 @@ namespace NSCustomShapesConvert
public:
NSStringUtils::CStringBuilder m_oWriter;
CXmlWriter() : m_oWriter()
{
}
~CXmlWriter()
{
}
CXmlWriter();
~CXmlWriter();
std::wstring GetXmlString()
{
return m_oWriter.GetData();
}
void ClearNoAttack()
{
m_oWriter.ClearNoAttack();
}
int GetSize()
{
return (int)m_oWriter.GetCurSize();
}
std::wstring GetXmlString();
void ClearNoAttack();
int GetSize();
// write value
void WriteString(const std::wstring& strValue)
{
m_oWriter.WriteString(strValue);
}
void WriteStringXML(std::wstring strValue)
{
m_oWriter.WriteEncodeXmlString(strValue);
}
void WriteDouble(const double& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteLONG(const long& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteINT(const int& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteDWORD(const DWORD& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteDWORD_hex(const DWORD& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteBool(const bool& val)
{
m_oWriter.WriteString(XmlUtils::ToString(val));
}
void WriteAttribute(const std::wstring& strAttributeName, const std::wstring& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
m_oWriter.WriteString(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute2(const std::wstring& strAttributeName, const std::wstring& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
m_oWriter.WriteEncodeXmlString(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute(const std::wstring& strAttributeName, const double& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDouble(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute(const std::wstring& strAttributeName, const int& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteINT(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute(const std::wstring& strAttributeName, const bool& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteBool(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute(const std::wstring& strAttributeName, const LONG& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteLONG(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttribute(const std::wstring& strAttributeName, const DWORD& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDWORD(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteAttributeDWORD_hex(const std::wstring& strAttributeName, const DWORD& val)
{
m_oWriter.WriteString(g_bstr_node_space);
m_oWriter.WriteString(strAttributeName);
m_oWriter.WriteString(g_bstr_node_equal);
m_oWriter.WriteString(g_bstr_node_quote);
WriteDWORD_hex(val);
m_oWriter.WriteString(g_bstr_node_quote);
}
void WriteString(const std::wstring& strValue);
void WriteStringXML(std::wstring strValue);
void WriteDouble(const double& val);
void WriteLONG(const long& val);
void WriteINT(const int& val);
void WriteDWORD(const DWORD& val);
void WriteDWORD_hex(const DWORD& val);
void WriteBool(const bool& val);
void WriteAttribute(const std::wstring& strAttributeName, const std::wstring& val);
void WriteAttribute2(const std::wstring& strAttributeName, const std::wstring& val);
void WriteAttribute(const std::wstring& strAttributeName, const double& val);
void WriteAttribute(const std::wstring& strAttributeName, const int& val);
void WriteAttribute(const std::wstring& strAttributeName, const bool& val);
void WriteAttribute(const std::wstring& strAttributeName, const LONG& val);
void WriteAttribute(const std::wstring& strAttributeName, const DWORD& val);
void WriteAttributeDWORD_hex(const std::wstring& strAttributeName, const DWORD& val);
// document methods
void WriteNodeBegin(std::wstring strNodeName, bool bAttributed = false)
{
m_oWriter.WriteString(g_bstr_nodeopen);
m_oWriter.WriteString(strNodeName);
if (!bAttributed)
m_oWriter.WriteString(g_bstr_nodeclose);
}
void WriteNodeEnd(std::wstring strNodeName, bool bEmptyNode = false, bool bEndNode = true)
{
if (bEmptyNode)
{
if (bEndNode)
m_oWriter.WriteString(g_bstr_nodeclose_slash);
else
m_oWriter.WriteString(g_bstr_nodeclose);
}
else
{
m_oWriter.WriteString(g_bstr_nodeopen_slash);
m_oWriter.WriteString(strNodeName);
m_oWriter.WriteString(g_bstr_nodeclose);
}
}
void WriteNodeBegin(std::wstring strNodeName, bool bAttributed = false);
void WriteNodeEnd(std::wstring strNodeName, bool bEmptyNode = false, bool bEndNode = true);
// write node values
void WriteNodeValue(const std::wstring& strNodeName, const std::wstring& val)
{
WriteNodeBegin(strNodeName);
WriteString(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const bool& val)
{
WriteNodeBegin(strNodeName);
if (val)
WriteString(_T("1"));
else
WriteString(_T("0"));
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const double& val)
{
WriteNodeBegin(strNodeName);
WriteDouble(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const LONG& val)
{
WriteNodeBegin(strNodeName);
WriteLONG(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const int& val)
{
WriteNodeBegin(strNodeName);
WriteINT(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const DWORD& val)
{
WriteNodeBegin(strNodeName);
WriteDWORD(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValueDWORD_hex(const std::wstring& strNodeName, const DWORD& val)
{
WriteNodeBegin(strNodeName);
WriteDWORD_hex(val);
WriteNodeEnd(strNodeName);
}
void WriteNodeValue(const std::wstring& strNodeName, const std::wstring& val);
void WriteNodeValue(const std::wstring& strNodeName, const bool& val);
void WriteNodeValue(const std::wstring& strNodeName, const double& val);
void WriteNodeValue(const std::wstring& strNodeName, const LONG& val);
void WriteNodeValue(const std::wstring& strNodeName, const int& val);
void WriteNodeValue(const std::wstring& strNodeName, const DWORD& val);
void WriteNodeValueDWORD_hex(const std::wstring& strNodeName, const DWORD& val);
public:
void StartNode(const std::wstring& name)
{
m_oWriter.WriteString(g_bstr_nodeopen);
m_oWriter.WriteString(name);
}
void StartAttributes()
{
// none
}
void EndAttributes()
{
m_oWriter.WriteString(g_bstr_nodeclose);
}
void EndNode(const std::wstring& name)
{
m_oWriter.WriteString(g_bstr_nodeopen_slash);
m_oWriter.WriteString(name);
m_oWriter.WriteString(g_bstr_nodeclose);
}
void StartNode(const std::wstring& name);
void StartAttributes();
void EndAttributes();
void EndNode(const std::wstring& name);
template<typename T>
void WriteArray(const std::wstring& strName, const std::vector<T>& arr)
@ -313,20 +130,6 @@ namespace NSCustomShapesConvert
// -------------------------------------------------------------------------------------
void ReplaceString(std::wstring from, std::wstring to)
{
// ужасная функция. вызывать ее не надо. не для этого класс писался.
std::wstring sCur = m_oWriter.GetData();
size_t start_pos = 0;
while((start_pos = sCur .find(from, start_pos)) != std::wstring::npos)
{
sCur .replace(start_pos, from.length(), to);
start_pos += to.length();
}
ClearNoAttack();
WriteString(sCur);
}
void ReplaceString(std::wstring from, std::wstring to);
};
}

View File

@ -0,0 +1,73 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "AccentBorderCallout2Type.h"
// 51
namespace NSCustomShapesConvert
{
CAccentBorderCallout2Type::CAccentBorderCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,46 +35,5 @@
// 51
namespace NSCustomShapesConvert
{
class CAccentBorderCallout2Type : public CCustomShape
{
public:
CAccentBorderCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
};
}
DEFINE_SHAPE_CLASS(CAccentBorderCallout2Type, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "AccentCallout1Type.h"
// 44
namespace NSCustomShapesConvert
{
CAccentCallout1Type::CAccentCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem@2,l@2,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 44
namespace NSCustomShapesConvert
{
class CAccentCallout1Type : public CCustomShape
{
public:
CAccentCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem@2,l@2,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CAccentCallout1Type, CCustomShape)
}

View File

@ -0,0 +1,73 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "AccentCallout2Type.h"
// 45
namespace NSCustomShapesConvert
{
CAccentCallout2Type::CAccentCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,45 +35,5 @@
// 45
namespace NSCustomShapesConvert
{
class CAccentCallout2Type : public CCustomShape
{
public:
CAccentCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem@4,l@4,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
};
}
DEFINE_SHAPE_CLASS(CAccentCallout2Type, CCustomShape)
}

View File

@ -0,0 +1,81 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "AccentCallout3Type.h"
// 46
namespace NSCustomShapesConvert
{
CAccentCallout3Type::CAccentCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem@6,l@6,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,54 +35,5 @@
// 46
namespace NSCustomShapesConvert
{
class CAccentCallout3Type : public CCustomShape
{
public:
CAccentCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem@6,l@6,21600nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
};
}
DEFINE_SHAPE_CLASS(CAccentCallout3Type, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "AccentCallout90Type.h"
// 179
namespace NSCustomShapesConvert
{
CAccentCallout90Type::CAccentCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 179
namespace NSCustomShapesConvert
{
class CAccentCallout90Type : public CCustomShape
{
public:
CAccentCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CAccentCallout90Type, CCustomShape)
}

View File

@ -0,0 +1,76 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonBack.h"
// 194
namespace NSCustomShapesConvert
{
CActionButtonBackType::CActionButtonBackType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@11@4@12@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,49 +35,5 @@
// 194
namespace NSCustomShapesConvert
{
class CActionButtonBackType : public CCustomShape
{
public:
CActionButtonBackType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@11@4@12@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonBackType, CCustomShape)
}

View File

@ -0,0 +1,83 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonBeginning.h"
// 196
namespace NSCustomShapesConvert
{
CActionButtonBeginType::CActionButtonBeginType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9l@17@4@12@10xem@11@9l@16@9@16@10@11@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 1 4"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @16 @5 0"));
AddGuide(_T("sum @17 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,56 +35,5 @@
// 196
namespace NSCustomShapesConvert
{
class CActionButtonBeginType : public CCustomShape
{
public:
CActionButtonBeginType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9l@17@4@12@10xem@11@9l@16@9@16@10@11@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 1 4"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @16 @5 0"));
AddGuide(_T("sum @17 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonBeginType, CCustomShape)
}

View File

@ -0,0 +1,67 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonBlank.h"
// 189
namespace NSCustomShapesConvert
{
CActionButtonBlankType::CActionButtonBlankType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,40 +35,5 @@
// 189
namespace NSCustomShapesConvert
{
class CActionButtonBlankType : public CCustomShape
{
public:
CActionButtonBlankType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonBlankType, CCustomShape)
}

View File

@ -0,0 +1,80 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonDocument.h"
// 198
namespace NSCustomShapesConvert
{
CActionButtonDocType::CActionButtonDocType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@12@10@13@10@13@14@15@9xem@15@9nfl@15@14@13@14e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("prod #0 3 4"));
AddGuide(_T("sum @3 @11 6075"));
AddGuide(_T("sum @3 6075 @11"));
AddGuide(_T("sum @4 @5 4050"));
AddGuide(_T("sum @13 @5 4050"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @13 @5 0"));
AddGuide(_T("sum @14 @5 0"));
AddGuide(_T("sum @15 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,53 +35,5 @@
// 198
namespace NSCustomShapesConvert
{
class CActionButtonDocType : public CCustomShape
{
public:
CActionButtonDocType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@9nfl@12@10@13@10@13@14@15@9xem@15@9nfl@15@14@13@14e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("prod #0 3 4"));
AddGuide(_T("sum @3 @11 6075"));
AddGuide(_T("sum @3 6075 @11"));
AddGuide(_T("sum @4 @5 4050"));
AddGuide(_T("sum @13 @5 4050"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @13 @5 0"));
AddGuide(_T("sum @14 @5 0"));
AddGuide(_T("sum @15 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonDocType, CCustomShape)
}

View File

@ -0,0 +1,83 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonEnd.h"
// 195
namespace NSCustomShapesConvert
{
CActionButtonEndType::CActionButtonEndType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9l@16@4@11@10xem@17@9l@12@9@12@10@17@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @16 @5 0"));
AddGuide(_T("sum @17 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,56 +35,5 @@
// 195
namespace NSCustomShapesConvert
{
class CActionButtonEndType : public CCustomShape
{
public:
CActionButtonEndType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9l@16@4@11@10xem@17@9l@12@9@12@10@17@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @16 @5 0"));
AddGuide(_T("sum @17 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonEndType, CCustomShape)
}

View File

@ -0,0 +1,120 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonHelp.h"
// 191
namespace NSCustomShapesConvert
{
CActionButtonHelpType::CActionButtonHelpType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@33@27nfqy@3@9@40@27@39@4@37@29l@37@30@36@30@36@29qy@37@28@39@27@3@26@34@27xem@3@31nfqx@35@32@3@10@38@32@3@31xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 7"));
AddGuide(_T("prod @13 3 14"));
AddGuide(_T("prod @13 2 7"));
AddGuide(_T("prod @13 5 14"));
AddGuide(_T("prod @13 11 28"));
AddGuide(_T("prod @13 3 7"));
AddGuide(_T("prod @13 4 7"));
AddGuide(_T("prod @13 17 28"));
AddGuide(_T("prod @13 9 14"));
AddGuide(_T("prod @13 21 28"));
AddGuide(_T("prod @13 11 14"));
AddGuide(_T("prod @13 25 28"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @9 @21 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @9 @25 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @11 @24 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
AddGuide(_T("sum @38 @5 0"));
AddGuide(_T("sum @39 @5 0"));
AddGuide(_T("sum @40 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,93 +35,5 @@
// 191
namespace NSCustomShapesConvert
{
class CActionButtonHelpType : public CCustomShape
{
public:
CActionButtonHelpType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@33@27nfqy@3@9@40@27@39@4@37@29l@37@30@36@30@36@29qy@37@28@39@27@3@26@34@27xem@3@31nfqx@35@32@3@10@38@32@3@31xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 7"));
AddGuide(_T("prod @13 3 14"));
AddGuide(_T("prod @13 2 7"));
AddGuide(_T("prod @13 5 14"));
AddGuide(_T("prod @13 11 28"));
AddGuide(_T("prod @13 3 7"));
AddGuide(_T("prod @13 4 7"));
AddGuide(_T("prod @13 17 28"));
AddGuide(_T("prod @13 9 14"));
AddGuide(_T("prod @13 21 28"));
AddGuide(_T("prod @13 11 14"));
AddGuide(_T("prod @13 25 28"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @9 @21 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @9 @25 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @11 @24 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
AddGuide(_T("sum @38 @5 0"));
AddGuide(_T("sum @39 @5 0"));
AddGuide(_T("sum @40 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonHelpType, CCustomShape)
}

View File

@ -0,0 +1,108 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonHome.h"
// 190
namespace NSCustomShapesConvert
{
CActionButtonHomeType::CActionButtonHomeType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfl@11@4@28@4@28@10@33@10@33@4@12@4@32@26@32@24@31@24@31@25xem@31@25nfl@32@26em@28@4nfl@33@4em@29@10nfl@29@27@30@27@30@10e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 16"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 3 16"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 7 16"));
AddGuide(_T("prod @13 9 16"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 13 16"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @21 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @11 @23 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,81 +35,5 @@
// 190
namespace NSCustomShapesConvert
{
class CActionButtonHomeType : public CCustomShape
{
public:
CActionButtonHomeType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfl@11@4@28@4@28@10@33@10@33@4@12@4@32@26@32@24@31@24@31@25xem@31@25nfl@32@26em@28@4nfl@33@4em@29@10nfl@29@27@30@27@30@10e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 16"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 3 16"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 7 16"));
AddGuide(_T("prod @13 9 16"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 13 16"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @21 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @11 @23 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonHomeType, CCustomShape)
}

View File

@ -0,0 +1,115 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonInfo.h"
// 192
namespace NSCustomShapesConvert
{
CActionButtonInfoType::CActionButtonInfoType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfqx@11@4@3@10@12@4@3@9xem@3@25nfqx@33@26@3@27@36@26@3@25xem@32@28nfl@32@29@34@29@34@30@32@30@32@31@37@31@37@30@35@30@35@28xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 32"));
AddGuide(_T("prod @13 5 32"));
AddGuide(_T("prod @13 9 32"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 3 8"));
AddGuide(_T("prod @13 13 32"));
AddGuide(_T("prod @13 19 32"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 13 16"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,87 +35,5 @@
// 192
namespace NSCustomShapesConvert
{
class CActionButtonInfoType : public CCustomShape
{
public:
CActionButtonInfoType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@3@9nfqx@11@4@3@10@12@4@3@9xem@3@25nfqx@33@26@3@27@36@26@3@25xem@32@28nfl@32@29@34@29@34@30@32@30@32@31@37@31@37@30@35@30@35@28xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 32"));
AddGuide(_T("prod @13 5 32"));
AddGuide(_T("prod @13 9 32"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 3 8"));
AddGuide(_T("prod @13 13 32"));
AddGuide(_T("prod @13 19 32"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 13 16"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @11 @22 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
AddGuide(_T("sum @27 @5 0"));
AddGuide(_T("sum @28 @5 0"));
AddGuide(_T("sum @29 @5 0"));
AddGuide(_T("sum @30 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonInfoType, CCustomShape)
}

View File

@ -0,0 +1,129 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonMovie.h"
// 200
namespace NSCustomShapesConvert
{
CActionButtonMovieType::CActionButtonMovieType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@39nfl@11@44@31@44@32@43@33@43@33@47@35@47@35@45@36@45@38@46@12@46@12@41@38@41@37@42@35@42@35@41@34@40@32@40@31@39xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1455 21600"));
AddGuide(_T("prod @13 1905 21600"));
AddGuide(_T("prod @13 2325 21600"));
AddGuide(_T("prod @13 16155 21600"));
AddGuide(_T("prod @13 17010 21600"));
AddGuide(_T("prod @13 19335 21600"));
AddGuide(_T("prod @13 19725 21600"));
AddGuide(_T("prod @13 20595 21600"));
AddGuide(_T("prod @13 5280 21600"));
AddGuide(_T("prod @13 5730 21600"));
AddGuide(_T("prod @13 6630 21600"));
AddGuide(_T("prod @13 7492 21600"));
AddGuide(_T("prod @13 9067 21600"));
AddGuide(_T("prod @13 9555 21600"));
AddGuide(_T("prod @13 13342 21600"));
AddGuide(_T("prod @13 14580 21600"));
AddGuide(_T("prod @13 15592 21600"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @9 @22 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @9 @25 0"));
AddGuide(_T("sum @9 @26 0"));
AddGuide(_T("sum @9 @27 0"));
AddGuide(_T("sum @9 @28 0"));
AddGuide(_T("sum @9 @29 0"));
AddGuide(_T("sum @9 @30 0"));
AddGuide(_T("sum @9 @31 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
AddGuide(_T("sum @38 @5 0"));
AddGuide(_T("sum @39 @5 0"));
AddGuide(_T("sum @40 @5 0"));
AddGuide(_T("sum @41 @5 0"));
AddGuide(_T("sum @42 @5 0"));
AddGuide(_T("sum @43 @5 0"));
AddGuide(_T("sum @44 @5 0"));
AddGuide(_T("sum @45 @5 0"));
AddGuide(_T("sum @46 @5 0"));
AddGuide(_T("sum @47 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,101 +35,5 @@
// 200
namespace NSCustomShapesConvert
{
class CActionButtonMovieType : public CCustomShape
{
public:
CActionButtonMovieType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@39nfl@11@44@31@44@32@43@33@43@33@47@35@47@35@45@36@45@38@46@12@46@12@41@38@41@37@42@35@42@35@41@34@40@32@40@31@39xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1455 21600"));
AddGuide(_T("prod @13 1905 21600"));
AddGuide(_T("prod @13 2325 21600"));
AddGuide(_T("prod @13 16155 21600"));
AddGuide(_T("prod @13 17010 21600"));
AddGuide(_T("prod @13 19335 21600"));
AddGuide(_T("prod @13 19725 21600"));
AddGuide(_T("prod @13 20595 21600"));
AddGuide(_T("prod @13 5280 21600"));
AddGuide(_T("prod @13 5730 21600"));
AddGuide(_T("prod @13 6630 21600"));
AddGuide(_T("prod @13 7492 21600"));
AddGuide(_T("prod @13 9067 21600"));
AddGuide(_T("prod @13 9555 21600"));
AddGuide(_T("prod @13 13342 21600"));
AddGuide(_T("prod @13 14580 21600"));
AddGuide(_T("prod @13 15592 21600"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @11 @19 0"));
AddGuide(_T("sum @11 @20 0"));
AddGuide(_T("sum @11 @21 0"));
AddGuide(_T("sum @9 @22 0"));
AddGuide(_T("sum @9 @23 0"));
AddGuide(_T("sum @9 @24 0"));
AddGuide(_T("sum @9 @25 0"));
AddGuide(_T("sum @9 @26 0"));
AddGuide(_T("sum @9 @27 0"));
AddGuide(_T("sum @9 @28 0"));
AddGuide(_T("sum @9 @29 0"));
AddGuide(_T("sum @9 @30 0"));
AddGuide(_T("sum @9 @31 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @31 @5 0"));
AddGuide(_T("sum @32 @5 0"));
AddGuide(_T("sum @33 @5 0"));
AddGuide(_T("sum @34 @5 0"));
AddGuide(_T("sum @35 @5 0"));
AddGuide(_T("sum @36 @5 0"));
AddGuide(_T("sum @37 @5 0"));
AddGuide(_T("sum @38 @5 0"));
AddGuide(_T("sum @39 @5 0"));
AddGuide(_T("sum @40 @5 0"));
AddGuide(_T("sum @41 @5 0"));
AddGuide(_T("sum @42 @5 0"));
AddGuide(_T("sum @43 @5 0"));
AddGuide(_T("sum @44 @5 0"));
AddGuide(_T("sum @45 @5 0"));
AddGuide(_T("sum @46 @5 0"));
AddGuide(_T("sum @47 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonMovieType, CCustomShape)
}

View File

@ -0,0 +1,76 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonNext.h"
// 193
namespace NSCustomShapesConvert
{
CActionButtonNextType::CActionButtonNextType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9nfl@12@4@11@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,48 +35,5 @@
// 193
namespace NSCustomShapesConvert
{
class CActionButtonNextType : public CCustomShape
{
public:
CActionButtonNextType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@9nfl@12@4@11@10xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonNextType, CCustomShape)
}

View File

@ -0,0 +1,98 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonReturn.h"
// 197
namespace NSCustomShapesConvert
{
CActionButtonReturnType::CActionButtonReturnType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@21nfl@23@9@3@21@24@21@24@20qy@3@19l@25@19qx@26@20l@26@21@11@21@11@20qy@25@10l@3@10qx@22@20l@22@21xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 3 8"));
AddGuide(_T("prod @13 1 4"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @19 @5 0"));
AddGuide(_T("sum @20 @5 0"));
AddGuide(_T("sum @21 @5 0"));
AddGuide(_T("sum @22 @5 0"));
AddGuide(_T("sum @23 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,70 +35,5 @@
// 197
namespace NSCustomShapesConvert
{
class CActionButtonReturnType : public CCustomShape
{
public:
CActionButtonReturnType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@12@21nfl@23@9@3@21@24@21@24@20qy@3@19l@25@19qx@26@20l@26@21@11@21@11@20qy@25@10l@3@10qx@22@20l@22@21xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 3 8"));
AddGuide(_T("prod @13 1 4"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @16 0"));
AddGuide(_T("sum @9 @18 0"));
AddGuide(_T("sum @11 @14 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @17 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @3 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @19 @5 0"));
AddGuide(_T("sum @20 @5 0"));
AddGuide(_T("sum @21 @5 0"));
AddGuide(_T("sum @22 @5 0"));
AddGuide(_T("sum @23 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonReturnType, CCustomShape)
}

View File

@ -0,0 +1,97 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "ActionButtonSound.h"
// 199
namespace NSCustomShapesConvert
{
CActionButtonSoundType::CActionButtonSoundType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@21nfl@11@22@24@22@25@10@25@9@24@21xem@26@21nfl@12@20em@26@4nfl@12@4em@26@22nfl@12@23e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @19 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @20 @5 0"));
AddGuide(_T("sum @21 @5 0"));
AddGuide(_T("sum @22 @5 0"));
AddGuide(_T("sum @23 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,69 +35,5 @@
// 199
namespace NSCustomShapesConvert
{
class CActionButtonSoundType : public CCustomShape
{
public:
CActionButtonSoundType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0em@11@21nfl@11@22@24@22@25@10@25@9@24@21xem@26@21nfl@12@20em@26@4nfl@12@4em@26@22nfl@12@23e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
AddGuide(_T("sum @0 @4 8100"));
AddGuide(_T("sum @2 8100 @4"));
AddGuide(_T("sum @0 @3 8100"));
AddGuide(_T("sum @1 8100 @3"));
AddGuide(_T("sum @10 0 @9"));
AddGuide(_T("prod @13 1 8"));
AddGuide(_T("prod @13 5 16"));
AddGuide(_T("prod @13 5 8"));
AddGuide(_T("prod @13 11 16"));
AddGuide(_T("prod @13 3 4"));
AddGuide(_T("prod @13 7 8"));
AddGuide(_T("sum @9 @14 0"));
AddGuide(_T("sum @9 @15 0"));
AddGuide(_T("sum @9 @17 0"));
AddGuide(_T("sum @9 @19 0"));
AddGuide(_T("sum @11 @15 0"));
AddGuide(_T("sum @11 @16 0"));
AddGuide(_T("sum @11 @18 0"));
AddGuide(_T("sum @4 @5 0"));
AddGuide(_T("sum @9 @5 0"));
AddGuide(_T("sum @10 @5 0"));
AddGuide(_T("sum @11 @5 0"));
AddGuide(_T("sum @12 @5 0"));
AddGuide(_T("sum @20 @5 0"));
AddGuide(_T("sum @21 @5 0"));
AddGuide(_T("sum @22 @5 0"));
AddGuide(_T("sum @23 @5 0"));
AddGuide(_T("sum @24 @5 0"));
AddGuide(_T("sum @25 @5 0"));
AddGuide(_T("sum @26 @5 0"));
m_arAdjustments.push_back(1350);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CActionButtonSoundType, CCustomShape)
}

View File

@ -0,0 +1,70 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BentArrowType.h"
// 91
namespace NSCustomShapesConvert
{
CBentArrowType::CBentArrowType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m21600,6079l@0,0@0@1,12427@1qx,12158l,21600@4,21600@4,12158qy12427@2l@0@2@0,12158xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("sum 12158 0 #1"));
AddGuide(_T("sum @2 0 #1"));
AddGuide(_T("prod @3 32768 32059"));
AddGuide(_T("prod @4 1 2"));
AddGuide(_T("sum 21600 0 #0"));
AddGuide(_T("prod @6 #1 6079"));
AddGuide(_T("sum @7 #0 0"));
m_arAdjustments.push_back(18000);
m_arAdjustments.push_back(3000);
LoadConnectorsList(_T("@0,0;@0,12158;@5,21600;21600,6079"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("12427,@1,@8,@2;0,12158,@4,21600"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
oHandle1.xrange = _T("12427,21600");
oHandle1.yrange = _T("0,6079");
m_arHandles.push_back(oHandle1);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,42 +35,5 @@
// 91
namespace NSCustomShapesConvert
{
class CBentArrowType : public CCustomShape
{
public:
CBentArrowType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m21600,6079l@0,0@0@1,12427@1qx,12158l,21600@4,21600@4,12158qy12427@2l@0@2@0,12158xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("sum 12158 0 #1"));
AddGuide(_T("sum @2 0 #1"));
AddGuide(_T("prod @3 32768 32059"));
AddGuide(_T("prod @4 1 2"));
AddGuide(_T("sum 21600 0 #0"));
AddGuide(_T("prod @6 #1 6079"));
AddGuide(_T("sum @7 #0 0"));
m_arAdjustments.push_back(18000);
m_arAdjustments.push_back(3000);
LoadConnectorsList(_T("@0,0;@0,12158;@5,21600;21600,6079"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("12427,@1,@8,@2;0,12158,@4,21600"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
oHandle1.xrange = _T("12427,21600");
oHandle1.yrange = _T("0,6079");
m_arHandles.push_back(oHandle1);
}
};
}
DEFINE_SHAPE_CLASS(CBentArrowType, CCustomShape)
}

View File

@ -0,0 +1,52 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BentConnector.h"
// 34
namespace NSCustomShapesConvert
{
CBentConnectorType::CBentConnectorType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
//m_strPathLimoX = _T("m0,0l@0,0r0,21600l21600,21600nfe");
//m_strPathLimoY = _T("m0,0l,@0r21600,0l21600,21600nfe");
m_strPath = _T("m,l@0,0@0,21600,21600,21600e");//m_strPathLimoX;
AddGuide(_T("val #0"));
m_arAdjustments.push_back(10800);
LoadConnectorsList(_T("0,0;21600,21600"));
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,23 +35,5 @@
// 34
namespace NSCustomShapesConvert
{
class CBentConnectorType : public CCustomShape
{
public:
CBentConnectorType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
//m_strPathLimoX = _T("m0,0l@0,0r0,21600l21600,21600nfe");
//m_strPathLimoY = _T("m0,0l,@0r21600,0l21600,21600nfe");
m_strPath = _T("m,l@0,0@0,21600,21600,21600e");//m_strPathLimoX;
AddGuide(_T("val #0"));
m_arAdjustments.push_back(10800);
LoadConnectorsList(_T("0,0;21600,21600"));
}
};
}
DEFINE_SHAPE_CLASS(CBentConnectorType, CCustomShape)
}

View File

@ -0,0 +1,87 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BentUpArrowType.h"
// 90
namespace NSCustomShapesConvert
{
CBentUpArrowType::CBentUpArrowType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m@4,l@0@2@5@2@5@12,0@12,,21600@1,21600@1@2,21600@2xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("sum @3 10800 0"));
AddGuide(_T("sum 21600 #0 #1"));
AddGuide(_T("sum #1 #2 0"));
AddGuide(_T("prod @6 1 2"));
AddGuide(_T("prod #1 2 1"));
AddGuide(_T("sum @8 0 21600"));
AddGuide(_T("prod 21600 @0 @1"));
AddGuide(_T("prod 21600 @4 @1"));
AddGuide(_T("prod 21600 @5 @1"));
AddGuide(_T("prod 21600 @7 @1"));
AddGuide(_T("prod #1 1 2"));
AddGuide(_T("sum @5 0 @4"));
AddGuide(_T("sum @0 0 @4"));
AddGuide(_T("prod @2 @15 @16"));
m_arAdjustments.push_back(9257);
m_arAdjustments.push_back(18514);
m_arAdjustments.push_back(7200);
LoadConnectorsList(_T("@4,0;@0,@2;0,@11;@14,21600;@1,@13;21600,@2"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("0,@12,@1,21600;@5,@17,@1,21600"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.xrange = _T("@2,@9");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#1,#2");
oHandle2.xrange = _T("@4,21600");
oHandle2.yrange = _T("0,@0");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,59 +35,5 @@
// 90
namespace NSCustomShapesConvert
{
class CBentUpArrowType : public CCustomShape
{
public:
CBentUpArrowType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m@4,l@0@2@5@2@5@12,0@12,,21600@1,21600@1@2,21600@2xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("sum @3 10800 0"));
AddGuide(_T("sum 21600 #0 #1"));
AddGuide(_T("sum #1 #2 0"));
AddGuide(_T("prod @6 1 2"));
AddGuide(_T("prod #1 2 1"));
AddGuide(_T("sum @8 0 21600"));
AddGuide(_T("prod 21600 @0 @1"));
AddGuide(_T("prod 21600 @4 @1"));
AddGuide(_T("prod 21600 @5 @1"));
AddGuide(_T("prod 21600 @7 @1"));
AddGuide(_T("prod #1 1 2"));
AddGuide(_T("sum @5 0 @4"));
AddGuide(_T("sum @0 0 @4"));
AddGuide(_T("prod @2 @15 @16"));
m_arAdjustments.push_back(9257);
m_arAdjustments.push_back(18514);
m_arAdjustments.push_back(7200);
LoadConnectorsList(_T("@4,0;@0,@2;0,@11;@14,21600;@1,@13;21600,@2"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("0,@12,@1,21600;@5,@17,@1,21600"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.xrange = _T("@2,@9");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#1,#2");
oHandle2.xrange = _T("@4,21600");
oHandle2.yrange = _T("0,@0");
m_arHandles.push_back(oHandle2);
}
};
DEFINE_SHAPE_CLASS(CBentUpArrowType, CCustomShape)
}

View File

@ -0,0 +1,72 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BevelType.h"
// 84
namespace NSCustomShapesConvert
{
CBevelType::CBevelType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
m_arAdjustments.push_back(2700);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,44 +35,5 @@
// 84
namespace NSCustomShapesConvert
{
class CBevelType : public CCustomShape
{
public:
CBevelType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("m,l,21600r21600,l21600,xem@0@0nfl@0@2@1@2@1@0xem,nfl@0@0em,21600nfl@0@2em21600,21600nfl@1@2em21600,nfl@1@0e");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("prod #0 3 2"));
AddGuide(_T("sum @1 @5 0"));
AddGuide(_T("sum @2 @5 0"));
m_arAdjustments.push_back(2700);
LoadConnectorsList(_T("0,@4;@0,@4;@3,21600;@3,@2;21600,@4;@1,@4;@3,0;@3,@0"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("@0,@0,@1,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CBevelType, CCustomShape)
}

View File

@ -0,0 +1,102 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BlockArcType.h"
// 95
namespace NSCustomShapesConvert
{
CBlockArcType::CBlockArcType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe");
AddGuide(_T("val #1"));
AddGuide(_T("val #0"));
AddGuide(_T("sum 0 0 #0"));
AddGuide(_T("sumangle #0 0 180"));
AddGuide(_T("sumangle #0 0 90"));
AddGuide(_T("prod @4 2 1"));
AddGuide(_T("sumangle #0 90 0"));
AddGuide(_T("prod @6 2 1"));
AddGuide(_T("abs #0"));
AddGuide(_T("sumangle @8 0 90"));
AddGuide(_T("if @9 @7 @5"));
AddGuide(_T("sumangle @10 0 360"));
AddGuide(_T("if @10 @11 @10"));
AddGuide(_T("sumangle @12 0 360"));
AddGuide(_T("if @12 @13 @12"));
AddGuide(_T("sum 0 0 @14"));
AddGuide(_T("val 10800"));
AddGuide(_T("sum 10800 0 #1"));
AddGuide(_T("prod #1 1 2"));
AddGuide(_T("sum @18 5400 0"));
AddGuide(_T("cos @19 #0"));
AddGuide(_T("sin @19 #0"));
AddGuide(_T("sum @20 10800 0"));
AddGuide(_T("sum @21 10800 0"));
AddGuide(_T("sum 10800 0 @20"));
AddGuide(_T("sum #1 10800 0"));
AddGuide(_T("if @9 @17 @25"));
AddGuide(_T("if @9 0 21600"));
AddGuide(_T("cos 10800 #0"));
AddGuide(_T("sin 10800 #0"));
AddGuide(_T("sin #1 #0"));
AddGuide(_T("sum @28 10800 0"));
AddGuide(_T("sum @29 10800 0"));
AddGuide(_T("sum @30 10800 0"));
AddGuide(_T("if @4 0 @31"));
AddGuide(_T("if #0 @34 0"));
AddGuide(_T("if @6 @35 @31"));
AddGuide(_T("sum 21600 0 @36"));
AddGuide(_T("if @4 0 @33"));
AddGuide(_T("if #0 @38 @32"));
AddGuide(_T("if @6 @39 0"));
AddGuide(_T("if @4 @32 21600"));
AddGuide(_T("if @6 @41 @33"));
m_arAdjustments.push_back(11796480);
m_arAdjustments.push_back(5400);
LoadConnectorsList(_T("10800,@27;@22,@23;10800,@26;@24,@23"));
LoadTextRect(_T("@36,@40,@37,@42"));
CHandle_ oHandle1;
oHandle1.position = _T("#1,#0");
oHandle1.polar = _T("10800,10800");
oHandle1.radiusrange = _T("0,10800");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,74 +35,5 @@
// 95
namespace NSCustomShapesConvert
{
class CBlockArcType : public CCustomShape
{
public:
CBlockArcType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
m_strPath = _T("al10800,10800@0@0@2@14,10800,10800,10800,10800@3@15xe");
AddGuide(_T("val #1"));
AddGuide(_T("val #0"));
AddGuide(_T("sum 0 0 #0"));
AddGuide(_T("sumangle #0 0 180"));
AddGuide(_T("sumangle #0 0 90"));
AddGuide(_T("prod @4 2 1"));
AddGuide(_T("sumangle #0 90 0"));
AddGuide(_T("prod @6 2 1"));
AddGuide(_T("abs #0"));
AddGuide(_T("sumangle @8 0 90"));
AddGuide(_T("if @9 @7 @5"));
AddGuide(_T("sumangle @10 0 360"));
AddGuide(_T("if @10 @11 @10"));
AddGuide(_T("sumangle @12 0 360"));
AddGuide(_T("if @12 @13 @12"));
AddGuide(_T("sum 0 0 @14"));
AddGuide(_T("val 10800"));
AddGuide(_T("sum 10800 0 #1"));
AddGuide(_T("prod #1 1 2"));
AddGuide(_T("sum @18 5400 0"));
AddGuide(_T("cos @19 #0"));
AddGuide(_T("sin @19 #0"));
AddGuide(_T("sum @20 10800 0"));
AddGuide(_T("sum @21 10800 0"));
AddGuide(_T("sum 10800 0 @20"));
AddGuide(_T("sum #1 10800 0"));
AddGuide(_T("if @9 @17 @25"));
AddGuide(_T("if @9 0 21600"));
AddGuide(_T("cos 10800 #0"));
AddGuide(_T("sin 10800 #0"));
AddGuide(_T("sin #1 #0"));
AddGuide(_T("sum @28 10800 0"));
AddGuide(_T("sum @29 10800 0"));
AddGuide(_T("sum @30 10800 0"));
AddGuide(_T("if @4 0 @31"));
AddGuide(_T("if #0 @34 0"));
AddGuide(_T("if @6 @35 @31"));
AddGuide(_T("sum 21600 0 @36"));
AddGuide(_T("if @4 0 @33"));
AddGuide(_T("if #0 @38 @32"));
AddGuide(_T("if @6 @39 0"));
AddGuide(_T("if @4 @32 21600"));
AddGuide(_T("if @6 @41 @33"));
m_arAdjustments.push_back(11796480);
m_arAdjustments.push_back(5400);
LoadConnectorsList(_T("10800,@27;@22,@23;10800,@26;@24,@23"));
LoadTextRect(_T("@36,@40,@37,@42"));
CHandle_ oHandle1;
oHandle1.position = _T("#1,#0");
oHandle1.polar = _T("10800,10800");
oHandle1.radiusrange = _T("0,10800");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
}
};
}
DEFINE_SHAPE_CLASS(CBlockArcType, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BorderCallout1Type.h"
// 47
namespace NSCustomShapesConvert
{
CBorderCallout1Type::CBorderCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 47
namespace NSCustomShapesConvert
{
class CBorderCallout1Type : public CCustomShape
{
public:
CBorderCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CBorderCallout1Type, CCustomShape)
}

View File

@ -0,0 +1,73 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BorderCallout2Type.h"
// 48
namespace NSCustomShapesConvert
{
CBorderCallout2Type::CBorderCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,45 +35,5 @@
// 48
namespace NSCustomShapesConvert
{
class CBorderCallout2Type : public CCustomShape
{
public:
CBorderCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
};
}
DEFINE_SHAPE_CLASS(CBorderCallout2Type, CCustomShape)
}

View File

@ -0,0 +1,81 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BorderCallout3Type.h"
// 49
namespace NSCustomShapesConvert
{
CBorderCallout3Type::CBorderCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,53 +35,5 @@
// 49
namespace NSCustomShapesConvert
{
class CBorderCallout3Type : public CCustomShape
{
public:
CBorderCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
};
}
DEFINE_SHAPE_CLASS(CBorderCallout3Type, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BorderCallout90Type.h"
// 180
namespace NSCustomShapesConvert
{
CBorderCallout90Type::CBorderCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 180
namespace NSCustomShapesConvert
{
class CBorderCallout90Type : public CCustomShape
{
public:
CBorderCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600xe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CBorderCallout90Type, CCustomShape)
}

View File

@ -0,0 +1,75 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BracePairType.h"
// 186
namespace NSCustomShapesConvert
{
CBracePairType::CBracePairType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@9,nfqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600em@10,nfqx@5@0l@5@7qy21600@4@5@8l@5@6qy@10,21600em@9,nsqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600l@10,21600qx@5@6l@5@8qy21600@4@5@7l@5@0qy@10,xe");
AddGuide(_T("val #0"));
AddGuide(_T("val width"));
AddGuide(_T("val height"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("sum @4 0 #0"));
AddGuide(_T("sum @4 #0 0"));
AddGuide(_T("prod #0 2 1"));
AddGuide(_T("sum width 0 @9"));
AddGuide(_T("prod #0 9598 32768"));
AddGuide(_T("sum height 0 @11"));
AddGuide(_T("sum @11 #0 0"));
AddGuide(_T("sum width 0 @13"));
m_arAdjustments.push_back(1800);
LoadConnectorsList(_T("@3,0;0,@4;@3,@2;@1,@4"));
LoadTextRect(_T("@13,@11,@14,@12"));
CHandle_ oHandle1;
oHandle1.position = _T("topLeft,#0");
oHandle1.switchHandle = _T("true");
oHandle1.yrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,47 +35,5 @@
// 186
namespace NSCustomShapesConvert
{
class CBracePairType : public CCustomShape
{
public:
CBracePairType()
{
m_bConcentricFill = false;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@9,nfqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600em@10,nfqx@5@0l@5@7qy21600@4@5@8l@5@6qy@10,21600em@9,nsqx@0@0l@0@7qy0@4@0@8l@0@6qy@9,21600l@10,21600qx@5@6l@5@8qy21600@4@5@7l@5@0qy@10,xe");
AddGuide(_T("val #0"));
AddGuide(_T("val width"));
AddGuide(_T("val height"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("sum @4 0 #0"));
AddGuide(_T("sum @4 #0 0"));
AddGuide(_T("prod #0 2 1"));
AddGuide(_T("sum width 0 @9"));
AddGuide(_T("prod #0 9598 32768"));
AddGuide(_T("sum height 0 @11"));
AddGuide(_T("sum @11 #0 0"));
AddGuide(_T("sum width 0 @13"));
m_arAdjustments.push_back(1800);
LoadConnectorsList(_T("@3,0;0,@4;@3,@2;@1,@4"));
LoadTextRect(_T("@13,@11,@14,@12"));
CHandle_ oHandle1;
oHandle1.position = _T("topLeft,#0");
oHandle1.switchHandle = _T("true");
oHandle1.yrange = _T("0,5400");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CBracePairType, CCustomShape)
}

View File

@ -0,0 +1,70 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "BracketPairType.h"
// 185
namespace NSCustomShapesConvert
{
CBracketPairType::CBracketPairType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
//Encaps: Flat
m_strPath = _T("m@0,nfqx0@0l0@2qy@0,21600em@1,nfqx21600@0l21600@2qy@1,21600em@0,nsqx0@0l0@2qy@0,21600l@1,21600qx21600@2l21600@0qy@1,xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod @0 2929 10000"));
AddGuide(_T("sum width 0 @3"));
AddGuide(_T("sum height 0 @3"));
AddGuide(_T("val width"));
AddGuide(_T("val height"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
m_arAdjustments.push_back(3600);
LoadConnectorsList(_T("@8,0;0,@9;@8,@7;@6,@9"));
LoadTextRect(_T("@3,@3,@4,@5"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,42 +35,5 @@
// 185
namespace NSCustomShapesConvert
{
class CBracketPairType : public CCustomShape
{
public:
CBracketPairType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
//Encaps: Flat
m_strPath = _T("m@0,nfqx0@0l0@2qy@0,21600em@1,nfqx21600@0l21600@2qy@1,21600em@0,nsqx0@0l0@2qy@0,21600l@1,21600qx21600@2l21600@0qy@1,xe");
AddGuide(_T("val #0"));
AddGuide(_T("sum width 0 #0"));
AddGuide(_T("sum height 0 #0"));
AddGuide(_T("prod @0 2929 10000"));
AddGuide(_T("sum width 0 @3"));
AddGuide(_T("sum height 0 @3"));
AddGuide(_T("val width"));
AddGuide(_T("val height"));
AddGuide(_T("prod width 1 2"));
AddGuide(_T("prod height 1 2"));
m_arAdjustments.push_back(3600);
LoadConnectorsList(_T("@8,0;0,@9;@8,@7;@6,@9"));
LoadTextRect(_T("@3,@3,@4,@5"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,topLeft");
oHandle1.switchHandle = _T("true");
oHandle1.xrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
m_lLimoX = 10800;
m_lLimoY = 10800;
}
};
}
DEFINE_SHAPE_CLASS(CBracketPairType, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "Callout1Type.h"
// 41
namespace NSCustomShapesConvert
{
CCallout1Type::CCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 41
namespace NSCustomShapesConvert
{
class CCallout1Type : public CCustomShape
{
public:
CCallout1Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(8280);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CCallout1Type, CCustomShape)
}

View File

@ -0,0 +1,73 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "Callout2Type.h"
// 42
namespace NSCustomShapesConvert
{
CCallout2Type::CCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,45 +35,5 @@
// 42
namespace NSCustomShapesConvert
{
class CCallout2Type : public CCustomShape
{
public:
CCallout2Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
m_arAdjustments.push_back(-10080);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-3600);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
}
};
}
DEFINE_SHAPE_CLASS(CCallout2Type, CCustomShape)
}

View File

@ -0,0 +1,81 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "Callout3Type.h"
// 43
namespace NSCustomShapesConvert
{
CCallout3Type::CCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,53 +35,5 @@
// 43
namespace NSCustomShapesConvert
{
class CCallout3Type : public CCustomShape
{
public:
CCallout3Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3@4@5@6@7nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
AddGuide(_T("val #4"));
AddGuide(_T("val #5"));
AddGuide(_T("val #6"));
AddGuide(_T("val #7"));
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(24400);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(21600);
m_arAdjustments.push_back(25200);
m_arAdjustments.push_back(4050);
m_arAdjustments.push_back(23400);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
CHandle_ oHandle3;
oHandle3.position = _T("#4,#5");
m_arHandles.push_back(oHandle3);
CHandle_ oHandle4;
oHandle4.position = _T("#6,#7");
m_arHandles.push_back(oHandle4);
}
};
}
DEFINE_SHAPE_CLASS(CCallout3Type, CCustomShape)
}

View File

@ -0,0 +1,65 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "Callout90Type.h"
// 178
namespace NSCustomShapesConvert
{
CCallout90Type::CCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,37 +35,5 @@
// 178
namespace NSCustomShapesConvert
{
class CCallout90Type : public CCustomShape
{
public:
CCallout90Type()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinMiter;
//Encaps: Flat
m_strPath = _T("m@0@1l@2@3nfem,l21600,r,21600l,21600nsxe");
AddGuide(_T("val #0"));
AddGuide(_T("val #1"));
AddGuide(_T("val #2"));
AddGuide(_T("val #3"));
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(24300);
m_arAdjustments.push_back(-1800);
m_arAdjustments.push_back(4050);
LoadConnectorsList(_T("@0,@1;10800,0;10800,21600;0,10800;21600,10800"));
CHandle_ oHandle1;
oHandle1.position = _T("#0,#1");
m_arHandles.push_back(oHandle1);
CHandle_ oHandle2;
oHandle2.position = _T("#2,#3");
m_arHandles.push_back(oHandle2);
}
};
}
DEFINE_SHAPE_CLASS(CCallout90Type, CCustomShape)
}

View File

@ -0,0 +1,63 @@
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* 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 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* 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 "CanType.h"
// 22
namespace NSCustomShapesConvert
{
CCanType::CCanType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
m_strPath = _T("m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe");
AddGuide(_T("val #0"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("sum height 0 @1"));
m_arAdjustments.push_back(5400);
LoadConnectorsList(_T("10800,@0;10800,0;0,10800;10800,21600;21600,10800"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("0,@0,21600,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("center,#0");
oHandle1.yrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
}
}

View File

@ -1,4 +1,4 @@
/*
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
@ -35,35 +35,5 @@
// 22
namespace NSCustomShapesConvert
{
class CCanType : public CCustomShape
{
public:
CCanType()
{
m_bConcentricFill = true;
m_eJoin = ODRAW::lineJoinRound;
m_strPath = _T("m10800,qx0@1l0@2qy10800,21600,21600@2l21600@1qy10800,xem0@1qy10800@0,21600@1nfe");
AddGuide(_T("val #0"));
AddGuide(_T("prod #0 1 2"));
AddGuide(_T("sum height 0 @1"));
m_arAdjustments.push_back(5400);
LoadConnectorsList(_T("10800,@0;10800,0;0,10800;10800,21600;21600,10800"));
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(270);
m_arConnectorAngles.push_back(180);
m_arConnectorAngles.push_back(90);
m_arConnectorAngles.push_back(0);
LoadTextRect(_T("0,@0,21600,@2"));
CHandle_ oHandle1;
oHandle1.position = _T("center,#0");
oHandle1.yrange = _T("0,10800");
m_arHandles.push_back(oHandle1);
}
};
}
DEFINE_SHAPE_CLASS(CCanType, CCustomShape)
}

Some files were not shown because too many files have changed in this diff Show More