[Libreoffice-commits] core.git: sfx2/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 23 12:57:37 UTC 2021
sfx2/source/appl/childwin.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 33584bc189235b2e0f263cade9f9d759d29448c9
Author: Noel Grandin <noel at peralex.com>
AuthorDate: Thu Sep 23 13:55:31 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Sep 23 14:57:04 2021 +0200
tdf#144132 Crash when insert formula object in Writer
regression from
commit ec01d43e0a8fa560d7cd8c76c0d609b18a60cddb
Date: Wed Jul 21 14:24:28 2021 +0200
pass SfxChildWinFactory around by value
Change-Id: I88bc6c8bfd35d0a653512b064c9ee0d59b1e8b38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122520
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index b00f70a3afb3..51f58a4193c0 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -51,7 +51,7 @@ struct SfxChildWindow_Impl
{
css::uno::Reference< css::frame::XFrame > xFrame;
css::uno::Reference< css::lang::XEventListener > xListener;
- SfxChildWinFactory* pFact;
+ SfxChildWinFactory aFact = { nullptr, 0, 0 };
bool bHideNotDelete;
bool bVisible;
bool bWantsFocus;
@@ -147,7 +147,6 @@ SfxChildWindow::SfxChildWindow(vcl::Window *pParentWindow, sal_uInt16 nId)
, eChildAlignment(SfxChildAlignment::NOALIGNMENT)
, nType(nId)
{
- pImpl->pFact = nullptr;
pImpl->bHideNotDelete = false;
pImpl->bWantsFocus = true;
pImpl->bVisible = true;
@@ -291,7 +290,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
aWinOpt.SetUserData( aSeq );
// ... but save status at runtime!
- pImpl->pFact->aInfo = rInfo;
+ pImpl->aFact.aInfo = rInfo;
}
void SfxChildWindow::SetAlignment(SfxChildAlignment eAlign)
@@ -301,7 +300,7 @@ void SfxChildWindow::SetAlignment(SfxChildAlignment eAlign)
SfxChildWinInfo SfxChildWindow::GetInfo() const
{
- SfxChildWinInfo aInfo(pImpl->pFact->aInfo);
+ SfxChildWinInfo aInfo(pImpl->aFact.aInfo);
if (xController)
{
weld::Dialog* pDialog = xController->getDialog();
@@ -343,7 +342,7 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
sal_uInt16 SfxChildWindow::GetPosition() const
{
- return pImpl->pFact->nPos;
+ return pImpl->aFact.nPos;
}
void SfxChildWindow::InitializeChildWinFactory_Impl(sal_uInt16 nId, SfxChildWinInfo& rInfo)
@@ -423,7 +422,7 @@ bool ParentIsFloatingWindow(const vcl::Window *pParent)
void SfxChildWindow::SetFactory_Impl( SfxChildWinFactory *pF )
{
- pImpl->pFact = pF;
+ pImpl->aFact = *pF;
}
void SfxChildWindow::SetHideNotDelete( bool bOn )
More information about the Libreoffice-commits
mailing list