sw/source/ui/frmdlg/column.cxx | 2 +- sw/uiconfig/swriter/ui/columnpage.ui | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
New commits: commit dfe551c816fcaf6f3d3ad9da6da5472900cf17d0 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Dec 1 17:11:09 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 1 21:57:50 2023 +0100 Related: tdf#158450 use SfxTabPage::GetFrameWeld to get the parent window. SfxTabPage::GetDialogController returns mpImpl->mpSfxDialogController and that is set in SfxTabPage::SfxTabPage ctor with mpImpl->mpSfxDialogController = dynamic_cast<SfxOkDialogController*>(m_pDialogController); and GetDialogController returns that mpImpl->mpSfxDialogController while nearly everything is derived from OKDialogController, not everything, like this column dialog case is, so mpImpl->mpSfxDialogController is null and it all fails. This same page is inside format, page styles as "columns" but that's the usual multi-page dialog derived from SfxOkDialogController, its just this single page dialog that is different. The original idea was to wait until this parent dialog is needed to figure out what to use. We have this SfxTabPage::SetDialogController so the dialog controller and page can theoretically change after the ctor, though maybe that doesn't happen in this case. Looking at SfxTabPage::GetFrameWeld that one always returns the current parent (of m_pDialogController, not the dynamically casted mpImpl->mpSfxDialogController) so in the best choice to use in general. Change-Id: I4617212fb27fdeeb0afc41123f7bc1b73f495c32 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160223 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 380bbb768f16..8caa69fade8c 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -393,7 +393,7 @@ SwColumnPage::SwColumnPage(weld::Container* pPage, weld::DialogController* pCont , m_xTextDirectionFT(m_xBuilder->weld_label("textdirectionft")) , m_xTextDirectionLB(new svx::FrameDirectionListBox(m_xBuilder->weld_combo_box("textdirectionlb"))) , m_xLineColorDLB(new ColorListBox(m_xBuilder->weld_menu_button("colorlb"), - [pController]{ return pController->getDialog(); })) + [this]{ return GetFrameWeld(); })) , m_xLineTypeDLB(new SvtLineListBox(m_xBuilder->weld_menu_button("linestylelb"))) , m_xEd1(new SwPercentField(m_xBuilder->weld_metric_spin_button("width1mf", FieldUnit::CM))) , m_xEd2(new SwPercentField(m_xBuilder->weld_metric_spin_button("width2mf", FieldUnit::CM))) commit 35c536023aad834a6fdd7e87b2af7ef20dc651b9 Author: Caolán McNamara <[email protected]> AuthorDate: Fri Dec 1 14:04:08 2023 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 1 21:57:40 2023 +0100 we need these label placeholders for gtk Change-Id: If86e0d1ff4259613bfc20b3ede873dc56ca59206 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160222 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/uiconfig/swriter/ui/columnpage.ui b/sw/uiconfig/swriter/ui/columnpage.ui index 201b01928216..c72bb1e919cf 100644 --- a/sw/uiconfig/swriter/ui/columnpage.ui +++ b/sw/uiconfig/swriter/ui/columnpage.ui @@ -495,6 +495,7 @@ <property name="receives-default">False</property> <property name="xalign">0</property> <property name="draw-indicator">True</property> + <property name="label" translatable="no"></property> <child> <placeholder/> </child> @@ -568,6 +569,7 @@ <property name="receives-default">False</property> <property name="xalign">0</property> <property name="draw-indicator">True</property> + <property name="label" translatable="no"></property> <child> <placeholder/> </child>
