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 #ifndef LOTUS_STYLE_MANAGER_H
00023 #define LOTUS_STYLE_MANAGER_H
00024
00025 #include <ostream>
00026 #include <vector>
00027
00028 #include <librevenge-stream/librevenge-stream.h>
00029
00030 #include "libwps_internal.h"
00031
00032 #include "WPSDebug.h"
00033
00034 namespace LotusStyleManagerInternal
00035 {
00036 struct State;
00037 }
00038
00039 class LotusParser;
00040
00045 class LotusStyleManager
00046 {
00047 public:
00048 friend class LotusParser;
00049
00051 LotusStyleManager(LotusParser &parser);
00053 ~LotusStyleManager();
00055 void cleanState();
00057 void updateState();
00058
00060 bool getColor(int cId, WPSColor &color) const;
00061
00063 bool updateCellStyle(int cellId, WPSCellFormat &format,
00064 WPSFont &font, libwps_tools_win::Font::Type &fontType);
00066 bool updateFontStyle(int fontId, WPSFont &font, libwps_tools_win::Font::Type &fontType);
00068 bool updateLineStyle(int lineId, WPSGraphicStyle &style) const;
00070 bool updateSurfaceStyle(int colorId, WPSGraphicStyle &style) const;
00072 bool updateGraphicStyle(int graphicId, WPSGraphicStyle &style) const;
00073 protected:
00075 bool checkFilePosition(long pos);
00077 int version() const;
00078
00079
00080
00081
00082
00084 bool readCellStyle(long endPos);
00086 bool readColorStyle(long endPos);
00088 bool readFontStyle(long endPos);
00090 bool readFormatStyle(long endPos);
00092 bool readLineStyle(long endPos);
00094 bool readGraphicStyle(long endPos);
00095
00097 bool updateShadowStyle(int colorId, WPSGraphicStyle &style) const;
00098
00099 private:
00100 LotusStyleManager(LotusStyleManager const &orig);
00101 LotusStyleManager &operator=(LotusStyleManager const &orig);
00103 libwps::DebugFile &ascii()
00104 {
00105 return m_asciiFile;
00106 }
00108 RVNGInputStreamPtr m_input;
00110 LotusParser &m_mainParser;
00112 shared_ptr<LotusStyleManagerInternal::State> m_state;
00114 libwps::DebugFile &m_asciiFile;
00115 };
00116
00117 #endif
00118