https://bugs.documentfoundation.org/show_bug.cgi?id=163844
Bug ID: 163844
Summary: CopyRange: The method may not work correctly if the
target range contains merged cells.
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Create a new Calc document and run the macro:
Sub Test
Dim oSheet As Object
oSheet=ThisComponent.Sheets(0)
With oSheet
.getCellRangeByName("A1").setvalue 1 ' A1=1
.getCellRangeByName("A2:A3").merge True ' merge A2:A3
.getCellRangeByName("B3:B4").merge True ' merge B3:B4
' copy A1:A4 To B1:B4
.copyRange .getCellByPosition(1, 0).cellAddress,
.getCellRangeByName("A1:A4").RangeAddress
End With
End Sub
Result: Range not copied.
I think in the implementation of the copyRange method it is possible to unmerge
the cells in the target range at the beginning of the work.
See also: https://forumooo.ru/index.php?topic=11398.msg7102
--
You are receiving this mail because:
You are the assignee for the bug.