55 , m_sheetName(sheetName)
61 return m_pos[0]>=0 && m_pos[1]>=0 && !m_sheetName.empty();
66 return valid() && maxPos.
valid() && maxPos.
m_pos[0]>=m_pos[0] && maxPos.
m_pos[1]>=m_pos[1];
80 return !(operator==(pos));
91 enum Type { A_None, A_Numeric, A_Logarithmic, A_Sequence, A_Sequence_Skip_Empty };
97 void addContentTo(
int coord, librevenge::RVNGPropertyList &propList)
const;
99 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
101 friend std::ostream &
operator<<(std::ostream &o,
Axis const &axis);
134 , m_autoPosition(true)
135 , m_relativePosition(
WPSBorder::RightBit)
142 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
144 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
164 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 };
168 P_None=0, P_Automatic,
P_Square, P_Diamond, P_Arrow_Down,
170 P_Circle, P_Star,
P_X, P_Plus, P_Asterisk,
171 P_Horizontal_Bar, P_Vertical_Bar
180 return m_type==S_Line || m_type==S_Radar || (m_type==S_Scatter && m_pointType==P_None);
185 if (force1D || is1DStyle())
186 m_style.m_lineColor=color;
188 m_style.setSurfaceColor(color, opacity);
196 m_style.m_lineColor=color;
201 return m_ranges[0].valid(m_ranges[0]);
204 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
206 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
208 static std::string getSerieTypeName(
Type type);
234 enum Type { T_Title, T_SubTitle, T_Footer };
245 if (!m_show)
return false;
246 if (m_contentType==C_Cell)
247 return m_cell.valid();
248 if (m_contentType!=C_Text)
250 for (
auto &e : m_textEntryList)
252 if (e.valid())
return true;
257 void addContentTo(librevenge::RVNGPropertyList &propList)
const;
259 void addStyleTo(librevenge::RVNGPropertyList &propList)
const;
285 void sendChart(
WKSContentListenerPtr &listener, librevenge::RVNGSpreadsheetInterface *interface)
const;
295 Axis &getAxis(
int coord);
297 Axis const &getAxis(
int coord)
const;
311 Serie *getSerie(
int id,
bool create);
std::string getCellName(Vec2i const &cellPos, Vec2b const &relative)
returns the cell name corresponding to a cell's position
Definition: libwps_internal.cpp:838
a cell position
Definition: WKSChart.h:50
std::shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:105
Internal: the subdocument of a WKSChart.
Definition: WKSChart.cpp:48
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:704
a border list
Definition: libwps_internal.h:394
bool operator==(Position &pos) const
operator==
Definition: WKSChart.h:73
a class used to store a chart associated to a spreadsheet ....
Definition: WKSChart.h:45
std::map< int, Serie > m_serieMap
the list of series
Definition: WKSChart.h:372
WPSGraphicStyle m_style
the graphic style
Definition: WKSChart.h:277
Type
the text type
Definition: WKSChart.h:234
librevenge::RVNGString m_sheetName
the cell sheet name
Definition: WKSChart.h:85
Type m_type
the zone type
Definition: WKSChart.h:263
WPSGraphicStyle m_floorStyle
floor
Definition: WKSChart.h:360
bool m_showTitle
show or not the title/subtitle
Definition: WKSChart.h:118
define the font properties
Definition: WPSFont.h:36
librevenge::RVNGString m_name
the chart name
Definition: WKSChart.h:345
Position(Vec2i pos=Vec2i(-1,-1), librevenge::RVNGString const &sheetName="")
constructor
Definition: WKSChart.h:53
Position m_titleRange
the title cell range
Definition: WKSChart.h:120
Legend m_legend
the legend
Definition: WKSChart.h:370
Position m_legendRange
the legend range if defined
Definition: WKSChart.h:222
bool valid(Position const &maxPos) const
return true if the position is valid
Definition: WKSChart.h:64
WPSGraphicStyle m_style
the graphic style
Definition: WKSChart.h:158
librevenge::RVNGString m_legendText
the legend name if defined
Definition: WKSChart.h:224
Vec2f m_scaling
the minimum, maximum scaling(if manual)
Definition: WKSChart.h:107
bool m_dataStacked
a flag to know if the data are stacked or not
Definition: WKSChart.h:330
WPSGraphicStyle m_wallStyle
wall
Definition: WKSChart.h:362
Definition: WKSChart.h:170
Internal: the structures of a WKSChart.
Definition: WKSChart.cpp:44
Legend & getLegend()
returns the legend
Definition: WKSChart.h:305
bool m_showGrid
show or not the grid
Definition: WKSChart.h:109
WPSGraphicStyle m_plotAreaStyle
the ploat area style
Definition: WKSChart.h:352
Definition: WKSChart.h:168
WPSGraphicStyle m_style
the graphic style
Definition: WKSChart.h:126
std::vector< WPSEntry > m_textEntryList
the text entry (or the list of text entry)
Definition: WKSChart.h:273
Position m_cell
the cell position ( or title and subtitle)
Definition: WKSChart.h:271
a axis in a chart
Definition: WKSChart.h:88
a structure used to define a picture style
Definition: WPSGraphicStyle.h:37
Legend()
constructor
Definition: WKSChart.h:132
Vec2i m_pos
the cell column and row
Definition: WKSChart.h:83
WPSGraphicStyle m_style
the chart style
Definition: WKSChart.h:343
bool valid() const
return true if the serie is valid
Definition: WKSChart.h:199
Vec2f m_dimension
the chart dimension in point
Definition: WKSChart.h:326
PointType
the point type
Definition: WKSChart.h:166
WPSFont m_font
the zone format
Definition: WKSChart.h:275
WPSFont m_font
the font
Definition: WKSChart.h:156
std::map< int, Serie > const & getIdSerieMap() const
returns the list of defined series
Definition: WKSChart.h:313
WPSFont m_font
the label font
Definition: WKSChart.h:218
Type m_type
the sequence type
Definition: WKSChart.h:103
bool m_show
true if the zone is visible
Definition: WKSChart.h:267
bool m_autoPosition
automatic position
Definition: WKSChart.h:150
librevenge::RVNGString m_subTitle
the subtitle label
Definition: WKSChart.h:124
bool m_is3D
a flag to know if the graphic is 3D
Definition: WKSChart.h:336
librevenge::RVNGString m_title
the title label
Definition: WKSChart.h:122
int m_relativePosition
the automatic position libwps::LeftBit|...
Definition: WKSChart.h:152
bool valid() const
returns true if the textbox is valid
Definition: WKSChart.h:243
bool is1DStyle() const
return true if the serie style is 1D
Definition: WKSChart.h:178
void setGridColor(WPSColor const &color)
set the grid color
Definition: WKSChart.h:290
ContentType
the text content type
Definition: WKSChart.h:236
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:702
the class to store a color
Definition: libwps_internal.h:280
bool m_useSecondaryY
use or not the secondary y axis
Definition: WKSChart.h:216
Serie::Type m_type
the chart type (if no series)
Definition: WKSChart.h:328
Vec2f m_position
the position in points
Definition: WKSChart.h:154
Definition: WKSChart.h:169
WPSBox2f m_legendPosition
the legend dimension in percent
Definition: WKSChart.h:357
void setSecondaryColor(WPSColor const &color)
set the secondary color
Definition: WKSChart.h:193
bool m_automaticScaling
automatic scaling (or manual)
Definition: WKSChart.h:105
void setPrimaryColor(WPSColor const &color, float opacity=1, bool force1D=false)
set the primary color
Definition: WKSChart.h:183
WPSBox2f m_plotAreaPosition
the plot area dimension in percent
Definition: WKSChart.h:350
WPSColor m_gridColor
the grid color
Definition: WKSChart.h:366
bool m_show
show or not the legend
Definition: WKSChart.h:148
Legend const & getLegend() const
returns the legend
Definition: WKSChart.h:300
Vec2f m_position
the position in the zone
Definition: WKSChart.h:269
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
ContentType m_contentType
the content type
Definition: WKSChart.h:265
a legend in a chart
Definition: WKSChart.h:129
std::map< TextZone::Type, TextZone > m_textZoneMap
a map text zone type to text zone
Definition: WKSChart.h:374
bool m_dataVertical
a flag to know if the data are vertical (for bar)
Definition: WKSChart.h:334
WPSGraphicStyle m_style
the graphic style
Definition: WKSChart.h:226
std::ostream & operator<<(std::ostream &o, WPSColor const &c)
Definition: libwps_internal.cpp:401
a serie in a chart
Definition: WKSChart.h:161
a text zone a chart
Definition: WKSChart.h:231
bool m_is3DDeep
a flag to know if real 3D or 2D-extended
Definition: WKSChart.h:338
bool m_showLabel
show or not the label
Definition: WKSChart.h:111
Type
the series type
Definition: WKSChart.h:164
Type
the axis content
Definition: WKSChart.h:91
Type m_type
the type
Definition: WKSChart.h:212
bool operator!=(Position &pos) const
operator!=
Definition: WKSChart.h:78
PointType m_pointType
the point type
Definition: WKSChart.h:228
bool m_dataPercentStacked
a flag to know if the data are percent stacked or not
Definition: WKSChart.h:332
a basic pattern used in a WPSGraphicStyle:
Definition: WPSGraphicStyle.h:88
bool valid() const
return true if the position is valid
Definition: WKSChart.h:59