-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75cf7b4
commit 27e9c09
Showing
4 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
Class constructor() | ||
This:C1470.document:=WP New:C1317 | ||
|
||
|
||
Function setText($newText : Text; $textPosition : Integer; $rangeUpdate : Integer) | ||
If (Count parameters:C259<3) | ||
$rangeUpdate:=wk include in range:K81:180 | ||
End if | ||
WP SET TEXT:C1574(This:C1470.document; $newText; $textPosition; $rangeUpdate) | ||
|
||
Function getText($expressions : Integer)->$text : Text | ||
If (Count parameters:C259=0) | ||
$expressions:=wk expressions as value:K81:255 | ||
End if | ||
$text:=WP Get text:C1575(This:C1470.document; $expressions) | ||
|
||
Function textRange($start : Integer; $end : Integer)->$range : Object | ||
$range:=WP Text range:C1341(This:C1470.document; $start; $end) | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Class constructor($target : Object; $index : Integer) | ||
|
||
Case of | ||
: (Count parameters:C259=2) | ||
This:C1470.section:=WP Get section:C1581($target; $index) // document + index | ||
|
||
: (Value type:C1509($target)=Is object:K8:27) | ||
This:C1470.section:=WP Get section:C1581($target) //element | ||
End case | ||
|
||
|
||
Function newHeader()->$header : Object | ||
$header:=WP New header:C1586(This:C1470.section) | ||
|
||
Function newFooter($section : Object)->$footer : Object | ||
$footer:=WP New footer:C1587(This:C1470.section) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,28 @@ | ||
//%attributes = {} | ||
//$d:=Chaîne(Date du jour; Système date court) | ||
//$h:=Chaîne(Heure courante; Système heure court) | ||
//$h:=Chaîne(Heure courante; Système heure court) | ||
|
||
|
||
var $doc : cs:C1710.WPdocument | ||
var $section1a; $section1b : cs:C1710.WPsection | ||
|
||
var $text : Text | ||
var $range; $header; $footer : Object | ||
|
||
$doc:=cs:C1710.WPdocument.new() | ||
|
||
$doc.setText("blablabla"; wk append:K81:179) | ||
|
||
$text:=$doc.getText() | ||
$range:=$doc.textRange(1; 3) | ||
|
||
$section1a:=cs:C1710.WPsection.new($doc.document; 1) | ||
$section1b:=cs:C1710.WPsection.new($range) | ||
|
||
|
||
$header:=$section1b.newHeader() | ||
$footer:=$section1b.newFooter() | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters