writer print current page

For years, I have use a macro to print the current page of a writer document, as advocated by Andrew Pitonyak and others. Recently, instead of printing the page, it calls up the print dialogue. Any reason why this would be?

sub PrintPage
Dim oVC as Object, CurrentPage$, Props(1) As New com.sun.star.beans.PropertyValue
  oVC = ThisComponent.CurrentController.getViewCursor
  CurrentPage = trim(Str(oVC.getPage))
  Props(0).Name = "Pages" : Props(0).Value = CurrentPage
  ThisComponent.print(Props)
end sub 'PrintPage

Looks like regression deserving a bug report. Likely related to print dialog rework.

I also use the same macro. However, it works for me in LO 6.4.0.3, thus, the question is recently in your report?

Looks like regression

Oh, there are so many things in macros, in extensions broken by LO developers…

Oh, there are so many things in macros, in extensions broken by LO developers…

I guess so. Sometimes the changes are intentional, and then they go to the release notes as incompatible changes. Often they are accidental regressions though; I myself remember fixing several. For each such fix, I create a unit test, to make it harder to break that function in the future. So filing bugs is as essential to avoid regressions in API, as with other bugs.

The problem is that sometimes it is difficult to determine if a report is justified and will be accepted by developers. For example, if a DOCX file opens with lost/garbled formatting, it is a sure case for a report because LibreOffice claims to be compatible with the DOCX format. However (a real-life case), if LibreOffice rejects an extension that installs and runs in Apache OpenOffice, is it enough for a report? LibreOffice does not claim to accept any particular extension. Or if my macro, that used to run fine since OOo 1.0 up to the last 3.4, does not run in the present LibreOffice, is it a case? Again, LibreOffice does not claim to run my macro.

@gabix: IMO any such case should be reported. It worked, then it doesn’t work anymore. That’s it. No claims are required to be entitled to report.

(I realize that you are experienced person, so writing the following just for completeness:)

What should be noted is the correct expectations. When one reports to bugzilla, it is great contribution; yet to avoid grief, one needs to realize that closed bug report (e.g. WONTFIX or NOTABUG) is a valid result, and is not an offence. (Me personally has many issues reported, that were eventually closed like that; and of course, I closed quite a few others’ reports with those resolutions.) So it’s essential to be prepared that a report is closed that way, and not be depressed because of that, and continue filing bugs in positive way.

Thanks to both for this commentary. I should have said I’m using LO6.4.3.2 on Ubuntu 18.04. I’m not certain which version last worked, but but 6.4.1 didn’t work, and I’ve just checked 6.3.2 appimage which works. I’ll report it.

On further investigation, resetting the profile fixes this problem. This is actually quite annoying. I’ve had issues like this before, and the solution is to reset the whole profile, or perhaps delete registrymodifications.xcu. But a lot of things, settings and macros in particular, are lost which are probably problem free. Is there a way to track down what part of the profile is causing the problem?