sfx2/source/dialog/tabdlg.cxx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
New commits: commit 7953c8a9c4eb0cfc75f74e26c0f916f779830bc1 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Mar 12 12:56:12 2019 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Mar 12 17:46:07 2019 +0100 get correct frame window for SfxTabPage inside a SingleTabController as opposed to the SfxTabDialogController case which already works Change-Id: If72ca14803e3ff4d716ecab56454a8e2324f460c Reviewed-on: https://gerrit.libreoffice.org/69098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 90ab0b9246e3..5338b6e924d0 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -51,10 +51,11 @@ struct TabPageImpl { bool mbStandard; VclPtr<SfxTabDialog> mxDialog; - SfxTabDialogController* mpDialogController; + weld::DialogController* mpDialogController; + SfxTabDialogController* mpTabDialogController; css::uno::Reference< css::frame::XFrame > mxFrame; - TabPageImpl() : mbStandard( false ), mpDialogController(nullptr) {} + TabPageImpl() : mbStandard(false), mpDialogController(nullptr), mpTabDialogController(nullptr) {} }; struct Data_Impl @@ -190,6 +191,7 @@ SfxTabPage::SfxTabPage(TabPageParent pParent, const OUString& rUIXMLDescription, : Application::CreateInterimBuilder(this, rUIXMLDescription)) , m_xContainer(m_xBuilder->weld_container(rID)) { + pImpl->mpDialogController = pParent.pController; } SfxTabPage::~SfxTabPage() @@ -335,12 +337,13 @@ SfxTabDialog* SfxTabPage::GetTabDialog() const void SfxTabPage::SetDialogController(SfxTabDialogController* pDialog) { - pImpl->mpDialogController = pDialog; + pImpl->mpTabDialogController = pDialog; + pImpl->mpDialogController = pImpl->mpTabDialogController; } SfxTabDialogController* SfxTabPage::GetDialogController() const { - return pImpl->mpDialogController; + return pImpl->mpTabDialogController; } OString SfxTabPage::GetConfigId() const @@ -356,14 +359,17 @@ OString SfxTabPage::GetConfigId() const weld::Window* SfxTabPage::GetDialogFrameWeld() const { if (pImpl->mpDialogController) + { + assert(pImpl->mpTabDialogController == pImpl->mpDialogController || !pImpl->mpTabDialogController); return pImpl->mpDialogController->getDialog(); + } return GetFrameWeld(); } const SfxItemSet* SfxTabPage::GetDialogExampleSet() const { - if (pImpl->mpDialogController) - return pImpl->mpDialogController->GetExampleSet(); + if (pImpl->mpTabDialogController) + return pImpl->mpTabDialogController->GetExampleSet(); if (pImpl->mxDialog) return pImpl->mxDialog->GetExampleSet(); return nullptr; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits