Skip to content

Commit

Permalink
ACI0104450 (report 20R4)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland-Lannuzel committed Dec 28, 2023
1 parent 8ac884f commit 748753e
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 39 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
WP_GetFontInfo(Form:C1466.selection; True:C214)

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

$font:=WP_fontLongName{WP_fontStyle}
WP_SetFont(Form:C1466.selection; $font)
WP_GetFontInfo(Form:C1466.selection; True:C214)

oform.forcedEventCode:=On After Edit:K2:43
SET TIMER:C645(-1)
If (Form:C1466.selection.start#Form:C1466.selection.end) //ACI0104450
WP_GetFontInfo(Form:C1466.selection; True:C214)
oForm.forcedEventCode:=On After Edit:K2:43
SET TIMER:C645(-1)
End if
17 changes: 9 additions & 8 deletions Project/Sources/Forms/WP_Toolbar/ObjectMethods/fontFamilly.4dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@

WP_SetFontFamily(Form:C1466.selection; Self:C308->{Self:C308->})
WP_GetFontInfo(Form:C1466.selection; True:C214)

oForm.forcedEventCode:=On After Edit:K2:43
SET TIMER:C645(-1)


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

$font:=WP_fontLongName{WP_fontStyle}

WP_SetFont(Form:C1466.selection; $font)
WP_GetFontInfo(Form:C1466.selection; True:C214)

oForm.forcedEventCode:=On After Edit:K2:43
SET TIMER:C645(-1)
If (Form:C1466.selection.start#Form:C1466.selection.end) //ACI0104450
WP_GetFontInfo(Form:C1466.selection; True:C214)
oForm.forcedEventCode:=On After Edit:K2:43
SET TIMER:C645(-1)
End if
10 changes: 10 additions & 0 deletions Project/Sources/Methods/WP_FillFontStyles.4dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//%attributes = {}
// method created after ACI0104450 to factorise the code

#DECLARE($fontFamily : Text)

ARRAY TEXT:C222(WP_fontStyle; 0)
ARRAY TEXT:C222(WP_fontLongName; 0)
FONT STYLE LIST:C1362($fontFamily; WP_fontStyle; WP_fontLongName)

WP_fontStyle:=1
17 changes: 1 addition & 16 deletions Project/Sources/Methods/WP_GetFontInfo.4dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ C_LONGINT:C283($rangeStart; $rangeEnd)
C_TEXT:C284($fontFamily)
C_TEXT:C284($font)

//$range:=$1

//If (Count parameters>=2)
//$check:=$2
//Else
//$check:=False
//End if

If (Count parameters:C259<2)
$check:=False:C215
End if
Expand Down Expand Up @@ -61,15 +53,8 @@ If (Not:C34(OB Is empty:C1297($range)))

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

If (Size of array:C274(WP_fontStyle)=1)
OBJECT SET ENABLED:C1123(*; "fontStyle"; False:C215)
Else
OBJECT SET ENABLED:C1123(*; "fontStyle"; True:C214)
End if
WP_FillFontStyles($fontFamily) //ACI0104450

WP GET ATTRIBUTES:C1345($range; wk font:K81:69; $font)
$p:=Find in array:C230(WP_fontLongName; $font)
Expand Down
2 changes: 1 addition & 1 deletion Project/Sources/catalog.4DCatalog
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<field name="title" uuid="19F64DF6BDDD4615A1EEC9F1978DBD56" type="10" limiting_length="255" never_null="true" id="3"/>
<field name="group" uuid="47208754D7924C1E8357A182DBB2A1CC" type="3" never_null="true" id="4"/>
<primary_key field_name="ID" field_uuid="25E1AC17AE3D4D5FBED8BEFDB6E6B6DC"/>
<table_extra input_form="InputToolBar" output_form="Output">
<table_extra input_form="InputSideBar" output_form="Output">
<editor_table_info displayable_fields_count="6">
<color red="255" green="255" blue="255" alpha="0"/>
<coordinates left="41.5" top="16.453125" width="120" height="167.33203125"/>
Expand Down

0 comments on commit 748753e

Please sign in to comment.