Commit 41da15d8 authored by ElenaSubbotina's avatar ElenaSubbotina

..

parent ea3db693
......@@ -33,7 +33,7 @@
#ifndef PPTXOOX_FILE_TYPES_INCLUDE_H_
#define PPTXOOX_FILE_TYPES_INCLUDE_H_
#include "../../Common/DocxFormat/Source/DocxFormat/FileType.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/FileType.h"
namespace OOX
{
......@@ -232,4 +232,4 @@ namespace Presentation
} //Presentation
} // namespace OOX
#endif // PPTXOOX_FILE_TYPES_INCLUDE_H_
\ No newline at end of file
#endif // PPTXOOX_FILE_TYPES_INCLUDE_H_
......@@ -34,10 +34,9 @@
#define PPTXOOX_RELS_FILE_INCLUDE_H_
#include "RelationTable.h"
#include "../FileTypes.h"
#include "../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
#include "../../Common/DocxFormat/Source/DocxFormat/RId.h"
#include "../../Common/DocxFormat/Source/DocxFormat/External/External.h"
#include "../../../../Common/DocxFormat/Source/DocxFormat/FileTypes.h"
#include "../../../../Common/DocxFormat/Source/Base/SmartPtr.h"
#include "../../../../Common/DocxFormat/Source/SystemUtility/SystemUtility.h"
......
......@@ -34,8 +34,8 @@
#define PPTXOOX_RELS_RELATION_SHIP_INCLUDE_H_
#include "./../WritingElement.h"
#include "../../Common/DocxFormat/Source/DocxFormat/RId.h"
#include "../../Common/DocxFormat/Source/DocxFormat/External/External.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/RId.h"
#include "../../../Common/DocxFormat/Source/DocxFormat/External/External.h"
#include <boost/algorithm/string.hpp>
......
......@@ -35,7 +35,6 @@
#include "./../WritingVector.h"
#include "RelationShip.h"
#include "../../Common/DocxFormat/Source/DocxFormat/RId.h"
namespace PPTX {class External;}
......@@ -73,4 +72,4 @@ namespace PPTX
} // namespace Rels
} // namespace PPTX
#endif // PPTXOOX_RELS_RELATION_TABLE_INCLUDE_H_
\ No newline at end of file
#endif // PPTXOOX_RELS_RELATION_TABLE_INCLUDE_H_
......@@ -55,35 +55,36 @@ namespace OOX
{
public:
WritingElement_AdditionConstructors(CRelationShip)
CRelationShip(const OOX::RId& rId, const std::wstring& sType, const OOX::CPath& oFilePath) : m_rId(rId), m_oTarget(oFilePath), m_sType(sType)
{
boost::algorithm::replace_all(m_oTarget.m_strFilename, L" ", L"_");
}
CRelationShip(const OOX::RId& rId, const smart_ptr<External> pExternal): m_rId(rId), m_oTarget(pExternal->Uri()), m_sType(pExternal->type().RelationType())
CRelationShip(const OOX::RId& rId, const smart_ptr<External> pExternal): m_rId(rId), m_oTarget(pExternal->Uri()), m_sType(pExternal->type().RelationType())
{
m_sMode = new std::wstring( _T("External") );
}
virtual ~CRelationShip()
virtual ~CRelationShip()
{
}
public:
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
virtual void fromXML(XmlUtils::CXmlLiteReader& oReader)
{
ReadAttributes( oReader );
if ( !oReader.IsEmptyNode() )
oReader.ReadTillEnd();
}
virtual void fromXML(XmlUtils::CXmlNode& oNode)
virtual void fromXML(XmlUtils::CXmlNode& oNode)
{
oNode.ReadAttributeBase( _T("Id"), m_rId );
oNode.ReadAttributeBase( _T("Target"), m_oTarget );
oNode.ReadAttributeBase( _T("Type"), m_sType );
oNode.ReadAttributeBase( _T("TargetMode"), m_sMode );
}
virtual std::wstring toXML() const
virtual std::wstring toXML() const
{
XmlUtils::CAttribute oAttr;
oAttr.Write( _T("Id"), m_rId.ToString() );
......@@ -124,13 +125,6 @@ namespace OOX
m_oTarget.SetName(sTempTarget, true);
}
public:
//const bool operator <(const CRelationShip& rhs) const
//{
// return m_rId < rhs.m_rId;
//}
public:
const std::wstring Type() const
......@@ -151,7 +145,7 @@ namespace OOX
return false;
return ( *m_sMode == _T("External" ));
}
const RId rId() const
const RId rId() const
{
return m_rId;
}
......@@ -187,8 +181,6 @@ namespace OOX
}
public:
void Read (const CPath& oFilePath)
{
CPath oRelsPath = CreateFileName( oFilePath );
......@@ -216,7 +208,7 @@ namespace OOX
sName = oReader.GetName();
if ( _T("Relationship") == sName )
{
Rels::CRelationShip *oRel = new Rels::CRelationShip(oReader);
OOX::Rels::CRelationShip *oRel = new OOX::Rels::CRelationShip(oReader);
if (oRel) m_arrRelations.push_back( oRel );
}
}
......
......@@ -758,8 +758,8 @@ namespace OOX
virtual ~WritingElement() {}
virtual void fromXML(XmlUtils::CXmlNode& node) = 0;
virtual std::wstring toXML() const = 0;
virtual EElementType getType() const
virtual std::wstring toXML() const = 0;
virtual EElementType getType() const
{
return OOX::et_Unknown;
}
......
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