framework/source/services/frame.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit 0aa2b700aae306674d768356875998f5b8f14f0f Author: Mike Kaganski <[email protected]> AuthorDate: Tue Aug 16 12:29:35 2022 +0300 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Aug 16 14:41:29 2022 +0200 No need to use throwing Reference ctor from 'this' Change-Id: I1a9d69d101d3adede0455e94d4026e38131e6c77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138350 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index c2efdecd50ca..23caecf79fb1 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -798,8 +798,7 @@ void SAL_CALL XFrameImpl::initialize( const css::uno::Reference< css::awt::XWind lcl_enableLayoutManager(xLayoutManager, this); // create progress helper - css::uno::Reference< css::frame::XFrame > xThis (static_cast< css::frame::XFrame* >(this), - css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XFrame > xThis (this); css::uno::Reference< css::task::XStatusIndicatorFactory > xIndicatorFactory = css::task::StatusIndicatorFactory::createWithFrame(m_xContext, xThis, false/*DisableReschedule*/, true/*AllowParentShow*/ ); commit 84fbb174d6c773ecd284398a9dc4fee9f142a193 Author: Mike Kaganski <[email protected]> AuthorDate: Tue Aug 16 12:17:45 2022 +0300 Commit: Mike Kaganski <[email protected]> CommitDate: Tue Aug 16 14:41:18 2022 +0200 Drop redundant warning after throwing check Change-Id: I1cc9ce6c415eb8aef9a250b3b5f342a425071b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138349 Tested-by: Jenkins Reviewed-by: Mike Kaganski <[email protected]> diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index d722b5e0b98d..c2efdecd50ca 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -765,15 +765,14 @@ void SAL_CALL XFrameImpl::initialize( const css::uno::Reference< css::awt::XWind /* SAFE AREA ----------------------------------------------------------------------------------------------- */ SolarMutexResettableGuard aWriteLock; + // This must be the first call of this method! + // We should initialize our object and open it for working. if ( m_xContainerWindow.is() ) throw css::uno::RuntimeException( "XFrameImpl::initialized() is called more than once, which is not useful nor allowed.", static_cast< css::frame::XFrame* >(this)); - // This must be the first call of this method! - // We should initialize our object and open it for working. // Set the new window. - SAL_WARN_IF( m_xContainerWindow.is(), "fwk.frame", "XFrameImpl::initialize(): Leak detected! This state should never occur ..." ); m_xContainerWindow = xWindow; // if window is initially visible, we will never get a windowShowing event
