mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
OfficeAutomation: Added new functions
git-svn-id: svn://ultimatepp.org/upp/trunk@3082 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
49a57302c4
commit
de504d298d
9 changed files with 1807 additions and 1027 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -31,9 +31,38 @@ public:
|
|||
bool SetBold(int col, int row, bool bold);
|
||||
bool SetBold(String cell, bool bold);
|
||||
bool SetBold(bool bold);
|
||||
bool SetItalic(int col, int row, bool italic);
|
||||
bool SetItalic(String cell, 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 SetFont(int col, int row, String name, int size);
|
||||
bool SetFont(String cell, String name, int size);
|
||||
bool SetFont(String name, int size);
|
||||
bool SetColor(int col, int row, Color color);
|
||||
bool SetColor(String cell, Color color);
|
||||
bool SetColor(Color color);
|
||||
bool SetBackColor(int col, int row, Color color);
|
||||
bool SetBackColor(String cell, Color color);
|
||||
bool SetBackColor(Color color);
|
||||
|
||||
bool SetRowHeight(int row, double height);
|
||||
bool SetColWidth(int col, double width);
|
||||
|
||||
enum {LEFT = 0, CENTER, RIGHT, JUSTIFY, TOP, BOTTOM, MAX_JUSTIFY};
|
||||
|
||||
bool SetHorizAlignment(String cell, int alignment);
|
||||
bool SetHorizAlignment(int col, int row, int alignment);
|
||||
bool SetVertAlignment(String cell, int alignment);
|
||||
bool SetVertAlignment(int col, int row, int alignment);
|
||||
|
||||
enum {BORDER_DIAG_DOWN = 0, BORDER_DIAG_UP, BORDER_LEFT, BORDER_TOP, BORDER_BOTTOM, BORDER_RIGHT};
|
||||
enum {HAIRLINE = 0, MEDIUM, THIN, THICK};
|
||||
enum {NONE = 0, CONTINUOUS, DASH, DASHDOT, DOT};
|
||||
|
||||
bool SetBorder(int borderIndx, int lineStyle, int weight, Color color);
|
||||
bool SetBorder(int col, int row, int borderIndx, int lineStyle, int weight, Color color);
|
||||
|
||||
bool Select(String range);
|
||||
bool Select(int fromX, int fromY, int toX, int toY);
|
||||
|
|
|
|||
|
|
@ -3,25 +3,29 @@
|
|||
#endif
|
||||
// OfficeAutomation.cpp
|
||||
|
||||
T_("OfficeAutomation internal error. NULL IDispatch passed to AutoWrap()")
|
||||
esES("Error interno en OfficeAutomation. Pasado IDispatch nulo a AutoWrap()")
|
||||
T_("OfficeAutomation internal error. ObjectOle included is null")
|
||||
esES("Error interno en OfficeAutomation. ObjectOle incluido es nulo")
|
||||
|
||||
T_("Error")
|
||||
esES("Error")
|
||||
|
||||
T_("OfficeAutomation internal error. Command \"%s\" not found for object or "
|
||||
"problem when running it")
|
||||
esES("Error interno en OfficeAutomation. Orden \"%s\" no encontrada para objeto "
|
||||
"o problema al ejecutarla")
|
||||
T_("OfficeAutomation internal error. Command \"%s\" not found for object o"
|
||||
"r problem when running it")
|
||||
esES("Error interno en OfficeAutomation. Orden \"%s\" no encontrada para obj"
|
||||
"eto o problema al ejecutarla")
|
||||
|
||||
T_("Ole error")
|
||||
esES("Error en Ole")
|
||||
|
||||
T_("OfficeAutomation internal error. Application not registered properly")
|
||||
esES("Error interno en OfficeAutomation. Aplicación no registrada correctamente")
|
||||
esES("Error interno en OfficeAutomation. Aplicaci\303\263n no registrada cor"
|
||||
"rectamente")
|
||||
|
||||
T_("Excel workbooks not loaded properly")
|
||||
esES("Libro de Excel no abierto correctamente")
|
||||
|
||||
T_("Word document not loaded properly")
|
||||
esES("Documento de Word no abierto correctamente")
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,21 @@
|
|||
description "Automation of Office suites OpenOffice and Microsoft\377B255,170,0";
|
||||
|
||||
noblitz;
|
||||
|
||||
uses
|
||||
Core,
|
||||
Functions4U;
|
||||
|
||||
library(WIN32) Oleaut32;
|
||||
|
||||
file
|
||||
OfficeAutomation.h,
|
||||
OfficeAutomationBase.h,
|
||||
OfficeAutomation.cpp,
|
||||
srcdoc.tpp,
|
||||
src.tpp,
|
||||
OfficeAutomation.t,
|
||||
License.txt;
|
||||
|
||||
|
||||
description "Automation of Office suites OpenOffice and Microsoft\377B255,170,0";
|
||||
|
||||
noblitz;
|
||||
|
||||
uses
|
||||
Core,
|
||||
Functions4U;
|
||||
|
||||
library(WIN32) Oleaut32;
|
||||
|
||||
file
|
||||
OfficeSheet.cpp,
|
||||
OfficeDoc.cpp,
|
||||
OfficeAutomation.cpp,
|
||||
OfficeAutomation.h,
|
||||
OfficeAutomationBase.h,
|
||||
srcdoc.tpp,
|
||||
src.tpp,
|
||||
OfficeAutomation.t,
|
||||
License.txt;
|
||||
|
||||
|
|
|
|||
|
|
@ -52,10 +52,33 @@ public:
|
|||
bool SetBold(int col, int row, bool bold);
|
||||
bool SetBold(String cell, bool bold);
|
||||
bool SetBold(bool bold);
|
||||
bool SetItalic(int col, int row, bool italic);
|
||||
bool SetItalic(String cell, 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 SetFont(int col, int row, String name, int size);
|
||||
bool SetFont(String cell, String name, int size);
|
||||
bool SetFont(String name, int size);
|
||||
bool SetColor(int col, int row, Color color);
|
||||
bool SetColor(String cell, Color color);
|
||||
bool SetColor(Color color);
|
||||
bool SetBackColor(int col, int row, Color color);
|
||||
bool SetBackColor(String cell, Color color);
|
||||
bool SetBackColor(Color color);
|
||||
|
||||
bool SetRowHeight(int row, double height);
|
||||
bool SetColWidth(int col, double width);
|
||||
|
||||
bool SetHorizAlignment(String cell, int alignment);
|
||||
bool SetHorizAlignment(int col, int row, int alignment);
|
||||
bool SetVertAlignment(String cell, int alignment);
|
||||
bool SetVertAlignment(int col, int row, int alignment);
|
||||
|
||||
bool SetBorder(int borderIndx, int lineStyle, int weight, Color color);
|
||||
bool SetBorder(int col, int row, int borderIndx, int lineStyle, int weight, Color color);
|
||||
|
||||
bool Select(String range);
|
||||
bool Select(int fromX, int fromY, int toX, int toY);
|
||||
bool Select();
|
||||
|
|
@ -90,6 +113,7 @@ private:
|
|||
bool quit;
|
||||
|
||||
bool SetVisible(bool visible);
|
||||
bool SetBorder(ObjectOle &borders, int borderIndx, int lineStyle, int weight, Color color);
|
||||
};
|
||||
|
||||
class MSDoc
|
||||
|
|
@ -156,9 +180,32 @@ public:
|
|||
bool SetBold(int col, int row, bool bold);
|
||||
bool SetBold(String cell, bool bold);
|
||||
bool SetBold(bool bold);
|
||||
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 SetFont(int col, int row, String name, int size);
|
||||
bool SetFont(String cell, String name, int size);
|
||||
bool SetFont(String name, int size);
|
||||
bool SetColor(int col, int row, Color color);
|
||||
bool SetColor(String cell, Color color);
|
||||
bool SetColor(Color color);
|
||||
bool SetBackColor(int col, int row, Color color);
|
||||
bool SetBackColor(String cell, Color color);
|
||||
bool SetBackColor(Color color);
|
||||
|
||||
bool SetColWidth(int col, double width);
|
||||
bool SetRowHeight(int row, double height);
|
||||
|
||||
bool SetHorizAlignment(String cell, int alignment);
|
||||
bool SetHorizAlignment(int col, int row, int alignment);
|
||||
bool SetVertAlignment(String cell, int alignment);
|
||||
bool SetVertAlignment(int col, int row, int alignment);
|
||||
|
||||
bool SetBorder(int borderIndx, int lineStyle, int weight, Color color);
|
||||
bool SetBorder(int col, int row, int borderIndx, int lineStyle, int weight, Color color);
|
||||
|
||||
bool Select(String range);
|
||||
bool Select(int fromX, int fromY, int toX, int toY);
|
||||
|
|
@ -182,23 +229,10 @@ public:
|
|||
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 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;
|
||||
|
|
@ -257,4 +291,37 @@ private:
|
|||
bool SetVisible(bool visible);
|
||||
};
|
||||
|
||||
|
||||
class Ole {
|
||||
public:
|
||||
static bool Invoke(int autoType, VARIANT *pvResult, IDispatch *pDisp, String name, int cArgs...);
|
||||
static void Init();
|
||||
static bool Close();
|
||||
static ObjectOle CreateObject(String application);
|
||||
static ObjectOle GetObject(ObjectOle from, String what);
|
||||
static ObjectOle GetObject(ObjectOle from, String which, VariantOle &value);
|
||||
static ObjectOle GetObject(ObjectOle from, String which, VariantOle &value, VariantOle &value2);
|
||||
static bool SetValue(ObjectOle from, String which, VariantOle &value);
|
||||
static bool SetValue(ObjectOle from, String which, VariantOle &value, VariantOle &value2);
|
||||
static bool SetValue(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3);
|
||||
static Value GetValue(ObjectOle from, String which);
|
||||
static Value GetValue(ObjectOle from, String which, VariantOle &value);
|
||||
static Value GetValue(ObjectOle from, String which, VariantOle &value, VariantOle &value2);
|
||||
static bool Method(ObjectOle from, String which);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value, VariantOle &value2);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3, VariantOle &value4);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3, VariantOle &value4, VariantOle &value5);
|
||||
static bool Method(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3, VariantOle &value4, VariantOle &value5, VariantOle &value6, VariantOle &value7, VariantOle &value8, VariantOle &value9, VariantOle &value10, VariantOle &value11);
|
||||
static ObjectOle MethodGet(ObjectOle from, String which);
|
||||
static ObjectOle MethodGet(ObjectOle from, String which, VariantOle &value);
|
||||
static ObjectOle MethodGet(ObjectOle from, String which, VariantOle &value, VariantOle &value2);
|
||||
static ObjectOle MethodGet(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3);
|
||||
static ObjectOle MethodGet(ObjectOle from, String which, VariantOle &value, VariantOle &value2, VariantOle &value3, VariantOle &value4);
|
||||
static bool IsOn() {return numOleInit > 0;};
|
||||
private:
|
||||
static int numOleInit;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
179
bazaar/OfficeAutomation/OfficeDoc.cpp
Normal file
179
bazaar/OfficeAutomation/OfficeDoc.cpp
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
#ifndef PLATFORM_WIN32
|
||||
#error Sorry: This platform is not supported!. Look for OfficeAutomation in Bazaar Upp Forum to search for info and new news
|
||||
#endif
|
||||
|
||||
#include "OfficeAutomationBase.h"
|
||||
#include "OfficeAutomation.h"
|
||||
|
||||
|
||||
OfficeDoc::OfficeDoc() {
|
||||
data = NULL;
|
||||
Ole::Init();
|
||||
}
|
||||
|
||||
OfficeDoc::~OfficeDoc() {
|
||||
if (!data)
|
||||
return;
|
||||
if (type == DocOPEN)
|
||||
delete (OPENDoc*)data;
|
||||
else if (type == DocMS)
|
||||
delete (MSDoc*)data;
|
||||
|
||||
Ole::Close();
|
||||
}
|
||||
|
||||
bool OfficeDoc::IsAvailable(String strtype) {
|
||||
if (strcmp(strtype, "Open") >= 0)
|
||||
return OPENDoc::IsAvailable();
|
||||
else if (strcmp(strtype, "Microsoft") >= 0)
|
||||
return MSDoc::IsAvailable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::Init(String strtype) {
|
||||
if (data) {
|
||||
if (type == DocOPEN)
|
||||
delete (OPENDoc*)data;
|
||||
else if (type == DocMS)
|
||||
delete (MSDoc*)data;
|
||||
}
|
||||
if (strcmp(strtype, "Open") >= 0) {
|
||||
type = DocOPEN;
|
||||
data = new OPENDoc();
|
||||
} else if (strcmp(strtype, "Microsoft") >= 0) {
|
||||
type = DocMS;
|
||||
data = new MSDoc();
|
||||
} else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OfficeDoc::AddDoc(bool visible) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->AddDoc(visible);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->AddDoc(visible);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::OpenDoc(String fileName, bool visible) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->OpenDoc(fileName, visible);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->OpenDoc(fileName, visible);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::SetFont(String font, int size) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->SetFont(font, size);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->SetFont(font, size);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::SetBold(bool bold) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->SetBold(bold);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->SetBold(bold);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::SetItalic(bool italic) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->SetItalic(italic);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->SetItalic(italic);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::WriteText(String value) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->WriteText(value);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->WriteText(value);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::Select() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->Select();
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->Select();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::Replace(String search, String replace) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->Replace(search, replace);
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->Replace(search, replace);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::Print() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->Print();
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->Print();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::SaveAs(String fileName, String _type) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN) {
|
||||
int ret;
|
||||
ret = ((OPENDoc*)data)->SaveAs(fileName, _type);
|
||||
((OPENDoc*)data)->SetSaved(true);
|
||||
return ret;
|
||||
} else if (type == DocMS) {
|
||||
((MSDoc*)data)->SetSaved(true);
|
||||
return ((MSDoc*)data)->SaveAs(fileName, _type);
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeDoc::Quit() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == DocOPEN)
|
||||
return ((OPENDoc*)data)->Quit();
|
||||
else if (type == DocMS)
|
||||
return ((MSDoc*)data)->Quit();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
644
bazaar/OfficeAutomation/OfficeSheet.cpp
Normal file
644
bazaar/OfficeAutomation/OfficeSheet.cpp
Normal file
|
|
@ -0,0 +1,644 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
#ifndef PLATFORM_WIN32
|
||||
#error Sorry: This platform is not supported!. Look for OfficeAutomation in Bazaar Upp Forum to search for info and new news
|
||||
#endif
|
||||
|
||||
#include "OfficeAutomationBase.h"
|
||||
#include "OfficeAutomation.h"
|
||||
|
||||
|
||||
OfficeSheet::OfficeSheet() {
|
||||
data = NULL;
|
||||
Ole::Init();
|
||||
}
|
||||
|
||||
OfficeSheet::~OfficeSheet() {
|
||||
if (!data)
|
||||
return;
|
||||
if (type == SheetOPEN)
|
||||
delete (OPENSheet*)data;
|
||||
else if (type == SheetMS)
|
||||
delete (MSSheet*)data;
|
||||
|
||||
Ole::Close();
|
||||
}
|
||||
|
||||
void OfficeSheet::CellToColRow(const char *cell, int &col, int &row) {
|
||||
String s_col;
|
||||
int i;
|
||||
int lenCell = strlen(cell);
|
||||
for (i = 0; (i < lenCell) && (cell[i] >= 'A') && (cell[i] <= 'Z'); ++i)
|
||||
s_col.Cat(cell[i]);
|
||||
|
||||
row = atoi(cell + i);
|
||||
|
||||
int num_az = 'Z' - 'A' + 1;
|
||||
col = 0;
|
||||
int len = s_col.GetCount();
|
||||
int p = (int)pow((double)num_az, len-1);
|
||||
for (int j = 0; j < s_col.GetCount(); ++j) {
|
||||
col += (s_col[j] - 'A' + 1)*p;
|
||||
p /= num_az;
|
||||
}
|
||||
}
|
||||
|
||||
void OfficeSheet::CellToColRow(const char *cell, Cell &cellPos) {
|
||||
CellToColRow(cell, cellPos.col, cellPos.row);
|
||||
}
|
||||
|
||||
String OfficeSheet::ColRowToCell(const int col, const int row) {
|
||||
String cell;
|
||||
int num_az = 'Z' - 'A' + 1;
|
||||
int firstLetter = col/num_az;
|
||||
int secondLetter = col - firstLetter*num_az;
|
||||
int len = firstLetter > 0 ? 2: 1;
|
||||
|
||||
StringBuffer bCell(len);
|
||||
if (len == 2) {
|
||||
bCell[0] = 'A' + firstLetter - 1;
|
||||
bCell[1] = 'A' + secondLetter - 1;
|
||||
} else if (len == 1)
|
||||
bCell[0] = 'A' + secondLetter - 1;
|
||||
else
|
||||
return "Error";
|
||||
bCell.Cat(AsString(row));
|
||||
cell = bCell;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
String OfficeSheet::ColRowToCell(const Cell &cellPos) {
|
||||
return ColRowToCell(cellPos.col, cellPos.row);
|
||||
}
|
||||
|
||||
bool OfficeSheet::IsAvailable(String strtype) {
|
||||
if (strtype == "Open" || strtype == "Libre")
|
||||
return OPENSheet::IsAvailable();
|
||||
else if (strtype == "Microsoft")
|
||||
return MSSheet::IsAvailable();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Init(String strtype) {
|
||||
if (data) {
|
||||
if (type == SheetOPEN)
|
||||
delete (OPENSheet*)data;
|
||||
else if (type == SheetMS)
|
||||
delete (MSSheet*)data;
|
||||
}
|
||||
if (strtype == "Open" || strtype == "Libre") {
|
||||
type = SheetOPEN;
|
||||
data = new OPENSheet();
|
||||
} else if (strtype == "Microsoft") {
|
||||
type = SheetMS;
|
||||
data = new MSSheet();
|
||||
} else
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OfficeSheet::AddSheet(bool visible) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->AddSheet(visible);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->AddSheet(visible);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::OpenSheet(String fileName, bool visible) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->OpenSheet(fileName, visible);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->OpenSheet(fileName, visible);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetValue(int col, int row, Value value) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetValue(col, row, value);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetValue(col, row, value);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetValue(String cell, Value value) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetValue(cell, value);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetValue(cell, value);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetValue(Value value) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetValue(value);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetValue(value);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
Value OfficeSheet::GetValue(String cell) {
|
||||
if (!data)
|
||||
return Null;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->GetValue(cell);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->GetValue(cell);
|
||||
else
|
||||
return Null;
|
||||
}
|
||||
|
||||
Value OfficeSheet::GetValue(int col, int row) {
|
||||
if (!data)
|
||||
return Null;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->GetValue(col, row);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->GetValue(col, row);
|
||||
else
|
||||
return Null;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Replace(Value search, Value replace) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Replace(search, replace);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Replace(search, replace);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBold(int col, int row, bool bold) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBold(col, row, bold);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBold(col, row, bold);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBold(String cell, bool bold) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBold(cell, bold);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBold(cell, bold);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBold(bool bold) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBold(bold);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBold(bold);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetItalic(int col, int row, bool italic) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetItalic(col, row, italic);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetItalic(col, row, italic);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetItalic(String cell, bool italic) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetItalic(cell, italic);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetItalic(cell, italic);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetItalic(bool italic) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetItalic(italic);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetItalic(italic);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetUnderline(int col, int row, bool underline) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetUnderline(col, row, underline);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetUnderline(col, row, underline);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetUnderline(String cell, bool underline) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetUnderline(cell, underline);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetUnderline(cell, underline);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetUnderline(bool underline) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetUnderline(underline);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetUnderline(underline);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetFont(int col, int row, String name, int size) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetFont(col, row, name, size);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetFont(col, row, name, size);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetFont(String cell, String name, int size) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetFont(cell, name, size);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetFont(cell, name, size);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetFont(String name, int size) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetFont(name, size);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetFont(name, size);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetColor(int col, int row, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetColor(col, row, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetColor(col, row, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetColor(String cell, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetColor(cell, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetColor(cell, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetColor(Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetColor(color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetColor(color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBackColor(int col, int row, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBackColor(col, row, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBackColor(col, row, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBackColor(String cell, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBackColor(cell, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBackColor(cell, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBackColor(Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBackColor(color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBackColor(color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetRowHeight(int row, double height) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetRowHeight(row, height);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetRowHeight(row, height);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetColWidth(int col, double width) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetColWidth(col, width);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetColWidth(col, width);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetVertAlignment(int col, int row, int alignment) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetVertAlignment(col, row, alignment);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetVertAlignment(col, row, alignment);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetVertAlignment(String cell, int alignment) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetVertAlignment(cell, alignment);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetVertAlignment(cell, alignment);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetHorizAlignment(int col, int row, int alignment) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetHorizAlignment(col, row, alignment);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetHorizAlignment(col, row, alignment);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetHorizAlignment(String cell, int alignment) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetHorizAlignment(cell, alignment);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetHorizAlignment(cell, alignment);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBorder(int col, int row, int borderIndx, int lineStyle, int weight, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
// if (type == SheetOPEN)
|
||||
// return ((OPENSheet*)data)->SetBorder(col, row, borderIndx, lineStyle, weight, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBorder(col, row, borderIndx, lineStyle, weight, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::SetBorder(int borderIndx, int lineStyle, int weight, Color color) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->SetBorder(borderIndx, lineStyle, weight, color);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->SetBorder(borderIndx, lineStyle, weight, color);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Select(String range) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Select(range);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Select(range);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Select(int fromX, int fromY, int toX, int toY) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Select(fromX, fromY, toX, toY);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Select(fromX, fromY, toX, toY);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Select() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Select();
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Select();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
void OfficeSheet::DefMatrix(int width, int height)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
if (type == SheetOPEN)
|
||||
((OPENSheet*)data)->DefMatrix(width, height);
|
||||
else if (type == SheetMS)
|
||||
((MSSheet*)data)->DefMatrix(width, height);
|
||||
else
|
||||
return;
|
||||
}
|
||||
bool OfficeSheet::FillSelectionMatrix()
|
||||
{
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->FillSelectionMatrix();
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->FillSelectionMatrix();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
void OfficeSheet::SetMatrixValue(int i, int j, ::Value value)
|
||||
{
|
||||
if (!data)
|
||||
return;
|
||||
if (type == SheetOPEN)
|
||||
((OPENSheet*)data)->SetMatrixValue(i, j, value);
|
||||
else if (type == SheetMS)
|
||||
((MSSheet*)data)->SetMatrixValue(i, j, value);
|
||||
else
|
||||
return;
|
||||
}
|
||||
*/
|
||||
bool OfficeSheet::SaveAs(String fileName, String _type) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN) {
|
||||
int ret;
|
||||
ret = ((OPENSheet*)data)->SaveAs(fileName, _type);
|
||||
((OPENSheet*)data)->SetSaved(true);
|
||||
return ret;
|
||||
} else if (type == SheetMS) {
|
||||
((MSSheet*)data)->SetSaved(true);
|
||||
return ((MSSheet*)data)->SaveAs(fileName, _type);
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Quit() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Quit();
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Quit();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::Print() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->Print();
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->Print();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::InsertTab(String name) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->InsertTab(name);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->InsertTab(name);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::ChooseTab(String name) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->ChooseTab(name);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->ChooseTab(name);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::ChooseTab(int index) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->ChooseTab(index);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->ChooseTab(index);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::RemoveTab(String name) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->RemoveTab(name);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->RemoveTab(name);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool OfficeSheet::RemoveTab(int index) {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->RemoveTab(index);
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->RemoveTab(index);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
int OfficeSheet::GetNumTabs() {
|
||||
if (!data)
|
||||
return false;
|
||||
if (type == SheetOPEN)
|
||||
return ((OPENSheet*)data)->GetNumTabs();
|
||||
else if (type == SheetMS)
|
||||
return ((MSSheet*)data)->GetNumTabs();
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
|
@ -5,9 +5,10 @@ topic "OfficeSheet class reference";
|
|||
[0 $$3,0#96390100711032703541132217272105:end]
|
||||
[H6;0 $$4,0#05600065144404261032431302351956:begin]
|
||||
[i448;a25;kKO9;2 $$5,0#37138531426314131252341829483370:codeitem]
|
||||
[l288;a4;*@5;1 $$6,6#70004532496200323422659154056402:requirement]
|
||||
[{_}
|
||||
[ {{10000@(113.42.0) [s0;%% [*@7;4 OfficeSheet]]}}&]
|
||||
[s1;*4 &]
|
||||
[s1;*2 &]
|
||||
[s1;:OfficeSheet`:`:class: [@(0.0.255)4 class][4 _][*4 OfficeSheet]&]
|
||||
[s2;l0;* &]
|
||||
[s0; [2 OfficeSheet class serves to manage spreadsheets made with OpenOffice
|
||||
|
|
@ -111,10 +112,10 @@ t]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) bool]_[*@3 bold])&]
|
|||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBold`(String`,bool`): [@(0.0.255) bool]_[* SetBold]([_^String^ Strin
|
||||
g]_[*@3 cell], [@(0.0.255) bool]_[*@3 bold])&]
|
||||
[s2;%% Sets or unsets cell bold letters in [%-*@3 cell. cell ]is a
|
||||
string that indicates the cell location with letters to indicate
|
||||
the column and a number to indicate the row as in `"B7`", following
|
||||
the format used in spreadsheets.&]
|
||||
[s2;%% Sets or unsets [%-*@3 cell ]bold letters in [%-*@3 cell. cell
|
||||
]is a string that indicates the cell location with letters to
|
||||
indicate the column and a number to indicate the row as in `"B7`",
|
||||
following the format used in spreadsheets.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBold`(bool`): [@(0.0.255) bool]_[* SetBold]([@(0.0.255) bool]_[*@3 bol
|
||||
|
|
@ -123,6 +124,46 @@ d])&]
|
|||
Select() or all the document.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetItalic`(int`,int`,bool`): [@(0.0.255) bool]_[* SetItalic]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) bool]_[*@3 italic])&]
|
||||
[s2;%% Sets or unsets cell italic letters in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetItalic`(String`,bool`): [@(0.0.255) bool]_[* SetItalic]([_^String^ S
|
||||
tring]_[*@3 cell], [@(0.0.255) bool]_[*@3 italic])&]
|
||||
[s2;%% Sets or unsets [%-*@3 cell ]italic letters in [%-*@3 cell. cell
|
||||
]is a string that indicates the cell location with letters to
|
||||
indicate the column and a number to indicate the row as in `"B7`",
|
||||
following the format used in spreadsheets.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetItalic`(bool`): [@(0.0.255) bool]_[* SetItalic]([@(0.0.255) bool]_[*@3 i
|
||||
talic])&]
|
||||
[s2;%% Sets or unsets cell italic letters in the selected range by
|
||||
Select() or all the document.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetUnderline`(bool`): [@(0.0.255) bool]_[* SetUnderline]([@(0.0.255) bo
|
||||
ol]_[*@3 underline])&]
|
||||
[s2;%% Sets or unsets cell underline letters in the selected range
|
||||
by Select() or all the document.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetUnderline`(String`,bool`): [@(0.0.255) bool]_[* SetUnderline]([_^String^ S
|
||||
tring]_[*@3 cell], [@(0.0.255) bool]_[*@3 underline])&]
|
||||
[s2;%% Sets or unsets [%-*@3 cell ]underline letters in [%-*@3 cell.
|
||||
cell ]is a string that indicates the cell location with letters
|
||||
to indicate the column and a number to indicate the row as in
|
||||
`"B7`", following the format used in spreadsheets.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetUnderline`(int`,int`,bool`): [@(0.0.255) bool]_[* SetUnderline]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) bool]_[*@3 underline])&]
|
||||
[s2;%% Sets or unsets cell underlined letters in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetFont`(int`,int`,String`,int`): [@(0.0.255) bool]_[* SetFont]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) int]_[*@3 row], [_^String^ String]_[*@3 name],
|
||||
[@(0.0.255) int]_[*@3 size])&]
|
||||
|
|
@ -144,6 +185,125 @@ tring]_[*@3 cell], [_^String^ String]_[*@3 name], [@(0.0.255) int]_[*@3 size])&]
|
|||
font [%-*@3 name] with [%-*@3 size ]in points. &]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetColor`(int`,int`,Color`): [@(0.0.255) bool]_[* SetColor]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) int]_[*@3 row], [_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets or unsets cell letter [%-*@3 color] in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetColor`(String`,Color`): [@(0.0.255) bool]_[* SetColor]([_^String^ St
|
||||
ring]_[*@3 cell], [_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets or unsets [%-*@3 cell ]letter [%-*@3 color] in [%-*@3 cell.
|
||||
cell ]is a string that indicates the cell location with letters
|
||||
to indicate the column and a number to indicate the row as in
|
||||
`"B7`", following the format used in spreadsheets.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetColor`(Color`): [@(0.0.255) bool]_[* SetColor]([_^Color^ Color]_[*@3 c
|
||||
olor])&]
|
||||
[s2;%% Sets or unsets cell letter [%-*@3 color] in the selected range
|
||||
by Select() or all the document.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBackColor`(int`,int`,Color`): [@(0.0.255) bool]_[* SetBackColor]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) int]_[*@3 row], [_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets or unsets cell background [%-*@3 color] in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBackColor`(String`,Color`): [@(0.0.255) bool]_[* SetBackColor]([_^String^ S
|
||||
tring]_[*@3 cell], [_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets or unsets [%-*@3 cell ]letter background [%-*@3 color] in
|
||||
[%-*@3 cell. cell ]is a string that indicates the cell location
|
||||
with letters to indicate the column and a number to indicate
|
||||
the row as in `"B7`", following the format used in spreadsheets.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBackColor`(Color`): [@(0.0.255) bool]_[* SetBackColor]([_^Color^ Col
|
||||
or]_[*@3 color])&]
|
||||
[s2;%% Sets or unsets cell letter background [%-*@3 color] in the selected
|
||||
range by Select() or all the document.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetRowHeight`(int`,double`): [@(0.0.255) bool]_[* SetRowHeight]([@(0.0.255) i
|
||||
nt]_[*@3 row], [@(0.0.255) double]_[*@3 height])&]
|
||||
[s2;%% Sets [%-*@3 row] [%-*@3 height] in millimeters.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetColWidth`(int`,double`): [@(0.0.255) bool]_[* SetColWidth]([@(0.0.255) i
|
||||
nt]_[*@3 col], [@(0.0.255) double]_[*@3 width])&]
|
||||
[s2;%% Sets [%-*@3 col] [%-*@3 width] in millimeters.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetHorizAlignment`(String`,int`): [@(0.0.255) bool]_[* SetHorizAlignm
|
||||
ent]([_^String^ String]_[*@3 cell], [@(0.0.255) int]_[*@3 alignment])&]
|
||||
[s2;%% Sets [%-*@3 cell ]horizontal alignment[%- . ][%-*@3 cell ]is a string
|
||||
that indicates the cell location with letters to indicate the
|
||||
column and a number to indicate the row as in `"B7`", following
|
||||
the format used in spreadsheets.&]
|
||||
[s2;%% [%-*@3 alignment ]is a constant that can be LEFT, CENTER, RIGHT
|
||||
or JUSTIFY.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetHorizAlignment`(int`,int`,int`): [@(0.0.255) bool]_[* SetHorizAlig
|
||||
nment]([@(0.0.255) int]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) int]_[*@3 alignmen
|
||||
t])&]
|
||||
[s2;%% Sets [%-*@3 cell ]horizontal alignment in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s2;%% [%-*@3 alignment ]is a constant that can be LEFT, CENTER, RIGHT
|
||||
or JUSTIFY.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetVertAlignment`(String`,int`): [@(0.0.255) bool]_[* SetVertAlignmen
|
||||
t]([_^String^ String]_[*@3 cell], [@(0.0.255) int]_[*@3 alignment])&]
|
||||
[s2;%% Sets [%-*@3 cell ]vertical alignment[%- . ][%-*@3 cell ]is a string
|
||||
that indicates the cell location with letters to indicate the
|
||||
column and a number to indicate the row as in `"B7`", following
|
||||
the format used in spreadsheets.&]
|
||||
[s2;%% [%-*@3 alignment ]is a constant that can be TOP, CENTER or BOTTOM.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetVertAlignment`(int`,int`,int`): [@(0.0.255) bool]_[* SetVertAlignm
|
||||
ent]([@(0.0.255) int]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) int]_[*@3 alignment])
|
||||
&]
|
||||
[s2;%% Sets [%-*@3 cell ]vertical alignment in [%-*@3 col,] [%-*@3 row.
|
||||
col,] [%-*@3 row ]origin is (1, 1).&]
|
||||
[s2;%% [%-*@3 alignment ]is a constant that can be TOP, CENTER or BOTTOM.&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBorder`(int`,int`,int`,Color`): [@(0.0.255) bool]_[* SetBorder]([@(0.0.255) i
|
||||
nt]_[*@3 borderIndx], [@(0.0.255) int]_[*@3 lineStyle], [@(0.0.255) int]_[*@3 weight],
|
||||
[_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets selected cells border type, where:&]
|
||||
[s2;i150;O0;%% [%-*@3 borderIndx ]is the changed border. Values are
|
||||
BORDER`_DIAG`_DOWN, BORDER`_DIAG`_UP, BORDER`_LEFT, BORDER`_TOP,
|
||||
BORDER`_BOTTOM and BORDER`_RIGHT.&]
|
||||
[s2;i150;O0;%% [%-*@3 lineStyle] is the line style. Values are NONE,
|
||||
CONTINUOUS, DASH, DASHDOT and DOT.&]
|
||||
[s2;i150;O0;%% [%-*@3 weight ]is the line thickness. Values are HAIRLINE,
|
||||
MEDIUM, THIN and THICK.&]
|
||||
[s2;i150;O0;%% [%-*@3 color] is the border color.&]
|
||||
[s2;%% [*@(28.42.255)1 SetBorder functions are not implemented in Open/LibreOffice
|
||||
yet.]&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:SetBorder`(int`,int`,int`,int`,int`,Color`): [@(0.0.255) bool]_[* Set
|
||||
Border]([@(0.0.255) int]_[*@3 col], [@(0.0.255) int]_[*@3 row], [@(0.0.255) int]_[*@3 borderI
|
||||
ndx], [@(0.0.255) int]_[*@3 lineStyle], [@(0.0.255) int]_[*@3 weight],
|
||||
[_^Color^ Color]_[*@3 color])&]
|
||||
[s2;%% Sets cell [%-*@3 col] and [%-*@3 row ]border type, where:&]
|
||||
[s2;i150;O0;%% [%-*@3 borderIndx ]is the changed border. Values are
|
||||
BORDER`_DIAG`_DOWN, BORDER`_DIAG`_UP, BORDER`_LEFT, BORDER`_TOP,
|
||||
BORDER`_BOTTOM and BORDER`_RIGHT.&]
|
||||
[s2;i150;O0;%% [%-*@3 lineStyle] is the line style. Values are NONE,
|
||||
CONTINUOUS, DASH, DASHDOT and DOT.&]
|
||||
[s2;i150;O0;%% [%-*@3 weight ]is the line thickness. Values are HAIRLINE,
|
||||
MEDIUM, THIN and THICK.&]
|
||||
[s2;i150;O0;%% [%-*@3 color] is the border color.&]
|
||||
[s0;l288;%% [*@(28.42.255)1 SetBorder functions are not implemented
|
||||
in Open/LibreOffice yet.]&]
|
||||
[s3;%% &]
|
||||
[s4; &]
|
||||
[s5;:OfficeSheet`:`:Select`(String`): [@(0.0.255) bool]_[* Select]([_^String^ String]_[*@3 ra
|
||||
nge])&]
|
||||
[s2;%% Selects [%-*@3 range]. [%-*@3 range ]is a string that indicates
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ and text editors:]&]
|
|||
[s0;i150;O0; [^topic`:`/`/OfficeAutomation`/src`/OfficeDoc`$en`-us^2 OfficeDoc]&]
|
||||
[s0;i150;O0; [^topic`:`/`/OfficeAutomation`/src`/OfficeSheet`$en`-us^2 OfficeSheet]&]
|
||||
[s0;2 &]
|
||||
[s0; [2 Supported office suites are OpenOffice and Microsoft Office.]&]
|
||||
[s0; [2 Supported office suites are Open/LibreOffice and Microsoft
|
||||
Office.]&]
|
||||
[s0;2 &]
|
||||
[s0; [2 OfficeAutomation is implemented only in U`+`+ Windows version.]&]
|
||||
[s0;2 &]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue