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

PPTFormatReader правка багов по результатам тестирования

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@65313 954022d7-b5bf-4e40-9824-e11837661b57
parent 776e8a75
......@@ -42,7 +42,7 @@ public:
std::vector<CRecordGroupShape*> oArrayGroupShapes;
oArrayShapes[nIndex]->GetRecordsByType(&oArrayGroupShapes, false, true);
if (0 != oArrayGroupShapes.size())
if ( oArrayGroupShapes.size() > 0 )
{
m_rcGroupBounds.left = oArrayGroupShapes[0]->m_oBounds.left;
m_rcGroupBounds.top = oArrayGroupShapes[0]->m_oBounds.top;
......@@ -52,7 +52,7 @@ public:
std::vector<CRecordClientAnchor*> oArrayClients;
oArrayShapes[nIndex]->GetRecordsByType(&oArrayClients, false, true);
if (0 != oArrayClients.size())
if ( oArrayClients.size() > 0)
{
m_rcGroupClientAnchor.left = (LONG)oArrayClients[0]->m_oBounds.Left;
m_rcGroupClientAnchor.top = (LONG)oArrayClients[0]->m_oBounds.Top;
......@@ -64,7 +64,7 @@ public:
std::vector<CRecordChildAnchor*> oArrayChilds;
oArrayShapes[nIndex]->GetRecordsByType(&oArrayChilds, false, true);
if (0 != oArrayChilds.size())
if ( oArrayChilds.size() > 0)
{
m_rcGroupClientAnchor.left = (LONG)oArrayChilds[0]->m_oBounds.left;
m_rcGroupClientAnchor.top = (LONG)oArrayChilds[0]->m_oBounds.top;
......
......@@ -1610,8 +1610,8 @@ public:
else
{
// ...
pElem->m_rcBoundsOriginal.left = -1;
pElem->m_rcBoundsOriginal.top = -1;
pElem->m_rcBoundsOriginal.left = 0;
pElem->m_rcBoundsOriginal.top = 0;
pElem->m_rcBoundsOriginal.right = 0;
pElem->m_rcBoundsOriginal.bottom = 0;
}
......@@ -1803,12 +1803,20 @@ public:
void RecalcGroupShapeAnchor(CDoubleRect& rcChildAnchor)
{
if ((NULL == m_pGroupBounds) || (NULL == m_pGroupClientAnchor))
{
rcChildAnchor.left = 0;///= dScaleX;
rcChildAnchor.top = 0;//= dScaleY;
rcChildAnchor.bottom = 0;//= dScaleY;
rcChildAnchor.right = 0;//= dScaleX;
return;
}
// ,
long lWidthClient = m_pGroupClientAnchor->right - m_pGroupClientAnchor->left;
long lHeightClient = m_pGroupClientAnchor->bottom - m_pGroupClientAnchor->top;
long lWidthGroup = m_pGroupBounds->right - m_pGroupBounds->left;
long lHeightGroup = m_pGroupBounds->bottom - m_pGroupBounds->top;
......
......@@ -432,8 +432,9 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
str.Format(_T("<a:lnSpc><a:spcPts val=\"%d\"/></a:lnSpc>"), (int)(val* 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
}
else
else if (val < 0 && val > -13200)
{//0 to 13200, inclusive - The value specifies spacing as a percentage of the text line height.
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPct val=\"%d\"/></a:lnSpc>"), -val * 1000);
m_oWriter.WriteString(str);
......@@ -448,7 +449,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
str.Format(_T("<a:spcAft><a:spcPts val=\"%d\"/></a:spcAft>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
}
else if (val < 0)
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcAft><a:spcPct val=\"%d\"/></a:spcAft>"), -val * 1000);
......@@ -464,7 +465,7 @@ void NSPresentationEditor::CShapeWriter::WriteTextInfo()
str.Format(_T("<a:spcBef><a:spcPts val=\"%d\"/></a:spcBef>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
m_oWriter.WriteString(str);
}
else if (val < 0)
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcBef><a:spcPct val=\"%d\"/></a:spcBef>"), -val * 1000);
......@@ -802,7 +803,15 @@ CString NSPresentationEditor::CShapeWriter::ConvertShape()
m_oWriter.WriteString(std::wstring(L"</a:prstGeom>"));
}
#else
if (prstTxWarp.empty())
{
m_oWriter.WriteString(m_pShapeElement->ConvertPPTShapeToPPTX());
}
else
{
//word art
m_oWriter.WriteString(std::wstring(L"<a:prstGeom prst=\"rect\"/>"));
}
#endif
m_oWriter.WriteString(ConvertBrush(m_oBrush));
......
......@@ -189,7 +189,7 @@ public:
str.Format(_T("<a:lnSpc><a:spcPts val=\"%d\"/></a:lnSpc>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
}
else
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:lnSpc><a:spcPct val=\"%d\"/></a:lnSpc>"), -val * 1000);
......@@ -205,7 +205,7 @@ public:
str.Format(_T("<a:spcAft><a:spcPts val=\"%d\"/></a:spcAft>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
}
else if (val < 0)
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcAft><a:spcPct val=\"%d\"/></a:spcAft>"), -val * 1000);
......@@ -221,7 +221,7 @@ public:
str.Format(_T("<a:spcBef><a:spcPts val=\"%d\"/></a:spcBef>"), (int)(val * 0.125 * 100/*/ dKoef1*/));
oWriter.WriteString(str);
}
else if (val < 0)
else if (val < 0 && val > -13200)
{
CString str = _T("");
str.Format(_T("<a:spcBef><a:spcPct val=\"%d\"/></a:spcBef>"), -val * 1000);
......
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