rtf include changes

This commit is contained in:
Vikulov Dmitry
2022-12-09 23:44:55 +03:00
parent 4673d68387
commit 0da7b35757
49 changed files with 1290 additions and 1239 deletions

View File

@ -30,11 +30,12 @@
*
*/
#pragma once
#include "../../Format/RtfProperty.h"
#include "OOXReader.h"
#include "OOXReaderBasic.h"
#include "../../../OOXML/PPTXFormat/Logic/Colors/SchemeClr.h"
#include "OOXReader.h"
#include "../../Format/RtfProperty.h"
#include "../../../OOXML/PPTXFormat/Theme/ClrScheme.h"
class OOXColorReader
{

View File

@ -30,6 +30,7 @@
*
*/
#include "OOXColorReader.h"
#include "OOXColorSchemeReader.h"
OOXColorSchemeReader::OOXColorSchemeReader(PPTX::nsTheme::ClrScheme * ooxColorScheme)

View File

@ -30,8 +30,9 @@
*
*/
#pragma once
#include "OOXColorReader.h"
#include "../../Format/RtfProperty.h"
#include "OOXReaderBasic.h"
#include "../../../OOXML/PPTXFormat/Theme/ClrScheme.h"
class OOXColorSchemeReader
{

View File

@ -43,8 +43,38 @@ private:
XmlUtils::CXmlLiteReader m_oReader;
public:
OOXContentTypeReader(std::wstring sFilePath);
bool GetByType(std::wstring sType, std::vector<std::wstring>& aOutArray);
std::wstring GetByID(std::wstring sId);
OOXContentTypeReader(std::wstring sFilePath)
{
m_sFilepath = sFilePath;
m_oReader.OpenFromFile(m_sFilepath);
m_oReader.ReadRootNode("Relationships");
m_oReader.ReadNodeList("Relationship");
}
bool GetByType(std::wstring sType, std::vector<std::wstring>& aOutArray)
{
aOutArray.clear();
for(int i=0;i<oParam.oReader->GetLengthList();i++)
{
if(oParam.oReader->ReadNodeAttribute(i,"Type") == sType)
{
std::wstring sResult = oParam.oReader->ReadNodeAttribute(i, "Target");
sResult = sResult.Replace('/','\\');
aOutArray += sResult;
}
}
return aOutArray.size() > 0;
}
public: std::wstring GetByID(std::wstring sId)
{
for(int i=0;i<oParam.oReader->GetLengthList();i++)
{
if(oParam.oReader->ReadNodeAttribute(i,"Id") == sId)
{
std::wstring sResult = oParam.oReader->ReadNodeAttribute(i,"Target");
sResult = sResult.Replace('/','\\');
return sResult;
}
}
return "";
}
};

View File

@ -30,6 +30,8 @@
*
*/
#include "../../Format/RtfDocument.h"
#include "OOXCoreReader.h"
OOXCoreReader::OOXCoreReader(OOX::CCore * ooxCore)

View File

@ -31,7 +31,6 @@
*/
#pragma once
#include "../../Format/RtfDocument.h"
#include "OOXReader.h"
#include "OOXReaderBasic.h"

View File

@ -30,6 +30,9 @@
*
*/
#include "OOXrPrReader.h"
#include "OOXpPrReader.h"
#include "OOXDocDefaultsReader.h"
OOXDocDefaultsReader::OOXDocDefaultsReader(OOX::CDocDefaults* ooxDefaults)

View File

@ -30,9 +30,8 @@
*
*/
#pragma once
#include "OOXrPrReader.h"
#include "OOXpPrReader.h"
#include "OOXReaderBasic.h"
#include "../../../OOXML/DocxFormat/Styles.h"
class OOXDocDefaultsReader

View File

@ -45,6 +45,7 @@ private:
RtfDocument* m_poDocument = NULL;
OOX::CDocument* m_ooxDocument = NULL;
public:
OOXDocumentReader(OOX::CDocument* ooxDocument);
~OOXDocumentReader();

View File

@ -30,8 +30,9 @@
*
*/
#pragma once
#include "OOXFontReader.h"
#include "../../Format/RtfProperty.h"
#include "../../../OOXML/PPTXFormat/Theme/FontScheme.h"
class OOXFontSchemeReader
{

View File

@ -30,6 +30,7 @@
*
*/
#pragma once
#include "OOXFontReader.h"
class OOXFontTableReader

View File

@ -33,9 +33,6 @@
#include "OOXReader.h"
#include "OOXReaderBasic.h"
#include "../../Format/RtfDocument.h"
#include <limits.h>
class OOXFootnotesReader
{

View File

@ -30,7 +30,6 @@
*
*/
#pragma once
#include "../../Format/RtfDocument.h"
#include "OOXReader.h"
#include "OOXReaderBasic.h"

View File

@ -32,10 +32,6 @@
#pragma once
#include "OOXReaderBasic.h"
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfProperty.h"
#include "../../Format/Utils.h"
#include "../../../OOXML/DocxFormat/Numbering.h"
class OOXLevelReader

View File

@ -31,7 +31,6 @@
*/
#pragma once
#include "../../Format/RtfDocument.h"
#include "OOXLevelReader.h"
class OOXNumberingMapReader

View File

@ -30,6 +30,7 @@
*
*/
#pragma once
#include "OOXAbstractNumReader.h"
#include "OOXNumberingMapReader.h"
#include "OOXShapeReader.h"

View File

@ -36,6 +36,7 @@
#include "OOXTextItemReader.h"
#include "OOXpPrFrameReader.h"
#include "OOXpPrTabReader.h"
#include "OOXMathReader.h"
#include "../../Format/RtfOle.h"
@ -617,6 +618,8 @@ bool OOXParagraphReader::Parse3( ReaderParameter oParam , RtfParagraph& oOutputP
}
return true;
}
OOXRunReader::OOXRunReader(OOX::Logic::CRun *ooxRun)
{
m_drawingRun = NULL;
@ -1094,6 +1097,18 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
}
OOXpPrReader::OOXpPrReader(OOX::Logic::CParagraphProperty *ooxParaProps)
{
m_bDefStyle = true;
m_ooxParaProps = ooxParaProps;
m_drawingParaProps = NULL;
}
OOXpPrReader::OOXpPrReader(PPTX::Logic::TextParagraphPr *ooxParaProps)
{
m_bDefStyle = true;
m_ooxParaProps = NULL;
m_drawingParaProps = ooxParaProps;
}
bool OOXpPrReader::Parse( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle )
{
if (m_drawingParaProps) return ParseDrawing( oParam, oOutputProperty);
@ -1440,6 +1455,114 @@ bool OOXpPrReader::Parse( ReaderParameter oParam, RtfParagraphProperty& oOutputP
}
return true;
}
bool OOXpPrReader::ParseDrawing( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty)
{
if (m_drawingParaProps == NULL) return false;
if (m_drawingParaProps->lvl.IsInit())
oOutputProperty.m_nOutlinelevel = m_drawingParaProps->lvl.get();
if( m_drawingParaProps->algn.IsInit())
{
switch(m_drawingParaProps->algn->GetBYTECode())
{
case SimpleTypes::jcBoth : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qj;break;
case SimpleTypes::jcCenter : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qc;break;
case SimpleTypes::jcDistribute : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qd;break;
case SimpleTypes::jcEnd : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
case SimpleTypes::jcHighKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk20;break;
case SimpleTypes::jcLowKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk0; break;
case SimpleTypes::jcMediumKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk10; break;
case SimpleTypes::jcNumTab : break;
case SimpleTypes::jcStart : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
case SimpleTypes::jcThaiDistribute : break;
case SimpleTypes::jcLeft : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
case SimpleTypes::jcRight : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
default: break;
}
}
//if( m_drawingParaProps->m_oInd.IsInit() )
//{
// int nFirstLine = PROP_DEF;
// if (m_drawingParaProps->m_oInd->m_oHanging.IsInit())
// nFirstLine = m_drawingParaProps->m_oInd->m_oHanging->ToTwips();
// if( PROP_DEF != nFirstLine )
// oOutputProperty.m_nIndFirstLine = -nFirstLine;
// if (m_drawingParaProps->m_oInd->m_oFirstLine.IsInit())
// oOutputProperty.m_nIndFirstLine = m_drawingParaProps->m_oInd->m_oFirstLine->ToTwips();
// if (m_drawingParaProps->m_oInd->m_oStart.IsInit())
// oOutputProperty.m_nIndStart = m_drawingParaProps->m_oInd->m_oStart->ToTwips();
// if (m_drawingParaProps->m_oInd->m_oEnd.IsInit())
// oOutputProperty.m_nIndEnd = m_drawingParaProps->m_oInd->m_oEnd->ToTwips();
//}
if ( m_drawingParaProps->spcBef.IsInit()
&& m_drawingParaProps->spcBef->spcPts.IsInit())
oOutputProperty.m_nSpaceBefore = m_drawingParaProps->spcBef->spcPts.get();
if ( m_drawingParaProps->spcAft.IsInit()
&& m_drawingParaProps->spcAft->spcPts.IsInit())
oOutputProperty.m_nSpaceAfter = m_drawingParaProps->spcAft->spcPts.get();
if (m_drawingParaProps->ParagraphBullet.has_bullet())
{
oOutputProperty.m_nListLevel = 0;
oOutputProperty.m_nListId = oParam.oRtf->m_oListTable.GetCount() + 1;
RtfListProperty oNewList;
oNewList.m_nID = oOutputProperty.m_nListId;
oNewList.m_nListSimple = 1;
RtfListLevelProperty oNewLevel;
//if (m_drawingParaProps->ParagraphBullet.IsInit() && m_drawingParaProps->m_oBuChar->m_sChar.IsInit())
//{
// oNewLevel.m_sText = m_drawingParaProps->m_oBuChar->m_sChar.get();
// oNewLevel.m_nNumberType = 23;
//}
//else if ( m_drawingParaProps->m_oBuAutoNum.IsInit() )
//{
// if (m_drawingParaProps->m_oBuAutoNum->m_sType.IsInit())
// oNewLevel.m_nNumberType = oNewLevel.GetFormat( m_drawingParaProps->m_oBuAutoNum->m_sType.get());
// else
// oNewLevel.m_nNumberType = 0;
// if (m_drawingParaProps->m_oBuAutoNum->m_nStartAt.IsInit())
// oNewLevel.m_nStart = m_drawingParaProps->m_oBuAutoNum->m_nStartAt->GetValue();
//}
oNewList.AddItem( oNewLevel );
oParam.oRtf->m_oListTable.AddItem( oNewList ); }
if (m_drawingParaProps->rtl.IsInit())
oOutputProperty.m_bRtl = m_drawingParaProps->rtl.get() ? 1 : 0;
if( m_drawingParaProps->defRPr.IsInit() )
{
OOXrPrReader orPrReader(m_drawingParaProps->defRPr.GetPointer());
orPrReader.Parse( oParam, oOutputProperty.m_oCharProperty );
}
return true;
}
OOXrPrReader::OOXrPrReader(OOX::Logic::CRunProperty *ooxRunProps)
{
m_bDefStyle = true;
m_ooxRunProps = ooxRunProps;
m_drawingRunProps = NULL;
}
OOXrPrReader::OOXrPrReader(PPTX::Logic::RunProperties *ooxRunProps)
{
m_bDefStyle = true;
m_ooxRunProps = NULL;
m_drawingRunProps = ooxRunProps;
}
bool OOXrPrReader::Parse( ReaderParameter oParam, RtfCharProperty& oOutputProperty)
{
if (m_drawingRunProps) ParseDrawing( oParam, oOutputProperty );
@ -1717,100 +1840,6 @@ bool OOXrPrReader::Parse( ReaderParameter oParam, RtfCharProperty& oOutputProper
}
return true;
}
bool OOXpPrReader::ParseDrawing( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty)
{
if (m_drawingParaProps == NULL) return false;
if (m_drawingParaProps->lvl.IsInit())
oOutputProperty.m_nOutlinelevel = m_drawingParaProps->lvl.get();
if( m_drawingParaProps->algn.IsInit())
{
switch(m_drawingParaProps->algn->GetBYTECode())
{
case SimpleTypes::jcBoth : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qj;break;
case SimpleTypes::jcCenter : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qc;break;
case SimpleTypes::jcDistribute : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qd;break;
case SimpleTypes::jcEnd : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
case SimpleTypes::jcHighKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk20;break;
case SimpleTypes::jcLowKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk0; break;
case SimpleTypes::jcMediumKashida : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qk10; break;
case SimpleTypes::jcNumTab : break;
case SimpleTypes::jcStart : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
case SimpleTypes::jcThaiDistribute : break;
case SimpleTypes::jcLeft : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_ql;break;
case SimpleTypes::jcRight : oOutputProperty.m_eAlign = RtfParagraphProperty::pa_qr;break;
default: break;
}
}
//if( m_drawingParaProps->m_oInd.IsInit() )
//{
// int nFirstLine = PROP_DEF;
// if (m_drawingParaProps->m_oInd->m_oHanging.IsInit())
// nFirstLine = m_drawingParaProps->m_oInd->m_oHanging->ToTwips();
// if( PROP_DEF != nFirstLine )
// oOutputProperty.m_nIndFirstLine = -nFirstLine;
// if (m_drawingParaProps->m_oInd->m_oFirstLine.IsInit())
// oOutputProperty.m_nIndFirstLine = m_drawingParaProps->m_oInd->m_oFirstLine->ToTwips();
// if (m_drawingParaProps->m_oInd->m_oStart.IsInit())
// oOutputProperty.m_nIndStart = m_drawingParaProps->m_oInd->m_oStart->ToTwips();
// if (m_drawingParaProps->m_oInd->m_oEnd.IsInit())
// oOutputProperty.m_nIndEnd = m_drawingParaProps->m_oInd->m_oEnd->ToTwips();
//}
if ( m_drawingParaProps->spcBef.IsInit()
&& m_drawingParaProps->spcBef->spcPts.IsInit())
oOutputProperty.m_nSpaceBefore = m_drawingParaProps->spcBef->spcPts.get();
if ( m_drawingParaProps->spcAft.IsInit()
&& m_drawingParaProps->spcAft->spcPts.IsInit())
oOutputProperty.m_nSpaceAfter = m_drawingParaProps->spcAft->spcPts.get();
if (m_drawingParaProps->ParagraphBullet.has_bullet())
{
oOutputProperty.m_nListLevel = 0;
oOutputProperty.m_nListId = oParam.oRtf->m_oListTable.GetCount() + 1;
RtfListProperty oNewList;
oNewList.m_nID = oOutputProperty.m_nListId;
oNewList.m_nListSimple = 1;
RtfListLevelProperty oNewLevel;
//if (m_drawingParaProps->ParagraphBullet.IsInit() && m_drawingParaProps->m_oBuChar->m_sChar.IsInit())
//{
// oNewLevel.m_sText = m_drawingParaProps->m_oBuChar->m_sChar.get();
// oNewLevel.m_nNumberType = 23;
//}
//else if ( m_drawingParaProps->m_oBuAutoNum.IsInit() )
//{
// if (m_drawingParaProps->m_oBuAutoNum->m_sType.IsInit())
// oNewLevel.m_nNumberType = oNewLevel.GetFormat( m_drawingParaProps->m_oBuAutoNum->m_sType.get());
// else
// oNewLevel.m_nNumberType = 0;
// if (m_drawingParaProps->m_oBuAutoNum->m_nStartAt.IsInit())
// oNewLevel.m_nStart = m_drawingParaProps->m_oBuAutoNum->m_nStartAt->GetValue();
//}
oNewList.AddItem( oNewLevel );
oParam.oRtf->m_oListTable.AddItem( oNewList ); }
if (m_drawingParaProps->rtl.IsInit())
oOutputProperty.m_bRtl = m_drawingParaProps->rtl.get() ? 1 : 0;
if( m_drawingParaProps->defRPr.IsInit() )
{
OOXrPrReader orPrReader(m_drawingParaProps->defRPr.GetPointer());
orPrReader.Parse( oParam, oOutputProperty.m_oCharProperty );
}
return true;
}
bool OOXrPrReader::ParseDrawing(ReaderParameter oParam, RtfCharProperty& oOutputProperty)
{
if (m_drawingRunProps == NULL) return false;
@ -1868,7 +1897,7 @@ bool OOXrPrReader::ParseDrawing(ReaderParameter oParam, RtfCharProperty& oOutput
//if( m_drawingRunProps->m_oHighlight.IsInit() && m_drawingRunProps->m_oHighlight->m_oVal.IsInit() )
//{
//if (m_drawingRunProps->m_oHighlight->m_oVal->GetValue() != SimpleTypes::highlightcolorNone)
//{
//{
// oOutputProperty.m_nHightlited = oParam.oRtf->m_oColorTable.AddItem(RtfColor(m_drawingRunProps->m_oHighlight->m_oVal->Get_R(),
// m_drawingRunProps->m_oHighlight->m_oVal->Get_G(),
// m_drawingRunProps->m_oHighlight->m_oVal->Get_B()));
@ -1906,12 +1935,12 @@ bool OOXrPrReader::ParseDrawing(ReaderParameter oParam, RtfCharProperty& oOutput
case SimpleTypes::underlineWavyDouble : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Double_wave; break;
case SimpleTypes::underlineWavyHeavy : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Heavy_wave; break;
case SimpleTypes::underlineWords : oOutputProperty.m_eUnderStyle = RtfCharProperty::uls_Word; break;
default: break;
}
default: break;
}
//if ((m_drawingRunProps->m_oU->m_oColor.IsInit()) && (m_drawingRunProps->m_oU->m_oColor->GetValue() == SimpleTypes::hexcolorRGB))
//{
// RtfColor oColor(m_drawingRunProps->m_oU->m_oColor->Get_R(), m_drawingRunProps->m_oU->m_oColor->Get_G(), m_drawingRunProps->m_oU->m_oColor->Get_B());
// RtfColor oColor(m_drawingRunProps->m_oU->m_oColor->Get_R(), m_drawingRunProps->m_oU->m_oColor->Get_G(), m_drawingRunProps->m_oU->m_oColor->Get_B());
// oOutputProperty.m_nUnderlineColor = oParam.oRtf->m_oColorTable.AddItem( oColor );
//}//todooo theme color, tint, shadow
}
@ -1919,6 +1948,10 @@ bool OOXrPrReader::ParseDrawing(ReaderParameter oParam, RtfCharProperty& oOutput
return true;
}
OOXpPrFrameReader::OOXpPrFrameReader(ComplexTypes::Word::CFramePr *ooxFramePr)
{
m_ooxFramePr = ooxFramePr;
}
bool OOXpPrFrameReader::Parse( ReaderParameter oParam ,RtfFrame& oOutputProperty)
{
if (m_ooxFramePr == NULL) return false;
@ -2020,6 +2053,12 @@ bool OOXpPrFrameReader::Parse( ReaderParameter oParam ,RtfFrame& oOutputProperty
return true;
}
OOXSectionPropertyReader::OOXSectionPropertyReader(OOX::Logic::CSectionProperty *ooxSectionProperty)
{
m_ooxSectionProperty = ooxSectionProperty;
}
bool OOXSectionPropertyReader::Parse( ReaderParameter oParam , RtfSectionProperty& oOutput)
{
if (m_ooxSectionProperty == NULL) return false;

View File

@ -30,12 +30,11 @@
*
*/
#pragma once
#include "OOXRunReader.h"
#include "OOXpPrReader.h"
#include "OOXMathReader.h"
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfField.h"
namespace OOX
{
@ -51,6 +50,7 @@ private:
PPTX::Logic::Paragraph *m_drawingParagraph;
OOX::Logic::CParagraph *m_ooxParagraph;
OOX::WritingElementWithChilds<OOX::WritingElement> *m_ooxElement;
public:
RtfCharProperty m_oCharProperty;

View File

@ -30,8 +30,8 @@
*
*/
#pragma once
#include "OOXDrawingGraphicReader.h"
#include "OOXReaderBasic.h"
class OOXDrawingAnchorReader
{

View File

@ -30,6 +30,9 @@
*
*/
#include "OOXPictureAnchorReader.h"
#include "OOXPictureInlineReader.h"
#include "OOXPictureReader.h"
OOXDrawingReader::OOXDrawingReader(OOX::Logic::CDrawing* ooxDrawing)

View File

@ -30,10 +30,9 @@
*
*/
#pragma once
#include "../../Format/RtfPicture.h"
#include "OOXPictureAnchorReader.h"
#include "OOXPictureInlineReader.h"
#include "OOXReaderBasic.h"
#include "../../Format/RtfPicture.h"
#include "../../../OOXML/DocxFormat/Drawing/Drawing.h"
class OOXDrawingReader

View File

@ -53,6 +53,7 @@
#include "../../../OOXML/DocxFormat/HeaderFooter.h"
#include "../../../OOXML/PPTXFormat/Theme.h"
class RtfConvertationManager;
class OOXReader

View File

@ -37,9 +37,7 @@
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfProperty.h"
#include "../../Format/RtfField.h"
#include "../../Format/RtfBookmark.h"
#include "../../Format/RtfOle.h"
namespace OOX
{
@ -54,6 +52,7 @@ class OOXRunReader
private:
PPTX::Logic::Run* m_drawingRun;
OOX::Logic::CRun* m_ooxRun;
public:
RtfCharProperty m_oCharProperty;

View File

@ -30,6 +30,7 @@
*
*/
#pragma once
#include "OOXReaderBasic.h"
#include "OOXHeaderReader.h"
@ -37,10 +38,9 @@ class OOXSectionPropertyReader
{
private:
OOX::Logic::CSectionProperty *m_ooxSectionProperty;
public:
OOXSectionPropertyReader(OOX::Logic::CSectionProperty *ooxSectionProperty)
{
m_ooxSectionProperty = ooxSectionProperty;
}
OOXSectionPropertyReader(OOX::Logic::CSectionProperty *ooxSectionProperty);
bool Parse( ReaderParameter oParam , RtfSectionProperty& oOutput);
};

File diff suppressed because it is too large Load Diff

View File

@ -30,6 +30,7 @@
*
*/
#pragma once
#include "OOXReaderBasic.h"
#include "../../Format/RtfDocument.h"
@ -44,19 +45,13 @@ namespace OOX
class CBackground;
}
}
class OOXShapeReader
{
public:
OOXShapeReader(OOX::Vml::CVmlCommonElements * vmlElem)
{
m_vmlElement = vmlElem;
m_arrElement = vmlElem;
}
OOXShapeReader(OOX::Vml::CVmlCommonElements * vmlElem);
OOXShapeReader(OOX::WritingElementWithChilds<OOX::WritingElement> * elem);
OOXShapeReader(OOX::WritingElement* ooxShape)
{
m_ooxShape = ooxShape;
}
OOXShapeReader(OOX::WritingElement* ooxShape);
static bool WriteDataToPicture( std::wstring sPath, RtfPicture& pOutput, ReaderParameter& oParam );
@ -70,6 +65,7 @@ public:
static void Parse(ReaderParameter oParam, PPTX::Logic::ColorBase *oox_color, unsigned int & nColor, _CP_OPT(double) &opacity);
static bool ParseVmlStyle(RtfShapePtr pShape, SimpleTypes::Vml::CCssProperty* prop);
private:
void ParseVmlPath(RtfShapePtr& pShape, const std::wstring &custom_path);
bool ParseVmlStyles(RtfShapePtr& pShape, std::vector<SimpleTypes::Vml::CCssPropertyPtr> & props);
@ -108,23 +104,11 @@ class OOXShapeGroupReader
private:
OOX::Vml::CGroup *m_vmlGroup = NULL;
PPTX::Logic::SpTree *m_ooxGroup = NULL;
public:
OOXShapeGroupReader(OOX::Vml::CGroup *vmlGroup)
{
m_vmlGroup = vmlGroup;
}
OOXShapeGroupReader(PPTX::Logic::SpTree *ooxGroup)
{
m_ooxGroup = ooxGroup;
}
bool ParseVmlStyles(RtfShapePtr pGroupShape, std::vector<SimpleTypes::Vml::CCssPropertyPtr> & props)
{
for (size_t i = 0; i < props.size(); i++)
{
OOXShapeReader::ParseVmlStyle( pGroupShape, props[i].get());
}
return true;
}
OOXShapeGroupReader(OOX::Vml::CGroup *vmlGroup);
OOXShapeGroupReader(PPTX::Logic::SpTree *ooxGroup);
bool ParseVmlStyles(RtfShapePtr pGroupShape, std::vector<SimpleTypes::Vml::CCssPropertyPtr> & props);
bool Parse( ReaderParameter oParam , RtfShapePtr& oOutput);
};
@ -133,6 +117,7 @@ class OOXBackgroundReader
{
private:
OOX::Logic::CBackground *m_ooxBackground = NULL;
public:
OOXBackgroundReader(OOX::Logic::CBackground *oox_background);

View File

@ -30,6 +30,10 @@
*
*/
#include "OOXtblPrReader.h"
#include "OOXtcPrReader.h"
#include "OOXrPrReader.h"
#include "OOXStyleReader.h"
OOXStyleReader::OOXStyleReader(OOX::CStyle *ooxStyle)

View File

@ -30,11 +30,9 @@
*
*/
#pragma once
#include "OOXpPrReader.h"
#include "OOXrPrReader.h"
#include "OOXtblPrReader.h"
#include "OOXtrPrReader.h"
#include "OOXtcPrReader.h"
#include "OOXpPrReader.h"
class OOXStyleReader
{

View File

@ -30,6 +30,9 @@
*
*/
#include "OOXDocDefaultsReader.h"
#include "OOXStyleReader.h"
#include "OOXStyleTableReader.h"
OOXStyleTableReader::OOXStyleTableReader(OOX::CStyles* ooxStyles)

View File

@ -30,8 +30,6 @@
*
*/
#pragma once
#include "OOXStyleReader.h"
#include "OOXDocDefaultsReader.h"
#include "../../../OOXML/DocxFormat/Styles.h"

View File

@ -31,10 +31,7 @@
*/
#pragma once
#include "OOXTableReader.h"
#include "OOXParagraphReader.h"
#include "OOXtcPrReader.h"
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfTable.h"
@ -52,7 +49,8 @@ class OOXTableCellReader
private:
OOX::Logic::CTc *m_ooxTableCell;
OOX::Logic::CTableProperty *m_ooxTableProps;
public:
OOXTableCellReader(OOX::Logic::CTc *ooxTableCell, OOX::Logic::CTableProperty* ooxTableProps);
bool Parse( ReaderParameter oParam ,RtfTableCell& oOutputCell, CcnfStyle oConditionalTableStyle, int nCurCell, int nCellCount, int nCurRow, int nRowCount );
bool Parse( ReaderParameter oParam, RtfTableCell& oOutputCell, CcnfStyle oConditionalTableStyle, int nCurCell, int nCellCount, int nCurRow, int nRowCount );
};

View File

@ -32,10 +32,15 @@
#include "OOXtblPrReader.h"
#include "OOXTableRowReader.h"
#include "OOXTableReader.h"
#include "OOXParagraphReader.h"
#include "../../../OOXML/DocxFormat/Logic/Table.h"
#include "../../../OOXML/DocxFormat/Logic/Paragraph.h"
OOXtrPrReader::OOXtrPrReader(OOX::Logic::CTableRowProperties* ooxTableRowProps)
{
m_ooxTableRowProps = ooxTableRowProps;
}
bool OOXtrPrReader::Parse( ReaderParameter oParam , RtfRowProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle)
{
if (m_ooxTableRowProps == NULL) return false;
@ -116,6 +121,10 @@ bool OOXtrPrReader::Parse( ReaderParameter oParam , RtfRowProperty& oOutputPrope
return true;
}
OOXTableReader::OOXTableReader(OOX::Logic::CTbl *ooxTable)
{
m_ooxTable = ooxTable;
}
bool OOXTableReader::Parse( ReaderParameter oParam, RtfTable& oOutputTable )
{
if (m_ooxTable == NULL) return false;
@ -219,12 +228,12 @@ void OOXTableReader::ApplyParagraphProperty( RtfTable& oOutputTable )
}
}
}
OOXTableRowReader::OOXTableRowReader(OOX::Logic::CTr *ooxRowTable, OOX::Logic::CTableProperty* ooxTableProps)
{
m_ooxRowTable = ooxRowTable;
m_ooxTableProps = ooxTableProps;
}
bool OOXTableRowReader::Parse( ReaderParameter oParam, RtfTableRow& oOutputRow, int nCurRow, int nRowCount)
{
if (m_ooxRowTable == NULL) return false;

View File

@ -48,10 +48,8 @@ private:
OOX::Logic::CTbl *m_ooxTable;
public:
OOXTableReader(OOX::Logic::CTbl *ooxTable)
{
m_ooxTable = ooxTable;
}
bool Parse( ReaderParameter oParam ,RtfTable & oOutputTable );
OOXTableReader(OOX::Logic::CTbl *ooxTable);
bool Parse( ReaderParameter oParam, RtfTable & oOutputTable );
void ApplyParagraphProperty( RtfTable& oOutputTable );
};

View File

@ -42,16 +42,18 @@ namespace OOX
namespace Logic
{
class CTr;
class CTableProperty;
class CTableProperty;
}
}
class OOXTableRowReader
{
private:
OOX::Logic::CTr *m_ooxRowTable;
OOX::Logic::CTableProperty *m_ooxTableProps;
public:
OOXTableRowReader(OOX::Logic::CTr *ooxRowTable, OOX::Logic::CTableProperty* ooxTableProps);
bool Parse( ReaderParameter oParam ,RtfTableRow& oOutputRow, int nCurRow, int nRowCount);
bool Parse( ReaderParameter oParam, RtfTableRow& oOutputRow, int nCurRow, int nRowCount);
};

View File

@ -40,5 +40,6 @@ public:
TextItemContainerPtr m_oTextItems;
OOXTextItemReader();
bool Parse(OOX::WritingElement* ooxElement, ReaderParameter oParam);
};

View File

@ -30,9 +30,9 @@
*
*/
#pragma once
#include "OOXColorSchemeReader.h"
#include "OOXFontSchemeReader.h"
#include "../../Format/Utils.h"
class OOXThemeReader
{

View File

@ -34,7 +34,6 @@
#include "../../Format/RtfProperty.h"
#include "../../Format/RtfTableCell.h"
#include "OOXReaderBasic.h"
#include "OOXtblLookReader.h"
class CcnfStyle

View File

@ -30,19 +30,17 @@
*
*/
#pragma once
#include "OOXReaderBasic.h"
#include "../../Format/RtfProperty.h"
#include "OOXReaderBasic.h"
#include "../../../OOXML/DocxFormat/Logic/ParagraphProperty.h"
class OOXpPrFrameReader
{
private:
ComplexTypes::Word::CFramePr *m_ooxFramePr;
public:
OOXpPrFrameReader(ComplexTypes::Word::CFramePr *ooxFramePr)
{
m_ooxFramePr = ooxFramePr;
}
bool Parse( ReaderParameter oParam ,RtfFrame& oOutputProperty);
OOXpPrFrameReader(ComplexTypes::Word::CFramePr *ooxFramePr);
bool Parse( ReaderParameter oParam, RtfFrame& oOutputProperty);
};

View File

@ -33,7 +33,7 @@
#include "OOXShadingReader.h"
#include "OOXBorderReader.h"
#include "OOXReaderBasic.h"
#include "OOXcnfStyleReader.h"
#include "OOXrPrReader.h"
#include "OOXSectionPropertyReader.h"
@ -48,20 +48,12 @@ private:
PPTX::Logic::TextParagraphPr * m_drawingParaProps;
OOX::Logic::CParagraphProperty * m_ooxParaProps;
public:
bool m_bDefStyle;
OOXpPrReader(OOX::Logic::CParagraphProperty *ooxParaProps)
{
m_bDefStyle = true;
m_ooxParaProps = ooxParaProps;
m_drawingParaProps = NULL;
}
OOXpPrReader(PPTX::Logic::TextParagraphPr *ooxParaProps)
{
m_bDefStyle = true;
m_ooxParaProps = NULL;
m_drawingParaProps = ooxParaProps;
}
bool Parse( ReaderParameter oParam ,RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle);
OOXpPrReader(OOX::Logic::CParagraphProperty *ooxParaProps);
OOXpPrReader(PPTX::Logic::TextParagraphPr *ooxParaProps);
bool Parse( ReaderParameter oParam, RtfParagraphProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle);
};

View File

@ -29,10 +29,10 @@
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
#pragma once
#include "OOXReaderBasic.h"
#include "../../Format/RtfProperty.h"
#include "../../../OOXML/DocxFormat/Logic/ParagraphProperty.h"
class OOXpPrTabReader

View File

@ -32,12 +32,8 @@
#pragma once
#include "OOXFontReader.h"
#include "OOXReaderBasic.h"
#include "OOXColorReader.h"
#include "OOXShadingReader.h"
#include "OOXBorderReader.h"
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfProperty.h"
class OOXrPrReader
@ -47,20 +43,12 @@ private:
PPTX::Logic::RunProperties * m_drawingRunProps;
OOX::Logic::CRunProperty * m_ooxRunProps;
public:
bool m_bDefStyle;
OOXrPrReader(OOX::Logic::CRunProperty *ooxRunProps)
{
m_bDefStyle = true;
m_ooxRunProps = ooxRunProps;
m_drawingRunProps = NULL;
}
OOXrPrReader(PPTX::Logic::RunProperties *ooxRunProps)
{
m_bDefStyle = true;
m_ooxRunProps = NULL;
m_drawingRunProps = ooxRunProps;
}
bool Parse( ReaderParameter oParam ,RtfCharProperty& oOutputProperty);
OOXrPrReader(OOX::Logic::CRunProperty *ooxRunProps);
OOXrPrReader(PPTX::Logic::RunProperties *ooxRunProps);
bool Parse( ReaderParameter oParam, RtfCharProperty& oOutputProperty);
};

View File

@ -31,9 +31,7 @@
*/
#pragma once
#include "../../Format/RtfProperty.h"
#include "OOXReaderBasic.h"
#include "../../../OOXML/DocxFormat/Logic/TableProperty.h"
struct CtblLook

View File

@ -30,6 +30,13 @@
*
*/
#include "OOXReader.h"
#include "OOXBorderReader.h"
#include "OOXShadingReader.h"
#include "OOXtblpPrReader.h"
#include "OOXtblLookReader.h"
#include "OOXtcPrReader.h"
#include "OOXtblPrReader.h"
OOXtblPrReader::OOXtblPrReader(OOX::Logic::CTableProperty* ooxTableProps)

View File

@ -31,14 +31,7 @@
*/
#pragma once
#include "OOXReader.h"
#include "OOXBorderReader.h"
#include "OOXShadingReader.h"
#include "OOXtblpPrReader.h"
#include "OOXReaderBasic.h"
#include "OOXtblLookReader.h"
#include "OOXtcPrReader.h"
#include "../../Format/RtfDocument.h"
#include "../../../OOXML/DocxFormat/Logic/TableProperty.h"

View File

@ -33,7 +33,6 @@
#include "OOXReader.h"
#include "OOXReaderBasic.h"
#include "../../Format/RtfDocument.h"
class OOXtblpPrReader
{

View File

@ -30,8 +30,8 @@
*
*/
#pragma once
#include "../../Format/RtfDocument.h"
#include "../../Format/RtfDocument.h"
#include "OOXBorderReader.h"
#include "OOXcnfStyleReader.h"
@ -43,7 +43,7 @@ class OOXtcPrReader
public:
OOXtcPrReader(OOX::Logic::CTableCellProperties* ooxTableCellProps, OOX::Logic::CTableProperty* ooxTableProps);
bool Parse( ReaderParameter oParam ,RtfCellProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle, int nCurCell, int nCellCount, int nCurRow, int nRowCount );
bool Parse( ReaderParameter oParam, RtfCellProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle, int nCurCell, int nCellCount, int nCurRow, int nRowCount );
static void Parse(ComplexTypes::Word::CTblWidth* margin, int& type, int& value, bool full = true );
};

View File

@ -30,21 +30,17 @@
*
*/
#pragma once
#include "OOXReader.h"
#include "OOXReaderBasic.h"
#include "OOXcnfStyleReader.h"
#include "../../Format/RtfDocument.h"
class OOXtrPrReader
{
private:
OOX::Logic::CTableRowProperties* m_ooxTableRowProps;
public:
OOXtrPrReader(OOX::Logic::CTableRowProperties* ooxTableRowProps)
{
m_ooxTableRowProps = ooxTableRowProps;
}
OOXtrPrReader(OOX::Logic::CTableRowProperties* ooxTableRowProps);
bool Parse( ReaderParameter oParam , RtfRowProperty& oOutputProperty, CcnfStyle& oConditionalTableStyle);
};