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

            Bug ID: 162807
           Summary: Macro recording fail / .uno:LeftRightMargin regression
           Product: LibreOffice
           Version: 24.2.5.2 release
          Hardware: All
                OS: Linux (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: [email protected]
          Reporter: [email protected]

Using LibreOffice from Ubuntu 24.04. repositories, here is version info

Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: gtk3, Wayland
Locale: sr-RS (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:24.2.5-0ubuntu0.24.04.2
Calc: threaded


Some of my old macros for setting margins in writer document fail since upgrade
to Ubuntu 24.04 (Libreoffice 24.2.5.2). Here is the code of a macro that is
failing to set margins:

  dim args1(3) as new com.sun.star.beans.PropertyValue
  args1(0).Name = "LeftRightMargin.LeftMargin"  
  args1(0).Value = 0
  args1(1).Name = "LeftRightMargin.TextLeftMargin"
  args1(1).Value = 0
  args1(2).Name = "LeftRightMargin.RightMargin"
  args1(2).Value = 0
  args1(3).Name = "LeftRightMargin.FirstLineIndent"
  args1(3).Value = 2540
  dispatcher.executeDispatch(document, ".uno:LeftRightMargin", "", 0, args1())

Looking at documentation for .uno:LeftRightMargin gives no parameters for
.uno:LeftRightMargin:
  .uno:LeftRightMargin          Edit            SID_ATTR_LRSPACE (10048) 


Ok, thinking, maybe it's a change in api, I tried to simply rerecord a macro by
just setting a margin and it also fails giving me the following:

document   = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:LeftRightParaMargin", "", 0,
Array())

So, no margins are being set at all in recorded macro (which kind of makes
sense since LeftRightParaMargin also has no params)

Steps to reproduce: Start recording macro, set margins for paragraph, stop
recording macro, inspect recorded code.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to