Bugzilla – Attachment 117690 Details for
Bug 93127
named range changed after copy, paste
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
The macro called by the button (not relevant to problem)
LibreOffice-Button macro.txt (text/plain), 1.85 KB, created by
David Lochrin
on 2015-08-06 02:43:37 UTC
(
hide
)
Description:
The macro called by the button (not relevant to problem)
Filename:
MIME Type:
Creator:
David Lochrin
Created:
2015-08-06 02:43:37 UTC
Size:
1.85 KB
patch
obsolete
>REM ***** BASIC ***** > >Sub PertUpdate > >' ------------------------------------------------------------------------ >' This macro is intended to be called from a Calc "push button" and >' its only purpose is to run an add-in function implemented in Java. >' This can be useful when the add-in function must process a whole sheet >' on a specified event (when the button is clicked in this case) rather >' than returning a cell value automatically. >' ------------------------------------------------------------------------ > >Dim oActSheet As Object >Dim oCellRange As Object >Dim aArray() >Dim NewStates() As String >Dim Status As Integer >' >' Find the three column arrays to be used as arguments for the PERT add-in >' and its output, and verify they are defined. These are the named ranges: >' "Tasks" "Dependencies" and "States". >' >oActSheet = ThisComponent.getCurrentController().getActiveSheet() >If NOT oActSheet.NamedRanges.hasByName("Tasks") Then > Status = MsgBox ("Tasks not defined.", 0, "") > Exit Sub >End If >If NOT oActSheet.NamedRanges.hasByName("Dependencies") Then > Status = MsgBox ("Dependencies not defined.", 0, "") > Exit Sub >End If >If NOT oActSheet.NamedRanges.hasByName("States") Then > Status = MsgBox ("States not defined.", 0, "") > Exit Sub >End If >If NOT oActSheet.NamedRanges.hasByName("NewStates") Then > Status = MsgBox ("NewStates not defined.", 0, "") > Exit Sub >End If >' >' Select the output range and set the array formula, then read the values >' (double or string) into an array and write the results back less the formula. >' >sFormula = "au.nsw.adl.pert.CalcDL2.updateTasks(Tasks;Dependencies;States)" >oCellRange = oActSheet.getCellRangeByName("NewStates") >oCellRange.setArrayFormula(sFormula) >aArray = oCellRange.getDataArray(oCellRange) >oCellRange.setDataArray(aArray) >' >Exit Sub >' >End Sub > >' ------------------------------------------------------------------------
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 93127
:
117689
| 117690