Commit 6e736c48 authored by ElenaSubbotina's avatar ElenaSubbotina

x2t ver. 2.0.2.387

parent 2f6c564e
...@@ -797,10 +797,10 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group) ...@@ -797,10 +797,10 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
bool bSet = false; bool bSet = false;
if (vml) if (vml)
{ {
OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(vml->m_oSpt.GetValue()); if (vml->m_oSpt.IsInit())
if (sptType != OOX::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(vml->m_oSpt->GetValue());
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
bSet = true; bSet = true;
} }
else if ((vml->m_oConnectorType.IsInit()) && (vml->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone)) else if ((vml->m_oConnectorType.IsInit()) && (vml->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone))
...@@ -827,8 +827,9 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group) ...@@ -827,8 +827,9 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
case OOX::et_v_shapetype: case OOX::et_v_shapetype:
{ {
OOX::Vml::CShapeType * vml = static_cast<OOX::Vml::CShapeType*>(vml_group->m_arrItems[i]); OOX::Vml::CShapeType * vml = static_cast<OOX::Vml::CShapeType*>(vml_group->m_arrItems[i]);
OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(vml->m_oSpt.GetValue()); OOX::Vml::SptType sptType = vml->m_oSpt.IsInit() ? static_cast<OOX::Vml::SptType>(vml->m_oSpt->GetValue()) : OOX::Vml::sptNotPrimitive;
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
OoxConverter::convert(vml); OoxConverter::convert(vml);
odf_context()->drawing_context()->end_shape(); odf_context()->drawing_context()->end_shape();
}break; }break;
......
...@@ -2003,7 +2003,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2003,7 +2003,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
} }
else if (oox_pic->m_oShapeType.IsInit()) else if (oox_pic->m_oShapeType.IsInit())
{ {
OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(oox_pic->m_oShapeType->m_oSpt.GetValue()); OOX::Vml::SptType sptType = oox_pic->m_oShapeType->m_oSpt.IsInit() ? static_cast<OOX::Vml::SptType>(oox_pic->m_oShapeType->m_oSpt->GetValue()) : OOX::Vml::sptNotPrimitive;
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
...@@ -2018,8 +2018,8 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2018,8 +2018,8 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
bool bSet = false; bool bSet = false;
if (oox_pic->m_oShape.IsInit()) if (oox_pic->m_oShape.IsInit())
{ {
OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(oox_pic->m_oShape->m_oSpt.GetValue()); OOX::Vml::SptType sptType = oox_pic->m_oShapeType->m_oSpt.IsInit() ? static_cast<OOX::Vml::SptType>(oox_pic->m_oShapeType->m_oSpt->GetValue()) : OOX::Vml::sptNotPrimitive;
if (sptType != OOX::Vml::SptType::sptNotPrimitive) if (sptType != OOX::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
...@@ -2075,8 +2075,9 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj) ...@@ -2075,8 +2075,9 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
bool bSet = false; bool bSet = false;
if (oox_obj->m_oShape.IsInit()) if (oox_obj->m_oShape.IsInit())
{ {
OOX::Vml::SptType sptType = static_cast<OOX::Vml::SptType>(oox_obj->m_oShape->m_oSpt.GetValue()); OOX::Vml::SptType sptType = oox_obj->m_oShapeType->m_oSpt.IsInit() ? static_cast<OOX::Vml::SptType>(oox_obj->m_oShapeType->m_oSpt->GetValue()) : OOX::Vml::sptNotPrimitive;
if (sptType != OOX::Vml::SptType::sptNotPrimitive)
if (sptType != OOX::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + boost::lexical_cast<std::wstring>(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType));
......
...@@ -74,51 +74,51 @@ namespace NSCustomVML ...@@ -74,51 +74,51 @@ namespace NSCustomVML
int Read(WORD value) int Read(WORD value)
{ {
int repeate = 0; int repeate = 0;
if (value >= 0x2000 && value < 0x20FF) if (value >= 0x2000 && value < 0x20FF)
{ {
repeate = value & 0x0FFF; repeate = value & 0x0FFF;
value &= 0xFF00; value &= 0xFF00;
} }
m_nCount = 0; m_nCount = 0;
switch (value) switch (value)
{ {
case 0x0001: // lineto case 0x0001: // lineto
m_eRuler = rtLineTo; m_eRuler = rtLineTo;
m_nCount = 1; m_nCount = 1;
break; break;
case 0x4000: // moveto case 0x4000: // moveto
m_eRuler = rtMoveTo; m_eRuler = rtMoveTo;
m_nCount = 1; m_nCount = 1;
break; break;
case 0x2000: // curveto case 0x2000: // curveto
m_eRuler = rtCurveTo; m_eRuler = rtCurveTo;
m_nCount = 3; m_nCount = 3;
break; break;
case 0xb300: // arcto case 0xb300: // arcto
m_eRuler = rtArc; m_eRuler = rtArc;
m_nCount = 2; m_nCount = 2;
break; break;
case 0xac00: case 0xac00:
case 0xaa00: // nofill case 0xaa00: // nofill
case 0xad00: case 0xad00:
m_eRuler = rtNoFill; m_eRuler = rtNoFill;
break; break;
case 0xab00: // nostroke case 0xab00: // nostroke
m_eRuler = rtNoStroke; m_eRuler = rtNoStroke;
break; break;
case 0x6001: // close case 0x6001: // close
m_eRuler = rtClose; m_eRuler = rtClose;
break; break;
case 0x8000: // end case 0x8000: // end
m_eRuler = rtEnd; m_eRuler = rtEnd;
break; break;
default: // given number of lineto elements default: // given number of lineto elements
m_eRuler = rtLineTo; m_eRuler = rtLineTo;
m_nCount = value; m_nCount = value;
break; break;
} }
return max(1, repeate); return std::max(1, repeate);
} }
void Read(POLE::Stream* pStream) void Read(POLE::Stream* pStream)
{ {
......
...@@ -19,8 +19,12 @@ include(../../../Common/base.pri) ...@@ -19,8 +19,12 @@ include(../../../Common/base.pri)
#BOOST #BOOST
include($$PWD/../../../Common/3dParty/boost/boost.pri) include($$PWD/../../../Common/3dParty/boost/boost.pri)
DEFINES += UNICODE _UNICODE _USE_LIBXML2_READER_ _USE_XMLLITE_READER_ USE_LITE_READER LIBXML_READER_ENABLED DEFINES += UNICODE _UNICODE _USE_LIBXML2_READER_ _USE_XMLLITE_READER_ USE_LITE_READER LIBXML_READER_ENABLED PPT_DEF
INCLUDEPATH += ../../../DesktopEditor/xml/libxml2/include
INCLUDEPATH += \
../../../DesktopEditor/freetype-2.5.2/include \
../../../DesktopEditor/xml/libxml2/include
core_mac { core_mac {
DEFINES += \ DEFINES += \
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
QT -= core QT -= core
QT -= gui QT -= gui
VERSION = 2.0.2.386 VERSION = 2.0.2.387
DEFINES += INTVER=$$VERSION DEFINES += INTVER=$$VERSION
TEMPLATE = app TEMPLATE = app
......
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