COOPY » Guide  version 0.6.5
/home/paulfitz/cvs/coopy_scm/coopy/src/libgnumeric/include/coopy/GnumericSheet.h
Go to the documentation of this file.
00001 #ifndef COOPY_GNUMERICSHEET
00002 #define COOPY_GNUMERICSHEET
00003 
00004 #include <coopy/DataSheet.h>
00005 
00006 namespace coopy {
00007   namespace store {
00008     namespace gnumeric {
00009       class GnumericSheet;
00010     }
00011   }
00012 }
00013 
00014 class coopy::store::gnumeric::GnumericSheet : public DataSheet {
00015 public:
00016   GnumericSheet(void *sheet);
00017 
00018   virtual ~GnumericSheet();
00019 
00020   virtual int width() const  { return w; }
00021   virtual int height() const { return h; }
00022 
00023 
00024   virtual SheetCell cellSummary(int x, int y) const;
00025 
00026   virtual bool cellSummary(int x, int y, const SheetCell& c);
00027 
00028   virtual std::string cellString(int x, int y) const {
00029     SheetCell cell = cellSummary(x,y);
00030     return cell.text;
00031   }
00032 
00033   virtual std::string cellString(int x, int y, bool& escaped) const {
00034     SheetCell cell = cellSummary(x,y);
00035     escaped = cell.escaped;
00036     return cell.text;
00037   }
00038 
00039   virtual bool cellString(int x, int y, const std::string& str) {
00040     return cellString(x,y,str,false);
00041   }
00042 
00043   virtual bool cellString(int x, int y, const std::string& str, bool escaped) {
00044     SheetCell cell(str,escaped);
00045     return cellSummary(x,y,cell);
00046   }
00047 
00048   virtual ColumnRef moveColumn(const ColumnRef& src, const ColumnRef& base);
00049 
00050   virtual bool deleteColumn(const ColumnRef& column);
00051 
00052   virtual ColumnRef insertColumn(const ColumnRef& base);
00053 
00054   virtual ColumnRef insertColumn(const ColumnRef& base, const ColumnInfo& kind);
00055 
00056   virtual bool modifyColumn(const ColumnRef& base, const ColumnInfo& kind);
00057 
00058   virtual RowRef insertRow(const RowRef& base);
00059 
00060   virtual bool deleteRow(const RowRef& src);
00061 
00062   virtual bool deleteRows(const RowRef& first, const RowRef& last);
00063 
00064   virtual RowRef moveRow(const RowRef& src, const RowRef& base);
00065 
00066 
00067   virtual bool hasDimension() const {
00068     return false;
00069   }
00070 
00071   virtual bool forceWidth(int width) {
00072     w = width;
00073     return true;
00074   }
00075 
00076   virtual bool deleteData(int offset=0);
00077 
00078   virtual Poly<Appearance> getCellAppearance(int x, int y);
00079 
00080   virtual Poly<Appearance> getRowAppearance(int y);
00081 
00082   virtual Poly<Appearance> getColAppearance(int x);
00083 
00084   virtual std::string getDescription() const {
00085     return "gnumeric";
00086   }
00087 
00088 private:
00089   void *implementation;
00090   int w, h;
00091 };
00092 
00093 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines