[Libreoffice-bugs] [Bug 140618] New: Writer, Calc: Problem with macro for on/off Automatic Spell Checking
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Tue Feb 23 10:07:37 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=140618
Bug ID: 140618
Summary: Writer, Calc: Problem with macro for on/off Automatic
Spell Checking
Product: LibreOffice
Version: 7.2.0.0.alpha0+ Master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: kamlan at post.cz
Part1:
Type some incorrect text to the Sheet. Run the macro in Basic Editor (menu Run/
Run) and in Calc it doesn't funct - Automatic Spell Checking will not be
activate/deactivate.
But if you run macro from the Calc menu (Tools/ Macros/ Run macro) then it
runs.
For Writer it runs from the Basic Editor and also from the Writer menu.
It is problem in all tested versions - 7.0.4.2/7.1.1.1/7.2.0.0.alpha0+
Windows7/10x64
Macro is edited (add msgbox) Macro Record from version 7.0.4.2:
Sub AutomaticSpellCheckingOnOff 'activate or deactivate Automatic Spell
Checking
dim document as object, dispatcher as object
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name="SpellOnline"
if msgbox("Yes = Activate Automatic Spell Checking" & chr(13) &
"No = Deactivate it",4)=6 then 'Activate/Deactivate Automatic Spell Checking
args1(0).Value=true 'non-functional for Run in Basic
Editor
else
args1(0).Value=false 'non-functional for Run in Basic
Editor
end if
document=ThisComponent.CurrentController.Frame
dispatcher=createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:SpellOnline", "", 0,
args1()) 'Macro Record in 7.0.4.2 saves parameter args1()
End Sub
--------------------------
Part2:
In 7.1.1.1/7.2.0.0.alpha0+ it ignores the parameter args1() in the command
dispatcher.executeDispatch(document, ".uno:SpellOnline", "", 0, args1()) in the
upper macro, so it is possible only to flip ON/OFF, but not to set only ON or
to set only OFF.
In these versions, the Tools/ Macros/ Record Macro saves on/off Automatic Spell
Checking with the empty parameter Array() ->
dispatcher.executeDispatch(document, ".uno:SpellOnline", "", 0, Array()).
Macro Record from 7.1.1.1:
sub RecordSpellCheckOnOff
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:SpellOnline", "", 0, Array()) 'Macro
Record in 7.1.1.1 saves empty parameter Array()
end sub
Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 2; OS: Windows 6.1 Service Pack 1 Build 7601; UI render:
Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: en-GB
Calc: CL
Version: 7.1.1.1 (x64) / LibreOffice Community
Build ID: 575c5867c4cc13d7ae78f9ce39a54a52ed38c769
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 576c6054d8d445cc977fc3789c572cfc2a3ccd83
CPU threads: 8; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: cs-CZ (cs_CZ); UI: cs-CZ
Calc: CL
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210223/015cfeb1/attachment.htm>
More information about the Libreoffice-bugs
mailing list