Commit 18a96323 authored by ElenaSubbotina's avatar ElenaSubbotina

PPTFormatReader - shape convert fix

parent e3d6d370
......@@ -369,6 +369,14 @@
<File
RelativePath="..\..\..\ASCOfficeDocxFile2\DocWrapper\DocxSerializer.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/bigobj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
......
......@@ -116,42 +116,44 @@ namespace NSGuidesVML
ptValue = 2
};
static LONG GetValue(CString strParam, ParamType& ptType, bool& bRes,
static long GetValue(CString strParam, ParamType& ptType, bool& bRes,
long lShapeWidth = ShapeSizeVML, long lShapeHeight = ShapeSizeVML)
{
ptType = ptValue;
bRes = true;
ptType = ptValue;
bRes = true;
long val = 0;
if ('#' == strParam[0])
{
ptType = ptAdjust;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
val = XmlUtils::GetInteger(strParam.Mid(1));
}
else if ('@' == strParam[0])
{
ptType = ptFormula;
return (LONG)XmlUtils::GetInteger(strParam.Mid(1));
val = XmlUtils::GetInteger(strParam.Mid(1));
}
else if (!NSStringUtils::IsNumber(strParam))
{
if (_T("width") == strParam)
{
return lShapeWidth;
val = lShapeWidth;
}
else if (_T("height") == strParam)
{
return lShapeHeight;
val = lShapeHeight;
}
else if (_T("pixelWidth") == strParam)
{
return lShapeWidth;
val = lShapeWidth;
}
else if (_T("pixelHeight") == strParam)
{
return lShapeHeight;
val = lShapeHeight;
}
else if (_T("pixelLineWidth") == strParam || _T("lineDrawn") == strParam)
{
return 1;
val = 1;
}
else
{
......@@ -162,8 +164,9 @@ namespace NSGuidesVML
else
{
ptType = ptValue;
return (LONG)XmlUtils::GetInteger(strParam);
val = XmlUtils::GetInteger(strParam);
}
return val;
}
static FormulaType GetFormula(CString strName, bool& bRes)
......
......@@ -2669,6 +2669,11 @@ namespace NSGuidesVML
{
if (0 != m_arSlicesPath.size())
{
if ( lValue >= 0x7fffff00 || lValue <= -0x7fffff00)
{
lValue = 0; //process(2).ppt - todooo разобраться что за хрень это ваще приплыла
}
m_arSlicesPath[m_arSlicesPath.size() - 1].AddParam(lValue, eParamType);
}
}
......
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