https://bugs.freedesktop.org/show_bug.cgi?id=73335

          Priority: medium
            Bug ID: 73335
          Assignee: libreoffice-bugs@lists.freedesktop.org
           Summary: FILESAVE: Misbehaving Macro corrupts .ods file when
                    tracking of changes is enabled
          Severity: minor
    Classification: Unclassified
                OS: All
          Reporter: polzin_spamprote...@gmx.de
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.1.4.2 release
         Component: Spreadsheet
           Product: LibreOffice

Created attachment 91562
  --> https://bugs.freedesktop.org/attachment.cgi?id=91562&action=edit
bug_before.ods is before the application of the macro

A corrupted .ods file will be written, when a VBA-macro does an insert of a
partial row with shifting of lines. This is forbidden in the GUI when tracking
of changes is enabled, but the macro was able to do this and broke the
content.xml. 

The macro:

Rem Attribute VBA_ModuleType=VBAModule
Option VBASupport 1
Sub Bug()
  Dim row As Long
  With ActiveSheet
    row = ActiveCell.row
    .Cells(row, 1).Range("A1:B1").Select
    Selection.Copy
    .Cells(row+1, 1).Range("A1:B1").Select
    Selection.Insert    
  End With  
End Sub

Replacing ".Range("A1:B1")" by ".EntireRow" makes the error go away.


bug_after.ods is after the application of the macro

xmllint content.xml gives:
-:2: parser error : Attribute table:id redefined
><table:tracked-changes><table:cell-content-change table:id="ct1" table:id="ct2"

I reported this before in #65363-

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to