<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - automatic backup during macro execution"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118904#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - automatic backup during macro execution"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118904">bug 118904</a>
from <span class="vcard"><a class="email" href="mailto:rbr146@yahoo.fr" title="BRANDT <rbr146@yahoo.fr>"> <span class="fn">BRANDT</span></a>
</span></b>
<pre>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é.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>