Commit f20a91ec authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander Trofimov

Исправлен баг с чтением Wmf файлов под linux.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@66969 954022d7-b5bf-4e40-9824-e11837661b57
parent 38ee7f2b
...@@ -120,7 +120,7 @@ namespace MetaFile ...@@ -120,7 +120,7 @@ namespace MetaFile
if (lLogicalFontHeight < 0.01) if (lLogicalFontHeight < 0.01)
lLogicalFontHeight = 18; lLogicalFontHeight = 18;
double dFontHeight = abs(lLogicalFontHeight * m_dScaleY * m_pFile->GetPixelHeight() / 25.4 * 72); double dFontHeight = fabs(lLogicalFontHeight * m_dScaleY * m_pFile->GetPixelHeight() / 25.4 * 72);
std::wstring wsFaceName = pFont->GetFaceName(); std::wstring wsFaceName = pFont->GetFaceName();
m_pRenderer->put_FontName(wsFaceName); m_pRenderer->put_FontName(wsFaceName);
......
...@@ -294,7 +294,7 @@ class CSvmFile : virtual public IMetaFileBase ...@@ -294,7 +294,7 @@ class CSvmFile : virtual public IMetaFileBase
TranslatePoint(nX, nY, dX, dY); TranslatePoint(nX, nY, dX, dY);
TranslatePoint(nX + nW, nY + nH, dX1, dY1); TranslatePoint(nX + nW, nY + nH, dX1, dY1);
m_pOutput->DrawBitmap(dX, dY, abs(dX1 - dX), abs(dY1 - dY), pBgra, unWidth, unHeight); m_pOutput->DrawBitmap(dX, dY, fabs(dX1 - dX), fabs(dY1 - dY), pBgra, unWidth, unHeight);
} }
if (pBgra) if (pBgra)
......
...@@ -79,8 +79,8 @@ void main() ...@@ -79,8 +79,8 @@ void main()
oFonts.Initialize(); oFonts.Initialize();
CMetaFile oMetaFile(&oFonts); CMetaFile oMetaFile(&oFonts);
//ConvertFolder(oMetaFile, L"D://Test Files//Wmf//Test//", c_lMetaWmf); ConvertFolder(oMetaFile, L"D://Test Files//Wmf//Test//", c_lMetaWmf);
ConvertFolder(oMetaFile, L"D://Test Files//Emf//Temp//", c_lMetaEmf); //ConvertFolder(oMetaFile, L"D://Test Files//Emf//Temp//", c_lMetaEmf);
//_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); //_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
//_CrtDumpMemoryLeaks(); //_CrtDumpMemoryLeaks();
......
...@@ -733,7 +733,7 @@ namespace MetaFile ...@@ -733,7 +733,7 @@ namespace MetaFile
TranslatePoint(nX, nY, dX, dY); TranslatePoint(nX, nY, dX, dY);
TranslatePoint(nX + nW, nY + nH, dX1, dY1); TranslatePoint(nX + nW, nY + nH, dX1, dY1);
m_pOutput->DrawBitmap(dX, dY, abs(dX1 - dX), abs(dY1 - dY), pBgra, unWidth, unHeight); m_pOutput->DrawBitmap(dX, dY, fabs(dX1 - dX), fabs(dY1 - dY), pBgra, unWidth, unHeight);
} }
if (pBgra) if (pBgra)
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
#ifdef _DEBUG #ifdef _DEBUG
#pragma comment(lib, "../../../SDK/lib/win_64/DEBUG/graphics.lib") #pragma comment(lib, "../../../SDK/lib/win_64/DEBUG/graphics.lib")
#pragma comment(lib, "../../../SDK/lib/win_64/DEBUG/ASCOfficeUtilsLib.lib")
#else #else
#pragma comment(lib, "../../../SDK/lib/win_64/graphics.lib") #pragma comment(lib, "../../../SDK/lib/win_64/graphics.lib")
#pragma comment(lib, "../../../SDK/lib/win_64/ASCOfficeUtilsLib.lib")
#endif #endif
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