mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-10 12:32:11 +08:00
Compare commits
4 Commits
v9.3.0.48
...
feature/hw
| Author | SHA1 | Date | |
|---|---|---|---|
| ebed729f13 | |||
| 7146c08ef4 | |||
| 5ae071fa19 | |||
| f75cc7fe0f |
@ -22,6 +22,58 @@ DEFINES += HWPFILE_USE_DYNAMIC_LIBRARY \
|
||||
|
||||
SOURCES += \
|
||||
HWPFile.cpp \
|
||||
HwpDoc/Chart/Attribute.cpp \
|
||||
HwpDoc/Chart/Axis.cpp \
|
||||
HwpDoc/Chart/Backdrop.cpp \
|
||||
HwpDoc/Chart/Bar.cpp \
|
||||
HwpDoc/Chart/Brush.cpp \
|
||||
HwpDoc/Chart/CategoryScale.cpp \
|
||||
HwpDoc/Chart/ChartReader.cpp \
|
||||
HwpDoc/Chart/ChartStream.cpp \
|
||||
HwpDoc/Chart/Contour.cpp \
|
||||
HwpDoc/Chart/ContourGradient.cpp \
|
||||
HwpDoc/Chart/Coor.cpp \
|
||||
HwpDoc/Chart/Coor3.cpp \
|
||||
HwpDoc/Chart/DataGrid.cpp \
|
||||
HwpDoc/Chart/DataPoint.cpp \
|
||||
HwpDoc/Chart/DateScale.cpp \
|
||||
HwpDoc/Chart/Doughnut.cpp \
|
||||
HwpDoc/Chart/Elevation.cpp \
|
||||
HwpDoc/Chart/Fill.cpp \
|
||||
HwpDoc/Chart/Footnote.cpp \
|
||||
HwpDoc/Chart/Frame.cpp \
|
||||
HwpDoc/Chart/Gradient.cpp \
|
||||
HwpDoc/Chart/HiLo.cpp \
|
||||
HwpDoc/Chart/Intersection.cpp \
|
||||
HwpDoc/Chart/LCoor.cpp \
|
||||
HwpDoc/Chart/LRect.cpp \
|
||||
HwpDoc/Chart/Label.cpp \
|
||||
HwpDoc/Chart/Legend.cpp \
|
||||
HwpDoc/Chart/Light.cpp \
|
||||
HwpDoc/Chart/Location.cpp \
|
||||
HwpDoc/Chart/Marker.cpp \
|
||||
HwpDoc/Chart/Pen.cpp \
|
||||
HwpDoc/Chart/Pie.cpp \
|
||||
HwpDoc/Chart/Plot.cpp \
|
||||
HwpDoc/Chart/Position.cpp \
|
||||
HwpDoc/Chart/PrintInformation.cpp \
|
||||
HwpDoc/Chart/Rect.cpp \
|
||||
HwpDoc/Chart/Series.cpp \
|
||||
HwpDoc/Chart/Shadow.cpp \
|
||||
HwpDoc/Chart/StatLine.cpp \
|
||||
HwpDoc/Chart/Surface.cpp \
|
||||
HwpDoc/Chart/TextLayout.cpp \
|
||||
HwpDoc/Chart/Tick.cpp \
|
||||
HwpDoc/Chart/Title.cpp \
|
||||
HwpDoc/Chart/ValueScale.cpp \
|
||||
HwpDoc/Chart/View3D.cpp \
|
||||
HwpDoc/Chart/VtChart.cpp \
|
||||
HwpDoc/Chart/VtColor.cpp \
|
||||
HwpDoc/Chart/VtFont.cpp \
|
||||
HwpDoc/Chart/VtPicture.cpp \
|
||||
HwpDoc/Chart/Wall.cpp \
|
||||
HwpDoc/Chart/Weighting.cpp \
|
||||
HwpDoc/Chart/XYZ.cpp \
|
||||
HwpDoc/Common/XMLReader.cpp \
|
||||
HwpDoc/Common/WriterContext.cpp \
|
||||
HwpDoc/Conversion/Converter2OOXML.cpp \
|
||||
@ -99,6 +151,61 @@ SOURCES += \
|
||||
|
||||
HEADERS += \
|
||||
HWPFile.h \
|
||||
HwpDoc/Chart/Attribute.h \
|
||||
HwpDoc/Chart/Axis.h \
|
||||
HwpDoc/Chart/Backdrop.h \
|
||||
HwpDoc/Chart/Bar.h \
|
||||
HwpDoc/Chart/Brush.h \
|
||||
HwpDoc/Chart/CategoryScale.h \
|
||||
HwpDoc/Chart/CharCommon.h \
|
||||
HwpDoc/Chart/ChartObject.h \
|
||||
HwpDoc/Chart/ChartReader.h \
|
||||
HwpDoc/Chart/ChartStream.h \
|
||||
HwpDoc/Chart/Contour.h \
|
||||
HwpDoc/Chart/ContourGradient.h \
|
||||
HwpDoc/Chart/Coor.h \
|
||||
HwpDoc/Chart/Coor3.h \
|
||||
HwpDoc/Chart/DataGrid.h \
|
||||
HwpDoc/Chart/DataPoint.h \
|
||||
HwpDoc/Chart/DateScale.h \
|
||||
HwpDoc/Chart/Doughnut.h \
|
||||
HwpDoc/Chart/Elevation.h \
|
||||
HwpDoc/Chart/Fill.h \
|
||||
HwpDoc/Chart/Footnote.h \
|
||||
HwpDoc/Chart/Frame.h \
|
||||
HwpDoc/Chart/Gradient.h \
|
||||
HwpDoc/Chart/HiLo.h \
|
||||
HwpDoc/Chart/Intersection.h \
|
||||
HwpDoc/Chart/LCoor.h \
|
||||
HwpDoc/Chart/LRect.h \
|
||||
HwpDoc/Chart/Label.h \
|
||||
HwpDoc/Chart/Legend.h \
|
||||
HwpDoc/Chart/Light.h \
|
||||
HwpDoc/Chart/Location.h \
|
||||
HwpDoc/Chart/Marker.h \
|
||||
HwpDoc/Chart/Pen.h \
|
||||
HwpDoc/Chart/Pie.h \
|
||||
HwpDoc/Chart/Plot.h \
|
||||
HwpDoc/Chart/Position.h \
|
||||
HwpDoc/Chart/PrintInformation.h \
|
||||
HwpDoc/Chart/Rect.h \
|
||||
HwpDoc/Chart/Series.h \
|
||||
HwpDoc/Chart/Shadow.h \
|
||||
HwpDoc/Chart/StatLine.h \
|
||||
HwpDoc/Chart/Surface.h \
|
||||
HwpDoc/Chart/TextLayout.h \
|
||||
HwpDoc/Chart/Tick.h \
|
||||
HwpDoc/Chart/Title.h \
|
||||
HwpDoc/Chart/Types.h \
|
||||
HwpDoc/Chart/ValueScale.h \
|
||||
HwpDoc/Chart/View3D.h \
|
||||
HwpDoc/Chart/VtChart.h \
|
||||
HwpDoc/Chart/VtColor.h \
|
||||
HwpDoc/Chart/VtFont.h \
|
||||
HwpDoc/Chart/VtPicture.h \
|
||||
HwpDoc/Chart/Wall.h \
|
||||
HwpDoc/Chart/Weighting.h \
|
||||
HwpDoc/Chart/XYZ.h \
|
||||
HwpDoc/Common/Common.h \
|
||||
HwpDoc/Common/NodeNames.h \
|
||||
HwpDoc/Common/WriterContext.h \
|
||||
|
||||
15
HwpFile/HwpDoc/Chart/Attribute.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Attribute.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Attribute.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CAttribute::CAttribute()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CAttribute::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBrush.Read(oStream) && m_oPen.Read(oStream) &&
|
||||
oStream.ReadString(m_sText) && oStream.ReadDouble(m_dValue);
|
||||
}
|
||||
}}
|
||||
25
HwpFile/HwpDoc/Chart/Attribute.h
Normal file
25
HwpFile/HwpDoc/Chart/Attribute.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef ATTRIBUTE_H
|
||||
#define ATTRIBUTE_H
|
||||
|
||||
#include "Brush.h"
|
||||
#include "Pen.h"
|
||||
#include "Collection.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CAttribute : public IChartObject
|
||||
{
|
||||
CBrush m_oBrush;
|
||||
CPen m_oPen;
|
||||
CHART_STRING m_sText;
|
||||
CHART_DOUBLE m_dValue;
|
||||
public:
|
||||
CAttribute();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
using CAttributes = CCollection<CAttribute>;
|
||||
}}
|
||||
|
||||
#endif // ATTRIBUTE_H
|
||||
51
HwpFile/HwpDoc/Chart/Axis.cpp
Normal file
51
HwpFile/HwpDoc/Chart/Axis.cpp
Normal file
@ -0,0 +1,51 @@
|
||||
#include "Axis.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CAxisGrid::CAxisGrid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CAxisGrid::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oMajorPen.Read(oStream) && m_oMinorPen.Read(oStream);
|
||||
}
|
||||
|
||||
CAxisScale::CAxisScale()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CAxisScale::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bHide) && oStream.ReadInteger(m_nLogBase) &&
|
||||
oStream.ReadString(m_sPercentBasis) && oStream.ReadInteger(m_nType);
|
||||
}
|
||||
|
||||
CAxisTitle::CAxisTitle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CAxisTitle::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && oStream.ReadString(m_sText) &&
|
||||
m_oTextLayout.Read(oStream) && oStream.ReadInteger(m_nTextLength) &&
|
||||
oStream.ReadBoolean(m_bVisible) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
|
||||
CAxis::CAxis()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CAxis::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oAxisGrid.Read(oStream) && m_oAxisScale.Read(oStream) &&
|
||||
m_oAxisTitle.Read(oStream) && m_oCategoryScale.Read(oStream) &&
|
||||
m_oDateScale.Read(oStream) && m_oIntersection.Read(oStream) &&
|
||||
m_oLabels.Read(oStream) && oStream.ReadInteger(m_nLabelLevelCount) &&
|
||||
m_oPen.Read(oStream) && m_oTick.Read(oStream) && m_oValueScale.Read(oStream);
|
||||
}
|
||||
}}
|
||||
73
HwpFile/HwpDoc/Chart/Axis.h
Normal file
73
HwpFile/HwpDoc/Chart/Axis.h
Normal file
@ -0,0 +1,73 @@
|
||||
#ifndef AXIS_H
|
||||
#define AXIS_H
|
||||
|
||||
#include "Pen.h"
|
||||
#include "VtFont.h"
|
||||
#include "Backdrop.h"
|
||||
#include "TextLayout.h"
|
||||
#include "CategoryScale.h"
|
||||
#include "DateScale.h"
|
||||
#include "Intersection.h"
|
||||
#include "Label.h"
|
||||
#include "Tick.h"
|
||||
#include "ValueScale.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CAxisGrid : public IChartObject
|
||||
{
|
||||
CPen m_oMajorPen;
|
||||
CPen m_oMinorPen;
|
||||
public:
|
||||
CAxisGrid();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CAxisScale : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bHide;
|
||||
CHART_INTEGER m_nLogBase;
|
||||
CHART_STRING m_sPercentBasis;
|
||||
CHART_INTEGER m_nType;
|
||||
public:
|
||||
CAxisScale();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CAxisTitle : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_STRING m_sText;
|
||||
CTextLayout m_oTextLayout;
|
||||
CHART_INTEGER m_nTextLength;
|
||||
CHART_BOOLEAN m_bVisible;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CAxisTitle();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CAxis : public IChartObject
|
||||
{
|
||||
CAxisGrid m_oAxisGrid;
|
||||
CAxisScale m_oAxisScale;
|
||||
CAxisTitle m_oAxisTitle;
|
||||
CCategoryScale m_oCategoryScale;
|
||||
CDateScale m_oDateScale;
|
||||
CIntersection m_oIntersection;
|
||||
CLabels m_oLabels;
|
||||
CHART_INTEGER m_nLabelLevelCount;
|
||||
CPen m_oPen;
|
||||
CTick m_oTick;
|
||||
CValueScale m_oValueScale;
|
||||
public:
|
||||
CAxis();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // AXIS_H
|
||||
14
HwpFile/HwpDoc/Chart/Backdrop.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Backdrop.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Backdrop.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CBackdrop::CBackdrop()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CBackdrop::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oFrame.Read(oStream) && m_oFill.Read(oStream) && m_oShadow.Read(oStream);
|
||||
}
|
||||
}}
|
||||
22
HwpFile/HwpDoc/Chart/Backdrop.h
Normal file
22
HwpFile/HwpDoc/Chart/Backdrop.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef BACKDROP_H
|
||||
#define BACKDROP_H
|
||||
|
||||
#include "Frame.h"
|
||||
#include "Fill.h"
|
||||
#include "Shadow.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CBackdrop : public IChartObject
|
||||
{
|
||||
CFrame m_oFrame;
|
||||
CFill m_oFill;
|
||||
CShadow m_oShadow;
|
||||
public:
|
||||
CBackdrop();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // BACKDROP_H
|
||||
14
HwpFile/HwpDoc/Chart/Bar.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Bar.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Bar.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CBar::CBar()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CBar::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nSides) && oStream.ReadSingle(m_snTopRatio);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Bar.h
Normal file
19
HwpFile/HwpDoc/Chart/Bar.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef BAR_H
|
||||
#define BAR_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CBar : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nSides;
|
||||
CHART_SINGLE m_snTopRatio;
|
||||
public:
|
||||
CBar();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // BAR_H
|
||||
15
HwpFile/HwpDoc/Chart/Brush.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Brush.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Brush.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CBrush::CBrush()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CBrush::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oFillColor.Read(oStream) && oStream.ReadInteger(m_nIndex) &&
|
||||
m_oPatternColor.Read(oStream) && oStream.ReadInteger(m_nStyle);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/Brush.h
Normal file
21
HwpFile/HwpDoc/Chart/Brush.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef BRUSH_H
|
||||
#define BRUSH_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CBrush : public IChartObject
|
||||
{
|
||||
CVtColor m_oFillColor;
|
||||
CHART_INTEGER m_nIndex;
|
||||
CVtColor m_oPatternColor;
|
||||
CHART_INTEGER m_nStyle;
|
||||
public:
|
||||
CBrush();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // BRUSH_H
|
||||
15
HwpFile/HwpDoc/Chart/CategoryScale.cpp
Normal file
15
HwpFile/HwpDoc/Chart/CategoryScale.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "CategoryScale.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CCategoryScale::CCategoryScale()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CCategoryScale::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && oStream.ReadInteger(m_nDivisionsPerLabel) &&
|
||||
oStream.ReadInteger(m_nDivisionsPerTick) && oStream.ReadBoolean(m_bLabelTick);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/CategoryScale.h
Normal file
21
HwpFile/HwpDoc/Chart/CategoryScale.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef CATEGORYSCALE_H
|
||||
#define CATEGORYSCALE_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CCategoryScale : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAuto;
|
||||
CHART_INTEGER m_nDivisionsPerLabel;
|
||||
CHART_INTEGER m_nDivisionsPerTick;
|
||||
CHART_BOOLEAN m_bLabelTick;
|
||||
public:
|
||||
CCategoryScale();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CATEGORYSCALE_H
|
||||
17
HwpFile/HwpDoc/Chart/CharCommon.h
Normal file
17
HwpFile/HwpDoc/Chart/CharCommon.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef CHARCOMMON_H
|
||||
#define CHARCOMMON_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
typedef bool CHART_BOOLEAN;
|
||||
typedef int8_t CHART_INTEGER;
|
||||
typedef int CHART_LONG;
|
||||
typedef float CHART_SINGLE;
|
||||
typedef double CHART_DOUBLE;
|
||||
typedef std::wstring CHART_STRING;
|
||||
}}
|
||||
|
||||
#endif // CHARCOMMON_H
|
||||
21
HwpFile/HwpDoc/Chart/ChartObject.h
Normal file
21
HwpFile/HwpDoc/Chart/ChartObject.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef CHARTOBJECT_H
|
||||
#define CHARTOBJECT_H
|
||||
|
||||
#include "Types.h"
|
||||
#include "ChartStream.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class IChartObject
|
||||
{
|
||||
CHART_LONG m_lId;
|
||||
CHART_LONG m_lStoredtypeId;
|
||||
protected:
|
||||
IChartObject() = default;
|
||||
public:
|
||||
virtual bool Read(CChartStream& oStream) = 0;
|
||||
// virtual ETypes GetType() const = 0;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CHARTOBJECT_H
|
||||
28
HwpFile/HwpDoc/Chart/ChartReader.cpp
Normal file
28
HwpFile/HwpDoc/Chart/ChartReader.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include "ChartReader.h"
|
||||
|
||||
#include "VtChart.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CChartReader::CChartReader()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CChartReader::ReadFromOle(CHWPStream& oOleData)
|
||||
{
|
||||
CChartStream oChartStream(&oOleData);
|
||||
|
||||
oChartStream.Skip(44); //Unknown data
|
||||
|
||||
CHART_STRING sStoredName;
|
||||
oChartStream.ReadString(sStoredName);
|
||||
|
||||
CVtChart oVtChart;
|
||||
|
||||
if (!oVtChart.Read(oChartStream))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
}
|
||||
}}
|
||||
17
HwpFile/HwpDoc/Chart/ChartReader.h
Normal file
17
HwpFile/HwpDoc/Chart/ChartReader.h
Normal file
@ -0,0 +1,17 @@
|
||||
#ifndef CHARTREADER_H
|
||||
#define CHARTREADER_H
|
||||
|
||||
#include "../HWPStream.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CChartReader
|
||||
{
|
||||
public:
|
||||
CChartReader();
|
||||
|
||||
bool ReadFromOle(CHWPStream& oOleData);
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CHARTREADER_H
|
||||
74
HwpFile/HwpDoc/Chart/ChartStream.cpp
Normal file
74
HwpFile/HwpDoc/Chart/ChartStream.cpp
Normal file
@ -0,0 +1,74 @@
|
||||
#include "ChartStream.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CChartStream::CChartStream()
|
||||
: m_pStream(nullptr), m_bExternStream(false)
|
||||
{}
|
||||
|
||||
CChartStream::CChartStream(CHWPStream* pStream, bool bExtern)
|
||||
: m_pStream(pStream), m_bExternStream(bExtern)
|
||||
{}
|
||||
|
||||
CChartStream::~CChartStream()
|
||||
{
|
||||
if (nullptr != m_pStream && !m_bExternStream)
|
||||
delete m_pStream;
|
||||
}
|
||||
|
||||
#define CHECK_VALID()\
|
||||
if (!Valid())\
|
||||
return false
|
||||
|
||||
bool CChartStream::ReadBoolean(CHART_BOOLEAN& bValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
return m_pStream->ReadBool(bValue);
|
||||
}
|
||||
|
||||
bool CChartStream::ReadInteger(CHART_INTEGER& nValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
return m_pStream->ReadByte((HWP_BYTE&)nValue);
|
||||
}
|
||||
|
||||
bool CChartStream::ReadLong(CHART_LONG& lValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
return m_pStream->ReadInt(lValue);
|
||||
}
|
||||
|
||||
bool CChartStream::ReadSingle(CHART_SINGLE& fValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
return m_pStream->ReadFloat(fValue);
|
||||
}
|
||||
|
||||
bool CChartStream::ReadDouble(CHART_DOUBLE& dValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
return m_pStream->ReadDouble(dValue);
|
||||
}
|
||||
|
||||
bool CChartStream::ReadString(HWP_STRING& sValue)
|
||||
{
|
||||
CHECK_VALID();
|
||||
|
||||
short shCount;
|
||||
if (!m_pStream->ReadShort(shCount))
|
||||
return false;
|
||||
|
||||
return m_pStream->ReadString(sValue, shCount, EStringCharacter::ASCII);
|
||||
}
|
||||
|
||||
void CChartStream::Skip(int nStep)
|
||||
{
|
||||
if (nullptr != m_pStream)
|
||||
m_pStream->Skip(nStep);
|
||||
}
|
||||
|
||||
bool CChartStream::Valid() const
|
||||
{
|
||||
return nullptr != m_pStream && m_pStream->IsValid();
|
||||
}
|
||||
}}
|
||||
31
HwpFile/HwpDoc/Chart/ChartStream.h
Normal file
31
HwpFile/HwpDoc/Chart/ChartStream.h
Normal file
@ -0,0 +1,31 @@
|
||||
#ifndef CHARTSTREAM_H
|
||||
#define CHARTSTREAM_H
|
||||
|
||||
#include "../HWPStream.h"
|
||||
#include "CharCommon.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CChartStream
|
||||
{
|
||||
CHWPStream *m_pStream;
|
||||
bool m_bExternStream;
|
||||
public:
|
||||
CChartStream();
|
||||
CChartStream(CHWPStream* pStream, bool bExtern = true);
|
||||
~CChartStream();
|
||||
|
||||
bool ReadBoolean(CHART_BOOLEAN& bValue);
|
||||
bool ReadInteger(CHART_INTEGER& nValue);
|
||||
bool ReadLong(CHART_LONG& lValue);
|
||||
bool ReadSingle(CHART_SINGLE& fValue);
|
||||
bool ReadDouble(CHART_DOUBLE& dValue);
|
||||
bool ReadString(HWP_STRING& sValue);
|
||||
|
||||
void Skip(int nStep);
|
||||
private:
|
||||
bool Valid() const;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CHARTSTREAM_H
|
||||
7
HwpFile/HwpDoc/Chart/Collection.cpp
Normal file
7
HwpFile/HwpDoc/Chart/Collection.cpp
Normal file
@ -0,0 +1,7 @@
|
||||
#include "Collection.h"
|
||||
|
||||
|
||||
CCollection::CCollection()
|
||||
{
|
||||
|
||||
}
|
||||
54
HwpFile/HwpDoc/Chart/Collection.h
Normal file
54
HwpFile/HwpDoc/Chart/Collection.h
Normal file
@ -0,0 +1,54 @@
|
||||
#ifndef COLLECTION_H
|
||||
#define COLLECTION_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
template<typename T>
|
||||
class CCollection : public IChartObject
|
||||
{
|
||||
std::vector<const T*> m_arItems;
|
||||
public:
|
||||
CCollection() = default;
|
||||
~CCollection()
|
||||
{
|
||||
for (const T* pItem : m_arItems)
|
||||
delete pItem;
|
||||
}
|
||||
|
||||
bool AddItem(const T* pItem)
|
||||
{
|
||||
if(nullptr == pItem)
|
||||
return false;
|
||||
|
||||
m_arItems.push_back(pItem);
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool Read(CChartStream& oStream) override
|
||||
{
|
||||
CHART_LONG lCount;
|
||||
|
||||
if (!oStream.ReadLong(lCount))
|
||||
return false;
|
||||
|
||||
for (long lIndex = 0; lIndex < lCount; ++lIndex)
|
||||
{
|
||||
T* pItem = new T();
|
||||
|
||||
if (nullptr == pItem)
|
||||
continue;
|
||||
|
||||
if (!pItem->Read(oStream) || !AddItem(pItem))
|
||||
{
|
||||
delete pItem;
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
}}
|
||||
#endif // COLLECTION_H
|
||||
14
HwpFile/HwpDoc/Chart/Contour.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Contour.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Contour.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CContour::CContour()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CContour::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nDisplayType);
|
||||
}
|
||||
}}
|
||||
18
HwpFile/HwpDoc/Chart/Contour.h
Normal file
18
HwpFile/HwpDoc/Chart/Contour.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef CONTOUR_H
|
||||
#define CONTOUR_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CContour : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nDisplayType;
|
||||
public:
|
||||
CContour();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CONTOUR_H
|
||||
15
HwpFile/HwpDoc/Chart/ContourGradient.cpp
Normal file
15
HwpFile/HwpDoc/Chart/ContourGradient.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "ContourGradient.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CContourGradient::CContourGradient()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CContourGradient::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oFromBrushColor.Read(oStream) && m_oToBrushColor.Read(oStream) &&
|
||||
m_oFromPenColor.Read(oStream) && m_oToPenColor.Read(oStream);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/ContourGradient.h
Normal file
21
HwpFile/HwpDoc/Chart/ContourGradient.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef CONTOURGRADIENT_H
|
||||
#define CONTOURGRADIENT_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CContourGradient : public IChartObject
|
||||
{
|
||||
CVtColor m_oFromBrushColor;
|
||||
CVtColor m_oToBrushColor;
|
||||
CVtColor m_oFromPenColor;
|
||||
CVtColor m_oToPenColor;
|
||||
public:
|
||||
CContourGradient();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // CONTOURGRADIENT_H
|
||||
14
HwpFile/HwpDoc/Chart/Coor.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Coor.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Coor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CCoor::CCoor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CCoor::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snX) && oStream.ReadSingle(m_snY);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Coor.h
Normal file
19
HwpFile/HwpDoc/Chart/Coor.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef COOR_H
|
||||
#define COOR_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CCoor : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snX;
|
||||
CHART_SINGLE m_snY;
|
||||
public:
|
||||
CCoor();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // COOR_H
|
||||
14
HwpFile/HwpDoc/Chart/Coor3.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Coor3.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Coor3.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CCoor3::CCoor3()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CCoor3::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snX) && oStream.ReadSingle(m_snY) && oStream.ReadSingle(m_snZ);
|
||||
}
|
||||
}}
|
||||
20
HwpFile/HwpDoc/Chart/Coor3.h
Normal file
20
HwpFile/HwpDoc/Chart/Coor3.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef COOR3_H
|
||||
#define COOR3_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CCoor3 : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snX;
|
||||
CHART_SINGLE m_snY;
|
||||
CHART_SINGLE m_snZ;
|
||||
public:
|
||||
CCoor3();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // COOR3_H
|
||||
17
HwpFile/HwpDoc/Chart/DataGrid.cpp
Normal file
17
HwpFile/HwpDoc/Chart/DataGrid.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "DataGrid.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CDataGrid::CDataGrid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDataGrid::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nColumnCount) && oStream.ReadString(m_sColumnLabel) &&
|
||||
oStream.ReadInteger(m_nColumnLabelCount) && oStream.ReadInteger(m_nCompositeColumnLabel) &&
|
||||
oStream.ReadString(m_sCompositeRowLabel) && oStream.ReadInteger(m_nRowCount) &&
|
||||
oStream.ReadString(m_sRowLabel) && oStream.ReadInteger(m_nRowLabelCount);
|
||||
}
|
||||
}}
|
||||
25
HwpFile/HwpDoc/Chart/DataGrid.h
Normal file
25
HwpFile/HwpDoc/Chart/DataGrid.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef DATAGRID_H
|
||||
#define DATAGRID_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CDataGrid : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nColumnCount;
|
||||
CHART_STRING m_sColumnLabel;
|
||||
CHART_INTEGER m_nColumnLabelCount;
|
||||
CHART_INTEGER m_nCompositeColumnLabel;
|
||||
CHART_STRING m_sCompositeRowLabel;
|
||||
CHART_INTEGER m_nRowCount;
|
||||
CHART_STRING m_sRowLabel;
|
||||
CHART_INTEGER m_nRowLabelCount;
|
||||
public:
|
||||
CDataGrid();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // DATAGRID_H
|
||||
31
HwpFile/HwpDoc/Chart/DataPoint.cpp
Normal file
31
HwpFile/HwpDoc/Chart/DataPoint.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
#include "DataPoint.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CDataPointLabel::CDataPointLabel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDataPointLabel::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && oStream.ReadInteger(m_nComponent) &&
|
||||
oStream.ReadBoolean(m_bCustom) && oStream.ReadInteger(m_nLineStyle) &&
|
||||
oStream.ReadInteger(m_nLocationType) && m_oOffset.Read(oStream) &&
|
||||
oStream.ReadString(m_sPercentFormat) && oStream.ReadString(m_sText) &&
|
||||
m_oTextLayout.Read(oStream) && oStream.ReadInteger(m_nTextLength) &&
|
||||
oStream.ReadString(m_sValueFormat) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
|
||||
CDataPoint::CDataPoint()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDataPoint::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBrush.Read(oStream) && m_oDataPointLabel.Read(oStream) &&
|
||||
m_oEdgePen.Read(oStream) && oStream.ReadSingle(m_snOffset) &&
|
||||
m_oMarker.Read(oStream) && m_oVtPicture.Read(oStream);
|
||||
}
|
||||
}}
|
||||
53
HwpFile/HwpDoc/Chart/DataPoint.h
Normal file
53
HwpFile/HwpDoc/Chart/DataPoint.h
Normal file
@ -0,0 +1,53 @@
|
||||
#ifndef DATAPOINT_H
|
||||
#define DATAPOINT_H
|
||||
|
||||
#include "Backdrop.h"
|
||||
#include "Coor.h"
|
||||
#include "TextLayout.h"
|
||||
#include "VtFont.h"
|
||||
#include "Pen.h"
|
||||
#include "Marker.h"
|
||||
#include "Brush.h"
|
||||
#include "VtPicture.h"
|
||||
#include "Collection.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CDataPointLabel : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_INTEGER m_nComponent;
|
||||
CHART_BOOLEAN m_bCustom;
|
||||
CHART_INTEGER m_nLineStyle;
|
||||
CHART_INTEGER m_nLocationType;
|
||||
CCoor m_oOffset;
|
||||
CHART_STRING m_sPercentFormat;
|
||||
CHART_STRING m_sText;
|
||||
CTextLayout m_oTextLayout;
|
||||
CHART_INTEGER m_nTextLength;
|
||||
CHART_STRING m_sValueFormat;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CDataPointLabel();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CDataPoint : public IChartObject
|
||||
{
|
||||
CBrush m_oBrush;
|
||||
CDataPointLabel m_oDataPointLabel;
|
||||
CPen m_oEdgePen;
|
||||
CHART_SINGLE m_snOffset;
|
||||
CMarker m_oMarker;
|
||||
CVtPicture m_oVtPicture;
|
||||
public:
|
||||
CDataPoint();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
using CDataPoints = CCollection<CDataPoint>;
|
||||
}}
|
||||
|
||||
#endif // DATAPOINT_H
|
||||
17
HwpFile/HwpDoc/Chart/DateScale.cpp
Normal file
17
HwpFile/HwpDoc/Chart/DateScale.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "DateScale.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CDateScale::CDateScale()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDateScale::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && oStream.ReadInteger(m_nMajFreq) &&
|
||||
oStream.ReadInteger(m_nMajInt) && oStream.ReadDouble(m_dMaximum) &&
|
||||
oStream.ReadDouble(m_dMinimum) && oStream.ReadInteger(m_nMinFreq) &&
|
||||
oStream.ReadInteger(m_nMinInt) && oStream.ReadBoolean(m_bSkipWeekend);
|
||||
}
|
||||
}}
|
||||
25
HwpFile/HwpDoc/Chart/DateScale.h
Normal file
25
HwpFile/HwpDoc/Chart/DateScale.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef DATESCALE_H
|
||||
#define DATESCALE_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CDateScale : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAuto;
|
||||
CHART_INTEGER m_nMajFreq;
|
||||
CHART_INTEGER m_nMajInt;
|
||||
CHART_DOUBLE m_dMaximum;
|
||||
CHART_DOUBLE m_dMinimum;
|
||||
CHART_INTEGER m_nMinFreq;
|
||||
CHART_INTEGER m_nMinInt;
|
||||
CHART_BOOLEAN m_bSkipWeekend;
|
||||
public:
|
||||
CDateScale();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // DATESCALE_H
|
||||
14
HwpFile/HwpDoc/Chart/Doughnut.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Doughnut.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Doughnut.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CDoughnut::CDoughnut()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CDoughnut::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nSides) && oStream.ReadSingle(m_snInteriorRatio);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Doughnut.h
Normal file
19
HwpFile/HwpDoc/Chart/Doughnut.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef DOUGHNUT_H
|
||||
#define DOUGHNUT_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CDoughnut : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nSides;
|
||||
CHART_SINGLE m_snInteriorRatio;
|
||||
public:
|
||||
CDoughnut();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // DOUGHNUT_H
|
||||
18
HwpFile/HwpDoc/Chart/Elevation.cpp
Normal file
18
HwpFile/HwpDoc/Chart/Elevation.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "Elevation.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CElevation::CElevation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CElevation::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oAttributes.Read(oStream) && oStream.ReadBoolean(m_bAutoValues) &&
|
||||
oStream.ReadInteger(m_nColorType) && oStream.ReadInteger(m_nColSmoothing) &&
|
||||
m_oContour.Read(oStream) && m_oContourGradient.Read(oStream) &&
|
||||
oStream.ReadInteger(m_nRowSmoothing) && oStream.ReadBoolean(m_bSeparateContourData) &&
|
||||
m_oSurface.Read(oStream);
|
||||
}
|
||||
}}
|
||||
29
HwpFile/HwpDoc/Chart/Elevation.h
Normal file
29
HwpFile/HwpDoc/Chart/Elevation.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef ELEVATION_H
|
||||
#define ELEVATION_H
|
||||
|
||||
#include "Attribute.h"
|
||||
#include "Contour.h"
|
||||
#include "ContourGradient.h"
|
||||
#include "Surface.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CElevation : public IChartObject
|
||||
{
|
||||
CAttributes m_oAttributes;
|
||||
CHART_BOOLEAN m_bAutoValues;
|
||||
CHART_INTEGER m_nColorType;
|
||||
CHART_INTEGER m_nColSmoothing;
|
||||
CContour m_oContour;
|
||||
CContourGradient m_oContourGradient;
|
||||
CHART_INTEGER m_nRowSmoothing;
|
||||
CHART_BOOLEAN m_bSeparateContourData;
|
||||
CSurface m_oSurface;
|
||||
public:
|
||||
CElevation();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // ELEVATION_H
|
||||
15
HwpFile/HwpDoc/Chart/Fill.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Fill.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Fill.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CFill::CFill()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CFill::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBrush.Read(oStream) && /*&&*/
|
||||
oStream.ReadInteger(m_nStyle) && m_oVtPicture.Read(oStream);
|
||||
}
|
||||
}}
|
||||
27
HwpFile/HwpDoc/Chart/Fill.h
Normal file
27
HwpFile/HwpDoc/Chart/Fill.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef FILL_H
|
||||
#define FILL_H
|
||||
|
||||
#include "Brush.h"
|
||||
#include "Gradient.h"
|
||||
#include "VtPicture.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CFill : public IChartObject
|
||||
{
|
||||
CBrush m_oBrush;
|
||||
// union
|
||||
// {
|
||||
// CGradient m_oGradient;
|
||||
// CVtPicture m_oPicture;
|
||||
// } m_oGradient;
|
||||
CHART_INTEGER m_nStyle;
|
||||
CVtPicture m_oVtPicture;
|
||||
public:
|
||||
CFill();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // FILL_H
|
||||
16
HwpFile/HwpDoc/Chart/Footnote.cpp
Normal file
16
HwpFile/HwpDoc/Chart/Footnote.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "Footnote.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CFootnote::CFootnote()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CFootnote::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && m_oLocation.Read(oStream) &&
|
||||
oStream.ReadString(m_sText) && m_oTextLayout.Read(oStream) &&
|
||||
oStream.ReadInteger(m_nTextLength) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
}}
|
||||
26
HwpFile/HwpDoc/Chart/Footnote.h
Normal file
26
HwpFile/HwpDoc/Chart/Footnote.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef FOOTNOTE_H
|
||||
#define FOOTNOTE_H
|
||||
|
||||
#include "Backdrop.h"
|
||||
#include "Location.h"
|
||||
#include "TextLayout.h"
|
||||
#include "VtFont.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CFootnote : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CLocation m_oLocation;
|
||||
CHART_STRING m_sText;
|
||||
CTextLayout m_oTextLayout;
|
||||
CHART_INTEGER m_nTextLength;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CFootnote();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // FOOTNOTE_H
|
||||
15
HwpFile/HwpDoc/Chart/Frame.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Frame.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Frame.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CFrame::CFrame()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CFrame::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nStyle) && oStream.ReadSingle(m_snWidth) &&
|
||||
m_oFrameColor.Read(oStream) && m_oSpaceColor.Read(oStream);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/Frame.h
Normal file
21
HwpFile/HwpDoc/Chart/Frame.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef FRAME_H
|
||||
#define FRAME_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CFrame : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nStyle;
|
||||
CHART_SINGLE m_snWidth;
|
||||
CVtColor m_oFrameColor;
|
||||
CVtColor m_oSpaceColor;
|
||||
public:
|
||||
CFrame();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // FRAME_H
|
||||
15
HwpFile/HwpDoc/Chart/Gradient.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Gradient.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Gradient.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CGradient::CGradient()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CGradient::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oFromColor.Read(oStream) && oStream.ReadInteger(m_nStyle) &&
|
||||
m_oToColor.Read(oStream);
|
||||
}
|
||||
}}
|
||||
20
HwpFile/HwpDoc/Chart/Gradient.h
Normal file
20
HwpFile/HwpDoc/Chart/Gradient.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef GRADIENT_H
|
||||
#define GRADIENT_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CGradient : public IChartObject
|
||||
{
|
||||
CVtColor m_oFromColor;
|
||||
CHART_INTEGER m_nStyle;
|
||||
CVtColor m_oToColor;
|
||||
public:
|
||||
CGradient();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // GRADIENT_H
|
||||
14
HwpFile/HwpDoc/Chart/HiLo.cpp
Normal file
14
HwpFile/HwpDoc/Chart/HiLo.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "HiLo.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CHiLo::CHiLo()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CHiLo::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oGainColor.Read(oStream) && m_oLossColor.Read(oStream);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/HiLo.h
Normal file
19
HwpFile/HwpDoc/Chart/HiLo.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef HILO_H
|
||||
#define HILO_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CHiLo : public IChartObject
|
||||
{
|
||||
CVtColor m_oGainColor;
|
||||
CVtColor m_oLossColor;
|
||||
public:
|
||||
CHiLo();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // HILO_H
|
||||
16
HwpFile/HwpDoc/Chart/Intersection.cpp
Normal file
16
HwpFile/HwpDoc/Chart/Intersection.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "Intersection.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CIntersection::CIntersection()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CIntersection::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && oStream.ReadInteger(m_nAxisId) &&
|
||||
oStream.ReadInteger(m_nIndex) && oStream.ReadBoolean(m_bLabelsInsidePlot) &&
|
||||
oStream.ReadDouble(m_dPoint);
|
||||
}
|
||||
}}
|
||||
22
HwpFile/HwpDoc/Chart/Intersection.h
Normal file
22
HwpFile/HwpDoc/Chart/Intersection.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef INTERSECTION_H
|
||||
#define INTERSECTION_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CIntersection : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAuto;
|
||||
CHART_INTEGER m_nAxisId;
|
||||
CHART_INTEGER m_nIndex;
|
||||
CHART_BOOLEAN m_bLabelsInsidePlot;
|
||||
CHART_DOUBLE m_dPoint;
|
||||
public:
|
||||
CIntersection();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // INTERSECTION_H
|
||||
14
HwpFile/HwpDoc/Chart/LCoor.cpp
Normal file
14
HwpFile/HwpDoc/Chart/LCoor.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "LCoor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLCoor::CLCoor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLCoor::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadLong(m_lX) && oStream.ReadLong(m_lY);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/LCoor.h
Normal file
19
HwpFile/HwpDoc/Chart/LCoor.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef LCOOR_H
|
||||
#define LCOOR_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLCoor : public IChartObject
|
||||
{
|
||||
CHART_LONG m_lX;
|
||||
CHART_LONG m_lY;
|
||||
public:
|
||||
CLCoor();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // LCOOR_H
|
||||
14
HwpFile/HwpDoc/Chart/LRect.cpp
Normal file
14
HwpFile/HwpDoc/Chart/LRect.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "LRect.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLRect::CLRect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLRect::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oMax.Read(oStream) && m_oMin.Read(oStream);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/LRect.h
Normal file
19
HwpFile/HwpDoc/Chart/LRect.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef LRECT_H
|
||||
#define LRECT_H
|
||||
|
||||
#include "Coor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLRect : public IChartObject
|
||||
{
|
||||
CCoor m_oMax;
|
||||
CCoor m_oMin;
|
||||
public:
|
||||
CLRect();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // LRECT_H
|
||||
17
HwpFile/HwpDoc/Chart/Label.cpp
Normal file
17
HwpFile/HwpDoc/Chart/Label.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "Label.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLabel::CLabel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLabel::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && m_oBackdrop.Read(oStream) &&
|
||||
oStream.ReadString(m_sFormat) && oStream.ReadString(m_sFormatLength) &&
|
||||
oStream.ReadBoolean(m_bStanding) && m_oTextLayout.Read(oStream) &&
|
||||
m_oVtFont.Read(oStream);
|
||||
}
|
||||
}}
|
||||
29
HwpFile/HwpDoc/Chart/Label.h
Normal file
29
HwpFile/HwpDoc/Chart/Label.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef LABEL_H
|
||||
#define LABEL_H
|
||||
|
||||
#include "Backdrop.h"
|
||||
#include "TextLayout.h"
|
||||
#include "VtFont.h"
|
||||
#include "Collection.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLabel : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAuto;
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_STRING m_sFormat;
|
||||
CHART_STRING m_sFormatLength;
|
||||
CHART_BOOLEAN m_bStanding;
|
||||
CTextLayout m_oTextLayout;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CLabel();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
using CLabels = CCollection<CLabel>;
|
||||
}}
|
||||
|
||||
#endif // LABEL_H
|
||||
15
HwpFile/HwpDoc/Chart/Legend.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Legend.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Legend.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLegend::CLegend()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLegend::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && m_oLocation.Read(oStream) &&
|
||||
m_oTextLayout.Read(oStream) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
}}
|
||||
24
HwpFile/HwpDoc/Chart/Legend.h
Normal file
24
HwpFile/HwpDoc/Chart/Legend.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef LEGEND_H
|
||||
#define LEGEND_H
|
||||
|
||||
#include "Backdrop.h"
|
||||
#include "Location.h"
|
||||
#include "TextLayout.h"
|
||||
#include "VtFont.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLegend : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CLocation m_oLocation;
|
||||
CTextLayout m_oTextLayout;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CLegend();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // LEGEND_H
|
||||
26
HwpFile/HwpDoc/Chart/Light.cpp
Normal file
26
HwpFile/HwpDoc/Chart/Light.cpp
Normal file
@ -0,0 +1,26 @@
|
||||
#include "Light.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLightSource::CLightSource()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLightSource::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snX) && oStream.ReadSingle(m_snY) &&
|
||||
oStream.ReadSingle(m_snZ) && oStream.ReadSingle(m_snIntensity);
|
||||
}
|
||||
|
||||
CLight::CLight()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLight::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snAmbientIntensity) && oStream.ReadSingle(m_snEdgeIntensity) &&
|
||||
oStream.ReadBoolean(m_bEdgeVisible) && m_oLightSources.Read(oStream);
|
||||
}
|
||||
}}
|
||||
35
HwpFile/HwpDoc/Chart/Light.h
Normal file
35
HwpFile/HwpDoc/Chart/Light.h
Normal file
@ -0,0 +1,35 @@
|
||||
#ifndef LIGHT_H
|
||||
#define LIGHT_H
|
||||
|
||||
#include "Collection.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLightSource : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snX;
|
||||
CHART_SINGLE m_snY;
|
||||
CHART_SINGLE m_snZ;
|
||||
CHART_SINGLE m_snIntensity;
|
||||
public:
|
||||
CLightSource();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
using CLightSources = CCollection<CLightSource>;
|
||||
|
||||
class CLight : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snAmbientIntensity;
|
||||
CHART_SINGLE m_snEdgeIntensity;
|
||||
CHART_BOOLEAN m_bEdgeVisible;
|
||||
CLightSources m_oLightSources;
|
||||
public:
|
||||
CLight();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // LIGHT_H
|
||||
14
HwpFile/HwpDoc/Chart/Location.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Location.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Location.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CLocation::CLocation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CLocation::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nLocationType) && m_oRect.Read(oStream) && oStream.ReadBoolean(m_bVisible);
|
||||
}
|
||||
}}
|
||||
20
HwpFile/HwpDoc/Chart/Location.h
Normal file
20
HwpFile/HwpDoc/Chart/Location.h
Normal file
@ -0,0 +1,20 @@
|
||||
#ifndef LOCATION_H
|
||||
#define LOCATION_H
|
||||
|
||||
#include "Rect.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CLocation : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nLocationType;
|
||||
CRect m_oRect;
|
||||
CHART_BOOLEAN m_bVisible;
|
||||
public:
|
||||
CLocation();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // LOCATION_H
|
||||
16
HwpFile/HwpDoc/Chart/Marker.cpp
Normal file
16
HwpFile/HwpDoc/Chart/Marker.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "Marker.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CMarker::CMarker()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CMarker::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oFillColor.Read(oStream) && m_oPen.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snSize) && oStream.ReadInteger(m_nStyle) &&
|
||||
oStream.ReadBoolean(m_bVisible) && m_oVtPicture.Read(oStream);
|
||||
}
|
||||
}}
|
||||
24
HwpFile/HwpDoc/Chart/Marker.h
Normal file
24
HwpFile/HwpDoc/Chart/Marker.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef MARKER_H
|
||||
#define MARKER_H
|
||||
|
||||
#include "Pen.h"
|
||||
#include "VtPicture.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CMarker : public IChartObject
|
||||
{
|
||||
CVtColor m_oFillColor;
|
||||
CPen m_oPen;
|
||||
CHART_SINGLE m_snSize;
|
||||
CHART_INTEGER m_nStyle;
|
||||
CHART_BOOLEAN m_bVisible;
|
||||
CVtPicture m_oVtPicture;
|
||||
public:
|
||||
CMarker();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // MARKER_H
|
||||
16
HwpFile/HwpDoc/Chart/Pen.cpp
Normal file
16
HwpFile/HwpDoc/Chart/Pen.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "Pen.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CPen::CPen()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPen::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nCap) && oStream.ReadInteger(m_nJoin) &&
|
||||
oStream.ReadSingle(m_snLimit) && oStream.ReadInteger(m_nStyle) &&
|
||||
oStream.ReadSingle(m_snWidth) && m_oVtColor.Read(oStream);
|
||||
}
|
||||
}}
|
||||
23
HwpFile/HwpDoc/Chart/Pen.h
Normal file
23
HwpFile/HwpDoc/Chart/Pen.h
Normal file
@ -0,0 +1,23 @@
|
||||
#ifndef PEN_H
|
||||
#define PEN_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CPen : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nCap;
|
||||
CHART_INTEGER m_nJoin;
|
||||
CHART_SINGLE m_snLimit;
|
||||
CHART_INTEGER m_nStyle;
|
||||
CHART_SINGLE m_snWidth;
|
||||
CVtColor m_oVtColor;
|
||||
public:
|
||||
CPen();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // PEN_H
|
||||
14
HwpFile/HwpDoc/Chart/Pie.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Pie.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Pie.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CPie::CPie()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPie::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snThicknessRatio) && oStream.ReadSingle(m_snTopRadiusRatio);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Pie.h
Normal file
19
HwpFile/HwpDoc/Chart/Pie.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef PIE_H
|
||||
#define PIE_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CPie : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snThicknessRatio;
|
||||
CHART_SINGLE m_snTopRadiusRatio;
|
||||
public:
|
||||
CPie();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // PIE_H
|
||||
39
HwpFile/HwpDoc/Chart/Plot.cpp
Normal file
39
HwpFile/HwpDoc/Chart/Plot.cpp
Normal file
@ -0,0 +1,39 @@
|
||||
#include "Plot.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CPlotBase::CPlotBase()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPlotBase::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBrush.Read(oStream) && oStream.ReadSingle(m_snBaseHeight) && m_oPen.Read(oStream);
|
||||
}
|
||||
|
||||
CPlot::CPlot()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPlot::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nAngleUnit) && oStream.ReadBoolean(m_bAutoLayout) &&
|
||||
m_oAxis.Read(oStream) && m_oBackdrop.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snBarGap) && oStream.ReadBoolean(m_bClockwise) &&
|
||||
oStream.ReadBoolean(m_bDataSeriesInRow) && oStream.ReadInteger(m_nDefaultPercentBasis) &&
|
||||
oStream.ReadSingle(m_snDepthToHeightRatio) && m_oDoughnut.Read(oStream) &&
|
||||
m_oElevation.Read(oStream) && m_oLight.Read(oStream) &&
|
||||
m_oLocationRect.Read(oStream) && oStream.ReadSingle(m_snMaxBubbleToAxisRatio) &&
|
||||
m_oPerspective.Read(oStream) && m_oPie.Read(oStream) &&
|
||||
m_oPlotBase.Read(oStream) && oStream.ReadInteger(m_nProjection) &&
|
||||
oStream.ReadSingle(m_snScaleAngle) && m_oSeries.Read(oStream) &&
|
||||
oStream.ReadInteger(m_nSort) && oStream.ReadSingle(m_snStartingAngle) &&
|
||||
oStream.ReadInteger(m_nSubPlotLabelPosition) && oStream.ReadBoolean(m_bUniformAxis) &&
|
||||
m_oView3D.Read(oStream) && m_oWall.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snWidthToHeightRatio) && m_oWeighting.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snxGap) && m_oXYZ.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snzGap);
|
||||
}
|
||||
}}
|
||||
73
HwpFile/HwpDoc/Chart/Plot.h
Normal file
73
HwpFile/HwpDoc/Chart/Plot.h
Normal file
@ -0,0 +1,73 @@
|
||||
#ifndef PLOT_H
|
||||
#define PLOT_H
|
||||
|
||||
#include "Brush.h"
|
||||
#include "Pen.h"
|
||||
|
||||
#include "Axis.h"
|
||||
#include "Coor.h"
|
||||
#include "Elevation.h"
|
||||
#include "Light.h"
|
||||
#include "Rect.h"
|
||||
#include "Coor3.h"
|
||||
#include "Pie.h"
|
||||
#include "Series.h"
|
||||
#include "View3D.h"
|
||||
#include "Wall.h"
|
||||
#include "Weighting.h"
|
||||
#include "XYZ.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CPlotBase : public IChartObject
|
||||
{
|
||||
CBrush m_oBrush;
|
||||
CHART_SINGLE m_snBaseHeight;
|
||||
CPen m_oPen;
|
||||
public:
|
||||
CPlotBase();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CPlot : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nAngleUnit;
|
||||
CHART_BOOLEAN m_bAutoLayout;
|
||||
CAxis m_oAxis;
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_SINGLE m_snBarGap;
|
||||
CHART_BOOLEAN m_bClockwise;
|
||||
CHART_BOOLEAN m_bDataSeriesInRow;
|
||||
CHART_INTEGER m_nDefaultPercentBasis;
|
||||
CHART_SINGLE m_snDepthToHeightRatio;
|
||||
CCoor m_oDoughnut;
|
||||
CElevation m_oElevation;
|
||||
CLight m_oLight;
|
||||
CRect m_oLocationRect;
|
||||
CHART_SINGLE m_snMaxBubbleToAxisRatio;
|
||||
CCoor3 m_oPerspective;
|
||||
CPie m_oPie;
|
||||
CPlotBase m_oPlotBase;
|
||||
CHART_INTEGER m_nProjection;
|
||||
CHART_SINGLE m_snScaleAngle;
|
||||
CSeries m_oSeries;
|
||||
CHART_INTEGER m_nSort;
|
||||
CHART_SINGLE m_snStartingAngle;
|
||||
CHART_INTEGER m_nSubPlotLabelPosition;
|
||||
CHART_BOOLEAN m_bUniformAxis;
|
||||
CView3D m_oView3D;
|
||||
CWall m_oWall;
|
||||
CHART_SINGLE m_snWidthToHeightRatio;
|
||||
CWeighting m_oWeighting;
|
||||
CHART_SINGLE m_snxGap;
|
||||
CXYZ m_oXYZ;
|
||||
CHART_SINGLE m_snzGap;
|
||||
public:
|
||||
CPlot();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // PLOT_H
|
||||
15
HwpFile/HwpDoc/Chart/Position.cpp
Normal file
15
HwpFile/HwpDoc/Chart/Position.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "Position.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CPosition::CPosition()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPosition::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bExcluded) && oStream.ReadBoolean(m_bHidden) &&
|
||||
oStream.ReadInteger(m_nOrder) && oStream.ReadInteger(m_nStackOrder);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/Position.h
Normal file
21
HwpFile/HwpDoc/Chart/Position.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef POSITION_H
|
||||
#define POSITION_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CPosition : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bExcluded;
|
||||
CHART_BOOLEAN m_bHidden;
|
||||
CHART_INTEGER m_nOrder;
|
||||
CHART_INTEGER m_nStackOrder;
|
||||
public:
|
||||
CPosition();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // POSITION_H
|
||||
18
HwpFile/HwpDoc/Chart/PrintInformation.cpp
Normal file
18
HwpFile/HwpDoc/Chart/PrintInformation.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "PrintInformation.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CPrintInformation::CPrintInformation()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CPrintInformation::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snBottomMargin) && oStream.ReadBoolean(m_bCenterHorizontally) &&
|
||||
oStream.ReadBoolean(m_bCenterVertically) && oStream.ReadBoolean(m_bLayoutForPrinter) &&
|
||||
oStream.ReadSingle(m_snLeftMargin) && oStream.ReadBoolean(m_bMonochrome) &&
|
||||
oStream.ReadInteger(m_nOrientation) && oStream.ReadSingle(m_snRightMargin) &&
|
||||
oStream.ReadInteger(m_nScaleType) && oStream.ReadSingle(m_snTopMargin);
|
||||
}
|
||||
}}
|
||||
27
HwpFile/HwpDoc/Chart/PrintInformation.h
Normal file
27
HwpFile/HwpDoc/Chart/PrintInformation.h
Normal file
@ -0,0 +1,27 @@
|
||||
#ifndef PRINTINFORMATION_H
|
||||
#define PRINTINFORMATION_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CPrintInformation : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snBottomMargin;
|
||||
CHART_BOOLEAN m_bCenterHorizontally;
|
||||
CHART_BOOLEAN m_bCenterVertically;
|
||||
CHART_BOOLEAN m_bLayoutForPrinter;
|
||||
CHART_SINGLE m_snLeftMargin;
|
||||
CHART_BOOLEAN m_bMonochrome;
|
||||
CHART_INTEGER m_nOrientation;
|
||||
CHART_SINGLE m_snRightMargin;
|
||||
CHART_INTEGER m_nScaleType;
|
||||
CHART_SINGLE m_snTopMargin;
|
||||
public:
|
||||
CPrintInformation();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // PRINTINFORMATION_H
|
||||
14
HwpFile/HwpDoc/Chart/Rect.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Rect.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Rect.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CRect::CRect()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CRect::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oMin.Read(oStream) && m_oMax.Read(oStream);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Rect.h
Normal file
19
HwpFile/HwpDoc/Chart/Rect.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef RECT_H
|
||||
#define RECT_H
|
||||
|
||||
#include "Coor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CRect : public IChartObject
|
||||
{
|
||||
CCoor m_oMin;
|
||||
CCoor m_oMax;
|
||||
public:
|
||||
CRect();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // RECT_H
|
||||
44
HwpFile/HwpDoc/Chart/Series.cpp
Normal file
44
HwpFile/HwpDoc/Chart/Series.cpp
Normal file
@ -0,0 +1,44 @@
|
||||
#include "Series.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CSeriesLabel::CSeriesLabel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CSeriesLabel::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && oStream.ReadInteger(m_nLineStyle) &&
|
||||
oStream.ReadInteger(m_nLocationType) && m_oOffset.Read(oStream) &&
|
||||
oStream.ReadString(m_sText) && m_oTextLayout.Read(oStream) &&
|
||||
oStream.ReadSingle(m_snTextLength) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
|
||||
CSeriesMarker::CSeriesMarker()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CSeriesMarker::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && oStream.ReadBoolean(m_bShow);
|
||||
}
|
||||
|
||||
CSeries::CSeries()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CSeries::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBar.Read(oStream) && m_oDataPoints.Read(oStream) &&
|
||||
m_oGuidelinePen.Read(oStream) && m_oHiLo.Read(oStream) &&
|
||||
oStream.ReadString(m_sLegendText) && m_oPen.Read(oStream) &&
|
||||
m_oPosition.Read(oStream) && oStream.ReadBoolean(m_bSecondaryAxis) &&
|
||||
m_oSeriesLabel.Read(oStream) && m_oSeriesMarker.Read(oStream) &&
|
||||
oStream.ReadInteger(m_nSeriesType) && oStream.ReadBoolean(m_bShowGuideLines) &&
|
||||
oStream.ReadBoolean(m_bShowLine) && oStream.ReadInteger(m_nSmoothingFactor) &&
|
||||
oStream.ReadInteger(m_nSmoothingType) && m_oStatLine.Read(oStream);
|
||||
}
|
||||
}}
|
||||
64
HwpFile/HwpDoc/Chart/Series.h
Normal file
64
HwpFile/HwpDoc/Chart/Series.h
Normal file
@ -0,0 +1,64 @@
|
||||
#ifndef SERIES_H
|
||||
#define SERIES_H
|
||||
|
||||
#include "Bar.h"
|
||||
#include "DataPoint.h"
|
||||
#include "Pen.h"
|
||||
#include "HiLo.h"
|
||||
#include "Position.h"
|
||||
#include "StatLine.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CSeriesLabel : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_INTEGER m_nLineStyle;
|
||||
CHART_INTEGER m_nLocationType;
|
||||
CCoor m_oOffset;
|
||||
CHART_STRING m_sText;
|
||||
CTextLayout m_oTextLayout;
|
||||
CHART_SINGLE m_snTextLength;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CSeriesLabel();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CSeriesMarker : public IChartObject
|
||||
{
|
||||
bool m_bAuto;
|
||||
bool m_bShow;
|
||||
public:
|
||||
CSeriesMarker();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
|
||||
class CSeries : public IChartObject
|
||||
{
|
||||
CBar m_oBar;
|
||||
CDataPoints m_oDataPoints;
|
||||
CPen m_oGuidelinePen;
|
||||
CHiLo m_oHiLo;
|
||||
CHART_STRING m_sLegendText;
|
||||
CPen m_oPen;
|
||||
CPosition m_oPosition;
|
||||
CHART_BOOLEAN m_bSecondaryAxis;
|
||||
CSeriesLabel m_oSeriesLabel;
|
||||
CSeriesMarker m_oSeriesMarker;
|
||||
CHART_INTEGER m_nSeriesType;
|
||||
CHART_BOOLEAN m_bShowGuideLines;
|
||||
CHART_BOOLEAN m_bShowLine;
|
||||
CHART_INTEGER m_nSmoothingFactor;
|
||||
CHART_INTEGER m_nSmoothingType;
|
||||
CStatLine m_oStatLine;
|
||||
public:
|
||||
CSeries();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // SERIES_H
|
||||
14
HwpFile/HwpDoc/Chart/Shadow.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Shadow.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Shadow.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CShadow::CShadow()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CShadow::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBrush.Read(oStream) && m_oOffset.Read(oStream) && oStream.ReadInteger(m_nStyle);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/Shadow.h
Normal file
21
HwpFile/HwpDoc/Chart/Shadow.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef SHADOW_H
|
||||
#define SHADOW_H
|
||||
|
||||
#include "Brush.h"
|
||||
#include "Coor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CShadow : public IChartObject
|
||||
{
|
||||
CBrush m_oBrush;
|
||||
CCoor m_oOffset;
|
||||
CHART_INTEGER m_nStyle;
|
||||
public:
|
||||
CShadow();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // SHADOW_H
|
||||
15
HwpFile/HwpDoc/Chart/StatLine.cpp
Normal file
15
HwpFile/HwpDoc/Chart/StatLine.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "StatLine.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CStatLine::CStatLine()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CStatLine::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nFlags) && oStream.ReadInteger(m_nStyle) &&
|
||||
m_oVtColor.Read(oStream) && oStream.ReadSingle(m_snWidth);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/StatLine.h
Normal file
21
HwpFile/HwpDoc/Chart/StatLine.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef STATLINE_H
|
||||
#define STATLINE_H
|
||||
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CStatLine : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nFlags;
|
||||
CHART_INTEGER m_nStyle;
|
||||
CVtColor m_oVtColor;
|
||||
CHART_SINGLE m_snWidth;
|
||||
public:
|
||||
CStatLine();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // STATLINE_H
|
||||
17
HwpFile/HwpDoc/Chart/Surface.cpp
Normal file
17
HwpFile/HwpDoc/Chart/Surface.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "Surface.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CSurface::CSurface()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CSurface::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nBase) && m_oBrush.Read(oStream) &&
|
||||
oStream.ReadInteger(m_nColWireframe) && oStream.ReadInteger(m_nDisplayType) &&
|
||||
oStream.ReadInteger(m_nProjection) && oStream.ReadInteger(m_nRowWireframe) &&
|
||||
m_oWireframePen.Read(oStream);
|
||||
}
|
||||
}}
|
||||
25
HwpFile/HwpDoc/Chart/Surface.h
Normal file
25
HwpFile/HwpDoc/Chart/Surface.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef SURFACE_H
|
||||
#define SURFACE_H
|
||||
|
||||
#include "Brush.h"
|
||||
#include "Pen.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CSurface : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nBase;
|
||||
CBrush m_oBrush;
|
||||
CHART_INTEGER m_nColWireframe;
|
||||
CHART_INTEGER m_nDisplayType;
|
||||
CHART_INTEGER m_nProjection;
|
||||
CHART_INTEGER m_nRowWireframe;
|
||||
CPen m_oWireframePen;
|
||||
public:
|
||||
CSurface();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // SURFACE_H
|
||||
15
HwpFile/HwpDoc/Chart/TextLayout.cpp
Normal file
15
HwpFile/HwpDoc/Chart/TextLayout.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "TextLayout.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CTextLayout::CTextLayout()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CTextLayout::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bWordWrap) && oStream.ReadInteger(m_nHorzAlignment) &&
|
||||
oStream.ReadInteger(m_nOrientation) && oStream.ReadInteger(m_nVertAlignment);
|
||||
}
|
||||
}}
|
||||
21
HwpFile/HwpDoc/Chart/TextLayout.h
Normal file
21
HwpFile/HwpDoc/Chart/TextLayout.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef TEXTLAYOUT_H
|
||||
#define TEXTLAYOUT_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CTextLayout : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bWordWrap;
|
||||
CHART_INTEGER m_nHorzAlignment;
|
||||
CHART_INTEGER m_nOrientation;
|
||||
CHART_INTEGER m_nVertAlignment;
|
||||
public:
|
||||
CTextLayout();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // TEXTLAYOUT_H
|
||||
14
HwpFile/HwpDoc/Chart/Tick.cpp
Normal file
14
HwpFile/HwpDoc/Chart/Tick.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "Tick.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CTick::CTick()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CTick::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snLength) && oStream.ReadInteger(m_nStyle);
|
||||
}
|
||||
}}
|
||||
19
HwpFile/HwpDoc/Chart/Tick.h
Normal file
19
HwpFile/HwpDoc/Chart/Tick.h
Normal file
@ -0,0 +1,19 @@
|
||||
#ifndef TICK_H
|
||||
#define TICK_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CTick : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snLength;
|
||||
CHART_INTEGER m_nStyle;
|
||||
public:
|
||||
CTick();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // TICK_H
|
||||
16
HwpFile/HwpDoc/Chart/Title.cpp
Normal file
16
HwpFile/HwpDoc/Chart/Title.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "Title.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CTitle::CTitle()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CTitle::Read(CChartStream& oStream)
|
||||
{
|
||||
return m_oBackdrop.Read(oStream) && m_oLocation.Read(oStream) &&
|
||||
oStream.ReadString(m_sText) && m_oTextLayout.Read(oStream)
|
||||
&& oStream.ReadInteger(m_nTextLength) && m_oVtFont.Read(oStream);
|
||||
}
|
||||
}}
|
||||
26
HwpFile/HwpDoc/Chart/Title.h
Normal file
26
HwpFile/HwpDoc/Chart/Title.h
Normal file
@ -0,0 +1,26 @@
|
||||
#ifndef TITLE_H
|
||||
#define TITLE_H
|
||||
|
||||
#include "Backdrop.h"
|
||||
#include "Location.h"
|
||||
#include "TextLayout.h"
|
||||
#include "VtFont.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CTitle : public IChartObject
|
||||
{
|
||||
CBackdrop m_oBackdrop;
|
||||
CLocation m_oLocation;
|
||||
CHART_STRING m_sText;
|
||||
CTextLayout m_oTextLayout;
|
||||
CHART_INTEGER m_nTextLength;
|
||||
CVtFont m_oVtFont;
|
||||
public:
|
||||
CTitle();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // TITLE_H
|
||||
14
HwpFile/HwpDoc/Chart/Types.h
Normal file
14
HwpFile/HwpDoc/Chart/Types.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
enum class ETypes
|
||||
{
|
||||
VtChart,
|
||||
VtColor,
|
||||
VtFont,
|
||||
VtPicture
|
||||
};
|
||||
}}
|
||||
#endif // TYPES_H
|
||||
16
HwpFile/HwpDoc/Chart/ValueScale.cpp
Normal file
16
HwpFile/HwpDoc/Chart/ValueScale.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "ValueScale.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CValueScale::CValueScale()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CValueScale::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAuto) && oStream.ReadInteger(m_nMajorDivision) &&
|
||||
oStream.ReadDouble(m_dMaximum) && oStream.ReadDouble(m_dMinimum) &&
|
||||
oStream.ReadInteger(m_nMinorDivision);
|
||||
}
|
||||
}}
|
||||
22
HwpFile/HwpDoc/Chart/ValueScale.h
Normal file
22
HwpFile/HwpDoc/Chart/ValueScale.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef VALUESCALE_H
|
||||
#define VALUESCALE_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CValueScale : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAuto;
|
||||
CHART_INTEGER m_nMajorDivision;
|
||||
CHART_DOUBLE m_dMaximum;
|
||||
CHART_DOUBLE m_dMinimum;
|
||||
CHART_INTEGER m_nMinorDivision;
|
||||
public:
|
||||
CValueScale();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // VALUESCALE_H
|
||||
14
HwpFile/HwpDoc/Chart/View3D.cpp
Normal file
14
HwpFile/HwpDoc/Chart/View3D.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "View3D.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CView3D::CView3D()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CView3D::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadSingle(m_snElevation) && oStream.ReadSingle(m_snRotation);
|
||||
}
|
||||
}}
|
||||
18
HwpFile/HwpDoc/Chart/View3D.h
Normal file
18
HwpFile/HwpDoc/Chart/View3D.h
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef VIEW3D_H
|
||||
#define VIEW3D_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CView3D : public IChartObject
|
||||
{
|
||||
CHART_SINGLE m_snElevation;
|
||||
CHART_SINGLE m_snRotation;
|
||||
public:
|
||||
CView3D();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
#endif // VIEW3D_H
|
||||
36
HwpFile/HwpDoc/Chart/VtChart.cpp
Normal file
36
HwpFile/HwpDoc/Chart/VtChart.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
#include "VtChart.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CVtChart::CVtChart()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CVtChart::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadInteger(m_nActiveSeriesCount) && oStream.ReadBoolean(m_bAllowDithering) &&
|
||||
oStream.ReadBoolean(m_bAllowDynamicRotation) && oStream.ReadBoolean(m_bAllowSelections) &&
|
||||
oStream.ReadBoolean(m_bAllowSeriesSelection) && oStream.ReadBoolean(m_bAllowUserChanges) &&
|
||||
oStream.ReadBoolean(m_bAutoIncrement) && m_oBackdrop.Read(oStream) &&
|
||||
oStream.ReadBoolean(m_bChart3d) && oStream.ReadInteger(m_nChartType) &&
|
||||
oStream.ReadInteger(m_nColumn) && oStream.ReadInteger(m_nColumnCount) &&
|
||||
oStream.ReadString(m_sColumnLabel) && oStream.ReadInteger(m_nColumnLabelCount)
|
||||
&& oStream.ReadInteger(m_nColumnLabelIndex) && oStream.ReadString(m_sData) &&
|
||||
m_oDataGrid.Read(oStream) && oStream.ReadBoolean(m_bDoSetCursor) &&
|
||||
oStream.ReadInteger(m_nDrawMode) && oStream.ReadInteger(m_nErrorOffset) &&
|
||||
oStream.ReadString(m_sFileName) && m_oFootnote.Read(oStream) &&
|
||||
oStream.ReadString(m_sFootnoteText) && oStream.ReadInteger(m_nPicture) &&
|
||||
m_oPlot.Read(oStream) && m_oPrintInformation.Read(oStream) &&
|
||||
oStream.ReadBoolean(m_bRandomFill) && oStream.ReadBoolean(m_bRepaint) &&
|
||||
oStream.ReadInteger(m_nRow) && oStream.ReadInteger(m_nRowCount) &&
|
||||
oStream.ReadString(m_sRowLabel) && oStream.ReadInteger(m_nRowLabelCount) &&
|
||||
oStream.ReadInteger(m_nRowLabelIndex) && oStream.ReadInteger(m_nSeriesColumn) &&
|
||||
oStream.ReadInteger(m_nSeriesType) && oStream.ReadBoolean(m_bShowLegend) &&
|
||||
oStream.ReadInteger(m_nSsLinkMode) && oStream.ReadString(m_sSsLinkRange) &&
|
||||
oStream.ReadString(m_sSsLinkBook) && oStream.ReadBoolean(m_bStacking) &&
|
||||
oStream.ReadInteger(m_nTextLengthType) && m_oTitle.Read(oStream) &&
|
||||
oStream.ReadString(m_sTitleText) && oStream.ReadInteger(m_nTwipsWidth) &&
|
||||
oStream.ReadInteger(m_nTwipsHeight);
|
||||
}
|
||||
}}
|
||||
70
HwpFile/HwpDoc/Chart/VtChart.h
Normal file
70
HwpFile/HwpDoc/Chart/VtChart.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef VTCHART_H
|
||||
#define VTCHART_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
#include "DataGrid.h"
|
||||
#include "Footnote.h"
|
||||
#include "Legend.h"
|
||||
#include "Plot.h"
|
||||
#include "PrintInformation.h"
|
||||
#include "Title.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CVtChart : public IChartObject
|
||||
{
|
||||
CHART_INTEGER m_nActiveSeriesCount;
|
||||
CHART_BOOLEAN m_bAllowDithering;
|
||||
CHART_BOOLEAN m_bAllowDynamicRotation;
|
||||
CHART_BOOLEAN m_bAllowSelections;
|
||||
CHART_BOOLEAN m_bAllowSeriesSelection;
|
||||
CHART_BOOLEAN m_bAllowUserChanges;
|
||||
CHART_BOOLEAN m_bAutoIncrement;
|
||||
CBackdrop m_oBackdrop;
|
||||
CHART_BOOLEAN m_bChart3d;
|
||||
CHART_INTEGER m_nChartType;
|
||||
CHART_INTEGER m_nColumn;
|
||||
CHART_INTEGER m_nColumnCount;
|
||||
CHART_STRING m_sColumnLabel;
|
||||
CHART_INTEGER m_nColumnLabelCount;
|
||||
CHART_INTEGER m_nColumnLabelIndex;
|
||||
CHART_STRING m_sData;
|
||||
CDataGrid m_oDataGrid;
|
||||
CHART_BOOLEAN m_bDoSetCursor;
|
||||
CHART_INTEGER m_nDrawMode;
|
||||
CHART_INTEGER m_nErrorOffset;
|
||||
CHART_STRING m_sFileName;
|
||||
CFootnote m_oFootnote;
|
||||
CHART_STRING m_sFootnoteText;
|
||||
CHART_LONG m_lHandle;
|
||||
CLegend m_oLegend;
|
||||
CHART_INTEGER m_nPicture;
|
||||
CPlot m_oPlot;
|
||||
CPrintInformation m_oPrintInformation;
|
||||
CHART_BOOLEAN m_bRandomFill;
|
||||
CHART_BOOLEAN m_bRepaint;
|
||||
CHART_INTEGER m_nRow;
|
||||
CHART_INTEGER m_nRowCount;
|
||||
CHART_STRING m_sRowLabel;
|
||||
CHART_INTEGER m_nRowLabelCount;
|
||||
CHART_INTEGER m_nRowLabelIndex;
|
||||
CHART_INTEGER m_nSeriesColumn;
|
||||
CHART_INTEGER m_nSeriesType;
|
||||
CHART_BOOLEAN m_bShowLegend;
|
||||
CHART_INTEGER m_nSsLinkMode;
|
||||
CHART_STRING m_sSsLinkRange;
|
||||
CHART_STRING m_sSsLinkBook;
|
||||
CHART_BOOLEAN m_bStacking;
|
||||
CHART_INTEGER m_nTextLengthType;
|
||||
CTitle m_oTitle;
|
||||
CHART_STRING m_sTitleText;
|
||||
CHART_INTEGER m_nTwipsWidth;
|
||||
CHART_INTEGER m_nTwipsHeight;
|
||||
public:
|
||||
CVtChart();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // VTCHART_H
|
||||
16
HwpFile/HwpDoc/Chart/VtColor.cpp
Normal file
16
HwpFile/HwpDoc/Chart/VtColor.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "VtColor.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
CVtColor::CVtColor()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool CVtColor::Read(CChartStream& oStream)
|
||||
{
|
||||
return oStream.ReadBoolean(m_bAutomatic) && oStream.ReadInteger(m_nBlue) &&
|
||||
oStream.ReadInteger(m_nGreen) && oStream.ReadInteger(m_nRed) &&
|
||||
oStream.ReadInteger(m_nValue);
|
||||
}
|
||||
}}
|
||||
22
HwpFile/HwpDoc/Chart/VtColor.h
Normal file
22
HwpFile/HwpDoc/Chart/VtColor.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef VTCOLOR_H
|
||||
#define VTCOLOR_H
|
||||
|
||||
#include "ChartObject.h"
|
||||
|
||||
namespace HWP { namespace CHART
|
||||
{
|
||||
class CVtColor : public IChartObject
|
||||
{
|
||||
CHART_BOOLEAN m_bAutomatic;
|
||||
CHART_INTEGER m_nBlue;
|
||||
CHART_INTEGER m_nGreen;
|
||||
CHART_INTEGER m_nRed;
|
||||
CHART_INTEGER m_nValue;
|
||||
public:
|
||||
CVtColor();
|
||||
|
||||
bool Read(CChartStream& oStream) override;
|
||||
};
|
||||
}}
|
||||
|
||||
#endif // VTCOLOR_H
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user