Window bug on C#

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Bl2ke
Posts: 4
Joined: Thu Nov 24, 2022 4:36 pm

Window bug on C#

Post by Bl2ke »

Hi, when I open the file in hidden mode:

Code: Select all

PropertyValue[] arr = new PropertyValue[2];
arr[0] = new PropertyValue();
arr[0].Name = "Hidden";
arr[0].Value = new uno.Any(true);

XComponent xComponent = aLoader.loadComponentFromURL(
   filePathUri, "_default", 0, arr);
   
And after using XClosable.close or XDesktop.terminate if my application was previously opened in fullscreen, then after opening LibreOffice, the window size changes to the one in the screenshot
BS6p1U7.jpeg
BS6p1U7.jpeg (118.02 KiB) Viewed 782 times
Can anyone advice, how to fix that?
LibreOffice 7.4 on Windows 11
JeJe
Volunteer
Posts: 2784
Joined: Wed Mar 09, 2016 2:40 pm

Re: Window bug on C#

Post by JeJe »

Have you tried closing full screen mode before closing the document?
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Bl2ke
Posts: 4
Joined: Thu Nov 24, 2022 4:36 pm

Re: Window bug on C#

Post by Bl2ke »

JeJe wrote: Fri Nov 25, 2022 7:56 pm Have you tried closing full screen mode before closing the document?
By fullscreen mode I meant the maximum window size
1. I open libreoffice, set the maximum window size
2. Open and close the file using the code
3. Open libreoffice again and the window size is changed
LibreOffice 7.4 on Windows 11
JeJe
Volunteer
Posts: 2784
Joined: Wed Mar 09, 2016 2:40 pm

Re: Window bug on C#

Post by JeJe »

With full screen mode the whole desktop is covered by the window and there is no titlebar.

If you mean the maximized window that you get by clicking on the maximize/restore button on the top right of the titlebar - that's a maximized window.

You can also use setpossize to set the window in normal (restored) position to the biggest size your OS will allow while remaining normal

I assume you mean the window reopens at the size of the two red arrows.

This isn't a place for bug reports - we're just fellow users.

You can use isMaximized and setpossize with the Tools menu/customize/view created event to open your windows with whatever maximized state or normal size you'd like.

Or you could play around with changing the visible state/maximized state/possize before closing to see if you can change what happens on reopening.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Bl2ke
Posts: 4
Joined: Thu Nov 24, 2022 4:36 pm

Re: Window bug on C#

Post by Bl2ke »

Yes, I mean about maximized window.
Thanks for advices, l also found that after XClosable.close or XDesktop.terminate overwrites in config file registrymodifications.xcu one of the parameters, which, as I understand it, is responsible for the size of the window
LibreOffice 7.4 on Windows 11
Post Reply