parent
cdf4b39350
commit
7283b7ac28
|
|
@ -29,7 +29,7 @@ public
|
||||||
Function GoForward();
|
Function GoForward();
|
||||||
Function Help(HelpType);
|
Function Help(HelpType);
|
||||||
Function InchesToPoints(Inches);
|
Function InchesToPoints(Inches);
|
||||||
Function Keyboard(LangId)
|
Function Keyboard(LangId);
|
||||||
Function KeyboardBidi();
|
Function KeyboardBidi();
|
||||||
Function KeyboardLatin();
|
Function KeyboardLatin();
|
||||||
Function KeyString(KeyCode, KeyCode2);
|
Function KeyString(KeyCode, KeyCode2);
|
||||||
|
|
@ -283,7 +283,7 @@ public
|
||||||
Function ReadEmailOptions();
|
Function ReadEmailOptions();
|
||||||
Function WriteDontResetInsertionPointProperties(value);
|
Function WriteDontResetInsertionPointProperties(value);
|
||||||
Function ReadDontResetInsertionPointProperties();
|
Function ReadDontResetInsertionPointProperties();
|
||||||
Function ReadDocuments();
|
Function ReadDocuments(Index);
|
||||||
Function WriteDisplayScrollBars(value);
|
Function WriteDisplayScrollBars(value);
|
||||||
Function ReadDisplayScrollBars();
|
Function ReadDisplayScrollBars();
|
||||||
Function WriteDisplayScreenTips(value);
|
Function WriteDisplayScreenTips(value);
|
||||||
|
|
@ -346,13 +346,14 @@ End;
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxApplication.Create();
|
Function TSDocxApplication.Create();
|
||||||
Begin
|
Begin
|
||||||
Class(TSVbaBase).Create(self, self, random(10000000));
|
Class(TSVbaBase).Create(self, random(10000000), self);
|
||||||
Init();
|
Init();
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxApplication.Init();
|
Function TSDocxApplication.Init();
|
||||||
Begin
|
Begin
|
||||||
documents_ := new TSDocxDocuments(application_, self, creator_);
|
documents_ := new TSDocxDocuments(self.Application, self.Creator, self);
|
||||||
|
documents_.Init();
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,28 @@
|
||||||
Type TSDocxBorder = Class
|
Type TSDocxBorder = Class(TSVbaBase)
|
||||||
|
Uses TSDocxEnumerations;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, borders, borderType);
|
Function Init(borders, borderType);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
border_;
|
border_;
|
||||||
|
|
||||||
public
|
public
|
||||||
property Application read ReadApplication;
|
|
||||||
property ArtStyle read ReadArtStyle write WriteArtStyle;
|
property ArtStyle read ReadArtStyle write WriteArtStyle;
|
||||||
property ArtWidth read ReadArtWidth write WriteArtWidth;
|
property ArtWidth read ReadArtWidth write WriteArtWidth;
|
||||||
property Color read ReadColor write WriteColor;
|
property Color read ReadColor write WriteColor;
|
||||||
property ColorIndex read ReadColorIndex write WriteColorIndex;
|
property ColorIndex read ReadColorIndex write WriteColorIndex;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property Inside read ReadInside;
|
property Inside read ReadInside;
|
||||||
property LineStyle read ReadLineStyle write WriteLineStyle;
|
property LineStyle read ReadLineStyle write WriteLineStyle;
|
||||||
property LineWidth read ReadLineWidth write WriteLineWidth;
|
property LineWidth read ReadLineWidth write WriteLineWidth;
|
||||||
property Parent read ReadParent;
|
|
||||||
property Visible read ReadVisible write WriteVisible;
|
property Visible read ReadVisible write WriteVisible;
|
||||||
Function WriteVisible();
|
Function WriteVisible();
|
||||||
Function ReadVisible();
|
Function ReadVisible();
|
||||||
Function ReadParent();
|
|
||||||
Function WriteLineWidth();
|
Function WriteLineWidth();
|
||||||
Function ReadLineWidth();
|
Function ReadLineWidth();
|
||||||
Function WriteLineStyle(value);virtual;
|
Function WriteLineStyle(value);virtual;
|
||||||
Function ReadLineStyle();
|
Function ReadLineStyle();
|
||||||
Function ReadInside();
|
Function ReadInside();
|
||||||
Function ReadCreator();
|
|
||||||
Function WriteColorIndex();
|
Function WriteColorIndex();
|
||||||
Function ReadColorIndex();
|
Function ReadColorIndex();
|
||||||
Function WriteColor();
|
Function WriteColor();
|
||||||
|
|
@ -36,32 +31,30 @@ public
|
||||||
Function ReadArtWidth();
|
Function ReadArtWidth();
|
||||||
Function WriteArtStyle();
|
Function WriteArtStyle();
|
||||||
Function ReadArtStyle();
|
Function ReadArtStyle();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxBorder.Create(application, borders, borderType);
|
Function TSDocxBorder.Init(borders, borderType);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
|
|
||||||
case borderType of
|
case borderType of
|
||||||
Class(TSDocxEnumerations).wdBorderBottom():
|
TSDocxEnumerations.wdBorderBottom():
|
||||||
border_ := borders.Bottom;
|
border_ := borders.Bottom;
|
||||||
Class(TSDocxEnumerations).wdBorderDiagonalDown():
|
TSDocxEnumerations.wdBorderDiagonalDown():
|
||||||
border_ := borders.tl2br;
|
border_ := borders.tl2br;
|
||||||
Class(TSDocxEnumerations).wdBorderDiagonalUp():
|
TSDocxEnumerations.wdBorderDiagonalUp():
|
||||||
border_ := borders.tr2bl;
|
border_ := borders.tr2bl;
|
||||||
Class(TSDocxEnumerations).wdBorderHorizontal():
|
TSDocxEnumerations.wdBorderHorizontal():
|
||||||
border_ := borders.InsideH;
|
border_ := borders.InsideH;
|
||||||
Class(TSDocxEnumerations).wdBorderLeft():
|
TSDocxEnumerations.wdBorderLeft():
|
||||||
border_ := borders.Left;
|
border_ := borders.Left;
|
||||||
Class(TSDocxEnumerations).wdBorderRight():
|
TSDocxEnumerations.wdBorderRight():
|
||||||
border_ := borders.Right;
|
border_ := borders.Right;
|
||||||
Class(TSDocxEnumerations).wdBorderTop():
|
TSDocxEnumerations.wdBorderTop():
|
||||||
border_ := borders.Top;
|
border_ := borders.Top;
|
||||||
Class(TSDocxEnumerations).wdBorderVertical():
|
TSDocxEnumerations.wdBorderVertical():
|
||||||
border_ := borders.InsideV;
|
border_ := borders.InsideV;
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
@ -70,79 +63,79 @@ End;
|
||||||
Function TSDocxBorder.WriteLineStyle(value);virtual;
|
Function TSDocxBorder.WriteLineStyle(value);virtual;
|
||||||
Begin
|
Begin
|
||||||
case value of
|
case value of
|
||||||
class(TSDocxEnumerations).wdLineStyleDashDot():
|
TSDocxEnumerations.wdLineStyleDashDot():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDashDotDot():
|
TSDocxEnumerations.wdLineStyleDashDotDot():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDashDotStroked():
|
TSDocxEnumerations.wdLineStyleDashDotStroked():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDashLargeGap():
|
TSDocxEnumerations.wdLineStyleDashLargeGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDashSmallGap():
|
TSDocxEnumerations.wdLineStyleDashSmallGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDot():
|
TSDocxEnumerations.wdLineStyleDot():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDouble():
|
TSDocxEnumerations.wdLineStyleDouble():
|
||||||
border_.Val := "double";
|
border_.Val := "double";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleDoubleWavy():
|
TSDocxEnumerations.wdLineStyleDoubleWavy():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleEmboss3D():
|
TSDocxEnumerations.wdLineStyleEmboss3D():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleEngrave3D():
|
TSDocxEnumerations.wdLineStyleEngrave3D():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleInset():
|
TSDocxEnumerations.wdLineStyleInset():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleNone():
|
TSDocxEnumerations.wdLineStyleNone():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleOutset():
|
TSDocxEnumerations.wdLineStyleOutset():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleSingle():
|
TSDocxEnumerations.wdLineStyleSingle():
|
||||||
border_.Val := "single";
|
border_.Val := "single";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleSingleWavy():
|
TSDocxEnumerations.wdLineStyleSingleWavy():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThickThinLargeGap():
|
TSDocxEnumerations.wdLineStyleThickThinLargeGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThickThinMedGap():
|
TSDocxEnumerations.wdLineStyleThickThinMedGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThickThinSmallGap():
|
TSDocxEnumerations.wdLineStyleThickThinSmallGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickLargeGap():
|
TSDocxEnumerations.wdLineStyleThinThickLargeGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickMedGap():
|
TSDocxEnumerations.wdLineStyleThinThickMedGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickSmallGap():
|
TSDocxEnumerations.wdLineStyleThinThickSmallGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickThinLargeGap():
|
TSDocxEnumerations.wdLineStyleThinThickThinLargeGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickThinMedGap():
|
TSDocxEnumerations.wdLineStyleThinThickThinMedGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleThinThickThinSmallGap():
|
TSDocxEnumerations.wdLineStyleThinThickThinSmallGap():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdLineStyleTriple():
|
TSDocxEnumerations.wdLineStyleTriple():
|
||||||
border_.Val := "nil";
|
border_.Val := "nil";
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,12 @@
|
||||||
Type TSDocxBorderTable = Class(TSDocxBorder)
|
Type TSDocxBorderTable = Class(TSDocxBorder)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table, borderType);
|
Function Init(table, borderType);
|
||||||
|
|
||||||
public
|
public
|
||||||
Function WriteLineStyle(value);override;
|
Function WriteLineStyle(value);override;
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_;
|
table_;
|
||||||
border_type_;
|
border_type_;
|
||||||
|
|
||||||
|
|
@ -15,9 +14,8 @@ End;
|
||||||
|
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxBorderTable.Create(application, table, borderType);
|
Function TSDocxBorderTable.Init(table, borderType);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
border_type_ := borderType;
|
border_type_ := borderType;
|
||||||
End;
|
End;
|
||||||
|
|
@ -30,7 +28,8 @@ Begin
|
||||||
begin
|
begin
|
||||||
for c:=1 to table_.Cols() do
|
for c:=1 to table_.Cols() do
|
||||||
begin
|
begin
|
||||||
cell := new TSDocxCell(application_, table_, r, c);
|
cell := new TSDocxCell(self.Application, self.Creator, self.Parent);
|
||||||
|
cell.Init(table_, r, c);
|
||||||
cell.Borders(border_type_).LineStyle := value;
|
cell.Borders(border_type_).LineStyle := value;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
||||||
Type TSDocxBorders = Class
|
Type TSDocxBorders = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, borders);
|
Function Init(borders);
|
||||||
Function Operator[](index);virtual;
|
Function Operator[](index);virtual;
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
borders_;
|
borders_;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
@ -13,9 +12,7 @@ public
|
||||||
Function Item(Index);
|
Function Item(Index);
|
||||||
|
|
||||||
property AlwaysInFront read ReadAlwaysInFront write WriteAlwaysInFront;
|
property AlwaysInFront read ReadAlwaysInFront write WriteAlwaysInFront;
|
||||||
property Application read ReadApplication;
|
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property DistanceFrom read ReadDistanceFrom write WriteDistanceFrom;
|
property DistanceFrom read ReadDistanceFrom write WriteDistanceFrom;
|
||||||
property DistanceFromBottom read ReadDistanceFromBottom write WriteDistanceFromBottom;
|
property DistanceFromBottom read ReadDistanceFromBottom write WriteDistanceFromBottom;
|
||||||
property DistanceFromLeft read ReadDistanceFromLeft write WriteDistanceFromLeft;
|
property DistanceFromLeft read ReadDistanceFromLeft write WriteDistanceFromLeft;
|
||||||
|
|
@ -35,7 +32,6 @@ public
|
||||||
property OutsideColorIndex read ReadOutsideColorIndex write WriteOutsideColorIndex;
|
property OutsideColorIndex read ReadOutsideColorIndex write WriteOutsideColorIndex;
|
||||||
property OutsideLineStyle read ReadOutsideLineStyle write WriteOutsideLineStyle;
|
property OutsideLineStyle read ReadOutsideLineStyle write WriteOutsideLineStyle;
|
||||||
property OutsideLineWidth read ReadOutsideLineWidth write WriteOutsideLineWidth;
|
property OutsideLineWidth read ReadOutsideLineWidth write WriteOutsideLineWidth;
|
||||||
property Parent read ReadParent;
|
|
||||||
property Shadow read ReadShadow write WriteShadow;
|
property Shadow read ReadShadow write WriteShadow;
|
||||||
property SurroundFooter read ReadSurroundFooter write WriteSurroundFooter;
|
property SurroundFooter read ReadSurroundFooter write WriteSurroundFooter;
|
||||||
property SurroundHeader read ReadSurroundHeader write WriteSurroundHeader;
|
property SurroundHeader read ReadSurroundHeader write WriteSurroundHeader;
|
||||||
|
|
@ -45,7 +41,6 @@ public
|
||||||
Function ReadSurroundFooter();
|
Function ReadSurroundFooter();
|
||||||
Function WriteShadow();
|
Function WriteShadow();
|
||||||
Function ReadShadow();
|
Function ReadShadow();
|
||||||
Function ReadParent();
|
|
||||||
Function WriteOutsideLineWidth();
|
Function WriteOutsideLineWidth();
|
||||||
Function ReadOutsideLineWidth();
|
Function ReadOutsideLineWidth();
|
||||||
Function WriteOutsideLineStyle();
|
Function WriteOutsideLineStyle();
|
||||||
|
|
@ -82,9 +77,7 @@ public
|
||||||
Function ReadDistanceFromBottom();
|
Function ReadDistanceFromBottom();
|
||||||
Function WriteDistanceFrom();
|
Function WriteDistanceFrom();
|
||||||
Function ReadDistanceFrom();
|
Function ReadDistanceFrom();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCount();
|
Function ReadCount();
|
||||||
Function ReadApplication();
|
|
||||||
Function WriteAlwaysInFront();
|
Function WriteAlwaysInFront();
|
||||||
Function ReadAlwaysInFront();
|
Function ReadAlwaysInFront();
|
||||||
|
|
||||||
|
|
@ -92,15 +85,16 @@ End;
|
||||||
|
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxBorders.Create(application, borders);
|
Function TSDocxBorders.Init(borders);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
borders_ := borders;
|
borders_ := borders;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxBorders.[](index);virtual;
|
Function Operator TSDocxBorders.[](index);virtual;
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxBorder(application_, borders_, index);
|
border_obj := new TSDocxBorder(self.Application, self.Creator, self);
|
||||||
|
border_obj.Init(borders_, index);
|
||||||
|
return border_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
Type TSDocxBordersTable = Class(TSDocxBorders)
|
Type TSDocxBordersTable = Class(TSDocxBorders)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table);
|
Function Init(table);
|
||||||
Function Operator[](index);overload;
|
Function Operator[](index);overload;
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_;
|
table_;
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxBordersTable.Create(application, table);
|
Function TSDocxBordersTable.Init(table);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxBordersTable.[](index);overload;
|
Function Operator TSDocxBordersTable.[](index);overload;
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxBorderTable(application_, table_, index);
|
border_table_obj := new TSDocxBorderTable(self.Application, self.Creator, self.Parent);
|
||||||
|
border_table_obj.Init(table_, index);
|
||||||
|
return border_table_obj;
|
||||||
End;
|
End;
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
Type TSDocxCell = Class
|
Type TSDocxCell = Class(TSVbaBase)
|
||||||
|
Uses TSDocxEnumerations;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table, row, col);
|
Function Init(table, row, column);
|
||||||
Function Init();
|
|
||||||
|
|
||||||
private
|
private
|
||||||
Function GetCell();
|
Function GetCell();
|
||||||
Function SetCellTcPrWidth(row, col, widthValue, widthType);
|
Function SetCellTcPrWidth(row, col, widthValue, widthType);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_; // TOfficeObj("TTable")
|
table_; // TOfficeObj("TTable")
|
||||||
row_;
|
row_;
|
||||||
column_;
|
column_;
|
||||||
|
|
@ -27,12 +26,10 @@ public
|
||||||
Function SetWidth(ColumnWidth, RulerStyle);
|
Function SetWidth(ColumnWidth, RulerStyle);
|
||||||
Function Split(NumRows, NumColumns);
|
Function Split(NumRows, NumColumns);
|
||||||
|
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property BottomPadding read ReadBottomPadding write WriteBottomPadding;
|
property BottomPadding read ReadBottomPadding write WriteBottomPadding;
|
||||||
property Column read ReadColumn;
|
property Column read ReadColumn;
|
||||||
property ColumnIndex read ReadColumnIndex;
|
property ColumnIndex read ReadColumnIndex;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property FitText read ReadFitText write WriteFitText;
|
property FitText read ReadFitText write WriteFitText;
|
||||||
property Height read ReadHeight write WriteHeight;
|
property Height read ReadHeight write WriteHeight;
|
||||||
property HeightRule read ReadHeightRule write WriteHeightRule;
|
property HeightRule read ReadHeightRule write WriteHeightRule;
|
||||||
|
|
@ -40,7 +37,6 @@ public
|
||||||
property LeftPadding read ReadLeftPadding write WriteLeftPadding;
|
property LeftPadding read ReadLeftPadding write WriteLeftPadding;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Next read ReadNext;
|
property Next read ReadNext;
|
||||||
property Parent read ReadParent;
|
|
||||||
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
||||||
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
||||||
property Previous read ReadPrevious;
|
property Previous read ReadPrevious;
|
||||||
|
|
@ -74,7 +70,6 @@ public
|
||||||
Function ReadPreferredWidthType();
|
Function ReadPreferredWidthType();
|
||||||
Function WritePreferredWidth(value);
|
Function WritePreferredWidth(value);
|
||||||
Function ReadPreferredWidth();
|
Function ReadPreferredWidth();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNext();
|
Function ReadNext();
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function WriteLeftPadding(left);
|
Function WriteLeftPadding(left);
|
||||||
|
|
@ -87,29 +82,21 @@ public
|
||||||
Function ReadHeight();
|
Function ReadHeight();
|
||||||
Function WriteFitText();
|
Function WriteFitText();
|
||||||
Function ReadFitText();
|
Function ReadFitText();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadColumnIndex();
|
Function ReadColumnIndex();
|
||||||
Function ReadColumn();
|
Function ReadColumn();
|
||||||
Function WriteBottomPadding(bottom);
|
Function WriteBottomPadding(bottom);
|
||||||
Function ReadBottomPadding();
|
Function ReadBottomPadding();
|
||||||
Function ReadBorders(index);
|
Function ReadBorders(index);
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxCell.Create(application, table, row, column);
|
Function TSDocxCell.Init(table, row, column);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
row_ := row;
|
row_ := row;
|
||||||
column_ := column;
|
column_ := column;
|
||||||
min_dxa_width_ := 321;
|
min_dxa_width_ := 321;
|
||||||
Init();
|
|
||||||
End;
|
|
||||||
|
|
||||||
Function TSDocxCell.Init();
|
|
||||||
Begin
|
|
||||||
cell := table_.GetCells()[row_-1, column_-1];
|
cell := table_.GetCells()[row_-1, column_-1];
|
||||||
if not ifnil(cell) then
|
if not ifnil(cell) then
|
||||||
begin
|
begin
|
||||||
|
|
@ -141,18 +128,18 @@ End;
|
||||||
// function
|
// function
|
||||||
Function TSDocxCell.Delete(ShiftCells);
|
Function TSDocxCell.Delete(ShiftCells);
|
||||||
Begin
|
Begin
|
||||||
if ifnil(ShiftCells) then ShiftCells := class(TSDocxEnumerations).wdDeleteCellsShiftLeft();
|
if ifnil(ShiftCells) then ShiftCells := TSDocxEnumerations.wdDeleteCellsShiftLeft();
|
||||||
case ShiftCells of
|
case ShiftCells of
|
||||||
class(TSDocxEnumerations).wdDeleteCellsEntireColumn():
|
TSDocxEnumerations.wdDeleteCellsEntireColumn():
|
||||||
table_.DeleteCell(nil, column_);
|
table_.DeleteCell(nil, column_);
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdDeleteCellsEntireRow():
|
TSDocxEnumerations.wdDeleteCellsEntireRow():
|
||||||
table_.DeleteCell(row_, nil);
|
table_.DeleteCell(row_, nil);
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdDeleteCellsShiftLeft():
|
TSDocxEnumerations.wdDeleteCellsShiftLeft():
|
||||||
table_.DeleteCell(row_, column_);
|
table_.DeleteCell(row_, column_);
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdDeleteCellsShiftUp():
|
TSDocxEnumerations.wdDeleteCellsShiftUp():
|
||||||
table_.DeleteCell(row_, column_, 0);
|
table_.DeleteCell(row_, column_, 0);
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
@ -170,7 +157,9 @@ End;
|
||||||
|
|
||||||
Function TSDocxCell.ReadColumn();
|
Function TSDocxCell.ReadColumn();
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxColumn(application_, table_, column_);
|
column_obj := new TSDocxColumn(self.Application, self.Creator, self);
|
||||||
|
column_obj.Init(table_, column_);
|
||||||
|
return column_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxCell.ReadRowIndex();
|
Function TSDocxCell.ReadRowIndex();
|
||||||
|
|
@ -203,19 +192,19 @@ End;
|
||||||
Function TSDocxCell.WriteVerticalAlignment(alignment);
|
Function TSDocxCell.WriteVerticalAlignment(alignment);
|
||||||
Begin
|
Begin
|
||||||
case alignment of
|
case alignment of
|
||||||
class(TSDocxEnumerations).wdCellAlignVerticalBottom():
|
TSDocxEnumerations.wdCellAlignVerticalBottom():
|
||||||
begin
|
begin
|
||||||
tcpr_.vAlign := "bottom";
|
tcpr_.vAlign := "bottom";
|
||||||
tcpr_.Update();
|
tcpr_.Update();
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdCellAlignVerticalCenter():
|
TSDocxEnumerations.wdCellAlignVerticalCenter():
|
||||||
begin
|
begin
|
||||||
tcpr_.vAlign := "center";
|
tcpr_.vAlign := "center";
|
||||||
tcpr_.Update();
|
tcpr_.Update();
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdCellAlignVerticalTop():
|
TSDocxEnumerations.wdCellAlignVerticalTop():
|
||||||
begin
|
begin
|
||||||
tcpr_.vAlign := "top";
|
tcpr_.vAlign := "top";
|
||||||
tcpr_.Update();
|
tcpr_.Update();
|
||||||
|
|
@ -227,9 +216,9 @@ Function TSDocxCell.ReadVerticalAlignment();
|
||||||
Begin
|
Begin
|
||||||
alignment := tcpr_.Value("vAlign");
|
alignment := tcpr_.Value("vAlign");
|
||||||
case alignment of
|
case alignment of
|
||||||
"bottom": return class(TSDocxEnumerations).wdCellAlignVerticalBottom();
|
"bottom": return TSDocxEnumerations.wdCellAlignVerticalBottom();
|
||||||
"center": return class(TSDocxEnumerations).wdCellAlignVerticalCenter();
|
"center": return TSDocxEnumerations.wdCellAlignVerticalCenter();
|
||||||
else return class(TSDocxEnumerations).wdCellAlignVerticalTop();
|
else return TSDocxEnumerations.wdCellAlignVerticalTop();
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -279,18 +268,22 @@ End;
|
||||||
|
|
||||||
Function TSDocxCell.ReadTables(index);
|
Function TSDocxCell.ReadTables(index);
|
||||||
Begin
|
Begin
|
||||||
tables_obj := new TSDocxTables(application_, GetCell());
|
tables_obj := new TSDocxTables(self.Application, self.Creator, self);
|
||||||
|
tables_obj.Init(GetCell());
|
||||||
return ifnil(index) ? tables_obj : tables_obj[index];
|
return ifnil(index) ? tables_obj : tables_obj[index];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxCell.ReadShading();
|
Function TSDocxCell.ReadShading();
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxShading(application_, tcpr_);
|
shading_obj := new TSDocxShading(self.Application, self.Creator, self);
|
||||||
|
shading_obj.Init(tcpr_);
|
||||||
|
return shading_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxCell.ReadBorders(index);
|
Function TSDocxCell.ReadBorders(index);
|
||||||
Begin
|
Begin
|
||||||
obj := new TSDocxBorders(application_, tcpr_.Borders);
|
borders_obj := new TSDocxBorders(self.Application, self.Creator, self);
|
||||||
|
borders_obj.Init(tcpr_.Borders);
|
||||||
return ifnil(index) ? obj : obj[index];
|
return ifnil(index) ? obj : obj[index];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -299,7 +292,7 @@ Begin
|
||||||
width_value := nil;
|
width_value := nil;
|
||||||
width_type := nil;
|
width_type := nil;
|
||||||
case value of
|
case value of
|
||||||
class(TSDocxEnumerations).wdPreferredWidthAuto():
|
TSDocxEnumerations.wdPreferredWidthAuto():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.Width := 0;
|
table_.TblPr.Width := 0;
|
||||||
table_.TblPr.WidthType := "auto";
|
table_.TblPr.WidthType := "auto";
|
||||||
|
|
@ -308,7 +301,7 @@ Begin
|
||||||
width_type := "auto";
|
width_type := "auto";
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPercent():
|
TSDocxEnumerations.wdPreferredWidthPercent():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.Width := 5000;
|
table_.TblPr.Width := 5000;
|
||||||
table_.TblPr.WidthType := "pct";
|
table_.TblPr.WidthType := "pct";
|
||||||
|
|
@ -318,7 +311,7 @@ Begin
|
||||||
width_type := "pct";
|
width_type := "pct";
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPoints():
|
TSDocxEnumerations.wdPreferredWidthPoints():
|
||||||
begin
|
begin
|
||||||
width_value := nil;
|
width_value := nil;
|
||||||
width_type := "dxa";
|
width_type := "dxa";
|
||||||
|
|
@ -333,9 +326,9 @@ Function TSDocxCell.ReadPreferredWidthType();
|
||||||
Begin
|
Begin
|
||||||
width_type := tcpr_.Value("Type");
|
width_type := tcpr_.Value("Type");
|
||||||
case width_type of
|
case width_type of
|
||||||
"auto": return class(TSDocxEnumerations).wdPreferredWidthAuto();
|
"auto": return TSDocxEnumerations.wdPreferredWidthAuto();
|
||||||
"dxa": return class(TSDocxEnumerations).wdPreferredWidthPoints();
|
"dxa": return TSDocxEnumerations.wdPreferredWidthPoints();
|
||||||
"pct": return class(TSDocxEnumerations).wdPreferredWidthPercent();
|
"pct": return TSDocxEnumerations.wdPreferredWidthPercent();
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -344,8 +337,8 @@ Begin
|
||||||
width_type := self.PreferredWidthType;
|
width_type := self.PreferredWidthType;
|
||||||
width_value := 0;
|
width_value := 0;
|
||||||
case width_type of
|
case width_type of
|
||||||
class(TSDocxEnumerations).wdPreferredWidthAuto(),
|
TSDocxEnumerations.wdPreferredWidthAuto(),
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPoints():
|
TSDocxEnumerations.wdPreferredWidthPoints():
|
||||||
begin
|
begin
|
||||||
width_type := "dxa";
|
width_type := "dxa";
|
||||||
width_value := 20 * value;
|
width_value := 20 * value;
|
||||||
|
|
@ -353,7 +346,7 @@ Begin
|
||||||
SetCellTcPrWidth(row_, column_, width_value, width_type);
|
SetCellTcPrWidth(row_, column_, width_value, width_type);
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPercent():
|
TSDocxEnumerations.wdPreferredWidthPercent():
|
||||||
begin
|
begin
|
||||||
width_type := "pct";
|
width_type := "pct";
|
||||||
if value < 0 or value > 100 then return;
|
if value < 0 or value > 100 then return;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
Type TSDocxCells = Class
|
Type TSDocxCells = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table);
|
Function Init(table);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_; // TOfficeObj("TTable")
|
table_; // TOfficeObj("TTable")
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
@ -19,14 +18,11 @@ public
|
||||||
Function SetWidth(ColumnWidth, RulerStyle);
|
Function SetWidth(ColumnWidth, RulerStyle);
|
||||||
Function Split(NumRows, NumColumns, MergeBeforeSplit);
|
Function Split(NumRows, NumColumns, MergeBeforeSplit);
|
||||||
|
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property Height read ReadHeight write WriteHeight;
|
property Height read ReadHeight write WriteHeight;
|
||||||
property HeightRule read ReadHeightRule write WriteHeightRule;
|
property HeightRule read ReadHeightRule write WriteHeightRule;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Parent read ReadParent;
|
|
||||||
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
||||||
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
||||||
property Shading read ReadShading;
|
property Shading read ReadShading;
|
||||||
|
|
@ -41,16 +37,13 @@ public
|
||||||
Function ReadPreferredWidthType();
|
Function ReadPreferredWidthType();
|
||||||
Function WritePreferredWidth();
|
Function WritePreferredWidth();
|
||||||
Function ReadPreferredWidth();
|
Function ReadPreferredWidth();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function WriteHeightRule();
|
Function WriteHeightRule();
|
||||||
Function ReadHeightRule();
|
Function ReadHeightRule();
|
||||||
Function WriteHeight();
|
Function WriteHeight();
|
||||||
Function ReadHeight();
|
Function ReadHeight();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCount();
|
Function ReadCount();
|
||||||
Function ReadBorders();
|
Function ReadBorders();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
Type TSDocxColumn = Class
|
Type TSDocxColumn = Class(TSVbaBase)
|
||||||
|
Uses TSDocxEnumerations;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table, column);
|
Function Init(table, column);
|
||||||
|
|
||||||
private
|
private
|
||||||
Function SetColumnWidth(column, wvalue, type);
|
Function SetColumnWidth(column, wvalue, type);
|
||||||
Function SerializeTblGrid();
|
Function SerializeTblGrid();
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_;
|
table_;
|
||||||
column_;
|
column_;
|
||||||
min_dxa_width_; // 最小宽度 321
|
min_dxa_width_; // 最小宽度 321
|
||||||
|
|
@ -20,16 +20,13 @@ public
|
||||||
Function SetWidth(ColumnWidth, RulerStyle);
|
Function SetWidth(ColumnWidth, RulerStyle);
|
||||||
Function Sort(ExcludeHeader, SortFieldType, SortOrder, CaseSensitive, BidiSort, IgnoreThe, IgnoreKashida, IgnoreDiacritics, IgnoreHe, LanguageID);
|
Function Sort(ExcludeHeader, SortFieldType, SortOrder, CaseSensitive, BidiSort, IgnoreThe, IgnoreKashida, IgnoreDiacritics, IgnoreHe, LanguageID);
|
||||||
|
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property Cells read ReadCells;
|
property Cells read ReadCells;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property Index read ReadIndex;
|
property Index read ReadIndex;
|
||||||
property IsFirst read ReadIsFirst;
|
property IsFirst read ReadIsFirst;
|
||||||
property IsLast read ReadIsLast;
|
property IsLast read ReadIsLast;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Next read ReadNext;
|
property Next read ReadNext;
|
||||||
property Parent read ReadParent;
|
|
||||||
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
||||||
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
||||||
property Previous read ReadPrevious;
|
property Previous read ReadPrevious;
|
||||||
|
|
@ -43,23 +40,19 @@ public
|
||||||
Function ReadPreferredWidthType();
|
Function ReadPreferredWidthType();
|
||||||
Function WritePreferredWidth(value);
|
Function WritePreferredWidth(value);
|
||||||
Function ReadPreferredWidth();
|
Function ReadPreferredWidth();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNext();
|
Function ReadNext();
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function ReadIsLast();
|
Function ReadIsLast();
|
||||||
Function ReadIsFirst();
|
Function ReadIsFirst();
|
||||||
Function ReadIndex();
|
Function ReadIndex();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCells();
|
Function ReadCells();
|
||||||
Function ReadBorders();
|
Function ReadBorders();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxColumn.Create(application, table, column);
|
Function TSDocxColumn.Init(table, column);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
column_ := column;
|
column_ := column;
|
||||||
min_dxa_width_ := 321;
|
min_dxa_width_ := 321;
|
||||||
|
|
@ -100,7 +93,7 @@ End;
|
||||||
// function
|
// function
|
||||||
Function TSDocxColumn.SetWidth(ColumnWidth, RulerStyle);
|
Function TSDocxColumn.SetWidth(ColumnWidth, RulerStyle);
|
||||||
Begin
|
Begin
|
||||||
if ifnil(RulerStyle) then RulerStyle := class(TSDocxEnumerations).wdAdjustNone();
|
if ifnil(RulerStyle) then RulerStyle := TSDocxEnumerations.wdAdjustNone();
|
||||||
width_value := ColumnWidth * 20;
|
width_value := ColumnWidth * 20;
|
||||||
[total_width, grid_col_arr] := SerializeTblGrid();
|
[total_width, grid_col_arr] := SerializeTblGrid();
|
||||||
// 设置w:tblPr的总宽度
|
// 设置w:tblPr的总宽度
|
||||||
|
|
@ -109,7 +102,7 @@ Begin
|
||||||
table_.TblPr.Update();
|
table_.TblPr.Update();
|
||||||
|
|
||||||
case RulerStyle of
|
case RulerStyle of
|
||||||
class(TSDocxEnumerations).wdAdjustFirstColumn():
|
TSDocxEnumerations.wdAdjustFirstColumn():
|
||||||
begin
|
begin
|
||||||
if column_ < length(grid_col_arr)-1 then
|
if column_ < length(grid_col_arr)-1 then
|
||||||
begin
|
begin
|
||||||
|
|
@ -120,16 +113,16 @@ Begin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdAdjustNone():
|
TSDocxEnumerations.wdAdjustNone():
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdAdjustProportional():
|
TSDocxEnumerations.wdAdjustProportional():
|
||||||
begin
|
begin
|
||||||
// TODO : 需要搞懂算法
|
// TODO : 需要搞懂算法
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdAdjustSameWidth():
|
TSDocxEnumerations.wdAdjustSameWidth():
|
||||||
begin
|
begin
|
||||||
after_width := grid_col_arr[column_-1][1] - width_value;
|
after_width := grid_col_arr[column_-1][1] - width_value;
|
||||||
for i:=column_ to length(grid_col_arr)-1 do
|
for i:=column_ to length(grid_col_arr)-1 do
|
||||||
|
|
@ -161,7 +154,7 @@ End;
|
||||||
Function TSDocxColumn.WritePreferredWidthType(value);
|
Function TSDocxColumn.WritePreferredWidthType(value);
|
||||||
Begin
|
Begin
|
||||||
case value of
|
case value of
|
||||||
class(TSDocxEnumerations).wdPreferredWidthAuto():
|
TSDocxEnumerations.wdPreferredWidthAuto():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.Width := 0;
|
table_.TblPr.Width := 0;
|
||||||
table_.TblPr.WidthType := "auto";
|
table_.TblPr.WidthType := "auto";
|
||||||
|
|
@ -170,7 +163,7 @@ Begin
|
||||||
SetColumnWidth(c, 0, "auto");
|
SetColumnWidth(c, 0, "auto");
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPercent():
|
TSDocxEnumerations.wdPreferredWidthPercent():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.Width := 5000;
|
table_.TblPr.Width := 5000;
|
||||||
table_.TblPr.WidthType := "pct";
|
table_.TblPr.WidthType := "pct";
|
||||||
|
|
@ -181,7 +174,7 @@ Begin
|
||||||
SetColumnWidth(c, width_value, "pct");
|
SetColumnWidth(c, width_value, "pct");
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPoints():
|
TSDocxEnumerations.wdPreferredWidthPoints():
|
||||||
begin
|
begin
|
||||||
for c:=1 to table_.Cols() do
|
for c:=1 to table_.Cols() do
|
||||||
SetColumnWidth(c, nil, "dxa");
|
SetColumnWidth(c, nil, "dxa");
|
||||||
|
|
@ -199,9 +192,9 @@ Begin
|
||||||
width_type := obj.Value("Type");
|
width_type := obj.Value("Type");
|
||||||
tcpr.print;
|
tcpr.print;
|
||||||
case width_type of
|
case width_type of
|
||||||
"auto": return class(TSDocxEnumerations).wdPreferredWidthAuto();
|
"auto": return TSDocxEnumerations.wdPreferredWidthAuto();
|
||||||
"dxa": return class(TSDocxEnumerations).wdPreferredWidthPoints();
|
"dxa": return TSDocxEnumerations.wdPreferredWidthPoints();
|
||||||
"pct": return class(TSDocxEnumerations).wdPreferredWidthPercent();
|
"pct": return TSDocxEnumerations.wdPreferredWidthPercent();
|
||||||
end;
|
end;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -210,8 +203,8 @@ Begin
|
||||||
width_type := self.PreferredWidthType;
|
width_type := self.PreferredWidthType;
|
||||||
width_value := 0;
|
width_value := 0;
|
||||||
case width_type of
|
case width_type of
|
||||||
class(TSDocxEnumerations).wdPreferredWidthAuto(),
|
TSDocxEnumerations.wdPreferredWidthAuto(),
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPoints():
|
TSDocxEnumerations.wdPreferredWidthPoints():
|
||||||
begin
|
begin
|
||||||
width_type := "dxa";
|
width_type := "dxa";
|
||||||
width_value := 20 * value;
|
width_value := 20 * value;
|
||||||
|
|
@ -219,7 +212,7 @@ Begin
|
||||||
SetColumnWidth(column_, width_value, width_type);
|
SetColumnWidth(column_, width_value, width_type);
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdPreferredWidthPercent():
|
TSDocxEnumerations.wdPreferredWidthPercent():
|
||||||
begin
|
begin
|
||||||
width_type := "pct";
|
width_type := "pct";
|
||||||
if value < 0 or value > 100 then return;
|
if value < 0 or value > 100 then return;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Type TSDocxColumns = Class
|
Type TSDocxColumns = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table);
|
Function Init(table);
|
||||||
Function Operator[](index);
|
Function Operator[](index);
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
@ -17,14 +17,11 @@ public
|
||||||
Function Select();
|
Function Select();
|
||||||
Function SetWidth(ColumnWidth, RulerStyle);
|
Function SetWidth(ColumnWidth, RulerStyle);
|
||||||
|
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property First read ReadFirst;
|
property First read ReadFirst;
|
||||||
property Last read ReadLast;
|
property Last read ReadLast;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Parent read ReadParent;
|
|
||||||
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
||||||
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
||||||
property Shading read ReadShading;
|
property Shading read ReadShading;
|
||||||
|
|
@ -36,27 +33,25 @@ public
|
||||||
Function ReadPreferredWidthType();
|
Function ReadPreferredWidthType();
|
||||||
Function WritePreferredWidth(value);
|
Function WritePreferredWidth(value);
|
||||||
Function ReadPreferredWidth();
|
Function ReadPreferredWidth();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function ReadLast();
|
Function ReadLast();
|
||||||
Function ReadFirst();
|
Function ReadFirst();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCount();
|
Function ReadCount();
|
||||||
Function ReadBorders();
|
Function ReadBorders();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxColumns.Create(application, table);
|
Function TSDocxColumns.Init(table);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxColumns.[](index);
|
Function Operator TSDocxColumns.[](index);
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxColumn(application_, table_, index);
|
column_obj := TSDocxColumn(self.Application, self.Creator, self);
|
||||||
|
column_obj.Init(table_, index);
|
||||||
|
return column_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,14 @@
|
||||||
Type TSDocxDocument = Class
|
Type TSDocxDocument = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, docx, name, fullname);
|
Function Init(docx, name, fullname);
|
||||||
Function Init();
|
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
docx_;
|
|
||||||
collection_;
|
collection_;
|
||||||
|
docx_;
|
||||||
file_name_;
|
file_name_;
|
||||||
full_name_;
|
full_name_;
|
||||||
|
tables_;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function AcceptAllRevisions();
|
Function AcceptAllRevisions();
|
||||||
|
|
@ -116,7 +115,6 @@ public
|
||||||
property ActiveThemeDisplayName read ReadActiveThemeDisplayName;
|
property ActiveThemeDisplayName read ReadActiveThemeDisplayName;
|
||||||
property ActiveWindow read ReadActiveWindow; // TODO
|
property ActiveWindow read ReadActiveWindow; // TODO
|
||||||
property ActiveWritingStyle read ReadActiveWritingStyle write WriteActiveWritingStyle;
|
property ActiveWritingStyle read ReadActiveWritingStyle write WriteActiveWritingStyle;
|
||||||
property Application read ReadApplication;
|
|
||||||
property AttachedTemplate read ReadAttachedTemplate write WriteAttachedTemplate;
|
property AttachedTemplate read ReadAttachedTemplate write WriteAttachedTemplate;
|
||||||
property AutoFormatOverride read ReadAutoFormatOverride write WriteAutoFormatOverride;
|
property AutoFormatOverride read ReadAutoFormatOverride write WriteAutoFormatOverride;
|
||||||
property AutoHyphenation read ReadAutoHyphenation write WriteAutoHyphenation;
|
property AutoHyphenation read ReadAutoHyphenation write WriteAutoHyphenation;
|
||||||
|
|
@ -140,7 +138,6 @@ public
|
||||||
property Content read ReadContent;
|
property Content read ReadContent;
|
||||||
property ContentControls read ReadContentControls;
|
property ContentControls read ReadContentControls;
|
||||||
property ContentTypeProperties read ReadContentTypeProperties;
|
property ContentTypeProperties read ReadContentTypeProperties;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property CurrentRsid read ReadCurrentRsid;
|
property CurrentRsid read ReadCurrentRsid;
|
||||||
property CustomTSDocxDocumentProperties read ReadCustomTSDocxDocumentProperties;
|
property CustomTSDocxDocumentProperties read ReadCustomTSDocxDocumentProperties;
|
||||||
property CustomXMLParts read ReadCustomXMLParts;
|
property CustomXMLParts read ReadCustomXMLParts;
|
||||||
|
|
@ -227,7 +224,6 @@ public
|
||||||
property OriginalTSDocxDocumentTitle read ReadOriginalTSDocxDocumentTitle;
|
property OriginalTSDocxDocumentTitle read ReadOriginalTSDocxDocumentTitle;
|
||||||
property PageSetup read ReadPageSetup;
|
property PageSetup read ReadPageSetup;
|
||||||
property Paragraphs read ReadParagraphs;
|
property Paragraphs read ReadParagraphs;
|
||||||
property Parent read ReadParent;
|
|
||||||
property Password write WritePassword;
|
property Password write WritePassword;
|
||||||
property PasswordEncryptionAlgorithm read ReadPasswordEncryptionAlgorithm;
|
property PasswordEncryptionAlgorithm read ReadPasswordEncryptionAlgorithm;
|
||||||
property PasswordEncryptionFileProperties read ReadPasswordEncryptionFileProperties;
|
property PasswordEncryptionFileProperties read ReadPasswordEncryptionFileProperties;
|
||||||
|
|
@ -408,7 +404,6 @@ public
|
||||||
Function ReadPasswordEncryptionFileProperties();
|
Function ReadPasswordEncryptionFileProperties();
|
||||||
Function ReadPasswordEncryptionAlgorithm();
|
Function ReadPasswordEncryptionAlgorithm();
|
||||||
Function WritePassword(password);
|
Function WritePassword(password);
|
||||||
Function ReadParent();
|
|
||||||
Function ReadParagraphs();
|
Function ReadParagraphs();
|
||||||
Function ReadPageSetup();
|
Function ReadPageSetup();
|
||||||
Function ReadOriginalTSDocxDocumentTitle();
|
Function ReadOriginalTSDocxDocumentTitle();
|
||||||
|
|
@ -542,7 +537,6 @@ public
|
||||||
Function ReadCustomXMLParts();
|
Function ReadCustomXMLParts();
|
||||||
Function ReadCustomTSDocxDocumentProperties();
|
Function ReadCustomTSDocxDocumentProperties();
|
||||||
Function ReadCurrentRsid();
|
Function ReadCurrentRsid();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadContentTypeProperties();
|
Function ReadContentTypeProperties();
|
||||||
Function ReadContentControls();
|
Function ReadContentControls();
|
||||||
Function ReadContent();
|
Function ReadContent();
|
||||||
|
|
@ -575,32 +569,23 @@ public
|
||||||
Function ReadAutoFormatOverride();
|
Function ReadAutoFormatOverride();
|
||||||
Function WriteAttachedTemplate();
|
Function WriteAttachedTemplate();
|
||||||
Function ReadAttachedTemplate();
|
Function ReadAttachedTemplate();
|
||||||
Function ReadApplication();
|
|
||||||
Function WriteActiveWritingStyle();
|
Function WriteActiveWritingStyle();
|
||||||
Function ReadActiveWritingStyle();
|
Function ReadActiveWritingStyle();
|
||||||
Function ReadActiveWindow();
|
Function ReadActiveWindow();
|
||||||
Function ReadActiveThemeDisplayName();
|
Function ReadActiveThemeDisplayName();
|
||||||
Function ReadActiveTheme();
|
Function ReadActiveTheme();
|
||||||
|
|
||||||
private
|
|
||||||
tables_;
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxDocument.Create(application, docx, name, fullname);
|
Function TSDocxDocument.Init(docx, name, fullname);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
docx_ := docx;
|
docx_ := docx;
|
||||||
file_name_ := name;
|
file_name_ := name;
|
||||||
full_name_ := fullname;
|
full_name_ := fullname;
|
||||||
collection_ := class(Collection).GetInstance('document');
|
collection_ := class(Collection).GetInstance('document');
|
||||||
Init();
|
tables_ := new TSDocxTables(self.Application, self.Parent, self);
|
||||||
End;
|
tables.Init(docx);
|
||||||
|
|
||||||
Function TSDocxDocument.Init();
|
|
||||||
Begin
|
|
||||||
tables_ := new TSDocxTables(application_, docx_);
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
Type TSDocxDocuments = Class(TSVbaBase)
|
Type TSDocxDocuments = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(app, par, cre);
|
Function Init();
|
||||||
Function Operator[](index);
|
Function Operator[](index);
|
||||||
Function GetActivation();
|
Function GetActivation();
|
||||||
|
|
||||||
|
|
@ -28,23 +28,22 @@ public
|
||||||
Function Save(NoPrompt, OriginalFormat); // Completed
|
Function Save(NoPrompt, OriginalFormat); // Completed
|
||||||
|
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
Function ReadCount(); // Completed
|
Function ReadCount(); // Completed
|
||||||
Function ReadCreator();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxDocuments.Create(app, par, cre);
|
Function TSDocxDocuments.Init();
|
||||||
Begin
|
Begin
|
||||||
Class(TSVbaBase).Create(app, par, cre);
|
|
||||||
collection_ := class(Collection).GetInstance('document');
|
collection_ := class(Collection).GetInstance('document');
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxDocuments.AddDocument(docx, fullname);
|
Function TSDocxDocuments.AddDocument(docx, fullname);
|
||||||
Begin
|
Begin
|
||||||
name := ExtractFileName(fullname);
|
name := ExtractFileName(fullname);
|
||||||
collection_.AddCollection(new TSDocxDocument(application_, docx, name, fullname), name);
|
document := new TSDocxDocument(self.Application, self.Creator, self);
|
||||||
|
document.Init(docx, name, fullname);
|
||||||
|
collection_.AddCollection(document, name);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxDocuments.[](index);
|
Function Operator TSDocxDocuments.[](index);
|
||||||
|
|
|
||||||
|
|
@ -1,459 +1,593 @@
|
||||||
Type TSDocxEnumerations = Class
|
Unit TSDocxEnumerations;
|
||||||
|
Interface
|
||||||
// WdSaveOptions enumeration
|
// WdSaveOptions enumeration
|
||||||
Class Function wdDoNotSaveChanges();
|
Function TEST123();
|
||||||
|
Function wdDoNotSaveChanges();
|
||||||
|
Function wdPromptToSaveChanges();
|
||||||
|
Function wdSaveChanges();
|
||||||
|
|
||||||
|
// WdAutoFitBehavior enumeration
|
||||||
|
Function wdAutoFitContent();
|
||||||
|
Function wdAutoFitFixed();
|
||||||
|
Function wdAutoFitWindow();
|
||||||
|
|
||||||
|
// WdDeleteCells enumeration
|
||||||
|
Function wdDeleteCellsEntireColumn();
|
||||||
|
Function wdDeleteCellsEntireRow();
|
||||||
|
Function wdDeleteCellsShiftLeft();
|
||||||
|
Function wdDeleteCellsShiftUp();
|
||||||
|
|
||||||
|
// WdCellVerticalAlignment
|
||||||
|
Function wdCellAlignVerticalBottom();
|
||||||
|
Function wdCellAlignVerticalCenter();
|
||||||
|
Function wdCellAlignVerticalTop();
|
||||||
|
|
||||||
|
// WdTextureIndex
|
||||||
|
Function wdTexture10Percent();
|
||||||
|
Function wdTexture12Pt5Percent();
|
||||||
|
Function wdTexture15Percent();
|
||||||
|
Function wdTexture17Pt5Percent();
|
||||||
|
Function wdTexture20Percent();
|
||||||
|
Function wdTexture22Pt5Percent();
|
||||||
|
Function wdTexture25Percent();
|
||||||
|
Function wdTexture27Pt5Percent();
|
||||||
|
Function wdTexture2Pt5Percent();
|
||||||
|
Function wdTexture30Percent();
|
||||||
|
Function wdTexture32Pt5Percent();
|
||||||
|
Function wdTexture35Percent();
|
||||||
|
Function wdTexture37Pt5Percent();
|
||||||
|
Function wdTexture40Percent();
|
||||||
|
Function wdTexture42Pt5Percent();
|
||||||
|
Function wdTexture45Percent();
|
||||||
|
Function wdTexture47Pt5Percent();
|
||||||
|
Function wdTexture50Percent();
|
||||||
|
Function wdTexture52Pt5Percent();
|
||||||
|
Function wdTexture55Percent();
|
||||||
|
Function wdTexture57Pt5Percent();
|
||||||
|
Function wdTexture5Percent();
|
||||||
|
Function wdTexture60Percent();
|
||||||
|
Function wdTexture62Pt5Percent();
|
||||||
|
Function wdTexture65Percent();
|
||||||
|
Function wdTexture67Pt5Percent();
|
||||||
|
Function wdTexture70Percent();
|
||||||
|
Function wdTexture72Pt5Percent();
|
||||||
|
Function wdTexture75Percent();
|
||||||
|
Function wdTexture77Pt5Percent();
|
||||||
|
Function wdTexture7Pt5Percent();
|
||||||
|
Function wdTexture80Percent();
|
||||||
|
Function wdTexture82Pt5Percent();
|
||||||
|
Function wdTexture85Percent();
|
||||||
|
Function wdTexture87Pt5Percent();
|
||||||
|
Function wdTexture90Percent();
|
||||||
|
Function wdTexture92Pt5Percent();
|
||||||
|
Function wdTexture95Percent();
|
||||||
|
Function wdTexture97Pt5Percent();
|
||||||
|
Function wdTextureCross();
|
||||||
|
Function wdTextureDarkCross();
|
||||||
|
Function wdTextureDarkDiagonalCross();
|
||||||
|
Function wdTextureDarkDiagonalDown();
|
||||||
|
Function wdTextureDarkDiagonalUp();
|
||||||
|
Function wdTextureDarkHorizontal();
|
||||||
|
Function wdTextureDarkVertical();
|
||||||
|
Function wdTextureDiagonalCross();
|
||||||
|
Function wdTextureDiagonalDown();
|
||||||
|
Function wdTextureDiagonalUp();
|
||||||
|
Function wdTextureHorizontal();
|
||||||
|
Function wdTextureNone();
|
||||||
|
Function wdTextureSolid();
|
||||||
|
Function wdTextureVertical();
|
||||||
|
|
||||||
|
// WdRowHeightRule
|
||||||
|
Function wdRowHeightAtLeast();
|
||||||
|
Function wdRowHeightAuto();
|
||||||
|
Function wdRowHeightExactly();
|
||||||
|
|
||||||
|
// WdBorderType
|
||||||
|
Function wdBorderBottom();
|
||||||
|
Function wdBorderDiagonalDown();
|
||||||
|
Function wdBorderDiagonalUp();
|
||||||
|
Function wdBorderHorizontal();
|
||||||
|
Function wdBorderLeft();
|
||||||
|
Function wdBorderRight();
|
||||||
|
Function wdBorderTop();
|
||||||
|
Function wdBorderVertical();
|
||||||
|
|
||||||
|
// WdLineStyle
|
||||||
|
Function wdLineStyleDashDot();
|
||||||
|
Function wdLineStyleDashDotDot();
|
||||||
|
Function wdLineStyleDashDotStroked();
|
||||||
|
Function wdLineStyleDashLargeGap();
|
||||||
|
Function wdLineStyleDashSmallGap();
|
||||||
|
Function wdLineStyleDot();
|
||||||
|
Function wdLineStyleDouble();
|
||||||
|
Function wdLineStyleDoubleWavy();
|
||||||
|
Function wdLineStyleEmboss3D();
|
||||||
|
Function wdLineStyleEngrave3D();
|
||||||
|
Function wdLineStyleInset();
|
||||||
|
Function wdLineStyleNone();
|
||||||
|
Function wdLineStyleOutset();
|
||||||
|
Function wdLineStyleSingle();
|
||||||
|
Function wdLineStyleSingleWavy();
|
||||||
|
Function wdLineStyleThickThinLargeGap();
|
||||||
|
Function wdLineStyleThickThinMedGap();
|
||||||
|
Function wdLineStyleThickThinSmallGap();
|
||||||
|
Function wdLineStyleThinThickLargeGap();
|
||||||
|
Function wdLineStyleThinThickMedGap();
|
||||||
|
Function wdLineStyleThinThickSmallGap();
|
||||||
|
Function wdLineStyleThinThickThinLargeGap();
|
||||||
|
Function wdLineStyleThinThickThinMedGap();
|
||||||
|
Function wdLineStyleThinThickThinSmallGap();
|
||||||
|
Function wdLineStyleTriple();
|
||||||
|
|
||||||
|
// WdRulerStyle
|
||||||
|
Function wdAdjustFirstColumn();
|
||||||
|
Function wdAdjustNone();
|
||||||
|
Function wdAdjustProportional();
|
||||||
|
Function wdAdjustSameWidth();
|
||||||
|
|
||||||
|
// WdPreferredWidthType
|
||||||
|
Function wdPreferredWidthAuto();
|
||||||
|
Function wdPreferredWidthPercent();
|
||||||
|
Function wdPreferredWidthPoints();
|
||||||
|
|
||||||
|
Implementation
|
||||||
|
Function wdDoNotSaveChanges();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
Class Function wdPromptToSaveChanges();
|
Function wdPromptToSaveChanges();
|
||||||
Begin
|
Begin
|
||||||
return -2;
|
return -2;
|
||||||
End;
|
End;
|
||||||
Class Function wdSaveChanges();
|
Function wdSaveChanges();
|
||||||
Begin
|
Begin
|
||||||
return -1;
|
return -1;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdAutoFitBehavior enumeration
|
// WdAutoFitBehavior enumeration
|
||||||
Class Function wdAutoFitContent();
|
Function wdAutoFitContent();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdAutoFitFixed();
|
Function wdAutoFitFixed();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
Class Function wdAutoFitWindow();
|
Function wdAutoFitWindow();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdDeleteCells enumeration
|
// WdDeleteCells enumeration
|
||||||
Class Function wdDeleteCellsEntireColumn();
|
Function wdDeleteCellsEntireColumn();
|
||||||
Begin
|
Begin
|
||||||
return 3;
|
return 3;
|
||||||
End;
|
End;
|
||||||
Class Function wdDeleteCellsEntireRow();
|
Function wdDeleteCellsEntireRow();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
Class Function wdDeleteCellsShiftLeft();
|
Function wdDeleteCellsShiftLeft();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdDeleteCellsShiftUp();
|
Function wdDeleteCellsShiftUp();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdCellVerticalAlignment
|
// WdCellVerticalAlignment
|
||||||
Class Function wdCellAlignVerticalBottom();
|
Function wdCellAlignVerticalBottom();
|
||||||
Begin
|
Begin
|
||||||
return 3;
|
return 3;
|
||||||
End;
|
End;
|
||||||
Class Function wdCellAlignVerticalCenter();
|
Function wdCellAlignVerticalCenter();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdCellAlignVerticalTop();
|
Function wdCellAlignVerticalTop();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdTextureIndex
|
// WdTextureIndex
|
||||||
Class Function wdTexture10Percent();
|
Function wdTexture10Percent();
|
||||||
Begin
|
Begin
|
||||||
return 100;
|
return 100;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture12Pt5Percent();
|
Function wdTexture12Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 125;
|
return 125;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture15Percent();
|
Function wdTexture15Percent();
|
||||||
Begin
|
Begin
|
||||||
return 150;
|
return 150;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture17Pt5Percent();
|
Function wdTexture17Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 175;
|
return 175;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture20Percent();
|
Function wdTexture20Percent();
|
||||||
Begin
|
Begin
|
||||||
return 200;
|
return 200;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture22Pt5Percent();
|
Function wdTexture22Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 225;
|
return 225;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture25Percent();
|
Function wdTexture25Percent();
|
||||||
Begin
|
Begin
|
||||||
return 250;
|
return 250;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture27Pt5Percent();
|
Function wdTexture27Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 275;
|
return 275;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture2Pt5Percent();
|
Function wdTexture2Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 25;
|
return 25;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture30Percent();
|
Function wdTexture30Percent();
|
||||||
Begin
|
Begin
|
||||||
return 300;
|
return 300;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture32Pt5Percent();
|
Function wdTexture32Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 325;
|
return 325;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture35Percent();
|
Function wdTexture35Percent();
|
||||||
Begin
|
Begin
|
||||||
return 350;
|
return 350;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture37Pt5Percent();
|
Function wdTexture37Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 375;
|
return 375;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture40Percent();
|
Function wdTexture40Percent();
|
||||||
Begin
|
Begin
|
||||||
return 400;
|
return 400;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture42Pt5Percent();
|
Function wdTexture42Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 425;
|
return 425;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture45Percent();
|
Function wdTexture45Percent();
|
||||||
Begin
|
Begin
|
||||||
return 450;
|
return 450;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture47Pt5Percent();
|
Function wdTexture47Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 475;
|
return 475;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture50Percent();
|
Function wdTexture50Percent();
|
||||||
Begin
|
Begin
|
||||||
return 500;
|
return 500;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture52Pt5Percent();
|
Function wdTexture52Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 525;
|
return 525;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture55Percent();
|
Function wdTexture55Percent();
|
||||||
Begin
|
Begin
|
||||||
return 550;
|
return 550;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture57Pt5Percent();
|
Function wdTexture57Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 575;
|
return 575;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture5Percent();
|
Function wdTexture5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 50;
|
return 50;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture60Percent();
|
Function wdTexture60Percent();
|
||||||
Begin
|
Begin
|
||||||
return 600;
|
return 600;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture62Pt5Percent();
|
Function wdTexture62Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 625;
|
return 625;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture65Percent();
|
Function wdTexture65Percent();
|
||||||
Begin
|
Begin
|
||||||
return 650;
|
return 650;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture67Pt5Percent();
|
Function wdTexture67Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 675;
|
return 675;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture70Percent();
|
Function wdTexture70Percent();
|
||||||
Begin
|
Begin
|
||||||
return 700;
|
return 700;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture72Pt5Percent();
|
Function wdTexture72Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 725;
|
return 725;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture75Percent();
|
Function wdTexture75Percent();
|
||||||
Begin
|
Begin
|
||||||
return 750;
|
return 750;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture77Pt5Percent();
|
Function wdTexture77Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 775;
|
return 775;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture7Pt5Percent();
|
Function wdTexture7Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 75;
|
return 75;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture80Percent();
|
Function wdTexture80Percent();
|
||||||
Begin
|
Begin
|
||||||
return 800;
|
return 800;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture82Pt5Percent();
|
Function wdTexture82Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 825;
|
return 825;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture85Percent();
|
Function wdTexture85Percent();
|
||||||
Begin
|
Begin
|
||||||
return 850;
|
return 850;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture87Pt5Percent();
|
Function wdTexture87Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 875;
|
return 875;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture90Percent();
|
Function wdTexture90Percent();
|
||||||
Begin
|
Begin
|
||||||
return 900;
|
return 900;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture92Pt5Percent();
|
Function wdTexture92Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 925;
|
return 925;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture95Percent();
|
Function wdTexture95Percent();
|
||||||
Begin
|
Begin
|
||||||
return 950;
|
return 950;
|
||||||
End;
|
End;
|
||||||
Class Function wdTexture97Pt5Percent();
|
Function wdTexture97Pt5Percent();
|
||||||
Begin
|
Begin
|
||||||
return 975;
|
return 975;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureCross();
|
Function wdTextureCross();
|
||||||
Begin
|
Begin
|
||||||
return -11;
|
return -11;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkCross();
|
Function wdTextureDarkCross();
|
||||||
Begin
|
Begin
|
||||||
return -5;
|
return -5;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkDiagonalCross();
|
Function wdTextureDarkDiagonalCross();
|
||||||
Begin
|
Begin
|
||||||
return -6;
|
return -6;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkDiagonalDown();
|
Function wdTextureDarkDiagonalDown();
|
||||||
Begin
|
Begin
|
||||||
return -3;
|
return -3;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkDiagonalUp();
|
Function wdTextureDarkDiagonalUp();
|
||||||
Begin
|
Begin
|
||||||
return -4;
|
return -4;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkHorizontal();
|
Function wdTextureDarkHorizontal();
|
||||||
Begin
|
Begin
|
||||||
return -1;
|
return -1;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDarkVertical();
|
Function wdTextureDarkVertical();
|
||||||
Begin
|
Begin
|
||||||
return -2;
|
return -2;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDiagonalCross();
|
Function wdTextureDiagonalCross();
|
||||||
Begin
|
Begin
|
||||||
return -12;
|
return -12;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDiagonalDown();
|
Function wdTextureDiagonalDown();
|
||||||
Begin
|
Begin
|
||||||
return -9;
|
return -9;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureDiagonalUp();
|
Function wdTextureDiagonalUp();
|
||||||
Begin
|
Begin
|
||||||
return -10;
|
return -10;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureHorizontal();
|
Function wdTextureHorizontal();
|
||||||
Begin
|
Begin
|
||||||
return -7;
|
return -7;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureNone();
|
Function wdTextureNone();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureSolid();
|
Function wdTextureSolid();
|
||||||
Begin
|
Begin
|
||||||
return 1000;
|
return 1000;
|
||||||
End;
|
End;
|
||||||
Class Function wdTextureVertical();
|
Function wdTextureVertical();
|
||||||
Begin
|
Begin
|
||||||
return -8;
|
return -8;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdRowHeightRule
|
// WdRowHeightRule
|
||||||
Class Function wdRowHeightAtLeast();
|
Function wdRowHeightAtLeast();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdRowHeightAuto();
|
Function wdRowHeightAuto();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
Class Function wdRowHeightExactly();
|
Function wdRowHeightExactly();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdBorderType
|
// WdBorderType
|
||||||
Class Function wdBorderBottom();
|
Function wdBorderBottom();
|
||||||
Begin
|
Begin
|
||||||
return -3;
|
return -3;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderDiagonalDown();
|
Function wdBorderDiagonalDown();
|
||||||
Begin
|
Begin
|
||||||
return -7;
|
return -7;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderDiagonalUp();
|
Function wdBorderDiagonalUp();
|
||||||
Begin
|
Begin
|
||||||
return -8;
|
return -8;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderHorizontal();
|
Function wdBorderHorizontal();
|
||||||
Begin
|
Begin
|
||||||
return -5;
|
return -5;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderLeft();
|
Function wdBorderLeft();
|
||||||
Begin
|
Begin
|
||||||
return -2;
|
return -2;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderRight();
|
Function wdBorderRight();
|
||||||
Begin
|
Begin
|
||||||
return -4;
|
return -4;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderTop();
|
Function wdBorderTop();
|
||||||
Begin
|
Begin
|
||||||
return -1;
|
return -1;
|
||||||
End;
|
End;
|
||||||
Class Function wdBorderVertical();
|
Function wdBorderVertical();
|
||||||
Begin
|
Begin
|
||||||
return -6;
|
return -6;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdLineStyle
|
// WdLineStyle
|
||||||
Class Function wdLineStyleDashDot();
|
Function wdLineStyleDashDot();
|
||||||
Begin
|
Begin
|
||||||
return 5;
|
return 5;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDashDotDot();
|
Function wdLineStyleDashDotDot();
|
||||||
Begin
|
Begin
|
||||||
return 6;
|
return 6;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDashDotStroked();
|
Function wdLineStyleDashDotStroked();
|
||||||
Begin
|
Begin
|
||||||
return 20;
|
return 20;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDashLargeGap();
|
Function wdLineStyleDashLargeGap();
|
||||||
Begin
|
Begin
|
||||||
return 4;
|
return 4;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDashSmallGap();
|
Function wdLineStyleDashSmallGap();
|
||||||
Begin
|
Begin
|
||||||
return 3;
|
return 3;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDot();
|
Function wdLineStyleDot();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDouble();
|
Function wdLineStyleDouble();
|
||||||
Begin
|
Begin
|
||||||
return 7;
|
return 7;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleDoubleWavy();
|
Function wdLineStyleDoubleWavy();
|
||||||
Begin
|
Begin
|
||||||
return 19;
|
return 19;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleEmboss3D();
|
Function wdLineStyleEmboss3D();
|
||||||
Begin
|
Begin
|
||||||
return 21;
|
return 21;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleEngrave3D();
|
Function wdLineStyleEngrave3D();
|
||||||
Begin
|
Begin
|
||||||
return 22;
|
return 22;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleInset();
|
Function wdLineStyleInset();
|
||||||
Begin
|
Begin
|
||||||
return 24;
|
return 24;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleNone();
|
Function wdLineStyleNone();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 0;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleOutset();
|
Function wdLineStyleOutset();
|
||||||
Begin
|
Begin
|
||||||
return 23;
|
return 23;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleSingle();
|
Function wdLineStyleSingle();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleSingleWavy();
|
Function wdLineStyleSingleWavy();
|
||||||
Begin
|
Begin
|
||||||
return 18;
|
return 18;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThickThinLargeGap();
|
Function wdLineStyleThickThinLargeGap();
|
||||||
Begin
|
Begin
|
||||||
return 16;
|
return 16;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThickThinMedGap();
|
Function wdLineStyleThickThinMedGap();
|
||||||
Begin
|
Begin
|
||||||
return 13;
|
return 13;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThickThinSmallGap();
|
Function wdLineStyleThickThinSmallGap();
|
||||||
Begin
|
Begin
|
||||||
return 10;
|
return 10;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickLargeGap();
|
Function wdLineStyleThinThickLargeGap();
|
||||||
Begin
|
Begin
|
||||||
return 15;
|
return 15;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickMedGap();
|
Function wdLineStyleThinThickMedGap();
|
||||||
Begin
|
Begin
|
||||||
return 12;
|
return 12;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickSmallGap();
|
Function wdLineStyleThinThickSmallGap();
|
||||||
Begin
|
Begin
|
||||||
return 9;
|
return 9;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickThinLargeGap();
|
Function wdLineStyleThinThickThinLargeGap();
|
||||||
Begin
|
Begin
|
||||||
return 17;
|
return 17;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickThinMedGap();
|
Function wdLineStyleThinThickThinMedGap();
|
||||||
Begin
|
Begin
|
||||||
return 14;
|
return 14;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleThinThickThinSmallGap();
|
Function wdLineStyleThinThickThinSmallGap();
|
||||||
Begin
|
Begin
|
||||||
return 11;
|
return 11;
|
||||||
End;
|
End;
|
||||||
Class Function wdLineStyleTriple();
|
Function wdLineStyleTriple();
|
||||||
Begin
|
Begin
|
||||||
return 8;
|
return 8;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdRulerStyle
|
// WdRulerStyle
|
||||||
Class Function wdAdjustFirstColumn();
|
Function wdAdjustFirstColumn();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
Class Function wdAdjustNone();
|
Function wdAdjustNone();
|
||||||
Begin
|
Begin
|
||||||
return 0;
|
return 11111111110;
|
||||||
End;
|
End;
|
||||||
Class Function wdAdjustProportional();
|
Function wdAdjustProportional();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdAdjustSameWidth();
|
Function wdAdjustSameWidth();
|
||||||
Begin
|
Begin
|
||||||
return 3;
|
return 3;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// WdPreferredWidthType
|
// WdPreferredWidthType
|
||||||
Class Function wdPreferredWidthAuto();
|
Function wdPreferredWidthAuto();
|
||||||
Begin
|
Begin
|
||||||
return 1;
|
return 1;
|
||||||
End;
|
End;
|
||||||
Class Function wdPreferredWidthPercent();
|
Function wdPreferredWidthPercent();
|
||||||
Begin
|
Begin
|
||||||
return 2;
|
return 2;
|
||||||
End;
|
End;
|
||||||
Class Function wdPreferredWidthPoints();
|
Function wdPreferredWidthPoints();
|
||||||
Begin
|
Begin
|
||||||
return 3;
|
return 3;
|
||||||
End;
|
End;
|
||||||
|
Function TEST123();
|
||||||
|
Begin
|
||||||
|
println("123");
|
||||||
|
End;
|
||||||
|
End.
|
||||||
|
|
||||||
End;
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
Type TSDocxRow = Class
|
Type TSDocxRow = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table, row);
|
Function Init(table, row);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_;
|
table_;
|
||||||
row_;
|
row_;
|
||||||
|
|
||||||
|
|
@ -17,10 +16,8 @@ public
|
||||||
|
|
||||||
property Alignment read ReadAlignment write WriteAlignment;
|
property Alignment read ReadAlignment write WriteAlignment;
|
||||||
property AllowBreakAcrossPages read ReadAllowBreakAcrossPages write WriteAllowBreakAcrossPages;
|
property AllowBreakAcrossPages read ReadAllowBreakAcrossPages write WriteAllowBreakAcrossPages;
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property Cells read ReadCells;
|
property Cells read ReadCells;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property HeadingFormat read ReadHeadingFormat write WriteHeadingFormat;
|
property HeadingFormat read ReadHeadingFormat write WriteHeadingFormat;
|
||||||
property Height read ReadHeight write WriteHeight;
|
property Height read ReadHeight write WriteHeight;
|
||||||
property HeightRule read ReadHeightRule write WriteHeightRule;
|
property HeightRule read ReadHeightRule write WriteHeightRule;
|
||||||
|
|
@ -31,7 +28,6 @@ public
|
||||||
property LeftIndent read ReadLeftIndent write WriteLeftIndent;
|
property LeftIndent read ReadLeftIndent write WriteLeftIndent;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Next read ReadNext;
|
property Next read ReadNext;
|
||||||
property Parent read ReadParent;
|
|
||||||
property Previous read ReadPrevious;
|
property Previous read ReadPrevious;
|
||||||
property Range read ReadRange;
|
property Range read ReadRange;
|
||||||
property Shading read ReadShading;
|
property Shading read ReadShading;
|
||||||
|
|
@ -41,7 +37,6 @@ public
|
||||||
Function ReadShading();
|
Function ReadShading();
|
||||||
Function ReadRange();
|
Function ReadRange();
|
||||||
Function ReadPrevious();
|
Function ReadPrevious();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNext();
|
Function ReadNext();
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function WriteLeftIndent();
|
Function WriteLeftIndent();
|
||||||
|
|
@ -57,10 +52,8 @@ public
|
||||||
Function ReadHeight();
|
Function ReadHeight();
|
||||||
Function WriteHeadingFormat();
|
Function WriteHeadingFormat();
|
||||||
Function ReadHeadingFormat();
|
Function ReadHeadingFormat();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCells();
|
Function ReadCells();
|
||||||
Function ReadBorders();
|
Function ReadBorders();
|
||||||
Function ReadApplication();
|
|
||||||
Function WriteAllowBreakAcrossPages();
|
Function WriteAllowBreakAcrossPages();
|
||||||
Function ReadAllowBreakAcrossPages();
|
Function ReadAllowBreakAcrossPages();
|
||||||
Function WriteAlignment();
|
Function WriteAlignment();
|
||||||
|
|
@ -69,9 +62,8 @@ public
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxRow.Create(application, table, row);
|
Function TSDocxRow.Init(table, row);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
row_ := row;
|
row_ := row;
|
||||||
End;
|
End;
|
||||||
|
|
@ -89,15 +81,15 @@ End;
|
||||||
Function TSDocxRow.SetHeight(RowHeight, HeightRule);
|
Function TSDocxRow.SetHeight(RowHeight, HeightRule);
|
||||||
Begin
|
Begin
|
||||||
case HeightRule of
|
case HeightRule of
|
||||||
class(TSDocxEnumerations).wdRowHeightAtLeast:
|
TSDocxEnumerations.wdRowHeightAtLeast:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdRowHeightAuto:
|
TSDocxEnumerations.wdRowHeightAuto:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdRowHeightExactly:
|
TSDocxEnumerations.wdRowHeightExactly:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
Type TSDocxRows = Class
|
Type TSDocxRows = Class(TSVbaBase)
|
||||||
|
Uses TSDocxEnumerations;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, table);
|
Function Init(table);
|
||||||
Function Operator[](index);
|
Function Operator[](index);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
table_;
|
table_;
|
||||||
|
|
||||||
public
|
public
|
||||||
|
|
@ -21,10 +21,8 @@ public
|
||||||
property Alignment read ReadAlignment write WriteAlignment;
|
property Alignment read ReadAlignment write WriteAlignment;
|
||||||
property AllowBreakAcrossPages read ReadAllowBreakAcrossPages write WriteAllowBreakAcrossPages;
|
property AllowBreakAcrossPages read ReadAllowBreakAcrossPages write WriteAllowBreakAcrossPages;
|
||||||
property AllowOverlap read ReadAllowOverlap write WriteAllowOverlap;
|
property AllowOverlap read ReadAllowOverlap write WriteAllowOverlap;
|
||||||
property Application read ReadApplication;
|
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property DistanceBottom read ReadDistanceBottom write WriteDistanceBottom;
|
property DistanceBottom read ReadDistanceBottom write WriteDistanceBottom;
|
||||||
property DistanceLeft read ReadDistanceLeft write WriteDistanceLeft;
|
property DistanceLeft read ReadDistanceLeft write WriteDistanceLeft;
|
||||||
property DistanceRight read ReadDistanceRight write WriteDistanceRight;
|
property DistanceRight read ReadDistanceRight write WriteDistanceRight;
|
||||||
|
|
@ -37,7 +35,6 @@ public
|
||||||
property Last read ReadLast;
|
property Last read ReadLast;
|
||||||
property LeftIndent read ReadLeftIndent write WriteLeftIndent;
|
property LeftIndent read ReadLeftIndent write WriteLeftIndent;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Parent read ReadParent;
|
|
||||||
property RelativeHorizontalPosition read ReadRelativeHorizontalPosition write WriteRelativeHorizontalPosition;
|
property RelativeHorizontalPosition read ReadRelativeHorizontalPosition write WriteRelativeHorizontalPosition;
|
||||||
property RelativeVerticalPosition read ReadRelativeVerticalPosition write WriteRelativeVerticalPosition;
|
property RelativeVerticalPosition read ReadRelativeVerticalPosition write WriteRelativeVerticalPosition;
|
||||||
property Shading read ReadShading;
|
property Shading read ReadShading;
|
||||||
|
|
@ -57,7 +54,6 @@ public
|
||||||
Function ReadRelativeVerticalPosition();
|
Function ReadRelativeVerticalPosition();
|
||||||
Function WriteRelativeHorizontalPosition();
|
Function WriteRelativeHorizontalPosition();
|
||||||
Function ReadRelativeHorizontalPosition();
|
Function ReadRelativeHorizontalPosition();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function WriteLeftIndent();
|
Function WriteLeftIndent();
|
||||||
Function ReadLeftIndent();
|
Function ReadLeftIndent();
|
||||||
|
|
@ -79,10 +75,8 @@ public
|
||||||
Function ReadDistanceLeft();
|
Function ReadDistanceLeft();
|
||||||
Function WriteDistanceBottom();
|
Function WriteDistanceBottom();
|
||||||
Function ReadDistanceBottom();
|
Function ReadDistanceBottom();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCount();
|
Function ReadCount();
|
||||||
Function ReadBorders();
|
Function ReadBorders();
|
||||||
Function ReadApplication();
|
|
||||||
Function WriteAllowOverlap();
|
Function WriteAllowOverlap();
|
||||||
Function ReadAllowOverlap();
|
Function ReadAllowOverlap();
|
||||||
Function WriteAllowBreakAcrossPages();
|
Function WriteAllowBreakAcrossPages();
|
||||||
|
|
@ -93,15 +87,16 @@ public
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxRows.Create(application, table);
|
Function TSDocxRows.Init(table);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
table_ := table;
|
table_ := table;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxRows.[](index);
|
Function Operator TSDocxRows.[](index);
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxRow(application_, table_, Index);
|
row_obj := new TSDocxRow(self.Application, self.Creator, self);
|
||||||
|
row_obj.Init(table_, index);
|
||||||
|
return row_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
@ -117,15 +112,15 @@ End;
|
||||||
Function TSDocxRows.SetHeight(RowHeight, HeightRule);
|
Function TSDocxRows.SetHeight(RowHeight, HeightRule);
|
||||||
Begin
|
Begin
|
||||||
case HeightRule of
|
case HeightRule of
|
||||||
class(TSDocxEnumerations).wdRowHeightAtLeast:
|
TSDocxEnumerations.wdRowHeightAtLeast:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdRowHeightAuto:
|
TSDocxEnumerations.wdRowHeightAuto:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdRowHeightExactly:
|
TSDocxEnumerations.wdRowHeightExactly:
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -1,42 +1,34 @@
|
||||||
Type TSDocxShading = Class
|
Type TSDocxShading = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, pr);
|
Function Init(pr);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
pr_; // xxPr对象,比如Cell: tr.tcPr,或Paragraph: p.pPr
|
pr_; // xxPr对象,比如Cell: tr.tcPr,或Paragraph: p.pPr
|
||||||
|
|
||||||
public
|
public
|
||||||
property Application read ReadApplication;
|
|
||||||
property BackgroundPatternColor read ReadBackgroundPatternColor write WriteBackgroundPatternColor;
|
property BackgroundPatternColor read ReadBackgroundPatternColor write WriteBackgroundPatternColor;
|
||||||
property BackgroundPatternColorIndex read ReadBackgroundPatternColorIndex write WriteBackgroundPatternColorIndex;
|
property BackgroundPatternColorIndex read ReadBackgroundPatternColorIndex write WriteBackgroundPatternColorIndex;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property ForegroundPatternColor read ReadForegroundPatternColor write WriteForegroundPatternColor;
|
property ForegroundPatternColor read ReadForegroundPatternColor write WriteForegroundPatternColor;
|
||||||
property ForegroundPatternColorIndex read ReadForegroundPatternColorIndex write WriteForegroundPatternColorIndex;
|
property ForegroundPatternColorIndex read ReadForegroundPatternColorIndex write WriteForegroundPatternColorIndex;
|
||||||
property Parent read ReadParent;
|
|
||||||
property Texture read ReadTexture write WriteTexture;
|
property Texture read ReadTexture write WriteTexture;
|
||||||
Function WriteTexture(texture);
|
Function WriteTexture(texture);
|
||||||
Function ReadTexture();
|
Function ReadTexture();
|
||||||
Function ReadParent();
|
|
||||||
Function WriteForegroundPatternColorIndex();
|
Function WriteForegroundPatternColorIndex();
|
||||||
Function ReadForegroundPatternColorIndex();
|
Function ReadForegroundPatternColorIndex();
|
||||||
Function WriteForegroundPatternColor();
|
Function WriteForegroundPatternColor();
|
||||||
Function ReadForegroundPatternColor();
|
Function ReadForegroundPatternColor();
|
||||||
Function ReadCreator();
|
|
||||||
Function WriteBackgroundPatternColorIndex();
|
Function WriteBackgroundPatternColorIndex();
|
||||||
Function ReadBackgroundPatternColorIndex();
|
Function ReadBackgroundPatternColorIndex();
|
||||||
Function WriteBackgroundPatternColor();
|
Function WriteBackgroundPatternColor();
|
||||||
Function ReadBackgroundPatternColor();
|
Function ReadBackgroundPatternColor();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxShading.Create(application, pr);
|
Function TSDocxShading.Init(application, pr);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
pr_ := pr;
|
pr_ := pr;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
@ -44,7 +36,7 @@ End;
|
||||||
Function TSDocxShading.WriteTexture(texture);
|
Function TSDocxShading.WriteTexture(texture);
|
||||||
Begin
|
Begin
|
||||||
case texture of
|
case texture of
|
||||||
class(TSDocxEnumerations).wdTextureHorizontal():
|
TSDocxEnumerations.wdTextureHorizontal():
|
||||||
begin
|
begin
|
||||||
pr_.Shading.Val := "thinHorzStripe";
|
pr_.Shading.Val := "thinHorzStripe";
|
||||||
pr_.Update();
|
pr_.Update();
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
Type TSDocxTable = Class
|
Type TSDocxTable = Class(TSVbaBase)
|
||||||
|
Uses TSDocxEnumerations;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, docx, table);
|
Function Init(docx, table);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
docx_;
|
docx_;
|
||||||
table_; // TOfficeObj('TTable') 对象
|
table_; // TOfficeObj('TTable') 对象
|
||||||
|
|
||||||
|
|
@ -23,7 +23,6 @@ public
|
||||||
Function UpdateAutoFormat();
|
Function UpdateAutoFormat();
|
||||||
|
|
||||||
property AllowAutoFit read ReadAllowAutoFit write WriteAllowAutoFit;
|
property AllowAutoFit read ReadAllowAutoFit write WriteAllowAutoFit;
|
||||||
property Application read ReadApplication;
|
|
||||||
property ApplyStyleColumnBands read ReadApplyStyleColumnBands write WriteApplyStyleColumnBands;
|
property ApplyStyleColumnBands read ReadApplyStyleColumnBands write WriteApplyStyleColumnBands;
|
||||||
property ApplyStyleFirstColumn read ReadApplyStyleFirstColumn write WriteApplyStyleFirstColumn;
|
property ApplyStyleFirstColumn read ReadApplyStyleFirstColumn write WriteApplyStyleFirstColumn;
|
||||||
property ApplyStyleHeadingRows read ReadApplyStyleHeadingRows write WriteApplyStyleHeadingRows;
|
property ApplyStyleHeadingRows read ReadApplyStyleHeadingRows write WriteApplyStyleHeadingRows;
|
||||||
|
|
@ -34,12 +33,10 @@ public
|
||||||
property Borders read ReadBorders;
|
property Borders read ReadBorders;
|
||||||
property BottomPadding read ReadBottomPadding write WriteBottomPadding;
|
property BottomPadding read ReadBottomPadding write WriteBottomPadding;
|
||||||
property Columns read ReadColumns;
|
property Columns read ReadColumns;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property Descr read ReadDescr write WriteDescr;
|
property Descr read ReadDescr write WriteDescr;
|
||||||
property ID read ReadID write WriteID;
|
property ID read ReadID write WriteID;
|
||||||
property LeftPadding read ReadLeftPadding write WriteLeftPadding;
|
property LeftPadding read ReadLeftPadding write WriteLeftPadding;
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Parent read ReadParent;
|
|
||||||
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
property PreferredWidth read ReadPreferredWidth write WritePreferredWidth;
|
||||||
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
property PreferredWidthType read ReadPreferredWidthType write WritePreferredWidthType;
|
||||||
property Range read ReadRange;
|
property Range read ReadRange;
|
||||||
|
|
@ -74,7 +71,6 @@ public
|
||||||
Function ReadPreferredWidthType();
|
Function ReadPreferredWidthType();
|
||||||
Function WritePreferredWidth(value);
|
Function WritePreferredWidth(value);
|
||||||
Function ReadPreferredWidth();
|
Function ReadPreferredWidth();
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function WriteLeftPadding();
|
Function WriteLeftPadding();
|
||||||
Function ReadLeftPadding();
|
Function ReadLeftPadding();
|
||||||
|
|
@ -82,7 +78,6 @@ public
|
||||||
Function ReadID();
|
Function ReadID();
|
||||||
Function WriteDescr();
|
Function WriteDescr();
|
||||||
Function ReadDescr();
|
Function ReadDescr();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadColumns(index);
|
Function ReadColumns(index);
|
||||||
Function WriteBottomPadding();
|
Function WriteBottomPadding();
|
||||||
Function ReadBottomPadding();
|
Function ReadBottomPadding();
|
||||||
|
|
@ -100,16 +95,14 @@ public
|
||||||
Function ReadApplyStyleFirstColumn();
|
Function ReadApplyStyleFirstColumn();
|
||||||
Function WriteApplyStyleColumnBands();
|
Function WriteApplyStyleColumnBands();
|
||||||
Function ReadApplyStyleColumnBands();
|
Function ReadApplyStyleColumnBands();
|
||||||
Function ReadApplication();
|
|
||||||
Function WriteAllowAutoFit();
|
Function WriteAllowAutoFit();
|
||||||
Function ReadAllowAutoFit();
|
Function ReadAllowAutoFit();
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxTable.Create(application, docx, table);
|
Function TSDocxTable.Init(docx, table);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
docx_ := docx;
|
docx_ := docx;
|
||||||
table_ := table;
|
table_ := table;
|
||||||
End;
|
End;
|
||||||
|
|
@ -126,7 +119,7 @@ Begin
|
||||||
// TODO : 这里应该使用递归去处理每个单元格
|
// TODO : 这里应该使用递归去处理每个单元格
|
||||||
// TODO : 等cell方法完善
|
// TODO : 等cell方法完善
|
||||||
case Behavior of
|
case Behavior of
|
||||||
class(TSDocxEnumerations).wdAutoFitContent():
|
TSDocxEnumerations.wdAutoFitContent():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.WidthType := "auto";
|
table_.TblPr.WidthType := "auto";
|
||||||
table_.TblPr.Width := 0;
|
table_.TblPr.Width := 0;
|
||||||
|
|
@ -145,11 +138,11 @@ Begin
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdAutoFitFixed():
|
TSDocxEnumerations.wdAutoFitFixed():
|
||||||
begin
|
begin
|
||||||
end
|
end
|
||||||
|
|
||||||
class(TSDocxEnumerations).wdAutoFitWindow():
|
TSDocxEnumerations.wdAutoFitWindow():
|
||||||
begin
|
begin
|
||||||
table_.TblPr.WidthType := "pct";
|
table_.TblPr.WidthType := "pct";
|
||||||
table_.TblPr.Width := 5000;
|
table_.TblPr.Width := 5000;
|
||||||
|
|
@ -160,25 +153,30 @@ End;
|
||||||
|
|
||||||
Function TSDocxTable.Cell(Row, Column);
|
Function TSDocxTable.Cell(Row, Column);
|
||||||
Begin
|
Begin
|
||||||
return new TSDocxCell(application_, table_, Row, Column);
|
cell_obj := new TSDocxCell(self.Application, self.Creator, self);
|
||||||
|
cell_obj.Init(table_, Row, Column);
|
||||||
|
return cell_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// property
|
// property
|
||||||
Function TSDocxTable.ReadBorders(index);
|
Function TSDocxTable.ReadBorders(index);
|
||||||
Begin
|
Begin
|
||||||
borders_obj := new TSDocxBordersTable(application_, table_);
|
borders_obj := new TSDocxBordersTable(self.Application, self.Creator, self);
|
||||||
|
borders_obj.Init(table_);
|
||||||
return ifnil(index) ? borders_obj : borders_obj[index];
|
return ifnil(index) ? borders_obj : borders_obj[index];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxTable.ReadColumns(index);
|
Function TSDocxTable.ReadColumns(index);
|
||||||
Begin
|
Begin
|
||||||
columns_obj := new TSDocxColumns(application_, table_);
|
columns_obj := new TSDocxColumns(self.Application, self.Creator, self);
|
||||||
|
columns_obj.Init(table);
|
||||||
return ifnil(index) ? columns_obj : columns_obj[index];
|
return ifnil(index) ? columns_obj : columns_obj[index];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TSDocxTable.ReadRows(index);
|
Function TSDocxTable.ReadRows(index);
|
||||||
Begin
|
Begin
|
||||||
rows_obj := new TSDocxRows(application_, table_);
|
rows_obj := new TSDocxRows(self.Application, self.Creator, self);
|
||||||
|
rows_obj.Init(table_);
|
||||||
return ifnil(index) ? rows_obj : rows_obj[index];
|
return ifnil(index) ? rows_obj : rows_obj[index];
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,47 +1,35 @@
|
||||||
Type TSDocxTables = Class
|
Type TSDocxTables = Class(TSVbaBase)
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(application, docx);
|
Function Init(docx);
|
||||||
Function Init();
|
|
||||||
Function Operator[](index);
|
Function Operator[](index);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
|
||||||
docx_;
|
docx_;
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Add(Range, NumRows, NumColumns, DefaultTableBehavior, AutoFitBehavior);
|
Function Add(Range, NumRows, NumColumns, DefaultTableBehavior, AutoFitBehavior);
|
||||||
Function Item(Index);
|
Function Item(Index);
|
||||||
|
|
||||||
property Application read ReadApplication;
|
|
||||||
property Count read ReadCount;
|
property Count read ReadCount;
|
||||||
property Creator read ReadCreator;
|
|
||||||
property NestingLevel read ReadNestingLevel;
|
property NestingLevel read ReadNestingLevel;
|
||||||
property Parent read ReadParent;
|
|
||||||
Function ReadParent();
|
|
||||||
Function ReadNestingLevel();
|
Function ReadNestingLevel();
|
||||||
Function ReadCreator();
|
|
||||||
Function ReadCount();
|
Function ReadCount();
|
||||||
Function ReadApplication();
|
|
||||||
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSDocxTables.Create(application, docx);
|
Function TSDocxTables.Init(docx);
|
||||||
Begin
|
Begin
|
||||||
application_ := application;
|
|
||||||
docx_ := docx;
|
docx_ := docx;
|
||||||
Init();
|
|
||||||
End;
|
|
||||||
|
|
||||||
Function TSDocxTables.Init();
|
|
||||||
Begin
|
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Operator TSDocxTables.[](index);
|
Function Operator TSDocxTables.[](index);
|
||||||
Begin
|
Begin
|
||||||
table := docx_.GetTable(index - 1);
|
table := docx_.GetTable(index - 1);
|
||||||
return table ? new TSDocxTable(application_, docx_, table) : nil;
|
table_obj := new TSDocxTable(self.Application, self.Creator, self);
|
||||||
|
table_obj.Init(docx_, table);
|
||||||
|
return table_obj;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// function
|
// function
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
Type TSVbaBase = class
|
Type TSVbaBase = class
|
||||||
|
|
||||||
public
|
public
|
||||||
Function Create(app, par, cre);
|
Function Create(app, cre, par);
|
||||||
|
|
||||||
private
|
private
|
||||||
application_;
|
application_;
|
||||||
parent_;
|
|
||||||
creator_;
|
creator_;
|
||||||
|
parent_;
|
||||||
|
|
||||||
|
public
|
||||||
property Application read ReadApplication;
|
property Application read ReadApplication;
|
||||||
property Parent read ReadParent;
|
property Parent read ReadParent;
|
||||||
property Creator read ReadCreator;
|
property Creator read ReadCreator;
|
||||||
|
|
@ -18,11 +19,11 @@ private
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// ============== 实现 ================= //
|
// ============== 实现 ================= //
|
||||||
Function TSVbaBase.Create(app, par, cre);
|
Function TSVbaBase.Create(app, cre, par);
|
||||||
Begin
|
Begin
|
||||||
application_ := app;
|
application_ := app;
|
||||||
parent_ := par;
|
|
||||||
creator_ := cre;
|
creator_ := cre;
|
||||||
|
parent_ := par;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
// property
|
// property
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue