1vJ7IguEWBfVakYkVCE5n3 changeset

Changeset353338353339 (b)
Parent656331373462 (a)
ab
1010                        Next
1111        End Select
1212End Sub
...
13-2
13+
...
1414Sub RangeReplaceHyperlink(ByVal address)
1515        sheet = ThisComponent.Sheets(address.Sheet)
...
16-        For y = address.StartRow To address.EndRow
16-                For x = address.StartColumn To address.EndColumn
16-                        ReplaceHyperlink(sheet.getCellByPosition(x, y))
16+        For x = address.StartColumn To address.EndColumn
16+                For y = address.StartRow To address.EndRow
16+                        cell = sheet.getCellByPosition(x, y)
16+                        If (cell.String = "") Then
16+                                Exit For
16+                        End If
16+                        ReplaceHyperlink(cell)
...
1919                Next
2020        Next
2121End Sub
2222
2323Sub ReplaceHyperlink(ByVal cell)
...
24-        If (cell.String = "") Then
24-                Exit Sub
24-        End If
...
2727        hyperlink = ThisComponent.createInstance("com.sun.star.text.TextField.URL")
2828        hyperlink.Representation = cell.String
2929        hyperlink.URL = cell.String
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- Revision 656331373462
+++ Revision 353338353339
@@ -11,20 +11,21 @@
Next
End Select
End Sub
-2
+
Sub RangeReplaceHyperlink(ByVal address)
sheet = ThisComponent.Sheets(address.Sheet)
- For y = address.StartRow To address.EndRow
- For x = address.StartColumn To address.EndColumn
- ReplaceHyperlink(sheet.getCellByPosition(x, y))
+ For x = address.StartColumn To address.EndColumn
+ For y = address.StartRow To address.EndRow
+ cell = sheet.getCellByPosition(x, y)
+ If (cell.String = "") Then
+ Exit For
+ End If
+ ReplaceHyperlink(cell)
Next
Next
End Sub
Sub ReplaceHyperlink(ByVal cell)
- If (cell.String = "") Then
- Exit Sub
- End If
hyperlink = ThisComponent.createInstance("com.sun.star.text.TextField.URL")
hyperlink.Representation = cell.String
hyperlink.URL = cell.String