Problem description: If you add a custom border to a style, it works correctly and you have have different sizes to each (i.e., top and bottom). However, if you go back in to re-edit them, the UI shows both as being the default of 0.05 pt even if you changed them. If you keep top and bottom at the same value, the UI reloads the modified value correctly. This may be a bigger problem with other settings as well, but I only noticed it with borders. Steps to reproduce: 1. set an H1 style in Writer 2. modify the style to have a border top and bottom 3. change the thickness of them 4. save changes ("OK") 5. re-edit style 6. make the top and bottom border different 7. save changes ("OK") 8. re-edit style Current behavior: 4. style updates "correctly" (oh my...so many bugs in styles ATM). 5. borders width show up correctly allowing re-editing 7. different thickness borders show up "correctly" 8. border widths reset to 0.05pt instead of pulling up the custom values you set it to. There is no way to get those values back correctly via UI. Expected behavior: 8. the customs widths you put in would be shown again for each item you set it with. Platform (if different from the browser): Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
svtools/source/control/ctrlbox.cxx cui/source/tabpages/border.cxx
oops, pushed wrong key, let me complete that... this problem has nothing to do with styles but is a general problem of the borders tabpage, which already existed in OOo: if the border lines are different, then it will not display the properties nicely; this is difficult to do anyway with a single width/style/color control. what could be done easily though is to update the width/style/color control when the user selects an individual line, to display the properties of that line. the tab page already has 4 different padding(line spacing) controls, it would be possible to do the same for the lines but it needs up to 6 controls (when the dialog is for a Table there are inner and outer lines), and it is going to become very cluttered. some input from UX would be nice, what is the best way to go here? AFAIR the dialog is implemented in these files: svtools/source/control/ctrlbox.cxx cui/source/tabpages/border.cxx
While I can agree that it needs some work, I still think it is a bug rather than an enhancement. If I apply a special style that hits this issue, there is no way to edit it without recreating it. I can't imaging that was ever the "correct behavior" as intended.
*** Bug 39336 has been marked as a duplicate of this bug. ***
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility. see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Restricted my LibreOffice hacking area
Migrating Whiteboard tags to Keywords: ( EasyHack SkillCpp TopicUI) [NinjaEdit]
Tested in LibO 3.3.0, so setting to inherited. Also, a better description of the behaviour I would expect: On click of a button styling (all 4 edges, sides, etc.), it would set those boarders on at the current settings for parameters. On first click of an edge on the preview, it would load the current settings into the parameters. Once loaded, subsequent click on that edge would toggle the state. Clicking on a different edge would restart the process.
JanI is default CC for Easy Hacks (Add Jan; remove LibreOffice Dev List from CC) [NinjaEdit]
Please add keyword 'needsUXEval' and CC 'libreoffice-ux-advise@lists.freedesktop.org' if input from UX is needed.
In border.cxx, GetVisibleWidth returns a single width value if all visible borders have the same width, the Reset function initializes the UI based on the current border settings. The LinesChanged_Impl handles changes when a border line is selected. However, these functions don't track which specific border is selected, leading to the assumption that all borders have the same properties. And do we also need to take into account multiple selection as checking whether a particular key is pressed the selected borders should be applied with same properties ?? but currently i think only previously selected border is getting selected. So I think one of the possible solution could be, Instead of just taking the width from the first selected border, we need to check all selected borders. so iterate over all selected borders,If they all have the same width, display it. If not, show a mixed state indicator and when applying changes from the UI to the borders, if the width control is in a mixed state, we shouldn't change the widths of the selected borders. Only when a specific width is chosen should it apply to all selected borders. So, Introduce a member variable, say m_aSelectedBorders, a set of svx::FrameBorderType, to keep track of which borders are selected. This requires modifying the SvxBorderTabPage class declaration. In the LinesChanged_Impl method, on clicking a border, check if the Shift key is pressed. If so, toggle the selection in m_aSelectedBorders; otherwise, clear and add the new selection. In SelStyleHdl_Impl, when updating the controls, iterate over m_aSelectedBorders to check if all have the same width. If they do, display the value; otherwise, show an asterisk. This requires a boolean flag, let's say m_bMixedWidth declared in the SvxBorderTabPage class to track the state. And also Modify the width control (like m_xLineWidthMF) to show the asterisk when m_bMixedWidth is true. and a function let's say applychange check m_bMixedWidth before applying the width. If mixed, don't change widths unless the user enters a new value, which then applies to all selected borders. Sorry for long comment, I just want to know Am I heading towards right direction ??
Hossein, please advice.