[Libreoffice-bugs] [Bug 111731] New: changing properties of inserted graphic-objects via macro (Basic) causes file store error

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 12 15:51:09 UTC 2017


https://bugs.documentfoundation.org/show_bug.cgi?id=111731

            Bug ID: 111731
           Summary: changing properties of inserted graphic-objects via
                    macro (Basic) causes file store error
           Product: LibreOffice
           Version: 5.3.1.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: tk at mic-consulting.de

Created attachment 135491
  --> https://bugs.documentfoundation.org/attachment.cgi?id=135491&action=edit
error message during storing prozess

situation:

You do have a writer document and insert a picture/graphic via UI (Icon or menu
insert-> picture). 
- store that file.  

Everything is ok.

Now you manipulate the properties of ths graphic object via API - in ths case
with basic macros. 

- I checked size, position and some others.

- works fine during processing and visible on screen (UI).

Try to store document afterwards it will cause a error message, that the
"content.xml" can not be written. (see attaches pic 1).

You cannot store document - not even with "store as".

You can kill the document.... or delete the manipulated graphic. this takes
away the error. 

Attached is a sample-file to show the behaviour:
Store the file on a local drive. Open it. accept Macros.

add same text or something. store the file  -> ok

select the graphic, run the macro. Pic ist reduced in size. 

now try to store the doc again.....


Included small macro just for test:

#######
Sub ChangeBildSize

  oDoc = thisComponent

  sName = oDoc.CurrentController.ViewCursor.textframe.name

'msgbox sName

  oObj = oDoc.GraphicObjects.getbyName(sName) 
REM Change size
  oSize = oObj.getSize()
  oSize.Height = oSize.Height/2
  oSize.Width = oSize.Width/2
  oObj.setSize(oSize)

End Sub
#######

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170812/2891f0ac/attachment.html>


More information about the Libreoffice-bugs mailing list