Position and Size dialog for shapes in Impress has an option to set position protection. When this option is enabled most of the settings made disabled on the dialog. The controls on rotation tab page are not disabled immediately after the position protection is enabled, but only after the dialog is closed and reopened. Similar thing happens when we disable the position protection, the rotation settings remain disabled and we need to reopen the dialog to be able to set any rotation.
Steps to Reproduce:
1. Open Impress
2. Open position and size dialog for title shape
3. Turn on position protection (Position and Size tab, Protect label)
4. Switch to Rotation tab -> all settings are enabled
5. Close and reopen the dialog -> settings on Rotation tab are disabled
Disabling settings on rotation tab page is done only after closing and reopening the whole dialog.
Rotation settings should be enabled / disabled immediately as the position protection changes.
User Profile Reset: No
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
Build ID: ef2e6260fad38e26c8591ea88ded348db618270d
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: gtk3;
Locale: ca-ES (ca_ES.UTF-8); Calc: group
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.
(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.
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":
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:
Affected users are encouraged to test the fix and report feedback.