wizards/source/scriptforge/SF_Platform.xba |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b42a94c6fdc3c1cf2b4266c3642ca20c696a9d9d
Author:     Jean-Pierre Ledure <j...@ledure.be>
AuthorDate: Sat Oct 2 12:54:28 2021 +0200
Commit:     Jean-Pierre Ledure <j...@ledure.be>
CommitDate: Sat Oct 2 13:49:40 2021 +0200

    ScriptForge - (SF_Platform) increase speed of Fonts property
    
    Tests have proven that the use of a case sensitive search
    on long strings improves significantly the execution
    performance.
    
    The number of fonts being potentially huge (2-3K), the change
    in the InStr() Basic function of the Compare argument
    can divide the execution duration by factors in the range > 5.
    
    Change-Id: I248ff88cd2cb5a2753e7749f8d512ad44b5fc8d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122979
    Tested-by: Jean-Pierre Ledure <j...@ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <j...@ledure.be>

diff --git a/wizards/source/scriptforge/SF_Platform.xba 
b/wizards/source/scriptforge/SF_Platform.xba
index 703ae195b942..c504de6b9809 100644
--- a/wizards/source/scriptforge/SF_Platform.xba
+++ b/wizards/source/scriptforge/SF_Platform.xba
@@ -346,7 +346,7 @@ Const cstSubArgs = &quot;&quot;
                        &apos;  Select only not yet registered fonts
                        For i = 0 To UBound(oFontDescriptors)
                                sFont = oFontDescriptors(i).Name
-                               If InStr(sFonts, &quot;,&quot; &amp; sFont 
&amp; &quot;,&quot;) = 0  Then sFonts = sFonts &amp; sFont &amp; &quot;,&quot;
+                               If InStr(1, sFonts, &quot;,&quot; &amp; sFont 
&amp; &quot;,&quot;, 0) = 0  Then sFonts = sFonts &amp; sFont &amp; 
&quot;,&quot; &apos; Case-sensitive comparison
                        Next i
                        &apos;  Remove leading and trailing commas
                        If Len(sFonts) &gt; 1 Then _PropertyGet = 
Split(Mid(sFonts, 2, Len(sFonts) - 2), &quot;,&quot;) Else _PropertyGet = 
Array()

Reply via email to