| Summary: | Selecting position protection disables rotation settings only after reopening the dialog | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Tamás Zolnai <zolnaitamas2000> |
| Component: | Impress | Assignee: | Kshitij <kshitijpathania> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | jhaekansh80, mentoring, xiscofauli |
| Priority: | medium | Keywords: | difficultyBeginner, easyHack, skillCpp |
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | target:6.1.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 102019 | ||
|
Description
Tamás Zolnai
2017-08-12 20:53:42 UTC
Reproduced in Version: 6.0.0.0.alpha0+ Build ID: ef2e6260fad38e26c8591ea88ded348db618270d CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3; Locale: ca-ES (ca_ES.UTF-8); Calc: group and in LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 Let's turn this into a easy hack. The code is here: cui/uiconfig/ui/rotationtabpage.ui -> defines the structure of the tab page cui/source/tabpages/transfrm.cxx -> implementation of the tab page Hello, This bug looks interesting for me, hence i would like to give it a try. Please guide me on this. (In reply to Ekansh Jha from comment #3) > Hello, This bug looks interesting for me, hence i would like to give it a > try. Please guide me on this. You've already got the guide points. See the previous comment, there you can find code pointers. So please read the code and try to understand how this tab page works. You can also find the whole dialog's code by add a breakpoint in the constructor of the tab page (SvxTransformTabDialog). Since disabling this rotation settings works when the dialog opens, I expect that you can find the code which is used for disabling these settings. It seems everything is in the code you need. I looked into the functions you suggested, it looks like when page is created the constructor completes its work but when protect button is clicked, I think its the work of SvxPositionSizeTabPage::UpdateControlStates(), but I don't know how to execute it, and also what is the difference between nPosSize and nSWPosSize. I even tried to insert code in "PageCreated" but it always gives error of "not a member of class". Please help me. Thanks (In reply to Ekansh Jha from comment #5) > I looked into the functions you suggested, it looks like when page is > created the constructor completes its work but when protect button is > clicked, I think its the work of > SvxPositionSizeTabPage::UpdateControlStates(), but I don't know how to > execute it, You need to understand what is OOP first, then you will see why you can't use directly SvxAngleTabPage class' private members from an other class. I suggest you to try to understand first the objects we have here (SvxPositionSizeTabPage, SvxAngleTabPage and SvxTransformTabDialog) and how they can manipulate each other and then you'll find a way to disable rotation when it's needed. > and also what is the difference between nPosSize and nSWPosSize. Please look into the code, how these variables are used. If you do that then you will see a comment about that the position tab is different in Writer as in other components (e.g. Impress) so that's why we have two of these variables. > I even tried to insert code in "PageCreated" but it always gives error of > "not a member of class". Please help me. Yes. I guess this is because you tried to use a variable not in the right scope. It seems to me you need to get a better understanding of variable scoping in C++. Sorry, but I can't help you with C++ basics here. If you learnt to use a different programing language, then it might be better to find something with that language. In the LibreOffice project we have also some python code. Hi, I have unassigned this bug, as it was taking long time. I will start working again after November. Thanks Hi! I would like to work on this bug. A polite ping, still working on this bug? (In reply to Xisco Faulí from comment #9) > A polite ping, still working on this bug? Yes ,working on it Kshitij Pathania committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f344f025a2fe0b8f2359aaf74a91f209e196923 tdf#111747 Enabled position protection immediately after protection is checked 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. |