Commit 3c7d9162 authored by ElenaSubbotina's avatar ElenaSubbotina

WordArt multiline from doc.

parent 9d45c373
...@@ -224,6 +224,8 @@ namespace DocFileFormat ...@@ -224,6 +224,8 @@ namespace DocFileFormat
ChildAnchor* pAnchor = pContainer->FirstChildWithType<ChildAnchor>(); ChildAnchor* pAnchor = pContainer->FirstChildWithType<ChildAnchor>();
ClientAnchor* clientAnchor = pContainer->FirstChildWithType<ClientAnchor>(); ClientAnchor* clientAnchor = pContainer->FirstChildWithType<ClientAnchor>();
XMLTools::XMLElement<wchar_t> *pMultiTextPath = NULL;
WriteBeginShapeNode (pShape); WriteBeginShapeNode (pShape);
m_pXmlWriter->WriteAttribute ( _T( "id"), GetShapeID(pShape).c_str()); m_pXmlWriter->WriteAttribute ( _T( "id"), GetShapeID(pShape).c_str());
...@@ -303,7 +305,6 @@ namespace DocFileFormat ...@@ -303,7 +305,6 @@ namespace DocFileFormat
} }
} }
break; break;
case fillStyleBooleanProperties: case fillStyleBooleanProperties:
{ {
FillStyleBooleanProperties booleans(iter->op); FillStyleBooleanProperties booleans(iter->op);
...@@ -311,9 +312,7 @@ namespace DocFileFormat ...@@ -311,9 +312,7 @@ namespace DocFileFormat
{ {
filled = false; filled = false;
} }
} }break;
break;
case lineStyleBooleans: case lineStyleBooleans:
{ {
LineStyleBooleanProperties booleans(iter->op); LineStyleBooleanProperties booleans(iter->op);
...@@ -366,44 +365,32 @@ namespace DocFileFormat ...@@ -366,44 +365,32 @@ namespace DocFileFormat
{ {
adjValues[2] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[2] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,3); nAdjValues = (std::max)(nAdjValues,3);
} }break;
break;
case adjust4Value: case adjust4Value:
{ {
adjValues[3] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[3] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,4); nAdjValues = (std::max)(nAdjValues,4);
} }break;
break;
case adjust5Value: case adjust5Value:
{ {
adjValues[4] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[4] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,5); nAdjValues = (std::max)(nAdjValues,5);
} }break;
break;
case adjust6Value: case adjust6Value:
{ {
adjValues[5] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[5] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,6); nAdjValues = (std::max)(nAdjValues,6);
} }break;
break;
case adjust7Value: case adjust7Value:
{ {
adjValues[6] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[6] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,7); nAdjValues = (std::max)(nAdjValues,7);
} }break;
break;
case adjust8Value: case adjust8Value:
{ {
adjValues[7] = FormatUtils::IntToWideString( (int)iter->op ); adjValues[7] = FormatUtils::IntToWideString( (int)iter->op );
nAdjValues = (std::max)(nAdjValues,8); nAdjValues = (std::max)(nAdjValues,8);
} }break;
break;
case pWrapPolygonVertices: case pWrapPolygonVertices:
{ {
std::wstring wrapCoords = getWrapCoords(*iter); std::wstring wrapCoords = getWrapCoords(*iter);
...@@ -412,144 +399,98 @@ namespace DocFileFormat ...@@ -412,144 +399,98 @@ namespace DocFileFormat
{ {
m_pXmlWriter->WriteAttribute( _T( "wrapcoords" ), wrapCoords.c_str() ); m_pXmlWriter->WriteAttribute( _T( "wrapcoords" ), wrapCoords.c_str() );
} }
} }break;
break;
case geoRight: case geoRight:
{ {
xCoord = iter->op; xCoord = iter->op;
} }break;
break;
case geoBottom: case geoBottom:
{ {
yCoord = iter->op; yCoord = iter->op;
} }break;
break;
case pGuides: case pGuides:
{ {
} }break;
break;
case pInscribe: case pInscribe:
{ {
arrInscribe = GetTextRectangles(*iter); arrInscribe = GetTextRectangles(*iter);
} }break;
break; // OUTLINE
// OUTLINE
case lineColor: case lineColor:
{ {
RGBColor lineColor((int)iter->op, RedFirst); RGBColor lineColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute( _T("strokecolor"), (std::wstring(_T("#")) + lineColor.SixDigitHexCode).c_str()); m_pXmlWriter->WriteAttribute( _T("strokecolor"), (std::wstring(_T("#")) + lineColor.SixDigitHexCode).c_str());
} }break;
break;
case lineWidth: case lineWidth:
{ {
EmuValue eLineWidth ((int)iter->op ); EmuValue eLineWidth ((int)iter->op );
CString sWidth; sWidth.Format(_T("%fpt"), eLineWidth.ToPoints()); CString sWidth; sWidth.Format(_T("%fpt"), eLineWidth.ToPoints());
m_pXmlWriter->WriteAttribute(_T("strokeweight"), sWidth); m_pXmlWriter->WriteAttribute(_T("strokeweight"), sWidth);
} }break;
break;
case lineDashing: case lineDashing:
{ {
appendValueAttribute(&m_stroke, _T( "dashstyle" ), FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ).c_str() ); appendValueAttribute(&m_stroke, _T( "dashstyle" ), FormatUtils::MapValueToWideString( iter->op, &Global::DashStyleMap[0][0], 11, 16 ).c_str() );
} }break;
break;
case lineStyle: case lineStyle:
{ {
appendValueAttribute(&m_stroke, _T( "linestyle" ), getLineStyle( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "linestyle" ), getLineStyle( iter->op ).c_str());
} }break;
break;
case lineEndArrowhead: case lineEndArrowhead:
{ {
appendValueAttribute(&m_stroke, _T( "endarrow" ), getArrowStyle( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "endarrow" ), getArrowStyle( iter->op ).c_str());
} }break;
break;
case lineEndArrowLength: case lineEndArrowLength:
{ {
appendValueAttribute(&m_stroke, _T( "endarrowlength" ), getArrowLength( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "endarrowlength" ), getArrowLength( iter->op ).c_str());
} }break;
break;
case lineEndArrowWidth: case lineEndArrowWidth:
{ {
appendValueAttribute(&m_stroke, _T( "endarrowwidth" ), getArrowWidth( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "endarrowwidth" ), getArrowWidth( iter->op ).c_str());
} }break;
break;
case lineStartArrowhead: case lineStartArrowhead:
{ {
appendValueAttribute(&m_stroke, _T( "startarrow" ), getArrowStyle( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "startarrow" ), getArrowStyle( iter->op ).c_str());
} }break;
break;
case lineStartArrowLength: case lineStartArrowLength:
{ {
appendValueAttribute(&m_stroke, _T( "startarrowlength" ), getArrowLength( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "startarrowlength" ), getArrowLength( iter->op ).c_str());
} }break;
break;
case lineStartArrowWidth: case lineStartArrowWidth:
{ {
appendValueAttribute(&m_stroke, _T( "startarrowwidth" ), getArrowWidth( iter->op ).c_str()); appendValueAttribute(&m_stroke, _T( "startarrowwidth" ), getArrowWidth( iter->op ).c_str());
} }break;
break; // FILL
// FILL
case fillColor: case fillColor:
{ {
RGBColor fillColor((int)iter->op, RedFirst); RGBColor fillColor((int)iter->op, RedFirst);
m_pXmlWriter->WriteAttribute(_T( "fillcolor" ), ( std::wstring( _T( "#" ) ) + fillColor.SixDigitHexCode ).c_str()); m_pXmlWriter->WriteAttribute(_T( "fillcolor" ), ( std::wstring( _T( "#" ) ) + fillColor.SixDigitHexCode ).c_str());
} }break;
break;
case fillBackColor: case fillBackColor:
{ {
RGBColor fillBackColor( (int)iter->op, RedFirst ); RGBColor fillBackColor( (int)iter->op, RedFirst );
appendValueAttribute(&m_fill, _T( "color2" ), ( std::wstring( _T( "#" ) ) + fillBackColor.SixDigitHexCode ).c_str()); appendValueAttribute(&m_fill, _T( "color2" ), ( std::wstring( _T( "#" ) ) + fillBackColor.SixDigitHexCode ).c_str());
} }break;
break;
case fillAngle: case fillAngle:
{ {
FixedPointNumber fllAngl( iter->op ); FixedPointNumber fllAngl( iter->op );
appendValueAttribute(&m_fill, _T( "angle" ), FormatUtils::DoubleToWideString( fllAngl.ToAngle() ).c_str()); appendValueAttribute(&m_fill, _T( "angle" ), FormatUtils::DoubleToWideString( fllAngl.ToAngle() ).c_str());
} }break;
break;
case fillShadeType: case fillShadeType:
{ {
appendValueAttribute(&m_fill, _T( "method" ), getFillMethod( iter->op ).c_str()); appendValueAttribute(&m_fill, _T( "method" ), getFillMethod( iter->op ).c_str());
} }break;
break;
case fillShadeColors: case fillShadeColors:
{ {
appendValueAttribute(&m_fill, _T( "colors" ), getFillColorString( iter->opComplex, iter->op ).c_str()); appendValueAttribute(&m_fill, _T( "colors" ), getFillColorString( iter->opComplex, iter->op ).c_str());
} }break;
break;
case fillFocus: case fillFocus:
{ {
appendValueAttribute(&m_fill, _T( "focus" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "%" ) ).c_str()); appendValueAttribute(&m_fill, _T( "focus" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "%" ) ).c_str());
} }break;
break;
case fillType: case fillType:
{ {
appendValueAttribute(&m_fill, _T( "type" ), getFillType( iter->op ).c_str()); appendValueAttribute(&m_fill, _T( "type" ), getFillType( iter->op ).c_str());
} }break;
break;
case fillBlip: case fillBlip:
{ {
BlipStoreEntry* pFillBlip = NULL; BlipStoreEntry* pFillBlip = NULL;
...@@ -569,9 +510,7 @@ namespace DocFileFormat ...@@ -569,9 +510,7 @@ namespace DocFileFormat
appendValueAttribute(&m_fill, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str()); appendValueAttribute(&m_fill, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
appendValueAttribute(&m_imagedata, _T( "o:title" ), _T( "" )); appendValueAttribute(&m_imagedata, _T( "o:title" ), _T( "" ));
} }
} }break;
break;
case fillOpacity: case fillOpacity:
{ {
appendValueAttribute(&m_fill, _T( "opacity" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "f" ) ).c_str()); appendValueAttribute(&m_fill, _T( "opacity" ), ( FormatUtils::IntToWideString( iter->op ) + _T( "f" ) ).c_str());
...@@ -580,76 +519,53 @@ namespace DocFileFormat ...@@ -580,76 +519,53 @@ namespace DocFileFormat
case fillBackOpacity: case fillBackOpacity:
{ {
appendValueAttribute(&m_fill, _T("opacity2"), (FormatUtils::IntToWideString(iter->op) + _T("f")).c_str()); appendValueAttribute(&m_fill, _T("opacity2"), (FormatUtils::IntToWideString(iter->op) + _T("f")).c_str());
} }break;
break; // SHADOW
// SHADOW
case shadowType: case shadowType:
{ {
appendValueAttribute(&m_shadow, _T("type"), getShadowType(iter->op).c_str()); appendValueAttribute(&m_shadow, _T("type"), getShadowType(iter->op).c_str());
} }break;
break;
case shadowColor: case shadowColor:
{ {
RGBColor shadowColor((int)iter->op, RedFirst); RGBColor shadowColor((int)iter->op, RedFirst);
appendValueAttribute(&m_shadow, _T( "color" ), ( std::wstring( _T( "#" ) ) + shadowColor.SixDigitHexCode ).c_str()); appendValueAttribute(&m_shadow, _T( "color" ), ( std::wstring( _T( "#" ) ) + shadowColor.SixDigitHexCode ).c_str());
} }break;
break;
case shadowOffsetX: case shadowOffsetX:
{ {
ShadowOffsetX = EmuValue( (int)iter->op ); ShadowOffsetX = EmuValue( (int)iter->op );
} }break;
break;
case shadowSecondOffsetX: case shadowSecondOffsetX:
{ {
SecondShadowOffsetX = EmuValue( (int)iter->op ); SecondShadowOffsetX = EmuValue( (int)iter->op );
} }break;
break;
case shadowOffsetY: case shadowOffsetY:
{ {
ShadowOffsetY = EmuValue( (int)iter->op ); ShadowOffsetY = EmuValue( (int)iter->op );
} }break;
break;
case shadowSecondOffsetY: case shadowSecondOffsetY:
{ {
SecondShadowOffsetY = EmuValue( (int)iter->op ); SecondShadowOffsetY = EmuValue( (int)iter->op );
} }break;
break;
case shadowOriginX: case shadowOriginX:
{ {
ShadowOriginX = ( iter->op / pow( (double)2, (double)16 ) ); ShadowOriginX = ( iter->op / pow( (double)2, (double)16 ) );
} }break;
break;
case shadowOriginY: case shadowOriginY:
{ {
ShadowOriginY = (iter->op / pow( (double)2, (double)16)); ShadowOriginY = (iter->op / pow( (double)2, (double)16));
} }break;
break;
case shadowOpacity: case shadowOpacity:
{ {
double shadowOpa = (iter->op / pow( (double)2, (double)16)); double shadowOpa = (iter->op / pow( (double)2, (double)16));
appendValueAttribute(&m_shadow, _T( "opacity" ), FormatUtils::DoubleToFormattedWideString( shadowOpa, _T( "%.2f" ) ).c_str()); appendValueAttribute(&m_shadow, _T( "opacity" ), FormatUtils::DoubleToFormattedWideString( shadowOpa, _T( "%.2f" ) ).c_str());
} }break;
break;
case shadowStyleBooleanProperties: case shadowStyleBooleanProperties:
{ {
shadowBoolean = ShadowStyleBooleanProperties(iter->op); shadowBoolean = ShadowStyleBooleanProperties(iter->op);
} }break;
break; // PICTURE
// PICTURE
case Pib: case Pib:
{ {
int index = (int)( iter->op - 1 ); int index = (int)( iter->op - 1 );
...@@ -662,19 +578,14 @@ namespace DocFileFormat ...@@ -662,19 +578,14 @@ namespace DocFileFormat
appendValueAttribute(&m_imagedata, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str()); appendValueAttribute(&m_imagedata, _T( "r:id" ), ( std::wstring( _T( "rId" ) ) + FormatUtils::IntToWideString(m_nImageId) ).c_str());
} }
} }
} }break;
break;
case pibName: case pibName:
{ {
std::wstring name; std::wstring name;
FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex, iter->op, ENCODING_UTF16); FormatUtils::GetSTLCollectionFromBytes<std::wstring>(&name, iter->opComplex, iter->op, ENCODING_UTF16);
appendValueAttribute(&m_imagedata, _T( "o:title" ), FormatUtils::XmlEncode(name).c_str()); appendValueAttribute(&m_imagedata, _T( "o:title" ), FormatUtils::XmlEncode(name).c_str());
} }break;
break; // 3D STYLE
// 3D STYLE
case f3D: case f3D:
case threeDStyleBooleanProperties: case threeDStyleBooleanProperties:
case threeDObjectBooleanProperties: case threeDObjectBooleanProperties:
...@@ -684,102 +595,113 @@ namespace DocFileFormat ...@@ -684,102 +595,113 @@ namespace DocFileFormat
{ {
EmuValue backwardValue( (int)iter->op ); EmuValue backwardValue( (int)iter->op );
appendValueAttribute(&m_3dstyle, _T( "backdepth" ), FormatUtils::DoubleToWideString( backwardValue.ToPoints() ).c_str()); appendValueAttribute(&m_3dstyle, _T( "backdepth" ), FormatUtils::DoubleToWideString( backwardValue.ToPoints() ).c_str());
} }break;
break;
case c3DSkewAngle: case c3DSkewAngle:
{ {
FixedPointNumber skewAngle( iter->op ); FixedPointNumber skewAngle( iter->op );
appendValueAttribute(&m_3dstyle, _T( "skewangle" ), FormatUtils::DoubleToWideString( skewAngle.ToAngle() ).c_str()); appendValueAttribute(&m_3dstyle, _T( "skewangle" ), FormatUtils::DoubleToWideString( skewAngle.ToAngle() ).c_str());
} }break;
break;
case c3DXViewpoint: case c3DXViewpoint:
{ {
ViewPointX = EmuValue( FixedPointNumber( iter->op ).Integral ); ViewPointX = EmuValue( FixedPointNumber( iter->op ).Integral );
} }break;
break;
case c3DYViewpoint: case c3DYViewpoint:
{ {
ViewPointY = EmuValue( FixedPointNumber( iter->op ).Integral ); ViewPointY = EmuValue( FixedPointNumber( iter->op ).Integral );
} }break;
break;
case c3DZViewpoint: case c3DZViewpoint:
{ {
ViewPointZ = EmuValue( FixedPointNumber( iter->op ).Integral ); ViewPointZ = EmuValue( FixedPointNumber( iter->op ).Integral );
} }break;
break;
case c3DOriginX: case c3DOriginX:
{ {
FixedPointNumber dOriginX( iter->op ); FixedPointNumber dOriginX( iter->op );
viewPointOriginX = ( dOriginX.Integral / 65536.0 ); viewPointOriginX = ( dOriginX.Integral / 65536.0 );
} }break;
break;
case c3DOriginY: case c3DOriginY:
{ {
FixedPointNumber dOriginY( iter->op ); FixedPointNumber dOriginY( iter->op );
viewPointOriginY = (dOriginY.Integral / 65536.0 ); viewPointOriginY = (dOriginY.Integral / 65536.0 );
} }break;
break; // TEXTBOX
// TEXTBOX
case lTxid: case lTxid:
{ {
hasTextbox = true; hasTextbox = true;
nLTxID = (((iter->op) >> 16) & 0xFFFF); nLTxID = (((iter->op) >> 16) & 0xFFFF);
} }break;
break;
case dxTextLeft: {ndxTextLeft = (int)iter->op;break;} case dxTextLeft: {ndxTextLeft = (int)iter->op;break;}
case dyTextTop: {ndyTextTop = (int)iter->op;break;} case dyTextTop: {ndyTextTop = (int)iter->op;break;}
case dxTextRight: {ndxTextRight = (int)iter->op;break;} case dxTextRight: {ndxTextRight = (int)iter->op;break;}
case dyTextBottom: {ndyTextBottom = (int)iter->op;break;} case dyTextBottom: {ndyTextBottom = (int)iter->op;break;}
case txflTextFlow: case txflTextFlow:
{ {
switch(iter->op) switch(iter->op)
{ {
case 0: case 0:
case 4://обычный case 4://обычный
break; break;
case 1: case 1:
case 5://верт (склони голову направо) case 5://верт (склони голову направо)
appendStyleProperty(&sTextboxStyle, L"layout-flow", L"vertical"); appendStyleProperty(&sTextboxStyle, L"layout-flow", L"vertical");
break; break;
case 2://верт (склони голову налево) case 2://верт (склони голову налево)
appendStyleProperty(&sTextboxStyle, L"layout-flow", L"vertical"); appendStyleProperty(&sTextboxStyle, L"layout-flow", L"vertical");
appendStyleProperty(&sTextboxStyle, L"mso-layout-flow-alt", L"bottom-to-top"); appendStyleProperty(&sTextboxStyle, L"mso-layout-flow-alt", L"bottom-to-top");
break; break;
} }
}break; }break;
// TEXT PATH (Word Art) // Word Art)
case gtextUNICODE: case gtextUNICODE:
{ {
std::wstring text = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex, (iter->op)/2); std::wstring text = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex, (iter->op)/2);
text = FormatUtils::XmlEncode(text); text = FormatUtils::XmlEncode(text);
text = ReplaceString(text, _T("\n"), _T("&#xA;"));
appendValueAttribute(&m_textpath, L"string", text.c_str()); if (0 <= text.find(_T("\n")))
}break; {
pMultiTextPath = new XMLTools::XMLElement<wchar_t>(_T("v:multitextpaths"));
int pos1 = 0, pos2 = 0;
std::wstring s;
XMLTools::XMLElement<wchar_t> t_child;
while(pos1 < text.length() && pos2 < text.length())
{
pos2 = text.find(_T("\n"), pos1);
if (pos2 > 0)
{
std::wstring s = text.substr(pos1, pos2 - pos1);
t_child = XMLTools::XMLElement<wchar_t>(_T("v:textpart"));
t_child.AppendAttribute(_T("val"), s.c_str());
pMultiTextPath->AppendChild(t_child );
pos1 = pos2 + 1;
}
else break;
}
s = text.substr(pos1, text.length() - pos1);
t_child = XMLTools::XMLElement<wchar_t>(_T("v:textpart"));
t_child.AppendAttribute(_T("val"), s.c_str());
pMultiTextPath->AppendChild(t_child );
}
m_textpath.AppendText(text.c_str());
text = ReplaceString(text, _T("\n") , _T("&#xA;"));
appendValueAttribute(&m_textpath, L"string", text.c_str());
}break;
case gtextFont: case gtextFont:
{
std::wstring font = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex, (iter->op)/2);
int i = font.size();
while (i > 0)
{ {
if (font[i-1] != 0) break; std::wstring font = NSStringExt::CConverter::GetUnicodeFromUTF16((unsigned short*)iter->opComplex, (iter->op)/2);
i--; int i = font.size();
} while (i > 0)
if (i < font.size()) font.erase(font.begin() + i, font.end()); {
if (font[i-1] != 0) break;
i--;
}
if (i < font.size()) font.erase(font.begin() + i, font.end());
font = std::wstring(_T("\"")) + font + std::wstring(_T("\"")); font = std::wstring(_T("\"")) + font + std::wstring(_T("\""));
appendStyleProperty(&m_textPathStyle, L"font-family", font); appendStyleProperty(&m_textPathStyle, L"font-family", font);
}break; }break;
case gtextSize: case gtextSize:
{ {
std::wstring fontSize = FormatUtils::IntToWideString(iter->op/65535); std::wstring fontSize = FormatUtils::IntToWideString(iter->op/65535);
...@@ -948,7 +870,6 @@ namespace DocFileFormat ...@@ -948,7 +870,6 @@ namespace DocFileFormat
m_pXmlWriter->WriteString(m_shadow.GetXMLString().c_str()); m_pXmlWriter->WriteString(m_shadow.GetXMLString().c_str());
} }
//write 3d style //write 3d style
if (m_3dstyle.GetAttributeCount() > 0) if (m_3dstyle.GetAttributeCount() > 0)
{ {
...@@ -1033,6 +954,11 @@ namespace DocFileFormat ...@@ -1033,6 +954,11 @@ namespace DocFileFormat
appendValueAttribute(&m_textpath, _T( "style" ), FormatUtils::XmlEncode(m_textPathStyle).c_str()); appendValueAttribute(&m_textpath, _T( "style" ), FormatUtils::XmlEncode(m_textPathStyle).c_str());
m_pXmlWriter->WriteString(m_textpath.GetXMLString().c_str()); m_pXmlWriter->WriteString(m_textpath.GetXMLString().c_str());
} }
if (pMultiTextPath)
{
//m_pXmlWriter->WriteString(pMultiTextPath->GetXMLString().c_str());
delete pMultiTextPath;
}
// write imagedata // write imagedata
if (m_imagedata.GetAttributeCount()) if (m_imagedata.GetAttributeCount())
......
...@@ -1869,9 +1869,13 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo ...@@ -1869,9 +1869,13 @@ PPTX::Logic::SpTreeElem CDrawingConverter::doc_LoadShape(XmlUtils::CXmlNode& oNo
CString strNameP = XmlUtils::GetNameNoNS(oNodeP.GetName()); CString strNameP = XmlUtils::GetNameNoNS(oNodeP.GetName());
if (_T("textpath") == strNameP) if (_T("textpath") == strNameP)
{ {
strString = oNodeP.GetAttribute(_T("string")); strString = oNodeP.GetText(); //для обхода &#xA пишется дубль в контент
// мы используем его в хмл
CorrectXmlString(strString); if (strString.IsEmpty())
{
strString = oNodeP.GetAttribute(_T("string"));
}
CorrectXmlString(strString); // мы используем его в хмл
CString strStyle = oNodeP.GetAttribute(_T("style")); CString strStyle = oNodeP.GetAttribute(_T("style"));
PPTX::CCSS oCSSParser; PPTX::CCSS oCSSParser;
......
...@@ -2623,6 +2623,8 @@ namespace OOX ...@@ -2623,6 +2623,8 @@ namespace OOX
{ {
ReadAttributes( oReader ); ReadAttributes( oReader );
m_sStringOriginal = oReader.GetText2();
if ( !oReader.IsEmptyNode() ) if ( !oReader.IsEmptyNode() )
oReader.ReadTillEnd(); oReader.ReadTillEnd();
} }
...@@ -2716,6 +2718,8 @@ namespace OOX ...@@ -2716,6 +2718,8 @@ namespace OOX
nullable<SimpleTypes::Vml::CCssStyle> m_oStyle; nullable<SimpleTypes::Vml::CCssStyle> m_oStyle;
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oTrim; SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oTrim;
SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oXScale; SimpleTypes::CTrueFalse<SimpleTypes::booleanFalse> m_oXScale;
nullable<CString> m_sStringOriginal;
}; };
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// CGroup 14.1.2.7 (Part4) // CGroup 14.1.2.7 (Part4)
......
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