Description: In general dialogs used to remember the last opened tab page and opens the same tab page when the dialog is opened again (see for example character properties dialog, paragraph properties dialog, page properties dialog, etc.). It can be useful when somebody changes a specific setting repeteadly, checks how the object looks like with the new settings and open the setting dialog again. The issue is that our new area dialog does not work the same way. It always opens the area tab page when the dialog is opened. Steps to Reproduce: 1. Open Impress 2. Create Shape 3. Open Area dialog (shape cotnext menu -> Area... 4. Swtich to transparency tab page and close the dialog 5. Open the dialog again Actual Results: Dialog does not remember the last opened tab page. It always opens the area tab page. Expected Results: Dialog should remember the last used tab page and switch that tab page when the dialog is opened. Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36
Repro. Version: 6.0.0.0.alpha0+ Build ID: 2585eb9d15f5c047d846ccb4b4d606d9ac89e518 CPU threads: 4; OS: Windows 6.19; UI render: default; TinderBox: Win-x86@42, Branch:master, Time: 2017-08-09_05:41:11 Locale: es-ES (es_ES); Calc: CL
Let's turn this into a easy hack. The code is here: cui/source/tabpages/tabarea.cxx An example dialog which works as expected is not Position and Size dialog in the same context menu). It's code is here: cui/source/tabpages/transfrm.cxx
Nigel Dias, Are you still working on this issue?
No, sorry :/
Hi! I want to work on this issue.
I tried to look into cui/source/tabpages/transfrm.cxx and found that in SvxTransformTabDialog::PageCreated SetView(pView) enable to load the dialog box. moreover there is no function like this in cui/source/tabpages/tabarea.cxx and in SvxAreaTabDialog::PageCreated what does ActivatePage do( i am a bit confused about it). Could you please clear my doubts.
(In reply to Ekansh Jha from comment #6) > I tried to look into cui/source/tabpages/transfrm.cxx and > found that in SvxTransformTabDialog::PageCreated SetView(pView) > enable to load the dialog box. moreover there is no function like this in > cui/source/tabpages/tabarea.cxx and in SvxAreaTabDialog::PageCreated what > does > ActivatePage do( i am a bit confused about it). Could you please clear my > doubts. It's not really clear what is the question here, but I can give some general info. In general PageCreated() method is called only once during a dialog lifetime and this method consturcts the different tab pages by calling their constructor. While ActivatePage() is called when the actual tab page is activated. So this second method is called more times, every time when the user switches to a different tab page in the dialog.
basically the arguement "nId" Passed in SvxTransformTabDialog::PageCreated decides which tab will show on opening dialog box, but from where this function is called and arguements(nId) is filled. I can't see nId declared anywhere.
(In reply to Ekansh Jha from comment #8) > basically the arguement "nId" Passed in SvxTransformTabDialog::PageCreated > decides which tab will show on opening dialog box, but from where this > function is called and arguements(nId) is filled. I can't see nId declared > anywhere. Did you have to look with OpenGrok? https://opengrok.libreoffice.org/search?project=core&q=PageCreated&defs=&refs=&path=&hist=&type= tabtempl.cxx seems the right place.
Tamas: Till now what i understood is : 1. Constructor(SvxTransformTabDialog::SvxTransformTabDialog): Only Creates tabpages. 2. PageCreated(SvxTransformTabDialog::PageCreated): decides which tab page to show when dialog box open. I also looked into transfrm.cxx and upto my understanding I got that nId decides which tab will open after opening the dialog, I can't find a way to manipulate nId. Do i need to change something in activatePage() or deactivatePage(). and Could you explain about SetView(pView), in my opinion it shows the tab. Correct me if i am wrong. I am little bit confused about it. Please help.
I think implementing function like SetView(pView) in tabarea.cxx would help to solve this problem, but I can't fund SetView function. Please help.
I suggest to use a debugger tool to understand the code: https://wiki.documentfoundation.org/Development/How_to_debug With a debugger you can check where the nId is set and also what SetView function is doing and where it is defined.
Add a breakpoint inside PageCreated() for example. With that you can check from where this is called and so you will see nId construction. Also you can add a breakpoint at the place where SetView() is called and step into that function. With that you can find the definition of this function.
ekuiitr committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b426b026b79a342c41f6f148bf17d5df66b22927 tdf#111723 Fixed - Dialog does not remember the last opened tab page It will be available in 6.1.0. 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.