summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-03-12 12:56:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-03-12 17:46:07 +0100
commit7953c8a9c4eb0cfc75f74e26c0f916f779830bc1 (patch)
treedb16dd258e46079d800416de89aeb986203cdc26 /sfx2
parent7650ca4c106abfa10d7e0a4714a3446ce94e8770 (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tabdlg.cxx18
1 files changed, 12 insertions, 6 deletions
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;