Commit 5c4eb82a authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

баг с цветами htmlrenderer

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@67493 954022d7-b5bf-4e40-9824-e11837661b57
parent 9af45b0d
......@@ -573,7 +573,28 @@ namespace NSStringUtils
}
void AddDouble(double val, int count)
{
// TODO:
std::wstring s = std::to_wstring(val);
if (count != -1)
{
size_t nSize = s.length();
std::wstring::size_type pos1 = s.find(wchar_t('.'));
if (pos1 != std::wstring::npos)
{
size_t nCountNeed = pos1 + 1 + count;
if (nCountNeed < nSize)
s = s.substr(0, nCountNeed);
}
std::wstring::size_type pos2 = s.find(wchar_t(','));
if (pos2 != std::wstring::npos)
{
size_t nCountNeed = pos2 + 1 + count;
if (nCountNeed < nSize)
s = s.substr(0, nCountNeed);
}
}
WriteString(s);
}
inline void WriteHexByteNoSafe(const unsigned char& value)
......
......@@ -971,14 +971,14 @@ namespace NSHtmlRenderer
}
m_oDocument.WriteString(L"<path style=\"fill:", 18);
m_oDocument.WriteHexInt3(m_pBrush->Color1);
m_oDocument.WriteHexColor3(m_pBrush->Color1);
m_oDocument.WriteString(L";fill-opacity:", 14);
m_oDocument.AddDouble((double)m_pBrush->Alpha1 / 255, 2);
if (nType & c_nEvenOddFillMode)
m_oDocument.WriteString(L";fill-rule:evenodd;stroke:", 26);
else
m_oDocument.WriteString(L";fill-rule:nonzero;stroke:", 26);
m_oDocument.WriteHexInt3(m_pPen->Color);
m_oDocument.WriteHexColor3(m_pPen->Color);
m_oDocument.WriteString(L";stroke-width:", 14);
m_oDocument.AddInt(nPenW);
m_oDocument.WriteString(L";stroke-opacity:", 16);
......
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