Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef WPS_PARAGRAPH
00027 # define WPS_PARAGRAPH
00028
00029 #include <assert.h>
00030 #include <iostream>
00031
00032 #include <vector>
00033
00034 #include "libwps_internal.h"
00035
00036 #include "WPSList.h"
00037
00038 struct WPSTabStop
00039 {
00040 enum Alignment { LEFT, RIGHT, CENTER, DECIMAL, BAR };
00041 WPSTabStop(double position = 0.0, Alignment alignment = LEFT, uint16_t leaderCharacter='\0', uint8_t leaderNumSpaces = 0) :
00042 m_position(position), m_alignment(alignment), m_leaderCharacter(leaderCharacter), m_leaderNumSpaces(leaderNumSpaces)
00043 {
00044 }
00045 void addTo(librevenge::RVNGPropertyListVector &propList, double decalX=0.0) const;
00047 friend std::ostream &operator<<(std::ostream &o, WPSTabStop const &ft);
00048 double m_position;
00049 Alignment m_alignment;
00050 uint16_t m_leaderCharacter;
00051 uint8_t m_leaderNumSpaces;
00052 };
00053
00055 struct WPSParagraph
00056 {
00057 typedef WPSList::Level ListLevel;
00058
00060 WPSParagraph() : m_tabs(), m_justify(libwps::JustificationLeft),
00061 m_breakStatus(0), m_listLevelIndex(0), m_listLevel(), m_backgroundColor(0xFFFFFF),
00062 m_border(0), m_borderStyle(), m_extra("")
00063 {
00064 for (int i = 0; i < 3; i++) m_margins[i] = m_spacings[i] = 0.0;
00065 m_spacings[0] = 1.0;
00066 }
00067
00068 virtual ~WPSParagraph() {}
00070 void addTo(librevenge::RVNGPropertyList &propList, bool inTable) const;
00072 friend std::ostream &operator<<(std::ostream &o, WPSParagraph const &ft);
00073
00079 double m_margins[3];
00085 double m_spacings[3];
00087 std::vector<WPSTabStop> m_tabs;
00088
00090 libwps::Justification m_justify;
00092 int m_breakStatus;
00093
00095 int m_listLevelIndex;
00097 ListLevel m_listLevel;
00098
00100 uint32_t m_backgroundColor;
00101
00103 int m_border;
00105 WPSBorder m_borderStyle;
00106
00108 std::string m_extra;
00109 };
00110 #endif
00111