Commit cff6f305 authored by ElenaSubbotina's avatar ElenaSubbotina

Merge branch 'develop' of https://github.com/ONLYOFFICE/core into develop

parents 50600712 d64109ea
......@@ -553,7 +553,7 @@ namespace PPTX
std::wstring strFillNode;
std::wstring strStrokeNode;;
CalculateFill(spPr, style, oTheme, oClrMap, strFillAttr, strFillNode, bOle);
CalculateFill(spPr, style, oTheme, oClrMap, strFillAttr, strFillNode, bOle, bSignature);
CalculateLine(spPr, style, oTheme, oClrMap, strStrokeAttr, strStrokeNode, bOle, bSignature);
pWriter->StartNode(L"v:shape");
......
......@@ -59,7 +59,7 @@ namespace PPTX
}
void CalculateFill(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, NSCommon::smart_ptr<PPTX::Theme>& oTheme,
NSCommon::smart_ptr<PPTX::Logic::ClrMap>& oClrMap, std::wstring& strAttr, std::wstring& strNode, bool bOle)
NSCommon::smart_ptr<PPTX::Logic::ClrMap>& oClrMap, std::wstring& strAttr, std::wstring& strNode, bool bOle, bool bSignature)
{
PPTX::Logic::UniFill fill;
DWORD ARGB = 0;
......@@ -113,7 +113,7 @@ namespace PPTX
std::wstring strId = oBlip.blip->embed->ToString();
if(bOle)
if (bOle || bSignature)
{
strAttr = _T(" filled=\"f\"");
strNode = _T("<v:imagedata r:id=\"") + strId + _T("\" o:title=\"\" />");
......
......@@ -44,7 +44,7 @@ namespace PPTX
namespace Logic
{
void CalculateFill(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle, smart_ptr<PPTX::Theme>& oTheme,
smart_ptr<PPTX::Logic::ClrMap>& oClrMap, std::wstring& strAttr, std::wstring& strNode, bool bOle = false);
smart_ptr<PPTX::Logic::ClrMap>& oClrMap, std::wstring& strAttr, std::wstring& strNode, bool bOle = false, bool bSignature = false);
void CalculateLine(PPTX::Logic::SpPr& oSpPr, nullable<ShapeStyle>& pShapeStyle,
smart_ptr<PPTX::Theme>& oTheme, smart_ptr<PPTX::Logic::ClrMap>& oClrMap, std::wstring& strAttr, std::wstring& strNode, bool bOle = false, bool bSignature = false);
......
......@@ -77,6 +77,11 @@ public:
std::wstring GetImageBase64(const std::wstring& file)
{
if (0 == file.find(L"data:image/"))
{
return file.substr(file.find(L",") + 1);
}
BYTE* pData = NULL;
DWORD dwLen = 0;
if (!NSFile::CFileBinary::ReadAllBytes(file, &pData, dwLen))
......@@ -97,6 +102,8 @@ public:
std::wstring GetRelsReference(const std::wstring& file)
{
COOXMLRelationships oRels(m_sFolder + file, true);
if (oRels.rels.size() == 0)
return L"";
if (L"/_rels/.rels" == file)
{
......
......@@ -487,7 +487,11 @@ namespace NExtractTools
}
else if(_T("m_nCsvDelimiterChar") == sName)
{
m_sCsvDelimiterChar = new std::wstring(L"");
std::wstring sNil;
if (!oXmlNode.GetAttributeIfExist(L"xsi:nil", sNil))
{
m_sCsvDelimiterChar = new std::wstring(L"");
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment