Commit 1826c98a authored by ElenaSubbotina's avatar ElenaSubbotina

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

parents b758270c 43abe817
......@@ -1297,7 +1297,18 @@ CString NSPresentationEditor::CShapeWriter::ConvertImage()
m_pImageElement->m_strImageFileName.clear();
m_pImageElement->m_bImagePresent = true;
}
CString strRid;
if (!m_pImageElement->m_strImageFileName.empty())
{
strRid = m_pRels->WriteImage(m_pImageElement->m_strImageFileName);
}
else if (!m_pImageElement->m_sImageName.empty())
{
strRid = m_pRels->WriteHyperlinkImage(CorrectXmlString3(m_pImageElement->m_sImageName));
}
if (strRid.IsEmpty()) return _T("");
m_oWriter.WriteString(std::wstring(L"<p:pic>"));
WriteImageInfo();
......@@ -1313,18 +1324,8 @@ CString NSPresentationEditor::CShapeWriter::ConvertImage()
oInfo.m_lOriginalHeight = (LONG)m_pImageElement->m_rcBoundsOriginal.GetHeight();
m_oWriter.WriteString(std::wstring(L"<p:blipFill>"));
CString strRid;
if (m_pImageElement->m_strImageFileName.empty())
{
strRid = m_pRels->WriteHyperlinkImage(CorrectXmlString3(m_pImageElement->m_sImageName));
}
else
{
strRid = m_pRels->WriteImage(m_pImageElement->m_strImageFileName);
}
CString strWrite = _T("<a:blip r:embed=\"") + strRid + _T("\"/>");
CString strWrite = _T("<a:blip r:embed=\"") + strRid + _T("\"/>");
m_oWriter.WriteString(strWrite);
m_oWriter.WriteString(std::wstring(L"<a:srcRect"));
......
......@@ -247,6 +247,7 @@ public:
case NSPresentationEditor::etPicture:
{
//default -> line = false
pElement->m_oBrush.Type = c_BrushTypeTexture;
pElement->m_bLine = false;
for (long i = 0; i < lCount; ++i)
{
......
......@@ -921,14 +921,10 @@ namespace NSDoctRenderer
NSStringUtils::CStringBuilder oBuilder;
std::wstring _path = path;
std::wstring sDstFileDir = NSCommon::GetDirectoryName(_path);
if (sDstFileDir.find(L"./") == 0)
sDstFileDir = NSFile::GetProcessDirectory() + L"/" + sDstFileDir.substr(2);
if (!NSDirectory::Exists(sDstFileDir))
std::wstring sDstFileDir = NSCommon::GetDirectoryName(_path);
if ((sDstFileDir != _path) && !NSDirectory::Exists(sDstFileDir))
NSDirectory::CreateDirectories(sDstFileDir);
_path = sDstFileDir + L"/" + NSCommon::GetFileName(path);
oBuilder.WriteString(L"<?xml version=\"1.0\" encoding=\"utf-8\"?><TaskQueueDataConvert><m_sFileFrom>");
oBuilder.WriteEncodeXmlString(m_sFileDir);
oBuilder.WriteString(sFileBin + L"</m_sFileFrom><m_sFileTo>");
......
......@@ -105,55 +105,11 @@ protected:
int main(int argc, char *argv[])
{
#if 0
std::vector<std::wstring> arFiles;
#ifdef WIN32
std::wstring sPath = NSFile::GetProcessDirectory() + L"/../../Internal/windows/Release/";
arFiles.push_back(L"file:///C:/Users/oleg.korshul/Desktop/original_message%20(5).html");
std::wstring sDstFolder = L"D:/test/Document";
#else
std::wstring sPath = NSFile::GetProcessDirectory() + L"/../../Internal/linux/Release/";
arFiles.push_back(L"/home/oleg/activex/test.html");
std::wstring sDstFolder = L"/home/oleg/activex/1/";
#endif
CHtmlFile oFile;
int nResult = oFile.Convert(arFiles, sDstFolder, sPath);
nResult;
#else
#ifdef WIN32
std::wstring sPath = NSFile::GetProcessDirectory() + L"/../../Internal/windows/Release/";
//std::wstring sSrc = L"D:\\activex\\1\\1";
std::wstring sSrc = L"\\\\192.168.3.208\\allusers\\Files\\HTML\\AllHTML\\embed.html";
std::wstring sDstFolder = L"D:/test/Document";
#else
std::wstring sPath = NSFile::GetProcessDirectory() + L"/../../Internal/linux/Release/";
std::wstring sSrc = L"/home/oleg/activex/37898EB";
std::wstring sDstFolder = L"/home/oleg/activex/1/";
#endif
#if 1
CHtmlFile oFile;
int nResult = oFile.ConvertMht(L"/home/oleg/activex/1/Яндекс.mht", sDstFolder, sPath);
//int nResult = oFile.ConvertMht(L"\\\\KIRILLOV8\\_Office\\MHT\\Problem_20091016_1927.mht", sDstFolder, sPath);
return 0;
#endif
#if 0
CHtmlFile oFile;
std::wstring sMetaInfo;
//int nResult = oFile.ConvertEpub(sSrc, sMetaInfo, sDstFolder, sPath);
std::vector<std::wstring> arFiles;
arFiles.push_back(sSrc);
int nResult = oFile.Convert(arFiles, sDstFolder, sPath);
nResult;
int nResult = oFile.ConvertEpub(L"D:/1", sMetaInfo, L"D:/test/Document");
return 0;
#else
int nCountTC = 1;
......@@ -170,9 +126,6 @@ int main(int argc, char *argv[])
while (0 != oCounter.GetCounter())
NSThreads::Sleep(100);
#endif
#endif
return 0;
......
......@@ -11,6 +11,8 @@ TARGET = test
CONFIG += console
CONFIG -= app_bundle
CONFIG -= debug_and_release debug_and_release_target
DEFINES += HTMLFILE_USE_DYNAMIC_LIBRARY
DEFINES += UNICODECONVERTER_USE_DYNAMIC_LIBRARY
......@@ -65,6 +67,9 @@ win32 {
LIBS += -ladvapi32 \
-luser32 \
-lshell32
LIBS += -L$$PWD/../../build/bin/icu/win_64/ -licudt
LIBS += -L$$PWD/../../build/bin/icu/win_64/ -licuuc
}
SOURCES += main.cpp
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