4545 $hasPasteMenu2 := False:C215
4646End if
4747
48- // If ($context="FrameBackground")
49- // $oSettings2:=(OBJECT Get pointer(Object named;"oSettings2"))->
50- // If (Not(OB Is empty($oSettings2)))
51- // $hasPasteMenu2:=True
52- // Else
53- // $hasPasteMenu2:=False
54- // End if
55- // End if
56-
5748// get the RANGE according to context ----------------------------------------------------------------------------------------------
5849
5950Case of
@@ -123,19 +114,21 @@ Case of
123114 : ($context= "Background")
124115
125116 APPEND MENU ITEM:C411 ($menu ; Get localized string:C991 ("CopyBackground" ))
126- SET MENU ITEM PARAMETER:C1004 ($menu ; - 1 ; "Copy1" )
117+ SET MENU ITEM PARAMETER:C1004 ($menu ; - 1 ; "CopyBackground" ) // <ACI0104196>
127118
128119 If ($hasPasteMenu1)
129120 APPEND MENU ITEM:C411 ($menu ; "(-" )
130121 End if
131122
132123 If ($hasPasteMenu1)
133124 APPEND MENU ITEM:C411 ($menu ; Get localized string:C991 ("PasteBackground" ))
134- SET MENU ITEM PARAMETER:C1004 ($menu ; - 1 ; "Paste1" )
125+ SET MENU ITEM PARAMETER:C1004 ($menu ; - 1 ; "PasteBackground" ) // <ACI0104196>
126+
135127 End if
136128
137129End case
138130
131+
139132// call the menu ------------------------------------------------------------------------------------------------------------------------------
140133$Parameter := Dynamic pop up menu:C1006 ($menu )
141134RELEASE MENU:C978 ($menu )
@@ -313,6 +306,11 @@ Case of
313306
314307 : ($context= "Background")
315308
309+ $oCurrent := Form:C1466 .selection // 2023/09/05 RL
310+ If (Not:C34 (Undefined:C82 ($oCurrent .container )))
311+ $oCurrent := $oCurrent .container
312+ End if
313+
316314 CLEAR VARIABLE:C89 (oSettings1)
317315
318316 // numeric values
@@ -335,6 +333,8 @@ Case of
335333 ARRAY TEXT:C222 ($_attributes ; 0 )
336334 APPEND TO ARRAY:C911 ($_attributes ; wk background width:K81:27 )
337335 APPEND TO ARRAY:C911 ($_attributes ; wk background height:K81:28 )
336+ APPEND TO ARRAY:C911 ($_attributes ; wk background image url:K81:220 ) // <ACI0104196>
337+
338338 $n := Size of array:C274 ($_attributes )
339339 For ($i; 1; $n)
340340 WP GET ATTRIBUTES:C1345 ($oCurrent ; $_attributes {$i }; $textValue )
@@ -344,9 +344,6 @@ Case of
344344 End for
345345 oSettings1:= oSettings1
346346
347- // +++
348- (OBJECT Get pointer:C1124 (Object named:K67:5 ; "bgndPictPreviewCopy" ))- > := (OBJECT Get pointer:C1124 (Object named:K67:5 ; "bgndPictPreview" ))- >
349-
350347
351348 End case
352349
@@ -360,6 +357,20 @@ Case of
360357 Case of
361358 : ($Parameter= "Paste1")
362359 $oSettings := oSettings1
360+
361+ : ($Parameter= "PasteBackground") // <ACI0104196>
362+
363+ $oSettings := oSettings1
364+
365+ $oCurrent := Form:C1466 .selection // 2023/09/05 RL
366+ If (Not:C34 (Undefined:C82 ($oCurrent .container )))
367+ $oCurrent := $oCurrent .container
368+ Else
369+ If ($oCurrent .type = wk type character:K81:296)
370+ $oCurrent := WP Paragraph range:C1346 (Form:C1466 .selection )
371+ End if
372+ End if
373+
363374 : ($Parameter= "Paste2")
364375 $oSettings := oSettings2
365376 End case
@@ -421,14 +432,6 @@ Case of
421432 End for
422433 End if
423434
424- If ($context= "Background")
425-
426- // $ptrPreview:=(OBJECT Get pointer(Object named;"bgndPictPreview"))
427- $ptrPreviewCopy := (OBJECT Get pointer:C1124 (Object named:K67:5 ; "bgndPictPreviewCopy" ))
428- // $ptrPreview->:=$ptrPreviewCopy->
429- WP_SetBackgroundPicture ($oCurrent ; $ptrPreviewCopy - > )
430-
431- End if
432435
433436 SET TIMER:C645 (- 1 )
434437
0 commit comments