Deleted prior to be renamed

git-svn-id: svn://ultimatepp.org/upp/trunk@1225 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
koldo 2009-05-24 14:24:41 +00:00
parent ec89abe7f0
commit 57920a23b3
4 changed files with 0 additions and 3012 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,112 +0,0 @@
#ifndef _Automation_h
#define _Automation_h
using namespace Upp;
class OfficeSheet
{
public:
OfficeSheet();
~OfficeSheet();
static bool IsAvailable(String type);
bool Init(char *type);
bool AddSheet(bool visible);
bool OpenSheet(String fileName, bool visible);
bool SetValue(int col, int row, Value value);
bool SetValue(String cell, Value value);
Value GetValue(int col, int row);
Value GetValue(String cell);
bool Replace(Value search, Value replace);
bool SetBold(int col, int row, bool bold);
bool SetBold(String cell, bool bold);
bool SetBold(bool bold);
bool SetFont(int col, int row, String name, int size);
bool SetFont(String cell, String name, int size);
bool SetFont(String name, int size);
bool Select(String range);
bool Select(int fromX, int fromY, int toX, int toY);
bool Select();
/*// New functs for next versions
void DefMatrix(int width, int height);
bool FillSelectionMatrix();
void SetMatrixValue(int i, int j, ::Value value);
*/
bool Print();
bool SaveAs(String fileName, String type = "xls");
bool Quit();
bool InsertTab(String name);
bool ChooseTab(String name);
bool ChooseTab(int index);
bool RemoveTab(String name);
bool RemoveTab(int index);
int GetNumTabs();
String GetType()
{
if (type == SheetOPEN)
return "Open";
else
return "Microsoft";
}
static void CellToColRow(const char *cell, int &col, int &row);
static String ColRowToCell(const int col, const int row);
private:
void *data;
enum {SheetOPEN = 1, SheetMS};
int type;
};
class OfficeDoc
{
public:
OfficeDoc();
~OfficeDoc();
static bool IsAvailable(char *program);
bool Init(char *type);
bool AddDoc(bool visible);
bool OpenDoc(String fileName, bool visible);
bool SetFont(String font, int size);
bool SetBold(bool bold);
bool SetItalic(bool italic);
bool WriteText(String value);
bool Select();
bool Replace(String search, String replace);
bool Print();
bool SetSaved(bool);
bool SaveAs(String fileName, String type = "doc");
bool Quit();
String GetType()
{
if (type == DocOPEN)
return "Open";
else
return "Microsoft";
}
private:
void *data;
enum {DocOPEN = 1, DocMS};
int type;
};
#endif

View file

@ -1,15 +0,0 @@
description "Ole Automation";
uses
Core;
library(WIN32) Oleaut32;
file
Automation.h,
AutomationBase.h,
Automation.cpp;
mainconfig
"" = "MT";

View file

@ -1,258 +0,0 @@
#ifndef _AutomationBase_h
#define _AutomationBase_h
using namespace Upp;
typedef IDispatch* ObjectOle;
class VariantOle
{
public:
VariantOle();
~VariantOle();
void Bool(bool val);
void Int(int val);
void Int4(long val);
void Real4(float val);
void Real8(double val);
void BString(String str);
void Optional();
void ObjectOle(::ObjectOle var);
void Time(Upp::Time t);
void ArrayDim(int sizeX);
void ArrayDim(int sizeX, int sizeY);
void ArraySetValue(int x, ::Value value);
void ArraySetVariant(int x, VariantOle &value);
void ArraySetValue(int x, int y, ::Value value);
void ArraySetVariant(int x, int y, VariantOle &value);
void Value(::Value value);
public:
VARIANT var;
};
class MSSheet
{
public:
MSSheet();
~MSSheet();
static bool IsAvailable();
bool AddSheet(bool visible);
bool OpenSheet(String fileName, bool visible);
bool SetValue(int col, int row, Value value);
bool SetValue(String cell, Value value);
Value GetValue(int col, int row);
Value GetValue(String cell);
bool Replace(Value search, Value replace);
bool SetBold(int col, int row, bool bold);
bool SetBold(String cell, bool bold);
bool SetBold(bool bold);
bool SetFont(int col, int row, String name, int size);
bool SetFont(String cell, String name, int size);
bool SetFont(String name, int size);
bool Select(String range);
bool Select(int fromX, int fromY, int toX, int toY);
bool Select();
bool Print();
bool SetSaved(bool);
bool SaveAs(String fileName, String type = "xls");
bool Quit();
bool InsertTab(String name);
bool ChooseTab(String name);
bool ChooseTab(int index);
bool RemoveTab(String name);
bool RemoveTab(int index);
int GetNumTabs();
// New functs for next versions
void DefMatrix(int width, int height);
bool FillSelectionMatrix();
void SetMatrixValue(int i, int j, ::Value value);
private:
ObjectOle App;
ObjectOle Books;
ObjectOle Book;
ObjectOle Sheet;
ObjectOle Range;
VariantOle Matrix;
bool quit;
bool SetVisible(bool visible);
};
class MSDoc
{
public:
MSDoc();
~MSDoc();
static bool IsAvailable();
bool AddDoc(bool visible);
bool OpenDoc(String fileName, bool visible);
bool SetFont(String font, int size);
bool SetBold(bool bold);
bool SetItalic(bool italic);
bool WriteText(String value);
bool Select();
bool Replace(String search, String replace);
bool Print();
bool SetSaved(bool);
bool SaveAs(String fileName, String type = "doc");
bool Quit();
private:
ObjectOle App;
ObjectOle Docs;
ObjectOle Doc;
ObjectOle Selection;
bool ReplaceSubset(String search, String replace);
static String CleanString(String str);
bool quit;
bool SetVisible(bool visible);
};
#define wdFindContinue 1
#define wdReplaceAll 2
class OPENSheet
{
public:
OPENSheet();
~OPENSheet();
static bool IsAvailable();
bool AddSheet(bool visible);
bool OpenSheet(String fileName, bool visible);
bool SetValue(int col, int row, Value value);
bool SetValue(String cell, Value value);
Value GetValue(int col, int row);
Value GetValue(String cell);
bool Replace(Value search, Value replace);
bool SetBold(int col, int row, bool bold);
bool SetBold(String cell, bool bold);
bool SetBold(bool bold);
bool SetFont(int col, int row, String name, int size);
bool SetFont(String cell, String name, int size);
bool SetFont(String name, int size);
bool Select(String range);
bool Select(int fromX, int fromY, int toX, int toY);
bool Select();
/* // New functs for next versions
void DefMatrix(int width, int height);
bool FillSelectionMatrix();
void SetMatrixValue(int i, int j, ::Value value);
*/
bool Print();
bool SetSaved(bool);
bool SaveAs(String fileName, String type = "xls");
bool Quit();
bool InsertTab(String name);
bool ChooseTab(String name);
bool ChooseTab(int index);
bool RemoveTab(String name);
bool RemoveTab(int index);
int GetNumTabs();
// New functs for next versions
bool SetItalic(String cell, bool italic);
bool SetItalic(int col, int row, bool italic);
bool SetItalic(bool italic);
bool SetUnderline(bool underline);
bool SetUnderline(String cell, bool underline);
bool SetUnderline(int col, int row, bool underline);
bool SetHorizJustify(int justify);
bool SetHorizJustify(String cell, int justify);
bool SetHorizJustify(int col, int row, int justify);
bool SetVertJustify(String cell, int justify);
bool SetVertJustify(int col, int row, int justify);
bool SetCellBackColor(Color color);
bool SetCellBackColor(String cell, Color color);
bool SetCellBackColor(int col, int row, Color color);
bool SetFormat(String format);
bool SetColWidth(int col, int width);
bool SetRowHeight(int row, int height);
private:
ObjectOle ServiceManager;
ObjectOle CoreReflection;
ObjectOle Desktop;
ObjectOle Document;
ObjectOle Sheets;
ObjectOle Sheet;
ObjectOle Cell;
ObjectOle Range;
bool selectedAll;
bool SelCell(int x, int y);
bool SetVisible(bool visible);
bool quit;
};
class OPENDoc
{
public:
OPENDoc();
~OPENDoc();
static bool IsAvailable();
bool AddDoc(bool visible);
bool OpenDoc(String fileName, bool visible);
bool SetFont(String font, int size);
bool SetBold(bool bold);
bool SetItalic(bool italic);
bool WriteText(String value);
bool Select();
bool Replace(String search, String replace);
bool Print();
bool SetSaved(bool);
bool SaveAs(String fileName, String type = "doc");
bool Quit();
// New functs for next versions
bool SetColor(Color col);
private:
ObjectOle ServiceManager;
ObjectOle CoreReflection;
ObjectOle Desktop;
ObjectOle Document;
ObjectOle Text;
ObjectOle Cursor;
bool quit;
bool SetVisible(bool visible);
};
#endif