Re: problems with LayerTabBar in unit tests
Hi Thorsten, Thorsten Behrens schrieb am 10-Oct-18 um 23:20: Hi Regina, Regina Henschel wrote: So I still need to investigate what is missing. If you can make it - perhaps something to look into for the Munich Hackfest? https://wiki.documentfoundation.org/Hackfest/Muenchen2018 I will not come to Munich Hackfest. Besides that, I have a solution now. You can examine it in https://gerrit.libreoffice.org/#/c/61545/ Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: problems with LayerTabBar in unit tests
Hi Regina, Regina Henschel wrote: > So I still need to investigate what is missing. > If you can make it - perhaps something to look into for the Munich Hackfest? https://wiki.documentfoundation.org/Hackfest/Muenchen2018 Cheers, -- Thorsten signature.asc Description: PGP signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: problems with LayerTabBar in unit tests
Hello all, Markus Mohrhard schrieb am 08-Oct-18 um 22:42: Hello Regina, On Mon, Oct 8, 2018 at 7:54 PM Regina Henschel mailto:rb.hensc...@t-online.de>> wrote: Hi all, does no one has an idea? I have put the problem as patch to Gerrit https://gerrit.libreoffice.org/61545. Perhaps my problem is easier understandable then. Problem: If I use the "Load"-method, I get the document loaded, but only the center pane has the correct size. All other window sizes have suspicious values. Especially the LayerTabBar has width 0, and therefore a click on it is not possible. But that would be needed for the unit test. Many of the unit tests actually don't include any parts of the UI. So, they are usually useless for testing that anything in the UI actually works. I had looked around, but didn't find a test, which I could use as template for my test. For some tests you can work around it by hooking into the corresponding shell but you will need to inspect the code and the setup of the test (e.g. your test does not link against libsdui) to check if that is possible. I think not many people can easily help you there for impress and draw code. And those familiar with Draw/Impress have a lot of more important things to do. I have made a little bit progress. I have initialized the size of the ContainerWindow of the Frame with meaningful values (size defaults to zero) and set it to Show(true). Now I get a LayerTabBar with correct outer rectangle. But the rectangles of the single tabs are empty and therefor the hit test for the mouse event fails. Other properties of the tabs like id, label text and associated layer are correct. So I still need to investigate what is missing. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: problems with LayerTabBar in unit tests
Hello Regina, On Mon, Oct 8, 2018 at 7:54 PM Regina Henschel wrote: > Hi all, > > does no one has an idea? I have put the problem as patch to Gerrit > https://gerrit.libreoffice.org/61545. Perhaps my problem is easier > understandable then. > > Problem: If I use the "Load"-method, I get the document loaded, but only > the center pane has the correct size. All other window sizes have > suspicious values. Especially the LayerTabBar has width 0, and therefore > a click on it is not possible. But that would be needed for the unit test. > Many of the unit tests actually don't include any parts of the UI. So, they are usually useless for testing that anything in the UI actually works. For some tests you can work around it by hooking into the corresponding shell but you will need to inspect the code and the setup of the test (e.g. your test does not link against libsdui) to check if that is possible. I think not many people can easily help you there for impress and draw code. Regards, Markus > > How to get the correct window sizes? > > Kind regards > Regina > > > Regina Henschel schrieb am 04-Oct-18 um 14:42: > > Hi all, > > > > I'm still working on a unit test for bug tdf#119956. My current state > > is, that the odg test document really opens in Draw. [On master it opens > > in Impress.] But the layer tab bar has width 0. So simulating a click on > > the layer tab bar is not possible, which is needed in case of bug > > tdf#119956. > > > > Which layers are shown in the layer tab bar is calculated in > > DrawViewShell::ResetActualLayer() in sd/source/ui/view/drviews1.cxx and > > the actual width is calculated in TabBar::ImplFormat() in > > svtools/source/control/tabbar.cxx. Please correct me, if I'm wrong about > > this. > > > > So my questions are: > > > > What makes the method SdMiscTest::Load from misc-tests.cxx in sd/qa/unit > > different from regular opening the file from a running LibreOffice via > > click on Open button of the start center? > > > > How can I open the test file in a unit test the same way as a regular > > Open does? > > > > Or what do I need to add/change in the SdMiscTest::Load method to get > > the layer tab bar in the correct width? > > > > Any ideas or tips? > > > > Kind regards > > Regina > > ___ > > LibreOffice mailing list > > LibreOffice@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/libreoffice > > ___ > LibreOffice mailing list > LibreOffice@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/libreoffice > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: problems with LayerTabBar in unit tests
Hi all, does no one has an idea? I have put the problem as patch to Gerrit https://gerrit.libreoffice.org/61545. Perhaps my problem is easier understandable then. Problem: If I use the "Load"-method, I get the document loaded, but only the center pane has the correct size. All other window sizes have suspicious values. Especially the LayerTabBar has width 0, and therefore a click on it is not possible. But that would be needed for the unit test. How to get the correct window sizes? Kind regards Regina Regina Henschel schrieb am 04-Oct-18 um 14:42: Hi all, I'm still working on a unit test for bug tdf#119956. My current state is, that the odg test document really opens in Draw. [On master it opens in Impress.] But the layer tab bar has width 0. So simulating a click on the layer tab bar is not possible, which is needed in case of bug tdf#119956. Which layers are shown in the layer tab bar is calculated in DrawViewShell::ResetActualLayer() in sd/source/ui/view/drviews1.cxx and the actual width is calculated in TabBar::ImplFormat() in svtools/source/control/tabbar.cxx. Please correct me, if I'm wrong about this. So my questions are: What makes the method SdMiscTest::Load from misc-tests.cxx in sd/qa/unit different from regular opening the file from a running LibreOffice via click on Open button of the start center? How can I open the test file in a unit test the same way as a regular Open does? Or what do I need to add/change in the SdMiscTest::Load method to get the layer tab bar in the correct width? Any ideas or tips? Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice