Commit a0d32619 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

Bug 30175 - Ошибка в консоли при переоткрытии презентации с определенной темой.

оишбка в mailmerge

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@64387 954022d7-b5bf-4e40-9824-e11837661b57
parent 9356a5c3
#include "BinaryFileReaderWriter.h"
#include "BinaryFileReaderWriter.h"
#include "../../Common/DocxFormat/Source/Base/Nullable.h"
#include "BinReaderWriterDefines.h"
......@@ -123,7 +123,7 @@ namespace NSBinPptxRW
int CImageManager2::IsDisplayedImage(const CString& strInput)
{
int nRes = 0;
// display[N]image.ext
//шаблон display[N]image.ext
CString sFind1 = _T("display");
int nIndex1 = strInput.Find(sFind1);
if(-1 != nIndex1)
......@@ -214,7 +214,7 @@ namespace NSBinPptxRW
if ((_T(".jpg") == strExts) || (_T(".jpeg") == strExts) || (_T(".png") == strExts) || (_T(".emf") == strExts) || (_T(".wmf") == strExts))
{
OOX::CPath pathOutput = m_strDstMedia + FILE_SEPARATOR_STR + strImage + strExts;
//
// теперь нужно скопировать картинку
if (pathOutput.GetPath() != strInput)
CDirectory::CopyFile(strInput, pathOutput.GetPath(), NULL, NULL);
}
......@@ -276,7 +276,9 @@ namespace NSBinPptxRW
int n3 = strFile.Find(_T("ftp"));
int n4 = strFile.Find(_T("https://"));
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
//если nI сранивать не с 0, то будут проблемы
//потому что в инсталяции мы кладем файлы в /var/www...
if (0 == n1 || 0 == n2 || 0 == n3 || 0 == n4)
return true;
return false;
}
......@@ -1089,7 +1091,7 @@ namespace NSBinPptxRW
StartMainRecord(NSBinPptxRW::NSMainTables::FontsEmbedded);
//
// добавим мега шрифт
m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckString(_T(".)abcdefghijklmnopqrstuvwxyz"));
m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckFont(_T("Wingdings 3"), m_pCommon->m_pNativePicker->m_pFontManager);
m_pCommon->m_pNativePicker->m_oEmbeddedFonts.CheckFont(_T("Arial"), m_pCommon->m_pNativePicker->m_pFontManager);
......
#pragma once
#pragma once
#include "math.h"
#include "CalculatorCRC32.h"
......@@ -268,7 +268,9 @@ namespace NSShapeImageGen
int n3 = strFile.Find(_T("ftp"));
int n4 = strFile.Find(_T("https"));
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
//если nI сранивать не с 0, то будут проблемы
//потому что в инсталяции мы кладем файлы в /var/www...
if (0 == n1 || 0 == n2 || 0 == n3 || 0 == n4)
bIsDownload = true;
if (bIsDownload)
......@@ -388,7 +390,7 @@ namespace NSShapeImageGen
}
else
{
// -
//конвертация неудачная - берем оригинальный файл
OOX::CPath pathOriginal = strFileSrc;
CString strSaveItem = oInfo.GetPathWithoutExtension();
......@@ -462,7 +464,7 @@ namespace NSShapeImageGen
std::map<DWORD, CImageInfo>::iterator pPair = m_mapImageData.find(dwSum);
if (m_mapImageData.end() == pPair)
{
//
// нужно добавить
++m_lNextIDImage;
oInfo.m_lID = m_lNextIDImage;
......@@ -536,7 +538,7 @@ namespace NSShapeImageGen
if (metaFileRaster.LoadFromFile(strFileName))
{
// wmf/emf
//случай растрового wmf/emf
CString strSaveItem = strSaveItemWE + _T(".png");
metaFileRaster.ConvertToRaster(strSaveItem, 4 /*CXIMAGE_FORMAT_PNG*/, lWidth, lHeight);
......@@ -569,7 +571,7 @@ namespace NSShapeImageGen
oBgraFrame.put_Stride(pImage->GetStride());
oBgraFrame.put_Data(pImage->GetData());
SaveImage(oBgraFrame, oInfo, lWidth, lHeight);
//
//чтобы в деструкторе не удалялось
oBgraFrame.put_Data(NULL);
m_mapImagesFile.insert(std::pair<CString,CImageInfo>(sMapKey, oInfo));
......
//#include "./stdafx.h"
//#include "./stdafx.h"
#include "FileFactory.h"
#include "DocxFormat/File.h"
......@@ -86,12 +86,12 @@ namespace PPTX
return smart_ptr<PPTX::File>(new PPTX::Video(filename));
else if (relation.type() == PPTX::FileTypes::Media) // FOR NONE OPTIMIZED PPTX FILES
return smart_ptr<PPTX::File>(new PPTX::HyperLink(filename));
else if (relation.type() == PPTX::FileTypes::Data) // filepath
else if (relation.type() == PPTX::FileTypes::Data) // нужен только filepath
return smart_ptr<PPTX::File>(new PPTX::Image(filename));
else if (relation.type() == PPTX::FileTypes::DrawingDiag)
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // filepath
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // нужен только filepath
else if (relation.type() == PPTX::FileTypes::Chart)
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // filepath
return smart_ptr<PPTX::File>(new PPTX::Image(filename)); // нужен только filepath
else if (relation.type() == PPTX::FileTypes::CommentAuthors)
return smart_ptr<PPTX::File>(new PPTX::Authors(filename, map));
else if (relation.type() == PPTX::FileTypes::SlideComments)
......@@ -111,7 +111,9 @@ namespace PPTX
int n3 = strFile.Find(_T("ftp"));
int n4 = strFile.Find(_T("https://"));
if (((n1 >= 0) && (n1 < 10)) || ((n2 >= 0) && (n2 < 10)) || ((n3 >= 0) && (n3 < 10)) || ((n4 >= 0) && (n4 < 10)))
//если nI сранивать не с 0, то будут проблемы
//потому что в инсталяции мы кладем файлы в /var/www...
if (0 == n1 || 0 == n2 || 0 == n3 || 0 == n4)
bIsDownload = true;
OOX::CPath filename = path / relation.filename();
......@@ -140,4 +142,4 @@ namespace PPTX
return smart_ptr<PPTX::File>(new PPTX::UnknowTypeFile());
}
} // namespace PPTX
\ No newline at end of file
} // namespace PPTX
This diff is collapsed.
......@@ -16,12 +16,16 @@ namespace NSSystemPath
static std::wstring GetDirectoryName(const std::wstring& strFileName)
{
std::wstring sRes;
//_wsplitpath return directory path, including trailing slash.
//dirname() returns the string up to, but not including, the final '/',
#if defined(_WIN32) || defined (_WIN64)
wchar_t tDrive[256];
wchar_t tFolder[256];
_wsplitpath( strFileName.c_str(), tDrive, tFolder, NULL, NULL );
sRes.append(tDrive);
sRes.append(tFolder);
if(sRes.length() > 0)
sRes.erase(sRes.length()-1);
#elif __linux__ || MAC
BYTE* pUtf8 = NULL;
LONG lLen = 0;
......
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