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
if (lLogicalFontHeight < 0.01)
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();
m_pRenderer->put_FontName(wsFaceName);
......
......@@ -294,7 +294,7 @@ class CSvmFile : virtual public IMetaFileBase
TranslatePoint(nX, nY, dX, dY);
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)
......
......@@ -79,8 +79,8 @@ void main()
oFonts.Initialize();
CMetaFile oMetaFile(&oFonts);
//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//Wmf//Test//", c_lMetaWmf);
//ConvertFolder(oMetaFile, L"D://Test Files//Emf//Temp//", c_lMetaEmf);
//_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
//_CrtDumpMemoryLeaks();
......
......@@ -733,7 +733,7 @@ namespace MetaFile
TranslatePoint(nX, nY, dX, dY);
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)
......
......@@ -2,6 +2,8 @@
#ifdef _DEBUG
#pragma comment(lib, "../../../SDK/lib/win_64/DEBUG/graphics.lib")
#pragma comment(lib, "../../../SDK/lib/win_64/DEBUG/ASCOfficeUtilsLib.lib")
#else
#pragma comment(lib, "../../../SDK/lib/win_64/graphics.lib")
#pragma comment(lib, "../../../SDK/lib/win_64/ASCOfficeUtilsLib.lib")
#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