Commit dc81f97b authored by ElenaSubbotina's avatar ElenaSubbotina

fix bugs after refactoring

parent d194249f
......@@ -91,7 +91,7 @@ public:
int pos =target.find(L".");
if (pos < 0)
{
target = target + std::wstring(L".A1");
target = L"\"" + target + std::wstring(L"\".A1");
}
r.location = converter_.convert_ref(std::wstring(target.begin() + 1, target.end()));
r.type = L"Internal" ;
......
......@@ -100,7 +100,7 @@ namespace PPTX
{
std::wstring sName = oReader.GetName();
if (sName == L"a:pos")
if (sName == L"a:pt")
{
ReadAttributes2(oReader, x[count], y[count]);
count++;
......
......@@ -70,7 +70,7 @@ namespace PPTX
{
std::wstring sName = oReader.GetName();
if (sName == L"a:pos")
if (sName == L"a:pt")
{
ReadAttributes2(oReader);
}
......
......@@ -69,7 +69,7 @@ namespace PPTX
{
std::wstring sName = oReader.GetName();
if (sName == L"a:pos")
if (sName == L"a:pt")
{
ReadAttributes2(oReader);
}
......
......@@ -73,7 +73,7 @@ namespace PPTX
{
std::wstring sName = oReader.GetName();
if (sName == L"a:pos")
if (sName == L"a:pt")
{
ReadAttributes2(oReader, x[count], y[count]);
count++;
......
......@@ -50,16 +50,24 @@ namespace PPTX
}
void MathParaWrapper::fromXML(XmlUtils::CXmlLiteReader& oReader)
{
std::wstring name = oReader.GetName();
if(L"oMathPara" == name)
{
m_oMathPara = oReader;
}
else if(L"oMath" == name)
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{
m_oMath = oReader;
std::wstring strName = XmlUtils::GetNameNoNS(oReader.GetName());
if(L"oMathPara" == strName)
{
m_oMathPara = oReader;
}
else if(L"oMath" == strName)
{
m_oMath = oReader;
}
}
FillParentPointersForChilds();
}
void MathParaWrapper::fromXML(XmlUtils::CXmlNode& node)
{
......@@ -151,8 +159,7 @@ namespace PPTX
oDrawingConverter.m_pBinaryWriter = pWriter;
DocWrapper::FontProcessor fp;
BinDocxRW::ParamsWriter oParamsWriter(pWriter, &fp, &oDrawingConverter, NULL);
oDocxSerializer.m_pParamsWriter = &oParamsWriter;
oDocxSerializer.m_pParamsWriter = new BinDocxRW::ParamsWriter(pWriter, &fp, &oDrawingConverter, NULL);
oDocxSerializer.getBinaryContentElem(eElemType, pElem, *pWriter, lDataSize);
//*oDrawingConverter.m_pBinaryWriter->m_pCommonRels = pOldRels;
oDrawingConverter.m_pBinaryWriter = pOldWriter;
......
......@@ -247,19 +247,28 @@ namespace PPTX
m_elem.reset(new Logic::GraphicFrame(oReader));
else if (name == _T("AlternateContent"))
{
bool isEmpty = true;
if ( oReader.IsEmptyNode() )
return;
int nCurDepth = oReader.GetDepth();
while( oReader.ReadNextSiblingNode( nCurDepth ) )
{
std::wstring strName = oReader.GetName();
if ( oReader.IsEmptyNode() )
continue;
if (strName == L"mc:Choice")
{
oReader.ReadNextSiblingNode(nCurDepth + 1);
//GetAttributeIfExist(L"Requires", sRequires) && L"a14" == sRequires)
fromXML(oReader);
break;
if (m_elem.is_init())
break;
}
else if (strName == L"mc:Fallback")
{
oReader.ReadNextSiblingNode(nCurDepth + 1);
fromXML(oReader);
}
}
......
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