Hi, all!<br><br>I believe I found the cause of fdo#49859 "FORMATTING, UI: numbering alignment or<br>indentation is not applied in Impress"<br><br>When the "Position" tab is deactivated, SvxNumPositionTabPage::DeactivatePage()<br>
is called. This call serves two purposes:<br><br>1: To check whether the Tab Page may be deactivated (answer: sal_True)<br>2: To retrieve the user input from this Tab Page<br><br>The Position tab contains two MetricFields: aDistBorderMF and aIndentMF. The<br>
processing of input in these fields is triggered when they lose focus, by:<br><br> SvxNumPositionTabPage::DistanceHdl_Impl()<br><br>When either aDistBorderMF or aIndentMF has focus when the Position tab is <br>deactivated, it faithfully triggers a call to DistanceHdl_Impl(). But this<br>
happens AFTER the call to DeactivatePage(). Therefore, the user input <br>retrieved from DeactivatePage() doesn't reflect the last changes made<br>in aDistBorderMF or aIndentMF.<br><br>I propose an addition to DeactivatePage():<br>
<br>int SvxNumPositionTabPage::DeactivatePage(SfxItemSet *_pSet)<br>{<br> if(_pSet)<br> {<br> if(aDistBorderMF.IsEnabled())<br> DistanceHdl_Impl(&aDistBorderMF);<br> DistanceHdl_Impl(&aIndentMF);<br>
FillItemSet(*_pSet);<br> }<br> return sal_True;<br>}<br><br>Question:<br><br>Ideally, I would wrap the DistanceHdl_Impl() calls in ..MF.HasFocus() checks<br>to prevent unnecessary calls:<br><br> if(aDistBorderMF.HasFocus() && aDistBorderMF.IsEnabled())<br>
DistanceHdl_Impl(&aDistBorderMF);<br> if(aIndentMF.HasFocus())<br> DistanceHdl_Impl(&aIndentMF);<br> FillItemSet(*_pSet);<br><br>But both aDistBorderMF.HasFocus() and aIndentMF.HasFocus() always seem to return <br>
false! Is this intentional, or a bug?<br><br>