as found out after ailing with Noel Gradin the com.sun.star.awt.DisplayAccess was removed by Noel http://cgit.freedesktop.org/libreoffice/core/commit/?id=dde234b6955a421d51d2b37e4fc3972c660146f0 but since there is no alternative to find oud the screen size of the machine where LO is runnning the proposed solution: otoolkit = createUnoService("com.sun.star.awt.Toolkit") aWorkRect = otoolkit.getWorkArea() is not working because empty values in the WorkArea so please make oDisplayAccess= createUnoService("com.sun.star.awt.DisplayAccess") oDisplayInfo = oDisplayAccess.getByIndex(0) aScreenArea = oDisplayInfo.ScreenArea iScreenW = aScreenArea.Width iScreenH = aScreenArea.Height working again Operating System: All Version: 4.0.1.2 release Last worked in: 4.0.4.2 release
The version info looks strange: you're reporting the issue against 4.0.1.2 and saying it works in 4.0.4.2. It doesn't make much sense if the issue has already been fixed in a subsequent release.
sorry was removed for 4.1
I can confirm the report Thanks for the info, Fernard.
Noel's, Stephan, Michael, do you have any idea how to get out of this trap, please?
I removed this in http://cgit.freedesktop.org/libreoffice/core/commit/?id=dde234b6955a421d51d2b37e4fc3972c660146f0 because I thought it was a purely internal API. The piece of internal machinery it is exposing is this: sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); Rectangle aWorkRect = Application::GetWorkAreaPosSizePixel( nDisplay ); I see three choices: (a) restore the old API, by reverting that part of the commit (b) Make the following OOBasic code work properly: XToolkit toolkit = createUnoService("com.sun.star.awt.Toolkit") Rectangle aWorkRect = toolkit->getWorkArea() This API currently exists, but unconditionally returns an empty rectangle. (c) design a new API The code for option (b) in VCLXToolkit::getWorkArea() currently has the comment: // 07/00: AppWindow doesn't exist anymore... And it's so old, it belongs to the initial import, so I can't figure out any more about it. I'm happy to do any of the above.
(In reply to comment #5) Using > The piece of internal machinery it is exposing is this: > sal_Int32 nDisplay = Application::GetDisplayBuiltInScreen(); > Rectangle aWorkRect = Application::GetWorkAreaPosSizePixel( nDisplay ); to make > (b) Make the following OOBasic code work properly: > XToolkit toolkit = createUnoService("com.sun.star.awt.Toolkit") > Rectangle aWorkRect = toolkit->getWorkArea() > This API currently exists, but unconditionally returns an empty > rectangle. work sounds like a good approach to me.
Looks like something we should restore IMHO. The "WorkArea" concept is however rather problematic. I believe the backends try to expose this as "the area of screen not covered by a panel at the bottom / top / side" etc. I would really prefer this to be (as the user suggests) exposing the screen size. Otherwise I guess it should go back ?
Lionel A: After googling you will see that there is not so match code around whou uses com.sun.star.awt.DisplayAccess. + it was undocumented stuff B: nice if the Toolkit does what it promise, giving us the dimensions of a work area C: Super when you can bring in also the stuff to detect the behaviour of multi screening. Maybe you do B: now and C later ? Thanks for the intersest
Guys, please continue to sort this out. I will just slightly lower the severity. It does not look as a core functionality used by most users. We could solve this in the bugfix releases => it should not block the release.
Noel Grandin committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=99d8ce56ecfc4af77cf9b2dc1120d821cba20bee fdo#66762 - Other: com.sun.star.awt.DisplayAccess removed The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Noel Grandin committed a patch related to this issue. It has been pushed to "libreoffice-4-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=48d7af8ad317b1919e83e7925c5809e8a96d5303&h=libreoffice-4-1 fdo#66762 - Other: com.sun.star.awt.DisplayAccess removed It will be available in LibreOffice 4.1.1. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.