104 void addContentTo(
int coord, librevenge::RVNGPropertyList &propList)
const;
106 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
108 friend std::ostream &
operator<<(std::ostream &o,
Axis const &axis);
147 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
149 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
169 enum Type {
S_Area,
S_Bar,
S_Bubble,
S_Circle,
S_Column,
S_Gantt,
S_Line,
S_Radar,
S_Ring,
S_Scatter,
S_Stock,
S_Surface };
197 m_style.setSurfaceColor(color, opacity);
213 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
215 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
255 if (!
m_show)
return false;
262 if (e.valid())
return true;
267 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
269 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
307 Axis
const &
getAxis(
int coord)
const;
321 Serie *
getSerie(
int id,
bool create);
Internal: the subdocument of a WKSChart.
Definition WKSChart.cpp:49
Vec2f m_dimension
the chart dimension in point
Definition WKSChart.h:336
Serie::Type m_type
the chart type (if no series)
Definition WKSChart.h:338
librevenge::RVNGString m_name
the chart name
Definition WKSChart.h:355
bool m_dataStacked
a flag to know if the data are stacked or not
Definition WKSChart.h:340
Legend m_legend
the legend
Definition WKSChart.h:380
std::map< TextZone::Type, TextZone > m_textZoneMap
a map text zone type to text zone
Definition WKSChart.h:384
std::map< int, Serie > m_serieMap
the list of series
Definition WKSChart.h:382
std::map< int, Serie > const & getIdSerieMap() const
returns the list of defined series
Definition WKSChart.h:323
WPSGraphicStyle m_style
the chart style
Definition WKSChart.h:353
virtual void sendContent(TextZone const &zone, WPSListenerPtr &listener) const =0
send the zone content (called when the zone is of text type)
WPSGraphicStyle m_plotAreaStyle
the ploat area style
Definition WKSChart.h:362
WPSBox2f m_legendPosition
the legend dimension in percent
Definition WKSChart.h:367
void sendTextZoneContent(TextZone::Type type, WPSListenerPtr listener) const
sends a textzone content
Definition WKSChart.cpp:176
Axis & getAxis(int coord)
return an axis (corresponding to a coord)
Definition WKSChart.cpp:136
WKSChart(WKSChart const &orig)=delete
virtual ~WKSChart()
the destructor
Definition WKSChart.cpp:132
Axis m_axis[5]
the x,y,y-second,z and a bad axis
Definition WKSChart.h:378
bool m_dataPercentStacked
a flag to know if the data are percent stacked or not
Definition WKSChart.h:342
void sendChart(WKSContentListenerPtr &listener, librevenge::RVNGSpreadsheetInterface *interface) const
send the chart to the listener
Definition WKSChart.cpp:186
bool m_is3DDeep
a flag to know if real 3D or 2D-extended
Definition WKSChart.h:348
WKSChart(Vec2f const &dim=Vec2f())
the constructor
Definition WKSChart.cpp:104
bool m_dataVertical
a flag to know if the data are vertical (for bar)
Definition WKSChart.h:344
WPSGraphicStyle m_wallStyle
wall
Definition WKSChart.h:372
void setGridColor(WPSColor const &color)
set the grid color
Definition WKSChart.h:300
WKSChart & operator=(WKSChart const &orig)=delete
WPSColor m_gridColor
the grid color
Definition WKSChart.h:376
Legend const & getLegend() const
returns the legend
Definition WKSChart.h:310
Legend & getLegend()
returns the legend
Definition WKSChart.h:315
WPSBox2f m_plotAreaPosition
the plot area dimension in percent
Definition WKSChart.h:360
WPSGraphicStyle m_floorStyle
floor
Definition WKSChart.h:370
bool m_is3D
a flag to know if the graphic is 3D
Definition WKSChart.h:346
Serie * getSerie(int id, bool create)
return a serie
Definition WKSChart.cpp:156
TextZone * getTextZone(TextZone::Type type, bool create=false)
returns a textzone content
Definition WKSChart.cpp:166
define the font properties
Definition WPSFont.h:37
a structure used to define a picture style
Definition WPSGraphicStyle.h:38
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition libwps_internal.h:114
Vec2< int > Vec2i
Vec2 of int.
Definition libwps_internal.h:702
Vec2< float > Vec2f
Vec2 of float.
Definition libwps_internal.h:704
WPSBox2< float > WPSBox2f
WPSBox2 of float.
Definition libwps_internal.h:890
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition libwps_internal.h:105
Internal: the structures of a WKSChart.
Definition WKSChart.cpp:45
a axis in a chart
Definition WKSChart.h:96
librevenge::RVNGString m_title
the title label
Definition WKSChart.h:127
bool m_showTitle
show or not the title/subtitle
Definition WKSChart.h:123
Position m_labelRanges[2]
the label range if defined
Definition WKSChart.h:120
WPSGraphicStyle m_style
the graphic style
Definition WKSChart.h:131
void addContentTo(int coord, librevenge::RVNGPropertyList &propList) const
add content to the propList
Definition WKSChart.cpp:398
void addStyleTo(librevenge::RVNGPropertyList &propList) const
add style to the propList
Definition WKSChart.cpp:457
friend std::ostream & operator<<(std::ostream &o, Axis const &axis)
operator<<
Definition WKSChart.cpp:472
~Axis()
destructor
Definition WKSChart.cpp:394
Vec2f m_scaling
the minimum, maximum scaling(if manual)
Definition WKSChart.h:114
bool m_showLabel
show or not the label
Definition WKSChart.h:118
Axis()
constructor
Definition WKSChart.cpp:379
Type m_type
the sequence type
Definition WKSChart.h:110
bool m_showGrid
show or not the grid
Definition WKSChart.h:116
librevenge::RVNGString m_subTitle
the subtitle label
Definition WKSChart.h:129
Type
the axis content
Definition WKSChart.h:98
@ A_Sequence_Skip_Empty
Definition WKSChart.h:98
@ A_None
Definition WKSChart.h:98
@ A_Numeric
Definition WKSChart.h:98
@ A_Sequence
Definition WKSChart.h:98
@ A_Logarithmic
Definition WKSChart.h:98
bool m_automaticScaling
automatic scaling (or manual)
Definition WKSChart.h:112
Position m_titleRange
the title cell range
Definition WKSChart.h:125
a legend in a chart
Definition WKSChart.h:135
int m_relativePosition
the automatic position libwps::LeftBit|...
Definition WKSChart.h:157
Legend()
constructor
Definition WKSChart.h:137
bool m_show
show or not the legend
Definition WKSChart.h:153
WPSGraphicStyle m_style
the graphic style
Definition WKSChart.h:163
WPSFont m_font
the font
Definition WKSChart.h:161
Vec2f m_position
the position in points
Definition WKSChart.h:159
friend std::ostream & operator<<(std::ostream &o, Legend const &legend)
operator<<
Definition WKSChart.cpp:547
bool m_autoPosition
automatic position
Definition WKSChart.h:155
void addContentTo(librevenge::RVNGPropertyList &propList) const
add content to the propList
Definition WKSChart.cpp:517
void addStyleTo(librevenge::RVNGPropertyList &propList) const
add style to the propList
Definition WKSChart.cpp:540
a cell position
Definition WKSChart.h:51
bool valid(Position const &maxPos) const
return true if the position is valid
Definition WKSChart.h:65
bool operator!=(Position const &pos) const
operator!=
Definition WKSChart.h:79
bool operator==(Position const &pos) const
operator==
Definition WKSChart.h:74
Position(Vec2i pos=Vec2i(-1,-1), librevenge::RVNGString const &sheetName="")
constructor
Definition WKSChart.h:53
librevenge::RVNGString getCellName() const
return the cell name
Definition WKSChart.cpp:354
Vec2i m_pos
the cell column and row
Definition WKSChart.h:84
int m_sheetId
the cell sheet id
Definition WKSChart.h:92
friend std::ostream & operator<<(std::ostream &o, Position const &pos)
operator<<
Definition WKSChart.cpp:368
bool valid() const
return true if the position is valid
Definition WKSChart.h:60
librevenge::RVNGString m_sheetName
the cell sheet name
Definition WKSChart.h:86
a serie in a chart
Definition WKSChart.h:167
friend std::ostream & operator<<(std::ostream &o, Serie const &series)
operator<<
Definition WKSChart.cpp:718
bool m_useSecondaryY
use or not the secondary y axis
Definition WKSChart.h:225
bool valid() const
return true if the serie is valid
Definition WKSChart.h:208
void addStyleTo(librevenge::RVNGPropertyList &propList) const
add style to the propList
Definition WKSChart.cpp:683
PointType
the point type
Definition WKSChart.h:172
@ P_Plus
Definition WKSChart.h:175
@ P_None
Definition WKSChart.h:173
@ P_Arrow_Up
Definition WKSChart.h:174
@ P_Vertical_Bar
Definition WKSChart.h:176
@ P_Arrow_Right
Definition WKSChart.h:174
@ P_Horizontal_Bar
Definition WKSChart.h:176
@ P_Star
Definition WKSChart.h:175
@ P_Arrow_Down
Definition WKSChart.h:173
@ P_Automatic
Definition WKSChart.h:173
@ P_X
Definition WKSChart.h:175
@ P_Square
Definition WKSChart.h:173
@ P_Asterisk
Definition WKSChart.h:175
@ P_Diamond
Definition WKSChart.h:173
@ P_Hourglass
Definition WKSChart.h:174
@ P_Circle
Definition WKSChart.h:175
@ P_Bow_Tie
Definition WKSChart.h:174
@ P_Arrow_Left
Definition WKSChart.h:174
Position m_legendRange
the legend range if defined
Definition WKSChart.h:231
Serie & operator=(Serie const &)=default
Serie & operator=(Serie &&)=default
librevenge::RVNGString m_legendText
the legend name if defined
Definition WKSChart.h:233
void setPrimaryColor(WPSColor const &color, float opacity=1, bool force1D=false)
set the primary color
Definition WKSChart.h:192
void setPrimaryPattern(WPSGraphicStyle::Pattern const &pattern, bool force1D=false)
set the primary pattern
Definition WKSChart.cpp:707
PointType m_pointType
the point type
Definition WKSChart.h:237
Type
the series type
Definition WKSChart.h:169
@ S_Column
Definition WKSChart.h:169
@ S_Circle
Definition WKSChart.h:169
@ S_Bar
Definition WKSChart.h:169
@ S_Area
Definition WKSChart.h:169
@ S_Ring
Definition WKSChart.h:169
@ S_Scatter
Definition WKSChart.h:169
@ S_Gantt
Definition WKSChart.h:169
@ S_Surface
Definition WKSChart.h:169
@ S_Line
Definition WKSChart.h:169
@ S_Stock
Definition WKSChart.h:169
@ S_Bubble
Definition WKSChart.h:169
@ S_Radar
Definition WKSChart.h:169
void setSecondaryColor(WPSColor const &color)
set the secondary color
Definition WKSChart.h:202
Serie()
constructor
Definition WKSChart.cpp:577
static std::string getSerieTypeName(Type type)
returns a string corresponding to a series type
Definition WKSChart.cpp:594
Serie(Serie const &)=default
bool is1DStyle() const
return true if the serie style is 1D
Definition WKSChart.h:187
Position m_ranges[2]
the data range
Definition WKSChart.h:223
virtual ~Serie()
destructor
Definition WKSChart.cpp:590
void addContentTo(librevenge::RVNGPropertyList &propList) const
add content to the propList
Definition WKSChart.cpp:630
WPSFont m_font
the label font
Definition WKSChart.h:227
Type m_type
the type
Definition WKSChart.h:221
WPSGraphicStyle m_style
the graphic style
Definition WKSChart.h:235
Position m_labelRanges[2]
the label ranges if defined(unused)
Definition WKSChart.h:229
a text zone a chart
Definition WKSChart.h:241
void addStyleTo(librevenge::RVNGPropertyList &propList) const
add to the propList
Definition WKSChart.cpp:852
ContentType
the text content type
Definition WKSChart.h:245
@ C_Cell
Definition WKSChart.h:245
@ C_Text
Definition WKSChart.h:245
WPSFont m_font
the zone format
Definition WKSChart.h:285
bool m_show
true if the zone is visible
Definition WKSChart.h:277
friend std::ostream & operator<<(std::ostream &o, TextZone const &zone)
operator<<
Definition WKSChart.cpp:858
Type m_type
the zone type
Definition WKSChart.h:273
TextZone(TextZone const &)=default
ContentType m_contentType
the content type
Definition WKSChart.h:275
Position m_cell
the cell position ( or title and subtitle)
Definition WKSChart.h:281
void addContentTo(librevenge::RVNGPropertyList &propList) const
add content to the propList
Definition WKSChart.cpp:812
Type
the text type
Definition WKSChart.h:243
@ T_Title
Definition WKSChart.h:243
@ T_Footer
Definition WKSChart.h:243
@ T_SubTitle
Definition WKSChart.h:243
~TextZone()
destructor
Definition WKSChart.cpp:808
TextZone(Type type)
constructor
Definition WKSChart.cpp:795
WPSGraphicStyle m_style
the graphic style
Definition WKSChart.h:287
bool valid() const
returns true if the textbox is valid
Definition WKSChart.h:253
std::vector< WPSEntry > m_textEntryList
the text entry (or the list of text entry)
Definition WKSChart.h:283
Vec2f m_position
the position in the zone
Definition WKSChart.h:279
a border list
Definition libwps_internal.h:395
the class to store a color
Definition libwps_internal.h:281
a basic pattern used in a WPSGraphicStyle:
Definition WPSGraphicStyle.h:89