Bug 152248 - LibreOffice window size bug after using XClosable.close or XDesktop.terminate on C#
Summary: LibreOffice window size bug after using XClosable.close or XDesktop.terminate...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.4.3.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-27 12:23 UTC by Vitaly
Modified: 2022-11-27 16:44 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly 2022-11-27 12:23:16 UTC
Description:
LibreOffice and SDK 7.4.3

This example for LibreOffice Writer:

using unoidl.com.sun.star.lang;
using unoidl.com.sun.star.uno;
using unoidl.com.sun.star.frame;
using unoidl.com.sun.star.util;
using unoidl.com.sun.star.beans;

namespace LibreOffice
{
    internal class Program
    {
        static void Main(string[] args)
        {
            XComponentContext m_xContext = uno.util.Bootstrap.bootstrap();
            XMultiServiceFactory mxMSFactory = (XMultiServiceFactory)m_xContext.getServiceManager();

            XComponentLoader aLoader = (XComponentLoader)
            mxMSFactory.createInstance("com.sun.star.frame.Desktop");

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

            XComponent xComponent = aLoader.loadComponentFromURL(
                "private:factory/swriter", "_default", 0,
                arr);

            XCloseable close = (XCloseable)xComponent;
            close.close(false);
            XDesktop desktop = (XDesktop)aLoader;
            desktop.terminate();
        }
    }
}


Steps to Reproduce:
1.Create .NET framework 4.8 project (.net 6 is not supported)
2.Open LibreOffice Writer as usual application 
3.Set the maximum window size and close LibreOffice
4.Complete code in description
5.Open again LibreOffice Writer 

Actual Results:
Window size changed

Expected Results:
Window size shoudn't changed


Reproducible: Always


User Profile Reset: Yes

Additional Info:
I noticed, that after using XClosable.close or XDesktop.terminate the config file registrymodifications.xcu is overwritten