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
00027
00028
00029
00030 #ifndef WPS_PARAGRAPH
00031 # define WPS_PARAGRAPH
00032
00033 #include <assert.h>
00034 #include <iostream>
00035
00036 #include <vector>
00037
00038 #include "libwps_internal.h"
00039
00040 #include "WPSList.h"
00041
00042 class WPSContentListener;
00043 class WPXPropertyListVector;
00044
00045 struct WPSTabStop
00046 {
00047 enum Alignment { LEFT, RIGHT, CENTER, DECIMAL, BAR };
00048 WPSTabStop(double position = 0.0, Alignment alignment = LEFT, uint16_t leaderCharacter='\0', uint8_t leaderNumSpaces = 0) :
00049 m_position(position), m_alignment(alignment), m_leaderCharacter(leaderCharacter), m_leaderNumSpaces(leaderNumSpaces)
00050 {
00051 }
00052 void addTo(WPXPropertyListVector &propList, double decalX=0.0);
00054 friend std::ostream &operator<<(std::ostream &o, WPSTabStop const &ft);
00055 double m_position;
00056 Alignment m_alignment;
00057 uint16_t m_leaderCharacter;
00058 uint8_t m_leaderNumSpaces;
00059 };
00060
00062 struct WPSParagraph
00063 {
00064 typedef WPSList::Level ListLevel;
00065
00067 WPSParagraph() : m_tabs(), m_justify(libwps::JustificationLeft),
00068 m_breakStatus(0), m_listLevelIndex(0), m_listLevel(),
00069 m_border(0), m_borderStyle(libwps::BorderSingle), m_borderWidth(1), m_borderColor(0), m_extra("")
00070 {
00071 for(int i = 0; i < 3; i++) m_margins[i] = m_spacings[i] = 0.0;
00072 m_spacings[0] = 1.0;
00073 }
00074 virtual ~WPSParagraph() {}
00076 void send(shared_ptr<WPSContentListener> listener) const;
00078 friend std::ostream &operator<<(std::ostream &o, WPSParagraph const &ft);
00079
00085 double m_margins[3];
00091 double m_spacings[3];
00093 std::vector<WPSTabStop> m_tabs;
00094
00096 libwps::Justification m_justify;
00098 int m_breakStatus;
00099
00101 int m_listLevelIndex;
00103 ListLevel m_listLevel;
00104
00106 int m_border;
00108 libwps::BorderStyle m_borderStyle;
00110 int m_borderWidth;
00112 uint32_t m_borderColor;
00113
00115 std::string m_extra;
00116 };
00117 #endif
00118