Skip to content

Commit 64569bc

Browse files
ACI0104450 (report v20.x)
1 parent 3dd8ce2 commit 64569bc

File tree

8 files changed

+45
-40
lines changed

8 files changed

+45
-40
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
2-
WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
3-
WP_GetFontInfo(Form:C1466.selection; True:C214)
4-
5-
oform.forcedEventCode:=On After Edit:K2:43
6-
SET TIMER:C645(-1)
1+
If (Form:C1466.selection.start#Form:C1466.selection.end) // not empty selection only ACI0104450
2+
WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
3+
WP_GetFontInfo(Form:C1466.selection; True:C214)
4+
oForm.forcedEventCode:=On After Edit:K2:43 // forced because it won't be generated by 4DWP because changes are made by programming
5+
SET TIMER:C645(-1)
6+
Else // ACI0104450 else, only Update font styles list and use 1st one
7+
WP_FillFontStyles(Self:C308->{Self:C308->})
8+
WP_SetFont(Form:C1466.selection; WP_fontLongName{1}) // use 1st style of the style list
9+
End if
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
C_TEXT:C284($font)
2-
$font:=WP_fontLongName{WP_fontStyle}
32

3+
$font:=WP_fontLongName{WP_fontStyle}
44
WP_SetFont(Form:C1466.selection; $font)
5-
WP_GetFontInfo(Form:C1466.selection; True:C214)
65

7-
oform.forcedEventCode:=On After Edit:K2:43
8-
SET TIMER:C645(-1)
6+
If (Form:C1466.selection.start#Form:C1466.selection.end) //ACI0104450
7+
WP_GetFontInfo(Form:C1466.selection; True:C214)
8+
oForm.forcedEventCode:=On After Edit:K2:43
9+
SET TIMER:C645(-1)
10+
End if
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
2-
WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
3-
WP_GetFontInfo(Form:C1466.selection; True:C214)
4-
5-
oForm.forcedEventCode:=On After Edit:K2:43
6-
SET TIMER:C645(-1)
7-
8-
1+
If (Form:C1466.selection.start#Form:C1466.selection.end) // not empty selection only ACI0104450
2+
WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
3+
WP_GetFontInfo(Form:C1466.selection; True:C214)
4+
oForm.forcedEventCode:=On After Edit:K2:43 // forced because it won't be generated by 4DWP because changes are made by programming
5+
SET TIMER:C645(-1)
6+
Else // ACI0104450 else, only Update font styles list and use 1st one
7+
WP_FillFontStyles(Self:C308->{Self:C308->})
8+
WP_SetFont(Form:C1466.selection; WP_fontLongName{1}) // use 1st style of the style list
9+
End if
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
C_TEXT:C284($font)
22

33
$font:=WP_fontLongName{WP_fontStyle}
4-
54
WP_SetFont(Form:C1466.selection; $font)
6-
WP_GetFontInfo(Form:C1466.selection; True:C214)
75

8-
oForm.forcedEventCode:=On After Edit:K2:43
9-
SET TIMER:C645(-1)
6+
If (Form:C1466.selection.start#Form:C1466.selection.end) //ACI0104450
7+
WP_GetFontInfo(Form:C1466.selection; True:C214)
8+
oForm.forcedEventCode:=On After Edit:K2:43
9+
SET TIMER:C645(-1)
10+
End if

Project/Sources/Methods/Compiler_Methods.4dm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,4 +230,7 @@ C_BOOLEAN:C305(WP_SelectText; $0)
230230
C_BOOLEAN:C305(gotoArea; $0)
231231

232232
//UI_PaletteBackgrounds
233-
C_TEXT:C284(UI_PaletteBackgrounds; $1)
233+
C_TEXT:C284(UI_PaletteBackgrounds; $1)
234+
235+
//WP_FillFontStyles
236+
C_TEXT:C284(WP_FillFontStyles; $1)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//%attributes = {}
2+
// method created after ACI0104450 to factorise the code
3+
4+
#DECLARE($fontFamily : Text)
5+
6+
ARRAY TEXT:C222(WP_fontStyle; 0)
7+
ARRAY TEXT:C222(WP_fontLongName; 0)
8+
FONT STYLE LIST:C1362($fontFamily; WP_fontStyle; WP_fontLongName)
9+
10+
WP_fontStyle:=1

Project/Sources/Methods/WP_GetFontInfo.4dm

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,6 @@ C_LONGINT:C283($rangeStart; $rangeEnd)
1818
C_TEXT:C284($fontFamily)
1919
C_TEXT:C284($font)
2020

21-
//$range:=$1
22-
23-
//If (Count parameters>=2)
24-
//$check:=$2
25-
//Else
26-
//$check:=False
27-
//End if
28-
2921
If (Count parameters:C259<2)
3022
$check:=False:C215
3123
End if
@@ -63,15 +55,8 @@ If (Not:C34(OB Is empty:C1297($range)))
6355

6456
// Then rebuild the font style and long names arrays
6557
$fontFamily:=WP_fontFamilly{$p}
66-
ARRAY TEXT:C222(WP_fontStyle; 0)
67-
ARRAY TEXT:C222(WP_fontLongName; 0)
68-
FONT STYLE LIST:C1362($fontFamily; WP_fontStyle; WP_fontLongName)
6958

70-
If (Size of array:C274(WP_fontStyle)=1)
71-
OBJECT SET ENABLED:C1123(*; "fontStyle"; False:C215)
72-
Else
73-
OBJECT SET ENABLED:C1123(*; "fontStyle"; True:C214)
74-
End if
59+
WP_FillFontStyles($fontFamily) //ACI0104450
7560

7661
WP GET ATTRIBUTES:C1345($range; wk font:K81:69; $font)
7762
$p:=Find in array:C230(WP_fontLongName; $font)

Project/Sources/catalog.4DCatalog

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</field>
1414
<field name="Title" uuid="19F64DF6BDDD4615A1EEC9F1978DBD56" type="10" limiting_length="255" never_null="true" id="3"/>
1515
<primary_key field_name="ID" field_uuid="25E1AC17AE3D4D5FBED8BEFDB6E6B6DC"/>
16-
<table_extra input_form="InputSideBar" output_form="Output">
16+
<table_extra input_form="InputToolBar" output_form="Output">
1717
<editor_table_info displayable_fields_count="6">
1818
<color red="255" green="255" blue="255" alpha="0"/>
1919
<coordinates left="41.5" top="16.453125" width="120" height="167.33203125"/>

0 commit comments

Comments
 (0)