mirror of
https://github.com/ONLYOFFICE/core.git
synced 2025-04-18 14:04:06 +03:00
Merge remote-tracking branch 'origin/release/v7.4.0' into develop
This commit is contained in:
commit
c16d7d16c7
@ -213,6 +213,11 @@ core_linux {
|
||||
}
|
||||
}
|
||||
|
||||
core_linux {
|
||||
equals(TEMPLATE, app):CONFIG += core_static_link_libstd
|
||||
plugin:CONFIG += core_static_link_libstd
|
||||
}
|
||||
|
||||
core_win_32 {
|
||||
CORE_BUILDS_PLATFORM_PREFIX = win_32
|
||||
}
|
||||
|
@ -8,8 +8,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += KERNEL_USE_DYNAMIC_LIBRARY_BUILDING
|
||||
|
||||
# CONFIG
|
||||
|
@ -33,8 +33,4 @@ core_windows {
|
||||
LIBS += -lUser32
|
||||
}
|
||||
|
||||
core_linux {
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
}
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
@ -27,8 +27,4 @@ core_windows {
|
||||
LIBS += -lUser32
|
||||
}
|
||||
|
||||
core_linux {
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
}
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
@ -19,8 +19,6 @@ DEFINES += INTVER=$$BINARYVERSION
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../core
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
@ -7,8 +7,6 @@ CONFIG -= app_bundle
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../core
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
@ -60,11 +60,11 @@ BEGIN
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Ascensio System SIA 2019"
|
||||
VALUE "CompanyName", "Ascensio System SIA 2022"
|
||||
VALUE "FileDescription", "ONLYOFFICE docbuilder ActiveX DLL"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "docbuilder.com.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) Ascensio System SIA 2019. All rights reserved."
|
||||
VALUE "LegalCopyright", "Copyright (C) Ascensio System SIA 2022. All rights reserved."
|
||||
VALUE "OriginalFilename", "docbuilder.com.dll"
|
||||
VALUE "ProductName", "docbuilder.com"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
|
100
DesktopEditor/doctrenderer/docbuilder.net/src/docbuilder.net.rc
Normal file
100
DesktopEditor/doctrenderer/docbuilder.net/src/docbuilder.net.rc
Normal file
@ -0,0 +1,100 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United States) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Ascensio System SIA"
|
||||
VALUE "FileDescription", "Document Builder .NET"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "docbuilder.net"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||
VALUE "OriginalFilename", "docbuilder.net"
|
||||
VALUE "ProductName", "docbuilder.net"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
@ -166,11 +166,15 @@
|
||||
<ItemGroup>
|
||||
<ClInclude Include="defines.h" />
|
||||
<ClInclude Include="docbuilder.net.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AssemblyInfo.cpp" />
|
||||
<ClCompile Include="docbuilder.net.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="docbuilder.net.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -21,6 +21,9 @@
|
||||
<ClInclude Include="defines.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="AssemblyInfo.cpp">
|
||||
@ -30,4 +33,9 @@
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="docbuilder.net.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
14
DesktopEditor/doctrenderer/docbuilder.net/src/resource.h
Normal file
14
DesktopEditor/doctrenderer/docbuilder.net/src/resource.h
Normal file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by docbuilder.net.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
@ -8,10 +8,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../../Common/base.pri)
|
||||
|
@ -1,7 +1,7 @@
|
||||
CORE_BUILDS_PLATFORM_PREFIX = win_64
|
||||
BUILD_MODE=debug
|
||||
|
||||
CONFIG += c++11 console
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG -= qt
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#include "ApplicationFonts.h"
|
||||
#include "ApplicationFonts.h"
|
||||
#include "../common/Directory.h"
|
||||
|
||||
#ifdef BOOL
|
||||
|
@ -39,6 +39,8 @@
|
||||
return name;
|
||||
}
|
||||
|
||||
var baseFontsPath = "../../../../fonts/";
|
||||
|
||||
var FS = undefined;
|
||||
|
||||
//desktop_fetch
|
||||
@ -411,7 +413,9 @@
|
||||
};
|
||||
|
||||
self["AscViewer"]["CDrawingFile"] = CFile;
|
||||
self["AscViewer"]["InitializeFonts"] = function() {
|
||||
self["AscViewer"]["InitializeFonts"] = function(basePath) {
|
||||
if (undefined !== basePath && "" !== basePath)
|
||||
baseFontsPath = basePath;
|
||||
if (!window["g_fonts_selection_bin"])
|
||||
return;
|
||||
var memoryBuffer = window["g_fonts_selection_bin"].toUtf8();
|
||||
@ -500,7 +504,7 @@
|
||||
{
|
||||
// шрифт не грузится - надо загрузить
|
||||
var _t = file;
|
||||
file.LoadFontAsync("../../../../fonts/", function(){
|
||||
file.LoadFontAsync(baseFontsPath, function(){
|
||||
fontToMemory(_t, true);
|
||||
|
||||
var pages = self.fontStreams[fileId].pages;
|
||||
|
@ -3,8 +3,6 @@ QT += xml
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
DEFINES += METAFILE_SUPPORT_WMF_EMF
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
|
@ -11,8 +11,6 @@ QT -= gui
|
||||
TARGET = test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CONFIG += c++11
|
||||
TEMPLATE = app
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../..
|
||||
|
@ -11,8 +11,6 @@ QT -= gui
|
||||
TARGET = test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CONFIG += c++11
|
||||
TEMPLATE = app
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../..
|
||||
|
@ -149,69 +149,49 @@ namespace XmlUtils
|
||||
class CXmlNodeBase;
|
||||
class KERNEL_DECL CXmlNode
|
||||
{
|
||||
private:
|
||||
CXmlNodeBase* m_pBase;
|
||||
private:
|
||||
CXmlNodeBase* m_pBase;
|
||||
|
||||
public:
|
||||
CXmlNode();
|
||||
CXmlNode(const CXmlNode& oSrc);
|
||||
~CXmlNode();
|
||||
|
||||
public:
|
||||
bool FromXmlFile(const wchar_t* sFile, bool bRemoveRootNode = false);
|
||||
bool FromXmlFile(const std::wstring& sFile, bool bRemoveRootNode = false);
|
||||
|
||||
bool FromXmlStringA(const std::string& sString);
|
||||
bool FromXmlString(const wchar_t* sString);
|
||||
bool FromXmlString(const std::wstring& sString);
|
||||
public:
|
||||
CXmlNode();
|
||||
CXmlNode(const CXmlNode& oSrc);
|
||||
~CXmlNode();
|
||||
|
||||
bool IsValid() const;
|
||||
void Clear();
|
||||
std::wstring GetName();
|
||||
std::wstring GetText();
|
||||
bool GetTextIfExist(std::wstring& sOutput);
|
||||
std::wstring GetTextExt(const std::wstring& strDefaultValue = L"");
|
||||
std::wstring GetXml(const std::wstring& strDefaultValue = L"");
|
||||
bool FromXmlFile(const wchar_t* sFile, bool bRemoveRootNode = false);
|
||||
bool FromXmlFile(const std::wstring& sFile, bool bRemoveRootNode = false);
|
||||
|
||||
std::wstring ReadAttributeBase(const wchar_t* bstrName);
|
||||
std::wstring ReadAttribute(const std::wstring& strAttibuteName);
|
||||
void ReadAllAttributesA(std::vector<std::string>& strNames, std::vector<std::string>& strValues);
|
||||
void ReadAllAttributes(std::vector<std::wstring>& strNames, std::vector<std::wstring>& strValues);
|
||||
bool FromXmlStringA(const std::string& sString);
|
||||
bool FromXmlString(const wchar_t* sString);
|
||||
bool FromXmlString(const std::wstring& sString);
|
||||
|
||||
int GetAttributesCount();
|
||||
void GetAllAttributes(std::vector<std::wstring>& names, std::vector<std::wstring>& values);
|
||||
void GetAllAttributes(std::vector<std::string>& names, std::vector<std::string>& values);
|
||||
void GetAllAttributes(std::list<std::wstring>& names, std::list<std::wstring>& values);
|
||||
void GetAllAttributes(std::list<std::string>& names, std::list<std::string>& values);
|
||||
|
||||
std::string GetAttributeA(const std::string& sName, const std::string& _default = "");
|
||||
std::string GetAttributeA(const std::wstring& sName, const std::string& _default = "");
|
||||
bool IsValid() const;
|
||||
void Clear();
|
||||
|
||||
std::wstring GetAttribute(const std::string& sName, const std::wstring& _default = L"");
|
||||
std::wstring GetAttribute(const std::wstring& sName, const std::wstring& _default = L"");
|
||||
std::wstring GetAttribute(const wchar_t* sName, const std::wstring& _default = L"");
|
||||
std::wstring GetName();
|
||||
std::wstring GetText();
|
||||
std::string GetTextA();
|
||||
|
||||
std::wstring GetAttributeBase(const wchar_t* strAttributeName, const std::wstring& strDefaultValue = L"");
|
||||
bool GetAttributeIfExist(const std::wstring& sName, std::wstring& sOutput);
|
||||
bool GetTextIfExist(std::wstring& sOutput);
|
||||
std::wstring GetTextExt(const std::wstring& strDefaultValue = L"");
|
||||
std::wstring GetXml(const std::wstring& strDefaultValue = L"");
|
||||
|
||||
int GetAttributeInt(const std::string& sName, const int& _default = 0);
|
||||
int GetAttributeInt(const std::wstring& sName, const int& _default = 0);
|
||||
|
||||
bool SetAttributeInt(const std::wstring& sName, const int& value);
|
||||
|
||||
int ReadAttributeInt(const std::wstring& str, const int& nDef = 0);
|
||||
double ReadAttributeDouble(const std::wstring& str, const double& nDef = 0);
|
||||
std::wstring ReadAttributeBase(const wchar_t* bstrName);
|
||||
std::wstring ReadAttribute(const std::wstring& strAttibuteName);
|
||||
void ReadAllAttributesA(std::vector<std::string>& strNames, std::vector<std::string>& strValues);
|
||||
void ReadAllAttributes(std::vector<std::wstring>& strNames, std::vector<std::wstring>& strValues);
|
||||
|
||||
double GetAttributeDouble(const std::string& sName, const double& _default = 0);
|
||||
double GetAttributeDouble(const std::wstring& sName, const double& _default = 0);
|
||||
int GetAttributesCount();
|
||||
void GetAllAttributes(std::vector<std::wstring>& names, std::vector<std::wstring>& values);
|
||||
void GetAllAttributes(std::vector<std::string>& names, std::vector<std::string>& values);
|
||||
void GetAllAttributes(std::list<std::wstring>& names, std::list<std::wstring>& values);
|
||||
void GetAllAttributes(std::list<std::string>& names, std::list<std::string>& values);
|
||||
|
||||
std::wstring ReadNodeTextBase(const wchar_t* bsName);
|
||||
|
||||
std::wstring ReadNodeText(const std::wstring& strName);
|
||||
std::wstring ReadValueString(const std::wstring& sName, const std::wstring& nDef = L"");
|
||||
int ReadValueInt(const std::wstring& str, const int& nDef = 0);
|
||||
std::string GetAttributeA(const std::string& sName, const std::string& _default = "");
|
||||
std::string GetAttributeA(const std::wstring& sName, const std::string& _default = "");
|
||||
|
||||
std::wstring GetAttributeOrValue(const std::wstring& strAttributeName, const std::wstring& strDefaultValue = L"");
|
||||
std::wstring GetAttribute(const std::string& sName, const std::wstring& _default = L"");
|
||||
std::wstring GetAttribute(const std::wstring& sName, const std::wstring& _default = L"");
|
||||
std::wstring GetAttribute(const wchar_t* sName, const std::wstring& _default = L"");
|
||||
|
||||
CXmlNode ReadNode(const wchar_t* strNodeName);
|
||||
CXmlNode ReadNode(const std::wstring& strNodeName);
|
||||
@ -220,24 +200,45 @@ namespace XmlUtils
|
||||
|
||||
CXmlNode GetNode(const std::wstring& sName);
|
||||
std::vector<CXmlNode> GetNodes(const std::wstring& sName);
|
||||
bool GetChilds(std::vector<CXmlNode>& oXmlNodes);
|
||||
bool GetChilds(std::vector<CXmlNode>& oXmlNodes);
|
||||
|
||||
bool GetNode(const std::wstring& sName, CXmlNode& oNode);
|
||||
bool GetNodes(const std::wstring& sName, std::vector<CXmlNode>& oNodes);
|
||||
|
||||
CXmlNode& operator=(const CXmlNode& oSrc);
|
||||
std::wstring GetAttributeBase(const wchar_t* strAttributeName, const std::wstring& strDefaultValue = L"");
|
||||
bool GetAttributeIfExist(const std::wstring& sName, std::wstring& sOutput);
|
||||
|
||||
public:
|
||||
std::wstring private_GetXml();
|
||||
std::wstring private_GetXml(const std::wstring& strDefaultValue = L"");
|
||||
std::wstring private_GetXmlFast();
|
||||
std::wstring private_GetXmlFast(const std::wstring& strDefaultValue);
|
||||
int GetAttributeInt(const std::string& sName, const int& _default = 0);
|
||||
int GetAttributeInt(const std::wstring& sName, const int& _default = 0);
|
||||
|
||||
bool SetAttributeInt(const std::wstring& sName, const int& value);
|
||||
|
||||
int ReadAttributeInt(const std::wstring& str, const int& nDef = 0);
|
||||
double ReadAttributeDouble(const std::wstring& str, const double& nDef = 0);
|
||||
|
||||
private:
|
||||
void SetBase(CXmlNodeBase* pBase);
|
||||
std::wstring GetNamespace(const std::wstring& strNodeName);
|
||||
std::wstring GetNameNoNS(const std::wstring& strNodeName);
|
||||
};
|
||||
double GetAttributeDouble(const std::string& sName, const double& _default = 0);
|
||||
double GetAttributeDouble(const std::wstring& sName, const double& _default = 0);
|
||||
|
||||
std::wstring ReadNodeTextBase(const wchar_t* bsName);
|
||||
|
||||
std::wstring ReadNodeText(const std::wstring& strName);
|
||||
std::wstring ReadValueString(const std::wstring& sName, const std::wstring& nDef = L"");
|
||||
int ReadValueInt(const std::wstring& str, const int& nDef = 0);
|
||||
|
||||
std::wstring GetAttributeOrValue(const std::wstring& strAttributeName, const std::wstring& strDefaultValue = L"");
|
||||
|
||||
CXmlNode& operator=(const CXmlNode& oSrc);
|
||||
|
||||
std::wstring private_GetXml();
|
||||
std::wstring private_GetXml(const std::wstring& strDefaultValue = L"");
|
||||
std::wstring private_GetXmlFast();
|
||||
std::wstring private_GetXmlFast(const std::wstring& strDefaultValue);
|
||||
|
||||
private:
|
||||
void SetBase(CXmlNodeBase* pBase);
|
||||
std::wstring GetNamespace(const std::wstring& strNodeName);
|
||||
std::wstring GetNameNoNS(const std::wstring& strNodeName);
|
||||
};
|
||||
|
||||
std::wstring KERNEL_DECL GetNameNoNS(const std::wstring & strNodeName);
|
||||
KERNEL_DECL const char* GetNameNoNS(const char* strNodeName);
|
||||
|
@ -72,7 +72,7 @@ namespace XmlUtils
|
||||
|
||||
std::map<std::string, std::string> m_attributes;
|
||||
std::vector<CXmlNodeBase*> m_nodes;
|
||||
std::wstring m_sText;
|
||||
std::string m_sText;
|
||||
std::wstring m_sName;
|
||||
|
||||
public:
|
||||
@ -89,7 +89,7 @@ namespace XmlUtils
|
||||
CXmlNodeBase::CXmlNodeBase()
|
||||
{
|
||||
m_pDocument = NULL;
|
||||
m_sText = L"";
|
||||
m_sText = "";
|
||||
m_sName = L"";
|
||||
}
|
||||
CXmlNodeBase::~CXmlNodeBase()
|
||||
@ -145,8 +145,7 @@ namespace XmlUtils
|
||||
{
|
||||
m_nodes[i]->GetXml(oWriter);
|
||||
}
|
||||
|
||||
oWriter.WriteEncodeXmlString(m_sText.c_str());
|
||||
oWriter.WriteEncodeXmlString(NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)m_sText.c_str(), (LONG)m_sText.length()).c_str());
|
||||
|
||||
oWriter.WriteString(L"</", 2);
|
||||
oWriter.WriteEncodeXmlString(m_sName.c_str());
|
||||
@ -257,11 +256,11 @@ namespace XmlUtils
|
||||
nCurDepth = GetDepth();
|
||||
if (eNodeType == XmlNodeType_Text || eNodeType == XmlNodeType_Whitespace || eNodeType == XmlNodeType_SIGNIFICANT_WHITESPACE)
|
||||
{
|
||||
m_pCurrentNode->m_sText += GetText();
|
||||
m_pCurrentNode->m_sText += GetTextA();
|
||||
}
|
||||
else if (eNodeType == XmlNodeType_CDATA)
|
||||
{
|
||||
m_pCurrentNode->m_sText += GetText();
|
||||
m_pCurrentNode->m_sText += GetTextA();
|
||||
}
|
||||
else if (eNodeType == XmlNodeType_Element)
|
||||
{
|
||||
@ -387,16 +386,30 @@ namespace XmlUtils
|
||||
{
|
||||
return (IsValid() ? m_pBase->m_sName : L"");
|
||||
}
|
||||
std::wstring CXmlNode::GetText()
|
||||
std::string CXmlNode::GetTextA()
|
||||
{
|
||||
if (IsValid())
|
||||
{
|
||||
return m_pBase->m_sText;
|
||||
}
|
||||
else
|
||||
return "";
|
||||
}
|
||||
std::wstring CXmlNode::GetText()
|
||||
{
|
||||
return (IsValid() ? m_pBase->m_sText : L"");
|
||||
if (IsValid())
|
||||
{
|
||||
return NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)m_pBase->m_sText.c_str(), (LONG)m_pBase->m_sText.length());
|
||||
}
|
||||
else
|
||||
return L"";
|
||||
}
|
||||
bool CXmlNode::GetTextIfExist(std::wstring& sOutput)
|
||||
{
|
||||
bool bRes = false;
|
||||
if (IsValid() && !m_pBase->m_sText.empty())
|
||||
{
|
||||
sOutput = m_pBase->m_sText;
|
||||
sOutput = NSFile::CUtf8Converter::GetUnicodeStringFromUTF8((BYTE*)m_pBase->m_sText.c_str(), (LONG)m_pBase->m_sText.length());
|
||||
bRes = true;
|
||||
}
|
||||
return bRes;
|
||||
|
@ -8,10 +8,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
@ -19,11 +19,6 @@ CORE_ROOT_DIR = $$PWD/../../../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
||||
core_linux {
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
|
||||
}
|
||||
|
||||
DEFINES += XMLSEC_OPENSSL_110
|
||||
#DEFINES += "OPENSSL_API_COMPAT=\"0x10100000\""
|
||||
|
||||
|
@ -7,8 +7,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += DJVU_USE_DYNAMIC_LIBRARY
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
|
@ -7,8 +7,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../Common/base.pri)
|
||||
|
@ -4,9 +4,6 @@ QT -= core gui
|
||||
TARGET = test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
|
@ -7,8 +7,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += EPUBFILE_USE_DYNAMIC_LIBRARY
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
|
@ -7,7 +7,6 @@ TEMPLATE = lib
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += FB2FILE_USE_DYNAMIC_LIBRARY
|
||||
|
||||
|
@ -7,8 +7,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
|
||||
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
|
||||
|
||||
|
@ -27,16 +27,10 @@ CONFIG(debug, debug|release) {
|
||||
DESTDIR = $$PWD/Release
|
||||
}
|
||||
|
||||
CONFIG += c++11
|
||||
TEMPLATE = app
|
||||
|
||||
LIBS += -L$$CORE_BUILDS_LIBRARIES_PATH -lUnicodeConverter -lkernel -lgraphics -lHtmlFile
|
||||
|
||||
linux-g++ | linux-g++-64 | linux-g++-32 {
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
message(linux)
|
||||
}
|
||||
|
||||
win32 {
|
||||
LIBS += -ladvapi32 \
|
||||
-luser32 \
|
||||
|
@ -7,7 +7,6 @@ TEMPLATE = lib
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += HTMLFILE2_USE_DYNAMIC_LIBRARY
|
||||
DEFINES += CSSCALCULATOR_LIBRARY_STATIC
|
||||
|
@ -8,8 +8,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
DEFINES += HTMLRENDERER_USE_DYNAMIC_LIBRARY
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
|
@ -12,8 +12,6 @@ TARGET = test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
DEFINES += PDFREADER_USE_DYNAMIC_LIBRARY
|
||||
DEFINES += PDFWRITER_USE_DYNAMIC_LIBRARY
|
||||
DEFINES += XPS_USE_DYNAMIC_LIBRARY
|
||||
|
@ -2069,11 +2069,14 @@ std::wstring PPT::CShapeWriter::ConvertImage()
|
||||
if (pImageElement->m_lpictureContrast < 0x10000)
|
||||
{
|
||||
contrast = (0x10000 - pImageElement->m_lpictureContrast) * -1.5259;
|
||||
} else
|
||||
}
|
||||
else
|
||||
{
|
||||
// contrast = (pImageElement->m_lpictureContrast - 0x10000) * 0.76294; // 0.76294 - not correct, * - not correct
|
||||
contrast = 0;
|
||||
}
|
||||
if (contrast < -100000)
|
||||
contrast = -100000;
|
||||
m_oWriter.WriteString(L" contrast=\"" + std::to_wstring(contrast) + L"\"");
|
||||
}
|
||||
|
||||
|
@ -489,7 +489,7 @@ void BinaryHeaderFooterTableWriter::WriteHdrFtrItem(OOX::Logic::CSectionProperty
|
||||
|
||||
smart_ptr<OOX::IFileContainer> oldRels = m_pOfficeDrawingConverter->GetRels();
|
||||
m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSerHdrFtrTypes::HdrFtr_Content);
|
||||
oBinaryDocumentTableWriter.WriteDocumentContent(pHdrFtr->m_arrItems);
|
||||
@ -8156,7 +8156,7 @@ void BinaryCommentsTableWriter::Write(OOX::CComments& oComments, OOX::CCommentsE
|
||||
|
||||
smart_ptr<OOX::IFileContainer> oldRels = m_pOfficeDrawingConverter->GetRels();
|
||||
m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
int nStart = m_oBcw.WriteItemWithLengthStart();
|
||||
WriteCommentsContent(oComments, pCommentsExt, pCommentsExtensible, pCommentsUserData, pPeople, pCommentsIds, mapIgnoreComments, oParamsDocumentWriter);
|
||||
@ -8170,7 +8170,7 @@ void BinaryCommentsTableWriter::WriteCommentsContent(OOX::CComments& oComments,
|
||||
|
||||
smart_ptr<OOX::IFileContainer> oldRels = m_pOfficeDrawingConverter->GetRels();
|
||||
m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
std::map<std::wstring, OOX::CPerson*> mapAuthorToUserId;
|
||||
std::map<unsigned int, CCommentWriteTemp*> mapParaIdToComment;
|
||||
@ -9164,7 +9164,7 @@ void BinaryNotesTableWriter::WriteNotes(const std::vector<OOX::CFtnEdn*>& arrNot
|
||||
|
||||
smart_ptr<OOX::IFileContainer> oldRels = m_pOfficeDrawingConverter->GetRels();
|
||||
m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
int nCurPos = 0;
|
||||
for(size_t i = 0 ; i < arrNotes.size(); ++i)
|
||||
@ -9463,7 +9463,7 @@ void BinaryFileWriter::intoBindoc(const std::wstring& sSrcPath)
|
||||
BinDocxRW::BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, &m_oParamsWriter.m_mapIgnoreComments, &oBinaryHeaderFooterTableWriter);
|
||||
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
oBinaryDocumentTableWriter.poDocument = pDocument;
|
||||
oBinaryDocumentTableWriter.pSectPr = pDocument->m_oSectPr.GetPointer();;
|
||||
@ -9595,7 +9595,7 @@ void BinaryFileWriter::intoBindoc(const std::wstring& sSrcPath)
|
||||
BinDocxRW::BinaryDocumentTableWriter oBinaryDocumentTableWriter(m_oParamsWriter, oParamsDocumentWriter, &m_oParamsWriter.m_mapIgnoreComments, &oBinaryHeaderFooterTableWriter);
|
||||
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->SetRels(oParamsDocumentWriter.m_pRels);
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_oParamsWriter.m_pOfficeDrawingConverter->Clear();
|
||||
|
||||
oBinaryDocumentTableWriter.poDocument = pDocx->m_oGlossary.document;
|
||||
oBinaryDocumentTableWriter.pSectPr = pDocx->m_oGlossary.document->m_oSectPr.GetPointer();;
|
||||
|
@ -82,6 +82,13 @@ namespace NSShapeImageGen
|
||||
|
||||
return GenerateImageID(oImage, (std::max)(1.0, width), (std::max)(1.0, height));
|
||||
}
|
||||
CMediaInfo CMediaManager::WriteImage(const std::string& strFile, double& x, double& y, double& width, double& height, const std::wstring& strAdditionalFile, int typeAdditionalFile)
|
||||
{
|
||||
if (width < 0 && height < 0)
|
||||
return GenerateImageID(strFile, L"", -1, -1, strAdditionalFile, typeAdditionalFile);
|
||||
|
||||
return GenerateImageID(strFile, L"", (std::max)(1.0, width), (std::max)(1.0, height), strAdditionalFile, typeAdditionalFile);
|
||||
}
|
||||
CMediaInfo CMediaManager::WriteImage(const std::wstring& strFile, double& x, double& y, double& width, double& height, const std::wstring& strAdditionalFile, int typeAdditionalFile)
|
||||
{
|
||||
bool bIsDownload = false;
|
||||
@ -397,7 +404,34 @@ namespace NSShapeImageGen
|
||||
|
||||
return oInfo;
|
||||
}
|
||||
CMediaInfo CMediaManager::GenerateImageID(std::string strFileName, const std::wstring & strUrl, double dWidth, double dHeight, const std::wstring& strAdditionalFile, int typeAdditionalFile)
|
||||
{
|
||||
if (0 == strFileName.find("data:base64,"))
|
||||
{
|
||||
int nHeaderSize = 12;
|
||||
int nBase64DataSize = (int)strFileName.length() - nHeaderSize;
|
||||
|
||||
int dstLen = NSBase64::Base64DecodeGetRequiredLength(nBase64DataSize);
|
||||
BYTE* pDstBuffer = new BYTE[dstLen];
|
||||
NSBase64::Base64Decode(strFileName.c_str() + nHeaderSize, nBase64DataSize, pDstBuffer, &dstLen);
|
||||
|
||||
CImageFileFormatChecker checker;
|
||||
std::wstring sImageExtension = checker.DetectFormatByData(pDstBuffer, dstLen);
|
||||
std::wstring tempFilePath = m_strTempMedia + FILE_SEPARATOR_STR;
|
||||
|
||||
std::wstring strFileNameNew = NSFile::CFileBinary::CreateTempFileWithUniqueName(tempFilePath, L"img") + L"." + sImageExtension;
|
||||
|
||||
NSFile::CFileBinary oTempFile;
|
||||
oTempFile.CreateFile(strFileNameNew);
|
||||
oTempFile.WriteFile((void*)pDstBuffer, (DWORD)dstLen);
|
||||
oTempFile.CloseFile();
|
||||
|
||||
RELEASEARRAYOBJECTS(pDstBuffer);
|
||||
|
||||
return GenerateImageID(strFileNameNew, strUrl, dWidth, dHeight, strAdditionalFile, typeAdditionalFile);
|
||||
}
|
||||
return CMediaInfo();
|
||||
}
|
||||
CMediaInfo CMediaManager::GenerateImageID(std::wstring strFileName, const std::wstring & strUrl, double dWidth, double dHeight, const std::wstring& strAdditionalFile, int typeAdditionalFile)
|
||||
{
|
||||
if (0 == strFileName.find(L"data:base64,"))
|
||||
|
@ -172,8 +172,9 @@ namespace NSShapeImageGen
|
||||
}
|
||||
|
||||
CMediaInfo WriteImage(CBgraFrame& punkImage, double& x, double& y, double& width, double& height);
|
||||
CMediaInfo WriteImage(const std::string& strFile, double& x, double& y, double& width, double& height, const std::wstring& strAdditionalFile, int typeAdditionalFile);
|
||||
CMediaInfo WriteImage(const std::wstring& strFile, double& x, double& y, double& width, double& height, const std::wstring& strAdditionalFile, int typeAdditionalFile);
|
||||
CMediaInfo WriteMedia(const std::wstring& strFile);
|
||||
CMediaInfo WriteMedia(const std::wstring& strFile);
|
||||
void SetFontManager(NSFonts::IFontManager* pFontManager);
|
||||
protected:
|
||||
inline void CopyFile(std::wstring& strFileSrc, std::wstring& strFileDst)
|
||||
@ -186,6 +187,7 @@ namespace NSShapeImageGen
|
||||
CMediaInfo GenerateImageID(CBgraFrame& punkData, double dWidth, double dHeight);
|
||||
CMediaInfo GenerateImageID(std::wstring strFileName, const std::wstring & strUrl, double dWidth, double dHeight, const std::wstring& strAdditionalFile, int typeAdditionalFile);
|
||||
CMediaInfo GenerateMediaID(const std::wstring& strFileName, const std::wstring & strUrl);
|
||||
CMediaInfo GenerateImageID(std::string strFileName, const std::wstring & strUrl, double dWidth, double dHeight, const std::wstring& strAdditionalFile, int typeAdditionalFile);
|
||||
MediaType GetImageType(CBgraFrame& pFrame);
|
||||
void FlipY(CBgraFrame& punkImage);
|
||||
void FlipX(CBgraFrame& punkImage);
|
||||
|
@ -1152,10 +1152,14 @@ namespace BinXlsxRW
|
||||
Sqref = 1,
|
||||
Name = 2,
|
||||
Text = 3,
|
||||
UserId = 4,
|
||||
User = 4,
|
||||
UsersGroup = 5
|
||||
};}
|
||||
|
||||
namespace c_oSer_UserProtectedRangeDesc {enum c_oSer_UserProtectedRangeDesc
|
||||
{
|
||||
Id = 0,
|
||||
Name = 1
|
||||
};}
|
||||
namespace c_oSer_DataValidation{enum c_oSer_DataValidation
|
||||
{
|
||||
DataValidations = 0,
|
||||
|
@ -5640,7 +5640,7 @@ void BinaryWorksheetTableWriter::WriteLegacyDrawingHF(const OOX::Spreadsheet::CW
|
||||
OOX::CVmlDrawing* pVmlDrawing = (OOX::CVmlDrawing*)oFileV.GetPointer();
|
||||
smart_ptr<OOX::IFileContainer> oldRels = m_pOfficeDrawingConverter->GetRels();
|
||||
m_pOfficeDrawingConverter->SetRels(pVmlDrawing);
|
||||
m_pOfficeDrawingConverter->ClearShapeTypes();
|
||||
m_pOfficeDrawingConverter->Clear();
|
||||
nCurPos = m_oBcw.WriteItemStart(c_oSer_LegacyDrawingHF::Drawings);
|
||||
WriteLegacyDrawingHFDrawings(pVmlDrawing);
|
||||
m_oBcw.WriteItemWithLengthEnd(nCurPos);
|
||||
@ -7007,37 +7007,52 @@ void BinaryWorksheetTableWriter::WriteUserProtectedRanges(const OOX::Spreadsheet
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void BinaryWorksheetTableWriter::WriteUserProtectedRangeDesc(const OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc& desc)
|
||||
{
|
||||
if (desc.id.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRangeDesc::Id);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
m_oBcw.m_oStream.WriteStringW(*desc.id);
|
||||
}
|
||||
if (desc.name.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRangeDesc::Name);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
m_oBcw.m_oStream.WriteStringW(*desc.name);
|
||||
}
|
||||
}
|
||||
void BinaryWorksheetTableWriter::WriteUserProtectedRange(const OOX::Spreadsheet::CUserProtectedRange& oUserProtectedRange)
|
||||
{
|
||||
if (oUserProtectedRange.m_oName.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRange::Name);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_UserProtectedRange::Name);
|
||||
m_oBcw.m_oStream.WriteStringW(*oUserProtectedRange.m_oName);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if (oUserProtectedRange.m_oSqref.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRange::Sqref);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_UserProtectedRange::Sqref);
|
||||
m_oBcw.m_oStream.WriteStringW(*oUserProtectedRange.m_oSqref);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
if (oUserProtectedRange.m_oText.IsInit())
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRange::Text);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_UserProtectedRange::Text);
|
||||
m_oBcw.m_oStream.WriteStringW(*oUserProtectedRange.m_oText);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
for (size_t i = 0; i < oUserProtectedRange.m_arUsersId.size(); ++i)
|
||||
for (size_t i = 0; i < oUserProtectedRange.m_arUsers.size(); ++i)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRange::UserId);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
m_oBcw.m_oStream.WriteStringW(oUserProtectedRange.m_arUsersId[i]);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_UserProtectedRange::User);
|
||||
WriteUserProtectedRangeDesc(oUserProtectedRange.m_arUsers[i]);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
for (size_t i = 0; i < oUserProtectedRange.m_arUsersGroupsId.size(); ++i)
|
||||
for (size_t i = 0; i < oUserProtectedRange.m_arUsersGroups.size(); ++i)
|
||||
{
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSer_UserProtectedRange::UsersGroup);
|
||||
m_oBcw.m_oStream.WriteBYTE(c_oSerPropLenType::Variable);
|
||||
m_oBcw.m_oStream.WriteStringW(oUserProtectedRange.m_arUsersGroupsId[i]);
|
||||
int nCurPos = m_oBcw.WriteItemStart(c_oSer_UserProtectedRange::UsersGroup);
|
||||
WriteUserProtectedRangeDesc(oUserProtectedRange.m_arUsersGroups[i]);
|
||||
m_oBcw.WriteItemEnd(nCurPos);
|
||||
}
|
||||
}
|
||||
void BinaryWorksheetTableWriter::WriteDataValidationsContent(const OOX::Spreadsheet::CDataValidations& oDataValidations)
|
||||
|
@ -303,6 +303,7 @@ namespace BinXlsxRW
|
||||
void WriteSlicers(OOX::Spreadsheet::CWorksheet& oWorksheet, const OOX::Spreadsheet::CSlicerRefs& oSlicers);
|
||||
void WriteUserProtectedRanges(const OOX::Spreadsheet::CUserProtectedRanges& oUserProtectedRanges);
|
||||
void WriteUserProtectedRange(const OOX::Spreadsheet::CUserProtectedRange& oUserProtectedRange);
|
||||
void WriteUserProtectedRangeDesc(const OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc& desc);
|
||||
};
|
||||
class BinaryCustomsTableWriter
|
||||
{
|
||||
|
@ -568,8 +568,8 @@ int BinaryTableReader::ReadTable(BYTE type, long length, void* poResult)
|
||||
|
||||
READ1_DEF(length, res, this->ReadAltTextTable, pOfficeArtExtension->m_oAltTextTable.GetPointer());
|
||||
|
||||
pOfficeArtExtension->m_sUri->append(_T("{504A1905-F514-4f6f-8877-14C23A59335A}"));
|
||||
pOfficeArtExtension->m_sAdditionalNamespace = _T("xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"");
|
||||
pOfficeArtExtension->m_sUri = L"{504A1905-F514-4f6f-8877-14C23A59335A}";
|
||||
pOfficeArtExtension->m_sAdditionalNamespace = L"xmlns:x14=\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main\"";
|
||||
pTable->m_oExtLst.Init();
|
||||
pTable->m_oExtLst->m_arrExt.push_back(pOfficeArtExtension);
|
||||
}
|
||||
@ -6403,36 +6403,57 @@ int BinaryWorksheetsTableReader::ReadUserProtectedRanges(BYTE type, long length,
|
||||
if (c_oSer_UserProtectedRange::UserProtectedRange == type)
|
||||
{
|
||||
OOX::Spreadsheet::CUserProtectedRange* pUserProtectedRange = new OOX::Spreadsheet::CUserProtectedRange();
|
||||
READ2_DEF_SPREADSHEET(length, res, this->ReadUserProtectedRange, pUserProtectedRange);
|
||||
READ1_DEF(length, res, this->ReadUserProtectedRange, pUserProtectedRange);
|
||||
pUserProtectedRanges->m_arrItems.push_back(pUserProtectedRange);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int BinaryWorksheetsTableReader::ReadUserProtectedRangeDesc(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc *desc = static_cast<OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc*>(poResult);
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
|
||||
if (c_oSer_UserProtectedRangeDesc::Name == type)
|
||||
{
|
||||
desc->name = m_oBufferedStream.GetString4(length);
|
||||
}
|
||||
else if (c_oSer_UserProtectedRangeDesc::Id == type)
|
||||
{
|
||||
desc->id = m_oBufferedStream.GetString4(length);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
return res;
|
||||
}
|
||||
int BinaryWorksheetsTableReader::ReadUserProtectedRange(BYTE type, long length, void* poResult)
|
||||
{
|
||||
OOX::Spreadsheet::CUserProtectedRange *pUserProtectedRanges = static_cast<OOX::Spreadsheet::CUserProtectedRange*>(poResult);
|
||||
OOX::Spreadsheet::CUserProtectedRange *pUserProtectedRange = static_cast<OOX::Spreadsheet::CUserProtectedRange*>(poResult);
|
||||
int res = c_oSerConstants::ReadOk;
|
||||
if (c_oSer_UserProtectedRange::Name == type)
|
||||
{
|
||||
pUserProtectedRanges->m_oName = m_oBufferedStream.GetString4(length);
|
||||
pUserProtectedRange->m_oName = m_oBufferedStream.GetString4(length);
|
||||
}
|
||||
else if (c_oSer_UserProtectedRange::Sqref == type)
|
||||
{
|
||||
pUserProtectedRanges->m_oSqref = m_oBufferedStream.GetString4(length);
|
||||
pUserProtectedRange->m_oSqref = m_oBufferedStream.GetString4(length);
|
||||
}
|
||||
else if (c_oSer_UserProtectedRange::Text == type)
|
||||
{
|
||||
pUserProtectedRanges->m_oText = m_oBufferedStream.GetString4(length);
|
||||
pUserProtectedRange->m_oText = m_oBufferedStream.GetString4(length);
|
||||
}
|
||||
else if (c_oSer_UserProtectedRange::UserId == type)
|
||||
else if (c_oSer_UserProtectedRange::User == type)
|
||||
{
|
||||
pUserProtectedRanges->m_arUsersId.push_back(m_oBufferedStream.GetString4(length));
|
||||
OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc desc;
|
||||
READ2_DEF_SPREADSHEET(length, res, this->ReadUserProtectedRangeDesc, &desc);
|
||||
pUserProtectedRange->m_arUsers.push_back(desc);
|
||||
}
|
||||
else if (c_oSer_UserProtectedRange::UsersGroup == type)
|
||||
{
|
||||
pUserProtectedRanges->m_arUsersGroupsId.push_back(m_oBufferedStream.GetString4(length));
|
||||
OOX::Spreadsheet::CUserProtectedRange::_UsersGroupsDesc desc;
|
||||
READ2_DEF_SPREADSHEET(length, res, this->ReadUserProtectedRangeDesc, &desc);
|
||||
pUserProtectedRange->m_arUsersGroups.push_back(desc);
|
||||
}
|
||||
else
|
||||
res = c_oSerConstants::ReadUnknown;
|
||||
|
@ -360,6 +360,7 @@ namespace BinXlsxRW
|
||||
int ReadSlicers(BYTE type, long length, void* poResult);
|
||||
int ReadUserProtectedRanges(BYTE type, long length, void* poResult);
|
||||
int ReadUserProtectedRange(BYTE type, long length, void* poResult);
|
||||
int ReadUserProtectedRangeDesc(BYTE type, long length, void* poResult);
|
||||
|
||||
void WriteComments();
|
||||
void AddLineBreak(OOX::Spreadsheet::CSi& oSi);
|
||||
|
@ -35,6 +35,7 @@
|
||||
|
||||
#include "../../PPTXFormat/Logic/SpTree.h"
|
||||
#include "../../Binary/Presentation/BinaryFileReaderWriter.h"
|
||||
#include "../Logic/Pict.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
|
@ -45,9 +45,14 @@ namespace OOX
|
||||
{
|
||||
CBinData::CBinData(OOX::Document *pMain) : WritingElement(pMain) {}
|
||||
CBinData::~CBinData() {}
|
||||
|
||||
void CBinData::fromXML(XmlUtils::CXmlNode &oNode)
|
||||
{
|
||||
m_sName = oNode.GetAttribute(L"w:name");
|
||||
|
||||
m_sData = oNode.GetTextA();
|
||||
}
|
||||
|
||||
void CBinData::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
ReadAttributes( oReader );
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "Sdt.h"
|
||||
#include "Hyperlink.h"
|
||||
#include "Table.h"
|
||||
#include "Pict.h"
|
||||
|
||||
#include "../Math/oMathPara.h"
|
||||
#include "../Math/OMath.h"
|
||||
@ -50,6 +51,7 @@
|
||||
#include "../../XlsxFormat/Drawing/CellAnchor.h"
|
||||
#include "../../XlsxFormat/Drawing/FromTo.h"
|
||||
|
||||
#include "../../../DesktopEditor/raster/ImageFileFormatChecker.h"
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
@ -179,6 +181,41 @@ namespace OOX
|
||||
pItem = new OOX::VmlWord::CWrap(document);
|
||||
else if (L"w10:wrap" == sName)
|
||||
pItem = new OOX::VmlWord::CWrap(document);
|
||||
else if (L"w:binData" == sName)
|
||||
{
|
||||
OOX::Logic::CBinData oBinData;
|
||||
oBinData.fromXML(oReader);
|
||||
|
||||
if (oBinData.m_sData.IsInit())
|
||||
{
|
||||
OOX::CDocxFlat* docx_flat = dynamic_cast<OOX::CDocxFlat*>(document);
|
||||
if (docx_flat)
|
||||
{
|
||||
smart_ptr<OOX::Image> pImageFile = smart_ptr<OOX::Image>(new OOX::Image(document, true));
|
||||
|
||||
int dstLen = Base64::Base64DecodeGetRequiredLength((int)oBinData.m_sData->size());
|
||||
pImageFile->m_Data.resize(dstLen);
|
||||
Base64::Base64Decode(oBinData.m_sData->c_str(), (int)oBinData.m_sData->size(), pImageFile->m_Data.data(), &dstLen);
|
||||
pImageFile->m_Data.resize(dstLen);
|
||||
|
||||
CImageFileFormatChecker fileChecker;
|
||||
std::wstring ext = fileChecker.DetectFormatByData(pImageFile->m_Data.data(), dstLen);
|
||||
if (false == ext.empty())
|
||||
{
|
||||
OOX::CPath filename(L"image." + ext);
|
||||
pImageFile->set_filename(filename, false, true);
|
||||
|
||||
NSCommon::smart_ptr<OOX::File> file = pImageFile.smart_dynamic_cast<OOX::File>();
|
||||
const OOX::RId rId = docx_flat->m_currentContainer->Add(file);
|
||||
|
||||
if (oBinData.m_sName.IsInit())
|
||||
{
|
||||
docx_flat->m_mapImages[*oBinData.m_sName] = file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
case 'x':
|
||||
@ -829,6 +866,12 @@ namespace OOX
|
||||
|
||||
sResult += CVmlCommonElements::WriteElements();
|
||||
|
||||
for (size_t i = 0; i < m_arrElements.size(); ++i)
|
||||
{
|
||||
if (m_arrElements[i])
|
||||
sResult += m_arrElements[i]->toXML();
|
||||
}
|
||||
|
||||
sResult += L"</v:group>";
|
||||
|
||||
return sResult;
|
||||
|
@ -1289,18 +1289,26 @@ void CDrawingConverter::SetMediaDstPath(const std::wstring& sPath)
|
||||
{
|
||||
m_pBinaryWriter->m_pCommon->m_pMediaManager->m_strDstMedia = sPath;
|
||||
}
|
||||
void CDrawingConverter::ClearShapeTypes()
|
||||
void CDrawingConverter::Clear()
|
||||
{
|
||||
m_mapShapeTypes.clear();
|
||||
m_mapBinDatas.clear();
|
||||
}
|
||||
|
||||
void CDrawingConverter::AddShapeType(XmlUtils::CXmlNode& oNodeST)
|
||||
void CDrawingConverter::AddBinData(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
std::wstring strId = oNodeST.GetAttribute(L"id");
|
||||
std::wstring name = oNode.GetAttribute(L"w:name");
|
||||
if (name.empty()) return;
|
||||
|
||||
nullable<OOX::Logic::CBinData> data(oNode);
|
||||
m_mapBinDatas.insert(std::make_pair(name, data));
|
||||
}
|
||||
void CDrawingConverter::AddShapeType(XmlUtils::CXmlNode& oNode)
|
||||
{
|
||||
std::wstring strId = oNode.GetAttribute(L"id");
|
||||
|
||||
if (strId.empty())
|
||||
{
|
||||
strId = oNodeST.GetAttribute(L"type");
|
||||
strId = oNode.GetAttribute(L"type");
|
||||
if (strId[0] == (wchar_t)('#'))
|
||||
{
|
||||
strId = strId.substr(1);
|
||||
@ -1313,12 +1321,12 @@ void CDrawingConverter::AddShapeType(XmlUtils::CXmlNode& oNodeST)
|
||||
CPPTShape* pShape = new CPPTShape();
|
||||
pShape->m_bIsShapeType = true;
|
||||
|
||||
pShape->LoadFromXMLShapeType(oNodeST);
|
||||
pShape->LoadFromXMLShapeType(oNode);
|
||||
|
||||
CShapePtr pS = CShapePtr(new CShape(NSBaseShape::unknown, 0));
|
||||
pS->setBaseShape(CBaseShapePtr(pShape));
|
||||
|
||||
LoadCoordSize(oNodeST, pS);
|
||||
LoadCoordSize(oNode, pS);
|
||||
|
||||
m_mapShapeTypes.insert(std::make_pair(strId, pS));
|
||||
}
|
||||
@ -1434,9 +1442,6 @@ xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\
|
||||
{
|
||||
AddShapeType(oNodeST);
|
||||
}
|
||||
//binary data
|
||||
XmlUtils::CXmlNode oNodeBinData;
|
||||
oParseNode.GetNode(L"w:binData", oNodeBinData);
|
||||
|
||||
std::vector<XmlUtils::CXmlNode> oChilds;
|
||||
if (oParseNode.GetNodes(L"*", oChilds))
|
||||
@ -1461,13 +1466,7 @@ xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\
|
||||
|
||||
if(NULL == pElem)
|
||||
{
|
||||
pElem = new PPTX::Logic::SpTreeElem;
|
||||
|
||||
if (oNodeBinData.IsValid())
|
||||
{
|
||||
pElem->fromXML(oNodeBinData);
|
||||
oNodeBinData.Clear();
|
||||
}
|
||||
pElem = new PPTX::Logic::SpTreeElem;
|
||||
ConvertShape(pElem, oNodeP, ppMainProps, true);
|
||||
|
||||
#ifdef AVS_OFFICE_DRAWING_DUMP_XML_TEST
|
||||
@ -1477,6 +1476,10 @@ xmlns:xdr=\"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing\
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else if (L"binData" == strNameP)
|
||||
{
|
||||
AddBinData(oNodeP);
|
||||
}
|
||||
else if (L"OLEObject" == strNameP || L"objectEmbed" == strNameP)
|
||||
{
|
||||
pOle = new PPTX::Logic::COLEObject();
|
||||
@ -1797,11 +1800,9 @@ void CDrawingConverter::ConvertVml(const std::wstring& sXml, std::vector<nullabl
|
||||
{
|
||||
AddShapeType(oNodeST);
|
||||
}
|
||||
//binary data
|
||||
XmlUtils::CXmlNode oNodeBinData;
|
||||
oParseNode.GetNode(L"w:binData", oNodeBinData);
|
||||
|
||||
std::vector<XmlUtils::CXmlNode> oChilds;
|
||||
|
||||
if (oParseNode.GetNodes(L"*", oChilds))
|
||||
{
|
||||
size_t lChildsCount = oChilds.size();
|
||||
@ -1827,10 +1828,6 @@ void CDrawingConverter::ConvertVml(const std::wstring& sXml, std::vector<nullabl
|
||||
if (false == pElem.IsInit())
|
||||
{
|
||||
pElem = new PPTX::Logic::SpTreeElem;
|
||||
if (oNodeBinData.IsValid())
|
||||
{
|
||||
pElem->fromXML(oNodeBinData);
|
||||
}
|
||||
ConvertShape(pElem.GetPointer(), oNodeP, ppMainProps, true);
|
||||
}
|
||||
}
|
||||
@ -1839,6 +1836,10 @@ void CDrawingConverter::ConvertVml(const std::wstring& sXml, std::vector<nullabl
|
||||
pOle = new PPTX::Logic::COLEObject();
|
||||
pOle->fromXML(oNodeP);
|
||||
}
|
||||
else if (L"binData" == strNameP)
|
||||
{
|
||||
AddBinData(oNodeP);
|
||||
}
|
||||
else if (L"group" == strNameP)
|
||||
{
|
||||
if (false == pElem.IsInit())
|
||||
@ -1959,9 +1960,6 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
|
||||
{
|
||||
AddShapeType(oNodeST);
|
||||
}
|
||||
//binary data
|
||||
XmlUtils::CXmlNode oNodeBinData;
|
||||
oParseNode.GetNode(L"w:binData", oNodeBinData);
|
||||
|
||||
std::vector<XmlUtils::CXmlNode> oChilds;
|
||||
if (oParseNode.GetNodes(L"*", oChilds))
|
||||
@ -1987,14 +1985,14 @@ bool CDrawingConverter::ParceObject(const std::wstring& strXml, std::wstring** p
|
||||
if(NULL == pElem)
|
||||
{
|
||||
pElem = new PPTX::Logic::SpTreeElem;
|
||||
if (oNodeBinData.IsValid())
|
||||
{
|
||||
pElem->fromXML(oNodeBinData);
|
||||
}
|
||||
ConvertShape(pElem, oNodeP, pMainProps, true);
|
||||
}
|
||||
}
|
||||
else if (L"OLEObject" == strNameP || L"objectEmbed" == strNameP)
|
||||
else if (L"binData" == strNameP)
|
||||
{
|
||||
AddBinData(oNodeP);
|
||||
}
|
||||
else if (L"OLEObject" == strNameP || L"objectEmbed" == strNameP)
|
||||
{
|
||||
pOle = new PPTX::Logic::COLEObject();
|
||||
pOle->fromXML(oNodeP);
|
||||
@ -3648,8 +3646,6 @@ void CDrawingConverter::ConvertGroup(PPTX::Logic::SpTreeElem *result, XmlUtils::
|
||||
}
|
||||
}
|
||||
|
||||
XmlUtils::CXmlNode oNodeBinData;
|
||||
|
||||
if (oNode.GetNodes(L"*", oNodes))
|
||||
{
|
||||
size_t nCount = oNodes.size();
|
||||
@ -3667,22 +3663,7 @@ void CDrawingConverter::ConvertGroup(PPTX::Logic::SpTreeElem *result, XmlUtils::
|
||||
L"background" == strNameP ||
|
||||
L"roundrect" == strNameP)
|
||||
{
|
||||
if (false == oNodeBinData.IsValid() && i + 1 < nCount)
|
||||
{
|
||||
oNodeBinData = oNodes[i + 1];
|
||||
if (L"binData" != XmlUtils::GetNameNoNS(oNodeBinData.GetName()))
|
||||
{
|
||||
i++;
|
||||
}
|
||||
else
|
||||
oNodeBinData.Clear();
|
||||
}
|
||||
PPTX::Logic::SpTreeElem _el;
|
||||
if (oNodeBinData.IsValid())
|
||||
{
|
||||
_el.fromXML(oNodeBinData);
|
||||
oNodeBinData.Clear();
|
||||
}
|
||||
ConvertShape(&_el, oNodeT, pMainProps, false);
|
||||
|
||||
if (_el.is_init())
|
||||
@ -3690,7 +3671,7 @@ void CDrawingConverter::ConvertGroup(PPTX::Logic::SpTreeElem *result, XmlUtils::
|
||||
}
|
||||
else if (L"binData" == strNameP)
|
||||
{
|
||||
oNodeBinData = oNodeT;
|
||||
AddBinData(oNodeT);
|
||||
}
|
||||
else if (L"group" == strNameP)
|
||||
{
|
||||
@ -5119,8 +5100,20 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
{
|
||||
XmlUtils::CXmlNode oNodeFillID = oNode.ReadNode(L"v:imagedata");
|
||||
|
||||
if (oNodeFillID.IsValid() || oElem->m_binaryData.IsInit())
|
||||
if (oNodeFillID.IsValid())
|
||||
{
|
||||
nullable_string sSrc;
|
||||
XmlMacroReadAttributeBase(oNodeFillID, L"src", sSrc);
|
||||
|
||||
if (sSrc.IsInit())
|
||||
{
|
||||
std::map<std::wstring, nullable<OOX::Logic::CBinData>>::iterator pFind = m_mapBinDatas.find(*sSrc);
|
||||
if (pFind != m_mapBinDatas.end())
|
||||
{
|
||||
oElem->m_binaryData = pFind->second;
|
||||
}
|
||||
}
|
||||
|
||||
nullable_string sRid;
|
||||
XmlMacroReadAttributeBase(oNodeFillID, L"r:id", sRid);
|
||||
|
||||
@ -5152,9 +5145,9 @@ void CDrawingConverter::CheckBrushShape(PPTX::Logic::SpTreeElem* oElem, XmlUtils
|
||||
|
||||
pBlipFill->blip = new PPTX::Logic::Blip();
|
||||
|
||||
if (oElem->m_binaryData.IsInit())
|
||||
if (oElem->m_binaryData.IsInit() && oElem->m_binaryData->m_sData.IsInit())
|
||||
{
|
||||
pBlipFill->blip->dataFilepathImage = L"data:base64," + *oElem->m_binaryData;
|
||||
pBlipFill->blip->dataFilepathImageA = "data:base64," + *oElem->m_binaryData->m_sData;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -6533,10 +6526,6 @@ OOX::CContentTypes* CDrawingConverter::GetContentTypes()
|
||||
return m_pImageManager->m_pContentTypes;
|
||||
}
|
||||
|
||||
void CDrawingConverter::Clear()
|
||||
{
|
||||
m_mapShapeTypes.clear();
|
||||
}
|
||||
void CDrawingConverter::SetRels(smart_ptr<OOX::IFileContainer> container)
|
||||
{
|
||||
m_pBinaryWriter->SetRels(container);
|
||||
|
@ -29,8 +29,7 @@
|
||||
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
||||
*
|
||||
*/
|
||||
#ifndef ASC_OFFICE_DRAWING_CONVERTER
|
||||
#define ASC_OFFICE_DRAWING_CONVERTER
|
||||
#pragma once
|
||||
|
||||
#include "../../Base/Nullable.h"
|
||||
|
||||
@ -69,6 +68,10 @@ namespace OOX
|
||||
{
|
||||
class CContentTypes;
|
||||
class IFileContainer;
|
||||
namespace Logic
|
||||
{
|
||||
class CBinData;
|
||||
}
|
||||
}
|
||||
namespace NSBinPptxRW
|
||||
{
|
||||
@ -192,7 +195,8 @@ namespace NSBinPptxRW
|
||||
};
|
||||
|
||||
|
||||
std::map<std::wstring, CShapePtr> m_mapShapeTypes;
|
||||
std::map<std::wstring, CShapePtr> m_mapShapeTypes;
|
||||
std::map<std::wstring, nullable<OOX::Logic::CBinData>> m_mapBinDatas;
|
||||
|
||||
NSBinPptxRW::CBinaryFileWriter* m_pBinaryWriter;
|
||||
int m_lNextId;
|
||||
@ -230,16 +234,17 @@ namespace NSBinPptxRW
|
||||
void SetMediaDstPath (const std::wstring& sMediaPath);
|
||||
void SetEmbedDstPath (const std::wstring& sEmbedPath);
|
||||
|
||||
void ClearShapeTypes ();
|
||||
HRESULT AddShapeType (const std::wstring& sXml);
|
||||
void AddShapeType (XmlUtils::CXmlNode& oNodeST);
|
||||
void Clear();
|
||||
HRESULT AddShapeType(const std::wstring& sXml);
|
||||
void AddShapeType(XmlUtils::CXmlNode& oNode);
|
||||
void AddBinData(XmlUtils::CXmlNode& oNode);
|
||||
|
||||
HRESULT AddObject (const std::wstring& sXml, std::wstring** pMainProps);
|
||||
HRESULT AddObject(const std::wstring& sXml, std::wstring** pMainProps);
|
||||
|
||||
void ConvertVml(const std::wstring& sXml, std::vector<nullable<PPTX::Logic::SpTreeElem>> &elements);
|
||||
|
||||
HRESULT SaveObject (long lStart, long lLength, const std::wstring& sMainProps, std::wstring & sXml);
|
||||
HRESULT SaveObjectEx (long lStart, long lLength, const std::wstring& sMainProps, int nDocType, std::wstring & sXml);
|
||||
HRESULT SaveObject(long lStart, long lLength, const std::wstring& sMainProps, std::wstring & sXml);
|
||||
HRESULT SaveObjectEx(long lStart, long lLength, const std::wstring& sMainProps, int nDocType, std::wstring & sXml);
|
||||
|
||||
void SaveObjectExWriterInit (NSBinPptxRW::CXmlWriter& oXmlWriter, int lDocType);
|
||||
void SaveObjectExWriterRelease (NSBinPptxRW::CXmlWriter& oXmlWriter);
|
||||
@ -303,8 +308,6 @@ namespace NSBinPptxRW
|
||||
|
||||
void ConvertTextVML (XmlUtils::CXmlNode &nodeTextBox, PPTX::Logic::Shape* pShape);
|
||||
|
||||
void Clear();
|
||||
HRESULT SetCurrentRelsPath();
|
||||
};
|
||||
}
|
||||
#endif //OOX_IFILE_CONTAINER_INCLUDE_H_
|
||||
|
@ -261,22 +261,26 @@ namespace PPTX
|
||||
additionalPath = mediaFilepath;
|
||||
additionalType = 2;
|
||||
}
|
||||
|
||||
std::wstring imagePath;
|
||||
if(!dataFilepathImage.empty())
|
||||
NSShapeImageGen::CMediaInfo oId;
|
||||
if(!dataFilepathImageA.empty())
|
||||
{
|
||||
imagePath = dataFilepathImage;
|
||||
oId = pWriter->m_pCommon->m_pMediaManager->WriteImage(dataFilepathImageA, dX, dY, dW, dH, additionalPath, additionalType);
|
||||
}
|
||||
if (!dataFilepathImage.empty())
|
||||
{
|
||||
oId = pWriter->m_pCommon->m_pMediaManager->WriteImage(dataFilepathImage, dX, dY, dW, dH, additionalPath, additionalType);
|
||||
}
|
||||
else if(!oleFilepathImage.empty())
|
||||
{
|
||||
imagePath = oleFilepathImage;
|
||||
std::wstring imagePath = oleFilepathImage;
|
||||
oId = pWriter->m_pCommon->m_pMediaManager->WriteImage(imagePath, dX, dY, dW, dH, additionalPath, additionalType);
|
||||
}
|
||||
else
|
||||
{
|
||||
imagePath = this->GetFullPicName(pRels);
|
||||
std::wstring imagePath = this->GetFullPicName(pRels);
|
||||
oId = pWriter->m_pCommon->m_pMediaManager->WriteImage(imagePath, dX, dY, dW, dH, additionalPath, additionalType);
|
||||
}
|
||||
|
||||
NSShapeImageGen::CMediaInfo oId = pWriter->m_pCommon->m_pMediaManager->WriteImage(imagePath, dX, dY, dW, dH, additionalPath, additionalType);
|
||||
std::wstring s = oId.GetPath2();
|
||||
|
||||
pWriter->StartRecord(3);
|
||||
|
@ -82,6 +82,7 @@ namespace PPTX
|
||||
std::wstring oleFilepathImage;
|
||||
|
||||
std::wstring dataFilepathImage;
|
||||
std::string dataFilepathImageA;
|
||||
|
||||
protected:
|
||||
virtual void FillParentPointersForChilds();
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "Pic.h"
|
||||
#include "../Theme.h"
|
||||
#include "ClrMap.h"
|
||||
#include "../../DocxFormat/Logic/Pict.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "../../DocxFormat/Media/Audio.h"
|
||||
#include "../../DocxFormat/Media/Video.h"
|
||||
#include "../../DocxFormat/Media/ActiveX.h"
|
||||
#include "../../DocxFormat/Logic/Pict.h"
|
||||
|
||||
namespace PPTX
|
||||
{
|
||||
@ -402,7 +403,7 @@ namespace PPTX
|
||||
}
|
||||
else if (name == L"binData")
|
||||
{
|
||||
m_binaryData = node.GetText();
|
||||
m_binaryData = node;
|
||||
}
|
||||
else m_elem.reset();
|
||||
}
|
||||
|
@ -39,6 +39,13 @@
|
||||
|
||||
#include <boost/smart_ptr/shared_array.hpp>
|
||||
|
||||
namespace OOX
|
||||
{
|
||||
namespace Logic
|
||||
{
|
||||
class CBinData;
|
||||
}
|
||||
}
|
||||
namespace PPTX
|
||||
{
|
||||
namespace Logic
|
||||
@ -90,7 +97,7 @@ namespace PPTX
|
||||
virtual void SetParentPointer(const WrapperWritingElement* pParent);
|
||||
std::wstring GetSlicerRequires();
|
||||
|
||||
nullable_string m_binaryData;
|
||||
nullable<OOX::Logic::CBinData> m_binaryData;
|
||||
std::wstring m_sRequires;//from mc:Choice
|
||||
|
||||
private:
|
||||
|
@ -1858,9 +1858,6 @@
|
||||
<ClInclude Include="..\..\..\..\MsBinaryFile\Common\Base\Aggregat.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\PPTXFormat\DrawingConverter\ASCOfficeDrawingConverter.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\..\MsBinaryFile\Common\Base\Callback.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
@ -1897,6 +1894,9 @@
|
||||
<ClInclude Include="..\..\..\..\MsBinaryFile\Common\Vml\VmlPath.h">
|
||||
<Filter>Vml</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\..\PPTXFormat\DrawingConverter\ASCOfficeDrawingConverter.h">
|
||||
<Filter>Binary</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\..\PPTXFormat\FileContainer.cpp" />
|
||||
@ -3717,12 +3717,6 @@
|
||||
<ClCompile Include="..\..\..\..\MsBinaryFile\Common\Vml\PPTShape\Ppt2PptxShapeConverter.cpp">
|
||||
<Filter>Vml\PptShape</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\PPTXFormat\DrawingConverter\ASCOfficeDrawingConverter.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\HtmlRenderer\src\ASCSVGWriter.cpp">
|
||||
<Filter>Common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\MsBinaryFile\Common\Base\XmlTools.cpp">
|
||||
<Filter>Common\Xml</Filter>
|
||||
</ClCompile>
|
||||
@ -3735,6 +3729,12 @@
|
||||
<ClCompile Include="..\..\..\..\MsBinaryFile\Common\Vml\VmlPath.cpp">
|
||||
<Filter>Vml</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\PPTXFormat\DrawingConverter\ASCOfficeDrawingConverter.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\HtmlRenderer\src\ASCSVGWriter.cpp">
|
||||
<Filter>Binary</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Limits">
|
||||
|
@ -3195,6 +3195,9 @@ xmlns:c16r2=\"http://schemas.microsoft.com/office/drawing/2015/06/chart\"");
|
||||
CT_BubbleSer::CT_BubbleSer()
|
||||
{
|
||||
m_dLbls = NULL;
|
||||
m_xVal = NULL;
|
||||
m_yVal = NULL;
|
||||
m_bubbleSize = NULL;
|
||||
}
|
||||
CT_BubbleSer::~CT_BubbleSer()
|
||||
{
|
||||
|
@ -2301,8 +2301,8 @@ namespace OOX
|
||||
void CUserProtectedRange::ReadAttributes(XmlUtils::CXmlLiteReader& oReader)
|
||||
{
|
||||
WritingElement_ReadAttributes_Start(oReader)
|
||||
WritingElement_ReadAttributes_Read_if(oReader, (L"name"), m_oName)
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, (L"sqref"), m_oSqref)
|
||||
WritingElement_ReadAttributes_Read_if(oReader, L"name", m_oName)
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, L"sqref", m_oSqref)
|
||||
WritingElement_ReadAttributes_End(oReader)
|
||||
}
|
||||
void CUserProtectedRange::fromXML(XmlUtils::CXmlLiteReader& oReader)
|
||||
@ -2329,11 +2329,12 @@ namespace OOX
|
||||
std::wstring sName2 = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
if (L"user" == sName2)
|
||||
{
|
||||
std::wstring id;
|
||||
_UsersGroupsDesc desc;
|
||||
WritingElement_ReadAttributes_Start(oReader)
|
||||
WritingElement_ReadAttributes_ReadSingle(oReader, L"id", id)
|
||||
WritingElement_ReadAttributes_Read_if(oReader, L"id", desc.id)
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, L"name", desc.name)
|
||||
WritingElement_ReadAttributes_End(oReader)
|
||||
m_arUsersId.push_back(id);
|
||||
m_arUsers.push_back(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2345,11 +2346,12 @@ namespace OOX
|
||||
std::wstring sName2 = XmlUtils::GetNameNoNS(oReader.GetName());
|
||||
if (L"usersGroup" == sName2)
|
||||
{
|
||||
std::wstring id;
|
||||
_UsersGroupsDesc desc;
|
||||
WritingElement_ReadAttributes_Start(oReader)
|
||||
WritingElement_ReadAttributes_ReadSingle(oReader, L"id", id)
|
||||
WritingElement_ReadAttributes_Read_if(oReader, L"id", desc.id)
|
||||
WritingElement_ReadAttributes_Read_else_if(oReader, L"name", desc.name)
|
||||
WritingElement_ReadAttributes_End(oReader)
|
||||
m_arUsersGroupsId.push_back(id);
|
||||
m_arUsersGroups.push_back(desc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2368,21 +2370,27 @@ namespace OOX
|
||||
writer.WriteString(*m_oText);
|
||||
writer.WriteString(L"</text>");
|
||||
}
|
||||
if (false == m_arUsersId.empty())
|
||||
if (false == m_arUsers.empty())
|
||||
{
|
||||
writer.WriteString(L"<users>");
|
||||
for (size_t i = 0; i < m_arUsersId.size(); ++i)
|
||||
for (size_t i = 0; i < m_arUsers.size(); ++i)
|
||||
{
|
||||
writer.WriteString(L"<user id=\"" + m_arUsersId[i] + L"\"/>");
|
||||
writer.WriteString(L"<user");
|
||||
WritingStringNullableAttrEncodeXmlString2(L"id", m_arUsers[i].id);
|
||||
WritingStringNullableAttrEncodeXmlString2(L"name", m_arUsers[i].name);
|
||||
writer.WriteString(L"/>");
|
||||
}
|
||||
writer.WriteString(L"</users>");
|
||||
}
|
||||
if (false == m_arUsersGroupsId.empty())
|
||||
if (false == m_arUsersGroups.empty())
|
||||
{
|
||||
writer.WriteString(L"<usersGroups>");
|
||||
for (size_t i = 0; i < m_arUsersGroupsId.size(); ++i)
|
||||
for (size_t i = 0; i < m_arUsersGroups.size(); ++i)
|
||||
{
|
||||
writer.WriteString(L"<usersGroup id=\"" + m_arUsersGroupsId[i] + L"\"/>");
|
||||
writer.WriteString(L"<usersGroup");
|
||||
WritingStringNullableAttrEncodeXmlString2(L"id", m_arUsersGroups[i].id);
|
||||
WritingStringNullableAttrEncodeXmlString2(L"name", m_arUsersGroups[i].name);
|
||||
writer.WriteString(L"/>");
|
||||
}
|
||||
writer.WriteString(L"</usersGroups>");
|
||||
}
|
||||
|
@ -837,6 +837,12 @@ namespace OOX
|
||||
class CUserProtectedRange : public WritingElement
|
||||
{
|
||||
public:
|
||||
struct _UsersGroupsDesc
|
||||
{
|
||||
nullable_string id;
|
||||
nullable_string name;
|
||||
};
|
||||
|
||||
WritingElement_AdditionMethods(CUserProtectedRange)
|
||||
CUserProtectedRange();
|
||||
virtual ~CUserProtectedRange();
|
||||
@ -851,12 +857,12 @@ namespace OOX
|
||||
|
||||
void ReadAttributes(XmlUtils::CXmlLiteReader& oReader);
|
||||
|
||||
nullable_string m_oName;
|
||||
nullable_string m_oSqref;
|
||||
nullable_string m_oText;
|
||||
nullable_string m_oName;
|
||||
nullable_string m_oSqref;
|
||||
nullable_string m_oText;
|
||||
|
||||
std::vector<std::wstring> m_arUsersId;
|
||||
std::vector<std::wstring> m_arUsersGroupsId;
|
||||
std::vector<_UsersGroupsDesc> m_arUsers;
|
||||
std::vector<_UsersGroupsDesc> m_arUsersGroups;
|
||||
};
|
||||
|
||||
class CUserProtectedRanges : public WritingElementWithChilds<CUserProtectedRange>
|
||||
|
@ -262,7 +262,7 @@ void math_munderover::add_child_element( xml::sax * Reader, const std::wstring &
|
||||
void math_munderover::oox_convert(oox::math_context & Context)
|
||||
{//3 elements (+1)
|
||||
if (content_.size() < 4)
|
||||
{
|
||||
{//???
|
||||
return;
|
||||
}
|
||||
std::wstringstream strmTemp;
|
||||
@ -355,18 +355,27 @@ void math_mover::oox_convert(oox::math_context & Context)
|
||||
|
||||
office_math_element* math_element = NULL;
|
||||
|
||||
int index_lim = content_.size() > 1 ? 1 : 0;
|
||||
int index_e = content_.size() > 1 ? 0 : -1;
|
||||
|
||||
strm << L"<m:limUpp>";
|
||||
strm << L"<m:limUppPr/>";
|
||||
strm << L"<m:e>";
|
||||
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
if (content_.size() > index_e && index_e >= 0)
|
||||
{
|
||||
math_element = dynamic_cast<office_math_element*>(content_[index_e].get());
|
||||
math_element->oox_convert(Context);
|
||||
}
|
||||
strm << L"</m:e>";
|
||||
strm << L"<m:lim>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[1].get());
|
||||
math_element->oox_convert(Context);
|
||||
if (content_.size() > index_lim && index_lim >= 0)
|
||||
{
|
||||
math_element = dynamic_cast<office_math_element*>(content_[index_lim].get());
|
||||
math_element->oox_convert(Context);
|
||||
}
|
||||
strm << L"</m:lim>";
|
||||
strm << L"</m:limUpp>";
|
||||
}
|
||||
@ -395,16 +404,25 @@ void math_munder::oox_convert(oox::math_context & Context)
|
||||
}
|
||||
Context.is_need_e_ = false;
|
||||
|
||||
int index_lim = content_.size() > 1 ? 1 : 0;
|
||||
int index_e = content_.size() > 1 ? 0 : -1;
|
||||
|
||||
office_math_element* math_element = NULL;
|
||||
strm << L"<m:limLow>";
|
||||
strm << L"<m:limLowPr/>";
|
||||
strm << L"<m:e>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[0].get());
|
||||
math_element->oox_convert(Context);
|
||||
if (content_.size() > index_e && index_e >= 0)
|
||||
{
|
||||
math_element = dynamic_cast<office_math_element*>(content_[index_e].get());
|
||||
math_element->oox_convert(Context);
|
||||
}
|
||||
strm << L"</m:e>";
|
||||
strm << L"<m:lim>";
|
||||
math_element = dynamic_cast<office_math_element*>(content_[1].get());
|
||||
math_element->oox_convert(Context);
|
||||
if (content_.size() > index_lim && index_lim >= 0)
|
||||
{
|
||||
math_element = dynamic_cast<office_math_element*>(content_[index_lim].get());
|
||||
math_element->oox_convert(Context);
|
||||
}
|
||||
strm << L"</m:lim>";
|
||||
strm << L"</m:limLow>";
|
||||
|
||||
|
@ -71,7 +71,10 @@ public:
|
||||
virtual void docx_serialize_field(const std::wstring & field_name, office_element_ptr & text, oox::docx_conversion_context & Context, bool bLock = false);
|
||||
virtual void docx_serialize_run(office_element_ptr & text, oox::docx_conversion_context & Context);
|
||||
|
||||
virtual void xlsx_serialize(std::wostream & _Wostream, oox::xlsx_conversion_context & Context){}
|
||||
virtual void xlsx_serialize(std::wostream & _Wostream, oox::xlsx_conversion_context & Context)
|
||||
{
|
||||
text_to_stream(_Wostream, true);
|
||||
}
|
||||
private:
|
||||
virtual void add_attributes( const xml::attributes_wc_ptr & Attributes ){}
|
||||
virtual void add_child_element( xml::sax * Reader, const std::wstring & Ns, const std::wstring & Name){}
|
||||
|
@ -1342,7 +1342,7 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_ExternalData *external_data)
|
||||
if (external_data == NULL)return;
|
||||
//данные для диаграммы внутренние !!!
|
||||
|
||||
if (external_data->m_id == NULL)return;
|
||||
if (false == external_data->m_id.IsInit()) return;
|
||||
|
||||
//CString pathEmbeddings = GetEmbeddings(*external_data->m_id);
|
||||
//oO
|
||||
|
@ -305,7 +305,11 @@ namespace Oox2Odf
|
||||
returnValues OoxConverter::convert(OOX::Logic::CCtrlPr *oox_ctrl_pr)
|
||||
{
|
||||
returnValues result;
|
||||
if (!oox_ctrl_pr) result.auxFlag = false;
|
||||
if (!oox_ctrl_pr)
|
||||
{
|
||||
result.auxFlag = false;
|
||||
return result;
|
||||
}
|
||||
|
||||
convert(oox_ctrl_pr->m_oARPr.GetPointer());
|
||||
convert(oox_ctrl_pr->m_oDel.GetPointer());
|
||||
@ -1360,14 +1364,23 @@ namespace Oox2Odf
|
||||
if (odf_context()->math_context()->style_flag)
|
||||
{
|
||||
odf_context()->math_context()->style_flag = false;
|
||||
odf_context()->math_context()->font = *oox_r_pr->m_oRFonts->m_sAscii;
|
||||
odf_context()->math_context()->size = oox_r_pr->m_oSz->m_oVal->GetValue();
|
||||
|
||||
odf_context()->settings_context()->start_view();
|
||||
odf_context()->settings_context()->add_config_content_item(L"BaseFontHeight", L"short", oox_r_pr->m_oSz->m_oVal->ToString());
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameFunctions", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameNumbers", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameText", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameVariables", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
if (oox_r_pr->m_oSz.IsInit() && oox_r_pr->m_oSz->m_oVal.IsInit())
|
||||
{
|
||||
odf_context()->math_context()->size = oox_r_pr->m_oSz->m_oVal->GetValue();
|
||||
|
||||
odf_context()->settings_context()->add_config_content_item(L"BaseFontHeight", L"short", oox_r_pr->m_oSz->m_oVal->ToString());
|
||||
}
|
||||
if (oox_r_pr->m_oRFonts.IsInit() && oox_r_pr->m_oRFonts->m_sAscii.IsInit())
|
||||
{
|
||||
odf_context()->math_context()->font = *oox_r_pr->m_oRFonts->m_sAscii;
|
||||
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameFunctions", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameNumbers", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameText", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
odf_context()->settings_context()->add_config_content_item(L"FontNameVariables", L"string", *oox_r_pr->m_oRFonts->m_sAscii);
|
||||
}
|
||||
odf_context()->settings_context()->end_view();
|
||||
}
|
||||
|
||||
|
@ -30,8 +30,8 @@
|
||||
*
|
||||
*/
|
||||
#include "../oox_shape_defines.h"
|
||||
// shapetypeIrregularSeal1,
|
||||
// shapetypeIrregularSeal2,
|
||||
//+ shapetypeIrregularSeal1,
|
||||
//+ shapetypeIrregularSeal2,
|
||||
//+ shapetypeSun,
|
||||
//+ shapetypeMoon,
|
||||
//+ shapetypeHeart,
|
||||
@ -625,7 +625,6 @@ public:
|
||||
add(L"f197", L"if(?f34, ?f174, ?f189)");
|
||||
}
|
||||
};
|
||||
|
||||
class oox_shape_LeftBrace : public oox_shape
|
||||
{
|
||||
public:
|
||||
@ -837,7 +836,6 @@ public:
|
||||
add(L"f195", L"if(?f32, ?f172, ?f187)");
|
||||
}
|
||||
};
|
||||
|
||||
class oox_shape_RightBracket : public oox_shape
|
||||
{
|
||||
public:
|
||||
@ -1100,7 +1098,6 @@ public:
|
||||
add(L"f113", L"if(?f27, ?f90, ?f105)");
|
||||
}
|
||||
};
|
||||
|
||||
class oox_shape_BracePair : public oox_shape
|
||||
{
|
||||
public:
|
||||
@ -1440,8 +1437,6 @@ public:
|
||||
add(L"f324", L"if(?f28, ?f301, ?f316)");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class oox_shape_BracketPair : public oox_shape
|
||||
{
|
||||
public:
|
||||
@ -1650,6 +1645,91 @@ public:
|
||||
add(L"f193", L"if(?f21, ?f170, ?f185)");
|
||||
}
|
||||
};
|
||||
class oox_shape_IrregularSeal1 : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_IrregularSeal1()
|
||||
{
|
||||
odf_type_name = L"ooxml-irregularSeal1";
|
||||
|
||||
enhanced_path = L"M 10800 5800 L 14522 0 14155 5325 18380 4457 16702 7315 21097 8137 17607 10475 21600 13290 16837 12942 18145 18095 14020 14457 13247 19737 10532 14935 8485 21600 7715 15627 4762 17617 5667 13937 135 14587 3722 11775 0 8615 4627 7617 370 2295 7312 6320 8352 2295 Z N";
|
||||
text_areas = L"?f24 ?f26 ?f25 ?f27";
|
||||
glue_points = L"?f16 ?f17 ?f18 ?f19 ?f20 ?f21 ?f22 ?f23";
|
||||
view_box = L"0 0 21600 21600";
|
||||
|
||||
add(L"f0", L"left");
|
||||
add(L"f1", L"right");
|
||||
add(L"f2", L"top");
|
||||
add(L"f3", L"bottom");
|
||||
add(L"f4", L"?f3 - ?f2");
|
||||
add(L"f5", L"?f1 - ?f0");
|
||||
add(L"f6", L"?f5 / 21600");
|
||||
add(L"f7", L"?f4 / 21600");
|
||||
add(L"f8", L"?f5 * 4627 / 21600");
|
||||
add(L"f9", L"?f5 * 8485 / 21600");
|
||||
add(L"f10", L"?f5 * 16702 / 21600");
|
||||
add(L"f11", L"?f5 * 14522 / 21600");
|
||||
add(L"f12", L"?f4 * 6320 / 21600");
|
||||
add(L"f13", L"?f4 * 8615 / 21600");
|
||||
add(L"f14", L"?f4 * 13937 / 21600");
|
||||
add(L"f15", L"?f4 * 13290 / 21600");
|
||||
add(L"f16", L"?f11 / ?f6");
|
||||
add(L"f17", L"?f2 / ?f7");
|
||||
add(L"f18", L"?f0 / ?f6");
|
||||
add(L"f19", L"?f13 / ?f7");
|
||||
add(L"f20", L"?f9 / ?f6");
|
||||
add(L"f21", L"?f3 / ?f7");
|
||||
add(L"f22", L"?f1 / ?f6");
|
||||
add(L"f23", L"?f15 / ?f7");
|
||||
add(L"f24", L"?f8 / ?f6");
|
||||
add(L"f25", L"?f10 / ?f6");
|
||||
add(L"f26", L"?f12 / ?f7");
|
||||
add(L"f27", L"?f14 / ?f7");
|
||||
}
|
||||
};
|
||||
class oox_shape_IrregularSeal2 : public oox_shape
|
||||
{
|
||||
public:
|
||||
oox_shape_IrregularSeal2()
|
||||
{
|
||||
odf_type_name = L"ooxml-irregularSeal2";
|
||||
|
||||
enhanced_path = L"M 11462 4342 L 14790 0 14525 5777 18007 3172 16380 6532 21600 6645 16985 9402 18270 11290 16380 12310 18877 15632 14640 14350 14942 17370 12180 15935 11612 18842 9872 17370 8700 19712 7527 18125 4917 21600 4805 18240 1285 17825 3330 15370 0 12877 3935 11592 1172 8270 5372 7817 4502 3625 8550 6382 9722 1887 Z N";
|
||||
text_areas = L"?f26 ?f28 ?f27 ?f29";
|
||||
glue_points = L"?f18 ?f19 ?f20 ?f21 ?f22 ?f23 ?f24 ?f25";
|
||||
view_box = L"0 0 21600 21600";
|
||||
|
||||
add(L"f0", L"left");
|
||||
add(L"f1", L"right");
|
||||
add(L"f2", L"top");
|
||||
add(L"f3", L"bottom");
|
||||
add(L"f4", L"?f3 - ?f2");
|
||||
add(L"f5", L"?f1 - ?f0");
|
||||
add(L"f6", L"?f5 / 21600");
|
||||
add(L"f7", L"?f4 / 21600");
|
||||
add(L"f8", L"?f5 * 9722 / 21600");
|
||||
add(L"f9", L"?f5 * 5372 / 21600");
|
||||
add(L"f10", L"?f5 * 11612 / 21600");
|
||||
add(L"f11", L"?f5 * 14640 / 21600");
|
||||
add(L"f12", L"?f4 * 1887 / 21600");
|
||||
add(L"f13", L"?f4 * 6382 / 21600");
|
||||
add(L"f14", L"?f4 * 12877 / 21600");
|
||||
add(L"f15", L"?f4 * 18842 / 21600");
|
||||
add(L"f16", L"?f4 * 15935 / 21600");
|
||||
add(L"f17", L"?f4 * 6645 / 21600");
|
||||
add(L"f18", L"?f8 / ?f6");
|
||||
add(L"f19", L"?f12 / ?f7");
|
||||
add(L"f20", L"?f0 / ?f6");
|
||||
add(L"f21", L"?f14 / ?f7");
|
||||
add(L"f22", L"?f10 / ?f6");
|
||||
add(L"f23", L"?f15 / ?f7");
|
||||
add(L"f24", L"?f1 / ?f6");
|
||||
add(L"f25", L"?f17 / ?f7");
|
||||
add(L"f26", L"?f9 / ?f6");
|
||||
add(L"f27", L"?f11 / ?f6");
|
||||
add(L"f28", L"?f13 / ?f7");
|
||||
add(L"f29", L"?f16 / ?f7");
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -198,9 +198,10 @@ void draw_custom_shape::serialize(std::wostream & _Wostream)
|
||||
CP_XML_NODE_SIMPLE()
|
||||
{
|
||||
draw_shape::serialize_attlist(CP_GET_XML_NODE());
|
||||
|
||||
if (draw_enhanced_geometry_)draw_enhanced_geometry_->serialize(CP_XML_STREAM());
|
||||
draw_shape::serialize(CP_XML_STREAM());
|
||||
|
||||
if (draw_enhanced_geometry_)
|
||||
draw_enhanced_geometry_->serialize(CP_XML_STREAM());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
CP_REGISTER_OFFICE_ELEMENT2(number_number_style)
|
||||
|
||||
//------------------------------------------------------------------------------------------------------
|
||||
class number_currency_style : public office_element_impl<number_currency_style>, number_style_base
|
||||
class number_currency_style : public office_element_impl<number_currency_style>, public number_style_base
|
||||
{
|
||||
public:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
@ -95,7 +95,7 @@ public:
|
||||
};
|
||||
CP_REGISTER_OFFICE_ELEMENT2(number_currency_style)
|
||||
//------------------------------------------------------------------------------------------------------
|
||||
class number_boolean_style : public office_element_impl<number_boolean_style>, number_style_base
|
||||
class number_boolean_style : public office_element_impl<number_boolean_style>, public number_style_base
|
||||
{
|
||||
public:
|
||||
virtual void create_child_element(const std::wstring & Ns, const std::wstring & Name);
|
||||
|
@ -111,20 +111,20 @@ namespace cpdoccore {
|
||||
|
||||
std::vector<std::vector<std::wstring>> brackets;
|
||||
std::wstring annotation;
|
||||
int lvl_of_me;
|
||||
int matrix_row_counter;
|
||||
int lvl_of_me = 0;
|
||||
int matrix_row_counter = 0;
|
||||
std::vector<int> end_counter;
|
||||
bool style_flag;
|
||||
int counter;
|
||||
bool style_flag = 0;
|
||||
int counter = 0;
|
||||
std::wstring current_tag;
|
||||
int symbol_counter;
|
||||
double lvl_counter;
|
||||
double lvl_up_counter;
|
||||
double lvl_down_counter;
|
||||
double lvl_max;
|
||||
double lvl_min;
|
||||
int symbol_counter = 0;
|
||||
double lvl_counter = 0;
|
||||
double lvl_up_counter = 0;
|
||||
double lvl_down_counter = 0;
|
||||
double lvl_max = 0;
|
||||
double lvl_min = 0;
|
||||
std::wstring font;
|
||||
double size;
|
||||
double size = 0;
|
||||
std::set<wchar_t> mo;
|
||||
std::map<std::wstring, std::wstring> diak_symbols;
|
||||
bool annotation_flag;
|
||||
|
@ -593,9 +593,26 @@ void odf_number_styles_context::create_currency_style(number_format_state & stat
|
||||
{
|
||||
create_element(L"number", L"currency-style", root_elm, odf_context_);
|
||||
{
|
||||
int res1 = (int)state.format_code[0].rfind(L"]");
|
||||
int res1 = (int)state.format_code[0].rfind(L"[");
|
||||
int res2 = (int)state.format_code[0].rfind(L"#");
|
||||
int res3 = (int)state.format_code[0].rfind(L"0");
|
||||
int res4 = (int)state.format_code[0].rfind(L"]");
|
||||
|
||||
if (res1 >= 0 && res4 >= 0)
|
||||
{
|
||||
state.format_code[0].erase(state.format_code[0].begin() + res1, state.format_code[0].begin() + res4 + 1);
|
||||
|
||||
std::vector<std::wstring> tmp;
|
||||
boost::algorithm::split(tmp, state.format_code[0], boost::algorithm::is_any_of(L"\\"), boost::algorithm::token_compress_on);
|
||||
for (size_t i = 0; i < tmp.size(); ++i)
|
||||
{
|
||||
if (!tmp[i].empty())
|
||||
{
|
||||
state.format_code[0] = tmp[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
office_element_ptr elm_symbol;
|
||||
create_element(L"number", L"currency-symbol", elm_symbol, odf_context_);
|
||||
@ -634,7 +651,7 @@ void odf_number_styles_context::create_currency_style(number_format_state & stat
|
||||
office_element_ptr elm_text;
|
||||
create_element(L"number", L"text", elm_text, odf_context_);
|
||||
number_text* number_text_ = dynamic_cast<number_text*>(elm_text.get());
|
||||
if (number_text_)number_text_->add_text(L" ");
|
||||
if (number_text_) number_text_->add_text(L" ");
|
||||
styles_elments.push_back(elm_text);
|
||||
////////////////////////////////////////////
|
||||
if (res1 > res2 || res1 > res3)
|
||||
|
@ -89,7 +89,9 @@ oox_shape_ptr oox_shape::create(int ooxPrstGeomType)
|
||||
case SimpleTypes::shapetypeMoon: return boost::make_shared<oox_shape_moon>();
|
||||
case SimpleTypes::shapetypeLightningBolt: return boost::make_shared<oox_shape_lightningBolt>();
|
||||
case SimpleTypes::shapetypeHeart: return boost::make_shared<oox_shape_heart>();
|
||||
|
||||
case SimpleTypes::shapetypeIrregularSeal1: return boost::make_shared<oox_shape_IrregularSeal1>();
|
||||
case SimpleTypes::shapetypeIrregularSeal2: return boost::make_shared<oox_shape_IrregularSeal2>();
|
||||
|
||||
case SimpleTypes::shapetypeCircularArrow: return boost::make_shared<oox_shape_CircularArrow>();
|
||||
case SimpleTypes::shapetypeCurvedLeftArrow: return boost::make_shared<oox_shape_CurvedLeftArrow>();
|
||||
case SimpleTypes::shapetypeCurvedRightArrow: return boost::make_shared<oox_shape_CurvedRightArrow>();
|
||||
|
@ -7,7 +7,6 @@ TARGET = test
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
include($$CORE_ROOT_DIR/Common/3dParty/boost/boost.pri)
|
||||
|
||||
@ -54,5 +53,4 @@ core_windows {
|
||||
|
||||
core_linux {
|
||||
LIBS += -lz -pthread -ldl
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ TARGET = ooxml_crypt
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
include($$CORE_ROOT_DIR/Common/3dParty/boost/boost.pri)
|
||||
|
||||
@ -55,5 +54,4 @@ core_windows {
|
||||
|
||||
core_linux {
|
||||
LIBS += -lz -pthread -ldl
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ TEMPLATE = lib
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "PdfWriter.h"
|
||||
|
||||
#ifdef BUILDING_WASM_MODULE
|
||||
CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA) : m_oCommandManager(this) {}
|
||||
CPdfWriter::CPdfWriter(NSFonts::IApplicationFonts* pAppFonts, bool isPDFA, IRenderer* pRenderer) : m_oCommandManager(this) {}
|
||||
CPdfWriter::~CPdfWriter() {}
|
||||
int CPdfWriter::SaveToFile(const std::wstring& wsPath) { return 0; }
|
||||
void CPdfWriter::SetPassword(const std::wstring& wsPassword) {}
|
||||
@ -141,8 +141,8 @@ void CPdfWriter::Sign(const double& dX, const double& dY, const double& dW, cons
|
||||
bool CPdfWriter::DrawImage(Aggplus::CImage* pImage, const double& dX, const double& dY, const double& dW, const double& dH, const BYTE& nAlpha) { return false; }
|
||||
//bool CPdfWriter::DrawText(unsigned char* pCodes, const unsigned int& unLen, const double& dX, const double& dY) { return false; }
|
||||
bool CPdfWriter::PathCommandDrawText(unsigned int* pUnicodes, unsigned int unLen, const double& dX, const double& dY, const unsigned int* pGids) { return false; }
|
||||
void CPdfWriter::UpdateFont() {}
|
||||
void CPdfWriter::GetFontPath(const std::wstring& wsFontName, const bool& bBold, const bool& bItalic, std::wstring& wsFontPath, LONG& lFaceIndex) {}
|
||||
bool CPdfWriter::UpdateFont() { return false; }
|
||||
bool CPdfWriter::GetFontPath(const std::wstring &wsFontName, const bool &bBold, const bool &bItalic, std::wstring& wsFontPath, LONG& lFaceIndex) { return false; }
|
||||
PdfWriter::CFontCidTrueType* CPdfWriter::GetFont(const std::wstring& wsFontPath, const LONG& lFontIndex) { return NULL; }
|
||||
PdfWriter::CFontCidTrueType* CPdfWriter::GetFont(const std::wstring& wsFontName, const bool& bBold, const bool& bItalic) { return NULL; }
|
||||
void CPdfWriter::UpdateTransform() {}
|
||||
|
@ -2,7 +2,6 @@ QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++11
|
||||
#CONFIG += console
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../core
|
||||
|
@ -6,7 +6,6 @@ TEMPLATE = lib
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
@ -1,57 +1,17 @@
|
||||
#-------------------------------------------------
|
||||
#
|
||||
# Project created by QtCreator 2015-07-21T18:28:42
|
||||
#
|
||||
#-------------------------------------------------
|
||||
|
||||
QT -= core
|
||||
QT -= gui
|
||||
|
||||
TARGET = test
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
|
||||
CONFIG -= debug_and_release debug_and_release_target
|
||||
|
||||
CONFIG += c++11
|
||||
TEMPLATE = app
|
||||
|
||||
QMAKE_LFLAGS += -Wl,--rpath=./
|
||||
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
|
||||
|
||||
############### destination path ###############
|
||||
DESTINATION_SDK_PATH = $$PWD/../../SDK/lib
|
||||
CORE_ROOT_DIR = $$PWD/../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../../Common/base.pri)
|
||||
|
||||
# WINDOWS
|
||||
win32:contains(QMAKE_TARGET.arch, x86_64):{
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64/DEBUG
|
||||
} else {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_64
|
||||
}
|
||||
}
|
||||
win32:!contains(QMAKE_TARGET.arch, x86_64):{
|
||||
CONFIG(debug, debug|release) {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32/DEBUG
|
||||
} else {
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/win_32
|
||||
}
|
||||
}
|
||||
ADD_DEPENDENCY(kernel, UnicodeConverter)
|
||||
|
||||
linux-g++:contains(QMAKE_HOST.arch, x86_64):{
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_64
|
||||
#LIBS += -L$$PWD/../icubuilds/linux64/usr/local/lib -licuuc -licudata
|
||||
LIBS += $$PWD/../icubuilds/linux64/usr/local/lib/libicuuc.so.55
|
||||
LIBS += $$PWD/../icubuilds/linux64/usr/local/lib/libicudata.so.55
|
||||
}
|
||||
linux-g++:!contains(QMAKE_HOST.arch, x86_64):{
|
||||
DESTINATION_SDK_PATH = $$DESTINATION_SDK_PATH/linux_32
|
||||
}
|
||||
|
||||
LIBS += -L$$DESTINATION_SDK_PATH -lUnicodeConverter
|
||||
|
||||
SOURCES += main.cpp
|
||||
|
||||
unix {
|
||||
LD_LIBRARY_PATH = ./
|
||||
}
|
||||
SOURCES += main.cpp
|
@ -11,7 +11,6 @@ TARGET = x2t
|
||||
CORE_ROOT_DIR = $$PWD/../../..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
CONFIG += core_x2t
|
||||
CONFIG += core_boost_date_time
|
||||
|
||||
|
@ -19,8 +19,6 @@ build_x2t_as_library {
|
||||
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
}
|
||||
|
||||
include(X2tConverter.pri)
|
||||
|
@ -11,8 +11,6 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
TARGET = x2t_test
|
||||
TEMPLATE = app
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/../../../../../core
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include($$CORE_ROOT_DIR/Common/base.pri)
|
||||
|
@ -7,8 +7,6 @@ TEMPLATE = lib
|
||||
CONFIG += shared
|
||||
CONFIG += plugin
|
||||
|
||||
CONFIG += core_static_link_libstd
|
||||
|
||||
CORE_ROOT_DIR = $$PWD/..
|
||||
PWD_ROOT_DIR = $$PWD
|
||||
include(../Common/base.pri)
|
||||
|
Loading…
x
Reference in New Issue
Block a user