wizards/source/sfdocuments/SF_Calc.xba     |   15 ++++++---------
 wizards/source/sfdocuments/SF_Document.xba |    2 +-
 wizards/source/sfdocuments/script.xlb      |   22 +++++++++++-----------
 3 files changed, 18 insertions(+), 21 deletions(-)

New commits:
commit 38bc68ba4b6e9f516983bec19d3b16b53223dbf0
Author:     Jean-Pierre Ledure <[email protected]>
AuthorDate: Mon Jan 12 12:36:33 2026 +0100
Commit:     Jean-Pierre Ledure <[email protected]>
CommitDate: Mon Jan 12 17:23:01 2026 +0100

    ScriptForge (Calc) FormatRange() fix new formats
    
    New formats should not be deleted after
    use. Anyway they are stored in the
    document, not at install level.
    
    +
    
    A few typos in comments.
    
    No change in user documentation.
    
    Change-Id: I839fa0d86abdaf521a12b0d97978cf225cc8088e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197090
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <[email protected]>

diff --git a/wizards/source/sfdocuments/SF_Calc.xba 
b/wizards/source/sfdocuments/SF_Calc.xba
index fbec5e4873a1..9b920ad073d6 100644
--- a/wizards/source/sfdocuments/SF_Calc.xba
+++ b/wizards/source/sfdocuments/SF_Calc.xba
@@ -492,7 +492,7 @@ Public Function AlignRange(Optional ByVal TargetRange As 
Variant _
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             A string representing the updated range
 &apos;&apos;&apos;     Examples:
-&apos;&apos;&apos;             oDoc.AlignRange(&quot;SheetX.A1:J30&quot;, 
&quot;Middle,Center&quot;, FilterFormula := &quot;IsNumeric(A1), FilterScope := 
&quot;CELL&quot;)
+&apos;&apos;&apos;             oDoc.AlignRange(&quot;SheetX.A1:J30&quot;, 
&quot;Middle,Center&quot;, FilterFormula := &quot;=IsNumeric(A1), FilterScope 
:= &quot;CELL&quot;)
 &apos;&apos;&apos;                     &apos;  Align to the middle of the 
cells, horizontally and vertically
 
 Dim sAlign As String                   &apos;  Return value
@@ -578,7 +578,7 @@ Public Function BorderRange(Optional ByVal TargetRange As 
Variant _
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             A string representing the updated range
 &apos;&apos;&apos;     Examples:
-&apos;&apos;&apos;             oDoc.BorderRange(&quot;SheetX.A1:J30&quot;, 
&quot;HB&quot;, FilterFormula := &quot;IsNumeric(A1), FilterScope := 
&quot;CELL&quot;)
+&apos;&apos;&apos;             oDoc.BorderRange(&quot;SheetX.A1:J30&quot;, 
&quot;HB&quot;, FilterFormula := &quot;=IsNumeric(A1), FilterScope := 
&quot;CELL&quot;)
 &apos;&apos;&apos;                     &apos;  Border with a bottom line, 
including the horizontal inner lines
 
 Dim sBorder As String                  &apos;  Return value
@@ -729,7 +729,7 @@ Public Function ColorizeRange(Optional ByVal TargetRange As 
Variant _
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             A string representing the updated range
 &apos;&apos;&apos;     Examples:
-&apos;&apos;&apos;             oDoc.ColorizeRange(&quot;SheetX.A1:J30&quot;, 
Background := RGB(255, 0, 0), FilterFormula := &quot;IsNumeric(A1), FilterScope 
:= &quot;CELL&quot;)
+&apos;&apos;&apos;             oDoc.ColorizeRange(&quot;SheetX.A1:J30&quot;, 
Background := RGB(255, 0, 0), FilterFormula := &quot;=IsNumeric(A1), 
FilterScope := &quot;CELL&quot;)
 &apos;&apos;&apos;                     &apos;  Paint the cell(s) in red.
 
 Dim sColorize As String                        &apos;  Return value
@@ -1814,7 +1814,7 @@ Public Function DecorateFont(Optional ByVal TargetRange 
As Variant _
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             A string representing the updated range
 &apos;&apos;&apos;     Examples:
-&apos;&apos;&apos;             oDoc.DecorateFont(&quot;SheetX.A1:J30&quot;, 
FontSize := 15, Decoration := &quot;BU&quot;, FilterFormula := 
&quot;IsNumeric(A1), FilterScope := &quot;CELL&quot;)
+&apos;&apos;&apos;             oDoc.DecorateFont(&quot;SheetX.A1:J30&quot;, 
FontSize := 15, Decoration := &quot;BU&quot;, FilterFormula := 
&quot;=IsNumeric(A1), FilterScope := &quot;CELL&quot;)
 &apos;&apos;&apos;                     &apos;  Modify the font size and apply 
bold and underline properties to the numeric cells
 
 Dim sDecorate As String                        &apos;  Return value
@@ -2083,7 +2083,7 @@ Public Function FormatRange(Optional ByVal TargetRange As 
Variant _
                                                        ) As String
 &apos;&apos;&apos;     Apply a given number format to a cell or a range of 
cells.
 &apos;&apos;&apos;     The cells range may be filtered with a filter formula 
and its scope.
-&apos;&apos;&apos;     If the given format does not exist, it is created and 
suppressed immediately.
+&apos;&apos;&apos;     If the given format does not exist, it is created.
 &apos;&apos;&apos;     Args:
 &apos;&apos;&apos;             TargetRange : the cell or the range as a string 
that should receive the format
 &apos;&apos;&apos;             NumberFormat: the format to apply, as a string
@@ -2096,7 +2096,7 @@ Public Function FormatRange(Optional ByVal TargetRange As 
Variant _
 &apos;&apos;&apos;     Returns:
 &apos;&apos;&apos;             A string representing the updated range
 &apos;&apos;&apos;     Examples:
-&apos;&apos;&apos;             oDoc.FormatRange(&quot;SheetX.A1:J30&quot;, 
&quot;0,00E+00&quot;, FilterFormula := &quot;IsNumeric(A1), FilterScope := 
&quot;CELL&quot;)
+&apos;&apos;&apos;             oDoc.FormatRange(&quot;SheetX.A1:J30&quot;, 
&quot;0,00E+00&quot;, FilterFormula := &quot;=IsNumeric(A1), FilterScope := 
&quot;CELL&quot;)
 &apos;&apos;&apos;                     &apos;  Format only the cells 
containing a numeric value
 
 Dim sFormat As String                  &apos;  Return value
@@ -2156,9 +2156,6 @@ Try:
                For Each oFRange In vRanges
                        oFRange.XCellRange.NumberFormat = lFormatID
                Next oFRange
-
-               &apos;  Delete the new format
-               If bNew Then .removeByKey(lFormatID)
        End With
 
        sFormat = oRange.RangeName
diff --git a/wizards/source/sfdocuments/SF_Document.xba 
b/wizards/source/sfdocuments/SF_Document.xba
index 4a4abd7870e9..d79296304fc2 100644
--- a/wizards/source/sfdocuments/SF_Document.xba
+++ b/wizards/source/sfdocuments/SF_Document.xba
@@ -2330,4 +2330,4 @@ Private Function _Repr() As String
 End Function   &apos;  SFDocuments.SF_Document._Repr
 
 REM ============================================ END OF SFDOCUMENTS.SF_DOCUMENT
-</script:module>
+</script:module>
\ No newline at end of file
diff --git a/wizards/source/sfdocuments/script.xlb 
b/wizards/source/sfdocuments/script.xlb
index a1612cbe24d7..aaa2f8524e29 100644
--- a/wizards/source/sfdocuments/script.xlb
+++ b/wizards/source/sfdocuments/script.xlb
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 
1.0//EN" "library.dtd">
 <library:library xmlns:library="http://openoffice.org/2000/library"; 
library:name="SFDocuments" library:readonly="false" 
library:passwordprotected="false">
- <library:element library:name="__License"/>
- <library:element library:name="SF_Form"/>
- <library:element library:name="SF_DocumentListener"/>
- <library:element library:name="SF_Document"/>
- <library:element library:name="SF_Calc"/>
- <library:element library:name="SF_Writer"/>
- <library:element library:name="SF_Register"/>
- <library:element library:name="SF_Base"/>
- <library:element library:name="SF_Shape"/>
- <library:element library:name="SF_FormControl"/>
- <library:element library:name="SF_FormDocument"/>
  <library:element library:name="SF_Chart"/>
+ <library:element library:name="SF_FormDocument"/>
+ <library:element library:name="SF_FormControl"/>
+ <library:element library:name="SF_Shape"/>
+ <library:element library:name="SF_Base"/>
+ <library:element library:name="SF_Register"/>
+ <library:element library:name="SF_Writer"/>
+ <library:element library:name="SF_Calc"/>
+ <library:element library:name="SF_Document"/>
+ <library:element library:name="SF_DocumentListener"/>
+ <library:element library:name="SF_Form"/>
+ <library:element library:name="__License"/>
 </library:library>
\ No newline at end of file

Reply via email to