Commit b8fffbf5 authored by Elen.Subbotina's avatar Elen.Subbotina Committed by Alexander Trofimov

DocFormat - bug #31790

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@68598 954022d7-b5bf-4e40-9824-e11837661b57
parent a5bc80a9
...@@ -37,10 +37,11 @@ namespace DocFileFormat ...@@ -37,10 +37,11 @@ namespace DocFileFormat
void TextboxMapping::SetInset (int nLeft, int nTop, int nRight, int nBottom) void TextboxMapping::SetInset (int nLeft, int nTop, int nRight, int nBottom)
{ {
m_ndxTextLeft = nLeft; //emu to pt (1 pt = 12700)
m_ndyTextTop = nTop; m_dxTextLeft = nLeft / 12700.;
m_ndxTextRight = nRight; m_dyTextTop = nTop / 12700.;
m_ndyTextBottom = nBottom; m_dxTextRight = nRight / 12700.;
m_dyTextBottom = nBottom / 12700.;
} }
void TextboxMapping::Apply (IVisitable* visited) void TextboxMapping::Apply (IVisitable* visited)
...@@ -53,13 +54,13 @@ namespace DocFileFormat ...@@ -53,13 +54,13 @@ namespace DocFileFormat
// return; // return;
m_pXmlWriter->WriteNodeBegin(_T("v:textbox"), true); m_pXmlWriter->WriteNodeBegin(_T("v:textbox"), true);
if(m_ndxTextLeft >= 0 && m_ndyTextTop >= 0 && m_ndxTextRight >= 0 && m_ndyTextBottom >= 0) if(m_dxTextLeft >= 0 && m_dyTextTop >= 0 && m_dxTextRight >= 0 && m_dyTextBottom >= 0)
{ {
m_pXmlWriter->WriteAttribute( _T( "inset" ), std_string2string( m_pXmlWriter->WriteAttribute( _T( "inset" ), std_string2string(
FormatUtils::IntToWideString(m_ndxTextLeft) + FormatUtils::DoubleToWideString(m_dxTextLeft) +
_T(",") + FormatUtils::IntToWideString(m_ndyTextTop) + _T("pt,") + FormatUtils::DoubleToWideString(m_dyTextTop) +
_T(",") + FormatUtils::IntToWideString(m_ndxTextRight) + _T("pt,") + FormatUtils::DoubleToWideString(m_dxTextRight) +
_T(",") + FormatUtils::IntToWideString(m_ndyTextBottom))); _T("pt,") + FormatUtils::DoubleToWideString(m_dyTextBottom) + _T("pt")));
} }
if (!m_sTextBoxStyle.empty()) if (!m_sTextBoxStyle.empty())
{ {
......
...@@ -24,10 +24,10 @@ namespace DocFileFormat ...@@ -24,10 +24,10 @@ namespace DocFileFormat
int m_nTBIndex; int m_nTBIndex;
int m_ndxTextLeft; double m_dxTextLeft;
int m_ndyTextTop; double m_dyTextTop;
int m_ndxTextRight; double m_dxTextRight;
int m_ndyTextBottom; double m_dyTextBottom;
std::wstring m_sTextBoxStyle; std::wstring m_sTextBoxStyle;
}; };
......
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