Commit 63655a97 authored by ElenaSubbotina's avatar ElenaSubbotina

..

parent fdf032d9
...@@ -926,7 +926,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group) ...@@ -926,7 +926,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
if (vml->m_oSpt.IsInit()) if (vml->m_oSpt.IsInit())
{ {
SimpleTypes::Vml::SptType sptType = static_cast<SimpleTypes::Vml::SptType>(vml->m_oSpt->GetValue()); SimpleTypes::Vml::SptType sptType = static_cast<SimpleTypes::Vml::SptType>(vml->m_oSpt->GetValue());
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(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))
...@@ -955,7 +955,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group) ...@@ -955,7 +955,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
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]);
SimpleTypes::Vml::SptType sptType = vml->m_oSpt.IsInit() ? static_cast<SimpleTypes::Vml::SptType>(vml->m_oSpt->GetValue()) : SimpleTypes::Vml::sptNotPrimitive; SimpleTypes::Vml::SptType sptType = vml->m_oSpt.IsInit() ? static_cast<SimpleTypes::Vml::SptType>(vml->m_oSpt->GetValue()) : SimpleTypes::Vml::sptNotPrimitive;
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
OoxConverter::convert(vml); OoxConverter::convert(vml);
odf_context()->drawing_context()->end_shape(); odf_context()->drawing_context()->end_shape();
}break; }break;
......
...@@ -657,12 +657,12 @@ void OoxConverter::convert(OOX::Drawing::CShapeProperties * oox_spPr, OOX::Dra ...@@ -657,12 +657,12 @@ void OoxConverter::convert(OOX::Drawing::CShapeProperties * oox_spPr, OOX::Dra
odf_context()->drawing_context()->start_line_properties(); odf_context()->drawing_context()->start_line_properties();
{ {
if (oox_spPr->m_oLn.IsInit()) if ((oox_sp_style) && (oox_sp_style->m_oLnRef.getType() == OOX::et_a_lnRef))
convert(oox_spPr->m_oLn.GetPointer()); //CLineProperties
else if ((oox_sp_style) && (oox_sp_style->m_oLnRef.getType() == OOX::et_a_lnRef))
{ {
convert(&oox_sp_style->m_oLnRef); convert(&oox_sp_style->m_oLnRef);
} }
if (oox_spPr->m_oLn.IsInit())
convert(oox_spPr->m_oLn.GetPointer()); //CLineProperties
} }
odf_context()->drawing_context()->end_line_properties(); odf_context()->drawing_context()->end_line_properties();
//----------------------------------------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------------------------------------
......
...@@ -2467,7 +2467,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2467,7 +2467,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
SimpleTypes::Vml::SptType sptType = oox_pic->m_oShapeType->m_oSpt.IsInit() ? static_cast<SimpleTypes::Vml::SptType>(oox_pic->m_oShapeType->m_oSpt->GetValue()) : SimpleTypes::Vml::sptNotPrimitive; SimpleTypes::Vml::SptType sptType = oox_pic->m_oShapeType->m_oSpt.IsInit() ? static_cast<SimpleTypes::Vml::SptType>(oox_pic->m_oShapeType->m_oSpt->GetValue()) : SimpleTypes::Vml::sptNotPrimitive;
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
OoxConverter::convert(oox_pic->m_oShape.GetPointer()); OoxConverter::convert(oox_pic->m_oShape.GetPointer());
OoxConverter::convert(oox_pic->m_oShapeType.GetPointer()); OoxConverter::convert(oox_pic->m_oShapeType.GetPointer());
...@@ -2486,7 +2486,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2486,7 +2486,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if (sptType != SimpleTypes::Vml::SptType::sptNotPrimitive) if (sptType != SimpleTypes::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
bSet = true; bSet = true;
} }
else if ((oox_pic->m_oShape->m_oConnectorType.IsInit()) && (oox_pic->m_oShape->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone)) else if ((oox_pic->m_oShape->m_oConnectorType.IsInit()) && (oox_pic->m_oShape->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone))
...@@ -2518,7 +2518,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2518,7 +2518,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if (!bSet && sptType != SimpleTypes::Vml::SptType::sptNotPrimitive) if (!bSet && sptType != SimpleTypes::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
bSet = true; bSet = true;
} }
} }
...@@ -2528,7 +2528,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic) ...@@ -2528,7 +2528,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if (pos >= 0) if (pos >= 0)
{ {
sptType = (SimpleTypes::Vml::SptType)_wtoi(oox_pic->m_oShape->m_sType->substr(pos + 9, oox_pic->m_oShape->m_sType->length() - pos - 9).c_str()); sptType = (SimpleTypes::Vml::SptType)_wtoi(oox_pic->m_oShape->m_sType->substr(pos + 9, oox_pic->m_oShape->m_sType->length() - pos - 9).c_str());
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
bSet = true; bSet = true;
} }
} }
...@@ -2578,7 +2578,7 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj) ...@@ -2578,7 +2578,7 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
if (sptType != SimpleTypes::Vml::SptType::sptNotPrimitive) if (sptType != SimpleTypes::Vml::SptType::sptNotPrimitive)
{ {
odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType)); odf_context()->drawing_context()->set_name(std::wstring (L"Custom") + std::to_wstring(sptType));
odf_context()->drawing_context()->start_shape(OOX::Spt2ShapeType(sptType)); odf_context()->drawing_context()->start_shape(OOX::VmlShapeType2PrstShape(sptType));
bSet = true; bSet = true;
} }
else if ((oox_obj->m_oShape->m_oConnectorType.IsInit()) && (oox_obj->m_oShape->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone)) else if ((oox_obj->m_oShape->m_oConnectorType.IsInit()) && (oox_obj->m_oShape->m_oConnectorType->GetValue() != SimpleTypes::connectortypeNone))
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace OOX namespace OOX
{ {
int static Spt2ShapeType(SimpleTypes::Vml::SptType type) static int VmlShapeType2PrstShape(SimpleTypes::Vml::SptType type)
{ {
switch(type) switch(type)
{ {
...@@ -209,7 +209,7 @@ namespace OOX ...@@ -209,7 +209,7 @@ namespace OOX
//case SimpleTypes::Vml::sptTextInflateTop : return SimpleTypes::shapetypeTextInflateTop ; //case SimpleTypes::Vml::sptTextInflateTop : return SimpleTypes::shapetypeTextInflateTop ;
//case SimpleTypes::Vml::sptTextDeflateTop : return SimpleTypes::shapetypeTextDeflateTop ; //case SimpleTypes::Vml::sptTextDeflateTop : return SimpleTypes::shapetypeTextDeflateTop ;
//case SimpleTypes::Vml::sptTextDeflateInflate : return SimpleTypes::shapetypeTextDeflateInflate ; //case SimpleTypes::Vml::sptTextDeflateInflate : return SimpleTypes::shapetypeTextDeflateInflate ;
//case SimpleTypes::Vml::sptTextDeflateInflateDeflate :return SimpleTypes::shapetypeTextDeflateInflateDeflat ; //case SimpleTypes::Vml::sptTextDeflateInflateDeflate : return SimpleTypes::shapetypeTextDeflateInflateDeflat ;
//case SimpleTypes::Vml::sptTextFadeRight : return SimpleTypes::shapetypeTextFadeRight ; //case SimpleTypes::Vml::sptTextFadeRight : return SimpleTypes::shapetypeTextFadeRight ;
//case SimpleTypes::Vml::sptTextFadeLeft : return SimpleTypes::shapetypeTextFadeLeft ; //case SimpleTypes::Vml::sptTextFadeLeft : return SimpleTypes::shapetypeTextFadeLeft ;
//case SimpleTypes::Vml::sptTextFadeUp : return SimpleTypes::shapetypeTextFadeUp ; //case SimpleTypes::Vml::sptTextFadeUp : return SimpleTypes::shapetypeTextFadeUp ;
...@@ -219,8 +219,8 @@ namespace OOX ...@@ -219,8 +219,8 @@ namespace OOX
case SimpleTypes::Vml::sptTextCanUp : return SimpleTypes::textshapetypeTextCanUp +2001; case SimpleTypes::Vml::sptTextCanUp : return SimpleTypes::textshapetypeTextCanUp +2001;
case SimpleTypes::Vml::sptTextCanDown : return SimpleTypes::textshapetypeTextCanDown +2001; case SimpleTypes::Vml::sptTextCanDown : return SimpleTypes::textshapetypeTextCanDown +2001;
case SimpleTypes::Vml::sptFlowChartAlternateProcess :return SimpleTypes::shapetypeFlowChartAlternateProcess ; case SimpleTypes::Vml::sptFlowChartAlternateProcess : return SimpleTypes::shapetypeFlowChartAlternateProcess ;
case SimpleTypes::Vml::sptFlowChartOffpageConnector :return SimpleTypes::shapetypeFlowChartOffpageConnector ; case SimpleTypes::Vml::sptFlowChartOffpageConnector : return SimpleTypes::shapetypeFlowChartOffpageConnector ;
case SimpleTypes::Vml::sptCallout90 : return SimpleTypes::shapetypeCallout1 ; case SimpleTypes::Vml::sptCallout90 : return SimpleTypes::shapetypeCallout1 ;
case SimpleTypes::Vml::sptAccentCallout90 : return SimpleTypes::shapetypeAccentCallout1 ; case SimpleTypes::Vml::sptAccentCallout90 : return SimpleTypes::shapetypeAccentCallout1 ;
case SimpleTypes::Vml::sptBorderCallout90 : return SimpleTypes::shapetypeBorderCallout1; case SimpleTypes::Vml::sptBorderCallout90 : return SimpleTypes::shapetypeBorderCallout1;
......
This diff is collapsed.
...@@ -874,20 +874,20 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap ...@@ -874,20 +874,20 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
oOutputParagraph.AddItem( pNewChar ); oOutputParagraph.AddItem( pNewChar );
}break; }break;
case OOX::et_mc_alternateContent: case OOX::et_mc_alternateContent:
{//выбираем всегда более старую версию {
OOX::Logic::CAlternateContent *ooxAlt = dynamic_cast<OOX::Logic::CAlternateContent* >(ooxItem); OOX::Logic::CAlternateContent *ooxAlt = dynamic_cast<OOX::Logic::CAlternateContent* >(ooxItem);
if (!ooxAlt->m_arrChoiceItems.empty()) if (!ooxAlt->m_arrChoiceItems.empty())
{ {
for (size_t i = 0; i < ooxAlt->m_arrFallbackItems.size(); i++) for (size_t i = 0; i < ooxAlt->m_arrChoiceItems.size(); i++)
{ {
Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrFallbackItems[i]); Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrChoiceItems[i]);
} }
} }
else else
{ {
for (size_t i = 0; i < ooxAlt->m_arrChoiceItems.size(); i++) for (size_t i = 0; i < ooxAlt->m_arrFallbackItems.size(); i++)
{ {
Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrChoiceItems[i]); Parse(oParam , oOutputParagraph, poStyle, oNewProperty, ooxAlt->m_arrFallbackItems[i]);
} }
} }
}break; }break;
......
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