https://bugs.documentfoundation.org/show_bug.cgi?id=46583
--- Comment #11 from Shrey_007 <[email protected]> --- 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 ?? -- You are receiving this mail because: You are the assignee for the bug.
