Commit 8532df08 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

полностью работает под линукс

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@63690 954022d7-b5bf-4e40-9824-e11837661b57
parent ba973a9a
......@@ -914,8 +914,8 @@ namespace NSHtmlRenderer
if (nCount > 1)
{
LONG* pWidthBuf = (LONG*)(m_pPageMeta->GetData() + _position);
*pWidthBuf = (LONG)(dWidthLine * 10000);
int* pWidthBuf = (int*)(m_pPageMeta->GetData() + _position);
*pWidthBuf = (int)(dWidthLine * 10000);
}
m_oLine.Clear();
......
......@@ -2011,7 +2011,7 @@ namespace NSHtmlRenderer
oDocInfo.WriteLONG(m_oDstFontGenerator.m_lCountFonts);
LONG lOffset = (6 + 4 * m_lPagesCount) * sizeof(LONG);
LONG lOffset = (6 + 4 * m_lPagesCount) * sizeof(int);
for (LONG i = 0; i < m_lPagesCount; i++)
{
CPageMeta& oMeta = m_arrPages[i];
......
#include <QCoreApplication>
//#include <QCoreApplication>
#include "../../DesktopEditor/fontengine/ApplicationFonts.h"
......@@ -9,7 +9,7 @@
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
//QCoreApplication a(argc, argv);
#if 0
//std::wstring sFile = L"\\\\KIRILLOV8\\_Office\\PDF\\Android intro(2p).pdf";
......@@ -75,5 +75,5 @@ int main(int argc, char *argv[])
oHtmlRenderer.CloseFile();
return a.exec();
return 0;
}
......@@ -4,7 +4,7 @@
#
#-------------------------------------------------
QT += core
QT -= core
QT -= gui
......
......@@ -370,7 +370,7 @@ namespace XPS
std::vector<CWString> arrElements = wsTransform.split(',');
double arrRes[6] ={ 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 };
for (int nIndex = 0, nCount = std::min(6, (int)arrElements.size()); nIndex < nCount; nIndex++)
arrRes[nIndex] = GetDouble(arrElements[nIndex].c_str());
arrRes[nIndex] = GetDouble(arrElements[nIndex]);
pState->PushTransform(arrRes);
return true;
......@@ -835,8 +835,8 @@ namespace XPS
}
else if (L"StrokeMiterLimit" == wsAttrName)
{
CWString wsMiterLimit = oReader.GetText();
dMiter = GetDouble(wsMiterLimit.c_str());
std::wstring wsMiterLimit = oReader.GetText();
dMiter = GetDouble(wsMiterLimit);
}
else if (L"Fill" == wsAttrName)
{
......
......@@ -268,10 +268,10 @@ namespace XPS
}
else if (wsAttrName == L"Opacity")
{
CWString wsOpacity = oReader.GetText();
std::wstring wsOpacity = oReader.GetText();
if (!wsOpacity.empty())
dOpacity = GetDouble(wsOpacity.c_str());
dOpacity = GetDouble(wsOpacity);
}
else if (wsAttrName == L"x:Key" && pwsKey)
{
......@@ -305,10 +305,10 @@ namespace XPS
}
else if (wsAttrName == L"Opacity")
{
CWString wsOpacity = oReader.GetText();
std::wstring wsOpacity = oReader.GetText();
if (!wsOpacity.empty())
dOpacity = GetDouble(wsOpacity.c_str());
dOpacity = GetDouble(wsOpacity);
}
else if (wsAttrName == L"RadiusX")
{
......
......@@ -692,7 +692,8 @@ namespace XPS
}
double GetDouble(const CWString& wsString)
{
return std::stod(wsString.c_str());
std::wstring sTmp(wsString.c_str(), wsString.size());
return std::stod(sTmp);
}
double GetDouble(const std::wstring& wsString)
{
......
......@@ -58,6 +58,7 @@ namespace XPS
bool IsAlpha(wchar_t wChar);
double GetDouble(const CWString& wsString);
double GetDouble(const std::wstring& wsString);
int GetInteger(const std::wstring& wsString);
bool GetBool(const std::wstring& wsString);
......
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