Commit 503f6b01 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander Trofimov

(2.0.0.249): ASCOfficeDocxFile2

Bug 27824 - [Docx] После выгрузки документа Word 2013 не открывает документ.

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@59996 954022d7-b5bf-4e40-9824-e11837661b57
parent b5c4fea9
...@@ -870,23 +870,23 @@ public: ...@@ -870,23 +870,23 @@ public:
__int64 nY = (__int64)(g_dKoef_mm_to_emu * Y); __int64 nY = (__int64)(g_dKoef_mm_to_emu * Y);
__int64 nWidth = (__int64)(g_dKoef_mm_to_emu * Width); __int64 nWidth = (__int64)(g_dKoef_mm_to_emu * Width);
__int64 nHeight = (__int64)(g_dKoef_mm_to_emu * Height); __int64 nHeight = (__int64)(g_dKoef_mm_to_emu * Height);
__int64 nPaddingLeft = 0; unsigned long nPaddingLeft = 0;
__int64 nPaddingTop = 0; unsigned long nPaddingTop = 0;
__int64 nPaddingRight = 0; unsigned long nPaddingRight = 0;
__int64 nPaddingBottom = 0; unsigned long nPaddingBottom = 0;
if(bPaddings) if(bPaddings)
{ {
if(Paddings.bLeft) if(Paddings.bLeft)
nPaddingLeft = (__int64)(g_dKoef_mm_to_emu * Paddings.Left); nPaddingLeft = (unsigned long)(g_dKoef_mm_to_emu * Paddings.Left);
if(Paddings.bTop) if(Paddings.bTop)
nPaddingTop = (__int64)(g_dKoef_mm_to_emu * Paddings.Top); nPaddingTop = (unsigned long)(g_dKoef_mm_to_emu * Paddings.Top);
if(Paddings.bRight) if(Paddings.bRight)
nPaddingRight = (__int64)(g_dKoef_mm_to_emu * Paddings.Right); nPaddingRight = (unsigned long)(g_dKoef_mm_to_emu * Paddings.Right);
if(Paddings.bBottom) if(Paddings.bBottom)
nPaddingBottom = (__int64)(g_dKoef_mm_to_emu * Paddings.Bottom); nPaddingBottom = (unsigned long)(g_dKoef_mm_to_emu * Paddings.Bottom);
} }
CString sDrawing; CString sDrawing;
sDrawing.Format(_T("<w:drawing><wp:anchor distT=\"%I64d\" distB=\"%I64d\" distL=\"%I64d\" distR=\"%I64d\" simplePos=\"0\" relativeHeight=\"1\" behindDoc=\"0\" locked=\"0\" layoutInCell=\"1\" allowOverlap=\"1\"><wp:simplePos x=\"0\" y=\"0\"/><wp:positionH relativeFrom=\"page\"><wp:posOffset>%I64d</wp:posOffset></wp:positionH><wp:positionV relativeFrom=\"page\"><wp:posOffset>%I64d</wp:posOffset></wp:positionV><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:effectExtent l=\"0\" t=\"0\" r=\"0\" b=\"0\"/><wp:wrapSquare wrapText=\"bothSides\"/><wp:docPr id=\"%d\" name=\"Image\"/><wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" noChangeAspect=\"1\"/></wp:cNvGraphicFramePr><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\"><pic:pic xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\"><pic:nvPicPr><pic:cNvPr id=\"0\" name=\"Image\"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed=\"%s\"><a:extLst><a:ext uri=\"{28A0092B-C50C-407E-A947-70E740481C1C}\"><a14:useLocalDpi xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" val=\"0\"/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"%I64d\" cy=\"%I64d\"/></a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:anchor></w:drawing>"), nPaddingTop, nPaddingBottom, nPaddingLeft, nPaddingRight, nX, nY, nWidth, nHeight, m_nDocPr, srId, nWidth, nHeight); sDrawing.Format(_T("<w:drawing><wp:anchor distT=\"%lu\" distB=\"%lu\" distL=\"%lu\" distR=\"%lu\" simplePos=\"0\" relativeHeight=\"1\" behindDoc=\"0\" locked=\"0\" layoutInCell=\"1\" allowOverlap=\"1\"><wp:simplePos x=\"0\" y=\"0\"/><wp:positionH relativeFrom=\"page\"><wp:posOffset>%I64d</wp:posOffset></wp:positionH><wp:positionV relativeFrom=\"page\"><wp:posOffset>%I64d</wp:posOffset></wp:positionV><wp:extent cx=\"%I64d\" cy=\"%I64d\"/><wp:effectExtent l=\"0\" t=\"0\" r=\"0\" b=\"0\"/><wp:wrapSquare wrapText=\"bothSides\"/><wp:docPr id=\"%d\" name=\"Image\"/><wp:cNvGraphicFramePr><a:graphicFrameLocks xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" noChangeAspect=\"1\"/></wp:cNvGraphicFramePr><a:graphic xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\"><a:graphicData uri=\"http://schemas.openxmlformats.org/drawingml/2006/picture\"><pic:pic xmlns:pic=\"http://schemas.openxmlformats.org/drawingml/2006/picture\"><pic:nvPicPr><pic:cNvPr id=\"0\" name=\"Image\"/><pic:cNvPicPr/></pic:nvPicPr><pic:blipFill><a:blip r:embed=\"%s\"><a:extLst><a:ext uri=\"{28A0092B-C50C-407E-A947-70E740481C1C}\"><a14:useLocalDpi xmlns:a14=\"http://schemas.microsoft.com/office/drawing/2010/main\" val=\"0\"/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></pic:blipFill><pic:spPr><a:xfrm><a:off x=\"0\" y=\"0\"/><a:ext cx=\"%I64d\" cy=\"%I64d\"/></a:xfrm><a:prstGeom prst=\"rect\"><a:avLst/></a:prstGeom></pic:spPr></pic:pic></a:graphicData></a:graphic></wp:anchor></w:drawing>"), nPaddingTop, nPaddingBottom, nPaddingLeft, nPaddingRight, nX, nY, nWidth, nHeight, m_nDocPr, srId, nWidth, nHeight);
pCStringWriter->WriteString(sDrawing); pCStringWriter->WriteString(sDrawing);
} }
} }
...@@ -1928,19 +1928,19 @@ public: ...@@ -1928,19 +1928,19 @@ public:
{ {
if(bWidth && bHeight && ((bPositionHRelativeFrom && (bPositionHAlign || bPositionHPosOffset) && bPositionVRelativeFrom && (bPositionVAlign || bPositionVPosOffset)) || (bBSimplePos && bSimplePosX && bSimplePosY))) if(bWidth && bHeight && ((bPositionHRelativeFrom && (bPositionHAlign || bPositionHPosOffset) && bPositionVRelativeFrom && (bPositionVAlign || bPositionVPosOffset)) || (bBSimplePos && bSimplePosX && bSimplePosY)))
{ {
__int64 emuDistL = 0; unsigned long emuDistL = 0;
__int64 emuDistT = 0; unsigned long emuDistT = 0;
__int64 emuDistR = 0; unsigned long emuDistR = 0;
__int64 emuDistB = 0; unsigned long emuDistB = 0;
if(bDistL) if(bDistL)
emuDistL = (__int64)(g_dKoef_mm_to_emu * DistL); emuDistL = (unsigned long)(g_dKoef_mm_to_emu * DistL);
if(bDistT) if(bDistT)
emuDistT = (__int64)(g_dKoef_mm_to_emu * DistT); emuDistT = (unsigned long)(g_dKoef_mm_to_emu * DistT);
if(bDistR) if(bDistR)
emuDistR = (__int64)(g_dKoef_mm_to_emu * DistR); emuDistR = (unsigned long)(g_dKoef_mm_to_emu * DistR);
if(bDistB) if(bDistB)
emuDistB = (__int64)(g_dKoef_mm_to_emu * DistB); emuDistB = (unsigned long)(g_dKoef_mm_to_emu * DistB);
int nSimplePos = 0; int nSimplePos = 0;
if(bBSimplePos && BSimplePos) if(bBSimplePos && BSimplePos)
nSimplePos = 1; nSimplePos = 1;
...@@ -1957,7 +1957,7 @@ public: ...@@ -1957,7 +1957,7 @@ public:
if(bChart) if(bChart)
sXml.Append(_T("<w:drawing>")); sXml.Append(_T("<w:drawing>"));
sXml.AppendFormat(_T("<wp:anchor xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" distT=\"%I64d\" distB=\"%I64d\" distL=\"%I64d\" distR=\"%I64d\" simplePos=\"%d\" relativeHeight=\"%lu\" behindDoc=\"%d\" locked=\"0\" layoutInCell=\"%d\" allowOverlap=\"1\">"), emuDistT, emuDistB, emuDistL, emuDistR, nSimplePos, nRelativeHeight, nBehindDoc, nLayoutInCell); sXml.AppendFormat(_T("<wp:anchor xmlns:wp=\"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing\" distT=\"%lu\" distB=\"%lu\" distL=\"%lu\" distR=\"%lu\" simplePos=\"%d\" relativeHeight=\"%lu\" behindDoc=\"%d\" locked=\"0\" layoutInCell=\"%d\" allowOverlap=\"1\">"), emuDistT, emuDistB, emuDistL, emuDistR, nSimplePos, nRelativeHeight, nBehindDoc, nLayoutInCell);
__int64 emuX = 0; __int64 emuX = 0;
if(bSimplePosX) if(bSimplePosX)
emuX = (__int64)(g_dKoef_mm_to_emu * SimplePosX); emuX = (__int64)(g_dKoef_mm_to_emu * SimplePosX);
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
//2 //2
//0 //0
//0 //0
//248 //249
#define INTVER 2,0,0,248 #define INTVER 2,0,0,249
#define STRVER "2,0,0,248\0" #define STRVER "2,0,0,249\0"
...@@ -1995,26 +1995,26 @@ CString CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, PPTX:: ...@@ -1995,26 +1995,26 @@ CString CDrawingConverter::GetDrawingMainProps(XmlUtils::CXmlNode& oNode, PPTX::
height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second)) - top; height = (LONG)(dKoefSize * parserPoint.FromString(pPair->second)) - top;
} }
LONG margL = (LONG)(9 * dKoef); unsigned long margL = (unsigned long)(9 * dKoef);
LONG margT = 0; unsigned long margT = 0;
LONG margR = (LONG)(9 * dKoef); unsigned long margR = (unsigned long)(9 * dKoef);
LONG margB = 0; unsigned long margB = 0;
pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-left")); pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-left"));
if (oCssStyles.m_mapSettings.end() != pPair) if (oCssStyles.m_mapSettings.end() != pPair)
margL = (LONG)(dKoef * parserPoint.FromString(pPair->second)); margL = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-top")); pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-top"));
if (oCssStyles.m_mapSettings.end() != pPair) if (oCssStyles.m_mapSettings.end() != pPair)
margT = (LONG)(dKoef * parserPoint.FromString(pPair->second)); margT = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-right")); pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-right"));
if (oCssStyles.m_mapSettings.end() != pPair) if (oCssStyles.m_mapSettings.end() != pPair)
margR = (LONG)(dKoef * parserPoint.FromString(pPair->second)); margR = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-bottom")); pPair = oCssStyles.m_mapSettings.find(_T("mso-wrap-distance-bottom"));
if (oCssStyles.m_mapSettings.end() != pPair) if (oCssStyles.m_mapSettings.end() != pPair)
margB = (LONG)(dKoef * parserPoint.FromString(pPair->second)); margB = (unsigned long)(dKoef * parserPoint.FromString(pPair->second));
oProps.X = left; oProps.X = left;
oProps.Y = top; oProps.Y = top;
......
...@@ -416,6 +416,7 @@ namespace NSBinPptxRW ...@@ -416,6 +416,7 @@ namespace NSBinPptxRW
} }
void CBinaryFileWriter::WriteDouble(const double& dValue) void CBinaryFileWriter::WriteDouble(const double& dValue)
{ {
//todo dValue , long
long _val = (long)(dValue * 100000); long _val = (long)(dValue * 100000);
WriteLONG(_val); WriteLONG(_val);
} }
......
...@@ -6059,7 +6059,7 @@ namespace SimpleTypes ...@@ -6059,7 +6059,7 @@ namespace SimpleTypes
virtual __int64 FromString(CString &sValue) virtual __int64 FromString(CString &sValue)
{ {
this->m_eValue = _wtoi( sValue ); this->m_eValue = wcstoul( sValue, NULL, 10 );
return this->m_eValue; return this->m_eValue;
} }
...@@ -6067,7 +6067,7 @@ namespace SimpleTypes ...@@ -6067,7 +6067,7 @@ namespace SimpleTypes
virtual CString ToString () const virtual CString ToString () const
{ {
CString sResult; CString sResult;
sResult.Format( _T("%d"), this->m_eValue); sResult.Format( _T("%lu"), this->m_eValue);
return sResult; return sResult;
} }
......
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