Bug 121213 - Autocorrection of Function Parameters and Static variables does not work
Summary: Autocorrection of Function Parameters and Static variables does not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.1.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: AutoCorrect-Complete Macro-StarBasic
  Show dependency treegraph
 
Reported: 2018-11-06 15:57 UTC by tsultana
Modified: 2020-04-18 09:28 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Basic IDE Tools | Options settings (49.48 KB, image/png)
2018-11-06 15:57 UTC, tsultana
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tsultana 2018-11-06 15:57:03 UTC
Created attachment 146365 [details]
Screenshot of Basic IDE Tools | Options settings

With Autocorrection enabled in the Basic IDE a variable declared with the Dim statement is correctly reformatted for any upper case letters.  If the variable is declared in a Sub/Function parameter or a Static variable AND has upper case letters then autocorrect does not work.

This is tested with LO 6.1.3 on Debian Linux and LO 6.1.1 on Win10.

Function test(iTest as Integer)
    Dim dABC as Double
    Static sText as String

    ' typing dabc changes to dABC to match the Dim statement
    dABC = 0
    ' typing itest does not change to iTest as declared in the function parameter
    msgbox itest & " append"
    ' type stext does not change to sText as declared in the Static statement
    stext = "this is a test"
End Function
Comment 1 Xisco Faulí 2019-01-22 16:23:19 UTC
Hello tsultana,
I don't see the 'Basic IDE' menu entry in the option dialog.
Could you please explain how you access to it ?
Comment 2 Xisco Faulí 2019-01-22 16:26:36 UTC
(In reply to Xisco Faulí from comment #1)
> Hello tsultana,
> I don't see the 'Basic IDE' menu entry in the option dialog.
> Could you please explain how you access to it ?

Ok, I found it, experimental features needs to be enabled...
Comment 3 Xisco Faulí 2019-03-21 12:36:21 UTC
Hello tsultana,
LibreOffice 6.2.2.2 is going to be released today, could you please try again
with this version to see if the problem has been resolved meanwhile? Thanks in
advance
Comment 5 himajin100000 2019-08-12 15:18:46 UTC
Should we add InsertFunctionParamVar thingy?

https://opengrok.libreoffice.org/xref/core/basic/source/classes/sbxmod.cxx?r=c88f7603#1695

Also, I guess we need to consider precedence in variable resolution.
local -> function params -> global, according to other code.

https://opengrok.libreoffice.org/xref/core/basic/source/comp/dim.cxx?r=9e6ca513#1247
Comment 6 QA Administrators 2020-03-16 02:36:31 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2020-04-16 03:37:30 UTC Comment hidden (obsolete)
Comment 8 Andreas Heinisch 2020-04-18 09:28:27 UTC
Error can be reproduced in:

Version: 6.3.3.2 (x64)
Build-ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU-Threads: 6; BS: Windows 10.0; UI-Render: GL; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL