When I open the test document and try to change the legend font properties (in chart edit mode) the legend position is also changes when closing Legend dialog (legend is repositioned to the left side of the chart area).
Steps to Reproduce:
1. Open attached test document
2. Double click on chart -> enter into edit mode
3. Double click on legend -> Legend dialog is opened
4. Change font type on Font tab page
-> Font type changes, but Legend also moves to the left.
Legend position changes when I set a new font type.
Legend position should not change.
User Profile Reset: No
User-Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Created attachment 131195 [details]
Test document with a chart
No problem with 3.6.
Arch Linux 64-bit, KDE Plasma 5
Build ID: 7ec0500e20cf273d70c4fbddb4063b8f8295307c
CPU Threads: 8; OS Version: Linux 4.9; UI Render: default; VCL: kde4;
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 18th 2016
Arch Linux 64-bit
Version 220.127.116.11 (Build ID: e183d5b)
Regression introduced by:
author Caolán McNamara <firstname.lastname@example.org> 2013-11-27 10:31:37 (GMT)
committer Caolán McNamara <email@example.com> 2013-11-27 10:33:25 (GMT)
commit 07a58db41301d15523519b99d2c64f1885909cda (patch)
parent 4f94f16ba15218e5e7a9eb4d72ddb4cb62884dbb (diff)
provide two LegendPositionResources for the interim
LegendPositionResources for .ui based stuff and a legacy
oldLegendPositionResources which can be phased out when
the last .res based user is gone
Adding Cc: to Caolán McNamara
Let's turn this into a easy hack. The code is here:
chart2/uiconfig/ui/tp_LegendPosition.ui -> defines the structure of the font page
chart2/source/controller/dialogs/res_LegendPosition.cxx -> implementation of the font page
Hello, I want to work on this easyhack. A little help will be really appreciated.
(In reply to Ekansh Jha from comment #5)
> Hello, I want to work on this easyhack. A little help will be really
First of all, if you are working on a bug, set Assigne field to your email address and also change Status field to ASSIGNED. So others can recognize easily that somebody is working on this issue.
Now, about the code. Most dialogs get their input from an SfxItemSet container and also write their output back to this item set. When the dialog opens the settings are loaded from this SfxItemSet in LegendPositionResources::initFromItemSet(). When the dialog is closed the itemset is updated by LegendPositionResources::writeToItemSet() method. So you need to check what happens in these two methods. The expected behavior is that the legend position properties does not change if the user does not change them in the dialog.
May I know what is the use of "chart2/uiconfig/ui/tp_LegendPosition.ui"?
(In reply to Ekansh Jha from comment #7)
> May I know what is the use of "chart2/uiconfig/ui/tp_LegendPosition.ui"?
The *.ui files describe the view of the the dialog. This file contains the GUI elements what the dialog has and also position, size and other informations. When you need to define the behavior of the dialog you can do that in the *.cxx file and you can get a GUI element defined in *ui. with the get function (e.g. "rParent.get(m_pRbtLeft, "left");").
ekuiitr committed a patch related to this issue.
It has been pushed to "master":
tdf#105991 - Changing legend's font also changes the legend position
It will be available in 6.0.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.