Commit 6f757bc8 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

полностью работающая версия

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63650 954022d7-b5bf-4e40-9824-e11837661b57
parent 2b4580eb
......@@ -117,7 +117,7 @@ namespace NSHtmlRenderer
LONG lWidthShape = rect.right - rect.left + 1;
LONG lHeightShape = rect.bottom - rect.top + 1;
pShapePicture = new CBgraFrame();
CBgraFrame* pShapePicture = new CBgraFrame();
pShapePicture->put_Width((int)lWidthShape);
pShapePicture->put_Height((int)lHeightShape);
pShapePicture->put_Stride(4 * ((int)lWidthShape));
......@@ -137,7 +137,7 @@ namespace NSHtmlRenderer
double dW = 25.4 * lWidthShape / 96.0;
double dH = 25.4 * lHeightShape / 96.0;
double dHeightMM = 25.4 * m_lHeight / 96.0;
double dHeightMM = 25.4 * m_lWidthPix / 96.0;
dT = (dHeightMM - dT - dH);
pPage->WriteImage(pShapePicture, dL, dT, dW, dH);
......@@ -705,12 +705,12 @@ namespace NSHtmlRenderer
}
}
BOOL bStroke = (0x01 == (0x01 & nType));
bool bStroke = (0x01 == (0x01 & nType));
if (nPenW == 0 && bStroke)
nPenW = 1;
BOOL bFill = (0x01 < nType);
bool bFill = (0x01 < nType);
bool bIsLine = false;
#ifdef USE_SIMPLE_GRAPHICS_NOSVG
......
......@@ -4,6 +4,11 @@
#include "FontManager.h"
#include "../../../Common/OfficeFileFormats.h"
#ifdef min
#undef min
#endif
#include <algorithm>
namespace NSHtmlRenderer
{
class CHChar
......@@ -630,7 +635,7 @@ namespace NSHtmlRenderer
_dumpMtx[2] = _src->shx;
_dumpMtx[3] = _src->sy;
double dTextScale = min( sqrt( _dumpMtx[2] * _dumpMtx[2] + _dumpMtx[3] * _dumpMtx[3] ), sqrt( _dumpMtx[0] * _dumpMtx[0] + _dumpMtx[1] * _dumpMtx[1] ) );
double dTextScale = std::min( sqrt( _dumpMtx[2] * _dumpMtx[2] + _dumpMtx[3] * _dumpMtx[3] ), sqrt( _dumpMtx[0] * _dumpMtx[0] + _dumpMtx[1] * _dumpMtx[1] ) );
if ((_dumpSize < 0.1 && dTextScale > 10) || (_dumpSize > 10 && dTextScale < 0.1))
{
......
......@@ -2049,7 +2049,7 @@ namespace NSHtmlRenderer
sDstLen += ";";
NSFile::CFileBinary _file;
_file.CreateFile(m_strDstDirectoryFiles + L"/Editor.bin");
_file.CreateFileW(m_strDstDirectoryFiles + L"/Editor.bin");
_file.WriteFile((BYTE*)sDstLen.c_str(), (DWORD)sDstLen.length());
_file.WriteFile((BYTE*)pOutput, (DWORD)nOutputLen);
......@@ -2078,7 +2078,7 @@ namespace NSHtmlRenderer
NSDirectory::CreateDirectory(strFileFonts);
std::wstring strDocRendererS = m_strDstDirectoryFiles + L"/document_temp.bin";
m_oFileWriter.CreateFile(strDocRendererS);
m_oFileWriter.CreateFileW(strDocRendererS);
m_oPage.Clear();
m_arrPages.clear();
......
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