Add a RefEdit::SetReferences variant that takes a weld::Frame
instead of a weld::Label param.
For those cases where a Frame's label was previously retrieved using
weld::Frame::weld_label_widget in order to pass
it to the only RefEdit::SetReferences variant taking
a weld::Label, use the new variant instead and stop
calling weld::Frame::weld_label_widget to get the
label child.
Use default of nullptr for the second param to the
RefEdit::SetReferences method taking a weld::Label,
to avoid ambiguity for the cases where an explicit
nullptr is passed.
For the QtInstanceFrame implementation, the QGroupBox
widget doesn't have a separate label child, but handles
the text itself, which is why
QtInstanceFrame::weld_label_widget simply triggers an assert.
This commit prepares for removing weld::Frame::weld_label_widget
altogether.
No change in behavior intended or seen in a quick test.
One way to trigger this code path:
* start Calc
* select some cells
* "Data" -> "Define Range"
* type "foobar" into the name field
* click on the "Shrink" button
Change-Id: Ia37e5f73d7b68aa5fae87be167bdc00e5cf6f1f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189220
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>