[Libreoffice-bugs] [Bug 118904] automatic backup during macro execution
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Sep 2 12:46:04 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=118904
--- Comment #8 from BRANDT <rbr146 at yahoo.fr> ---
i just see that i loosed the message i entered with the attachments.
so the macro TESTBUG :
Sub TestBug
rem ----------------------------------------------------------------------
rem Macro used to test the automatic backup bug
rem ----------------------------------------------------------------------
dim answ1, answ2, answ3, answ4 as string
answ1 = inputbox("1st line")
answ2 = inputbox("Number of lines to insert ?")
answ3 = inputbox("Number of times for the loop ?")
answ4 = inputbox("number of lines to skip ?")
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")
dim args0(0) as new com.sun.star.beans.PropertyValue
args0(0).Name = "Nr"
args0(0).Value = 1
dispatcher.executeDispatch(document, ".§ ", "", 0, args0())
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "ToPoint"
rem access to first cell to get the start value
osheets = Thiscomponent.getSheets()
osheet = osheets.getByIndex(0)
ocell1 = osheet.getCellByPosition(0, 0)
Lcell = ocell1.getValue()
nu1 = val(answ1) rem line to start
nu2 = val(answ2) rem number of lines to insert
nu3 = val(answ3) rem number of times we loop to insert lines
nu4 = val(answ4) rem how many lines we skip before next insert
for j = 1 to nu3
args1(0).Value = "$A$" & Cint(nu1)
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:InsertRows", "", 0, Array())
for i = 1 to nu2 - 1
dispatcher.executeDispatch(document, ".uno:Repeat", "", 0, Array())
next i
nu1 = nu1 + nu2
ocell1 = osheet.getCellByPosition(0, nu1)
Lcell = Lcell + 1
ocell1.Value = Lcell
nu1 = nu1 + nu4 rem skip nu4 lines
next j
end sub
********************************
this macro ask four things :
1 - on which line we start
2 - how many lines we insert
3 - how many times we loop on the inserts
4 - how many lines we skip before next insert
I run it with start on line 2, insert 2 lines, loop 1500 times and skip 3
lines,
that gives image before and after the execution.
I tryed but can't reproduce the bug.
René.
--
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/20180902/191b97a7/attachment.html>
More information about the Libreoffice-bugs
mailing list