tdf#76981 sd: Hide the document opening process when opening linked

presentation in slideshow mode, only the presentation should be visible.
The user should not see any intermediate loading processes or windows,
providing a seamless transition directly to the presentation content.
After closing the opened presentation, the running presentation should receive focus.

Change-Id: Idc24de3d38523f044d7969f1eacb05c6bae91b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175706
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
This commit is contained in:
Tibor Nagy 2024-10-27 23:44:00 +01:00 committed by Nagy Tibor
parent 3e2feb8d3f
commit d239ac793f
2 changed files with 7 additions and 5 deletions

View file

@ -159,7 +159,6 @@ css::uno::Reference< css::lang::XComponent > LoadEnv::loadComponentFromURL(const
try
{
LoadEnv aEnv(xContext);
LoadEnvFeatures loadEnvFeatures = LoadEnvFeatures::WorkWithUI;
// tdf#118238 Only disable UI interaction when loading as hidden
if (comphelper::NamedValueCollection::get(lArgs, u"Hidden") == uno::Any(true) || Application::IsHeadlessModeEnabled())
@ -1103,8 +1102,9 @@ bool LoadEnv::impl_loadContent()
bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN, false);
bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED, false);
bool bPreview = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_PREVIEW, false);
bool bStartPres = m_lMediaDescriptor.contains("StartPresentation");
if (!bHidden && !bMinimized && !bPreview)
if (!bHidden && !bMinimized && !bPreview && !bStartPres)
{
css::uno::Reference<css::task::XStatusIndicator> xProgress = m_lMediaDescriptor.getUnpackedValueOrDefault(
utl::MediaDescriptor::PROP_STATUSINDICATOR, css::uno::Reference<css::task::XStatusIndicator>());
@ -1596,6 +1596,8 @@ void LoadEnv::impl_reactForLoadingState()
css::uno::Reference< css::awt::XWindow > xWindow = m_xTargetFrame->getContainerWindow();
bool bHidden = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_HIDDEN, false);
bool bMinimized = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_MINIMIZED, false);
bool bStartPres = m_lMediaDescriptor.contains("StartPresentation");
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(xWindow);
if (bMinimized)
@ -1605,7 +1607,7 @@ void LoadEnv::impl_reactForLoadingState()
if (pWindow && pWindow->IsSystemWindow())
static_cast<WorkWindow*>(pWindow.get())->Minimize();
}
else if (!bHidden)
else if (!bHidden && !bStartPres)
{
// show frame ... if it's not still visible ...
// But do nothing if it's already visible!

View file

@ -804,8 +804,8 @@ static void ImplSalCalcFullScreenSize( const WinSalFrame* pFrame,
}
nScreenX = aRect.Left();
nScreenY = aRect.Top();
nScreenDX = aRect.GetWidth();
nScreenDY = aRect.GetHeight();
nScreenDX = aRect.GetWidth() + 1;
nScreenDY = aRect.GetHeight() + 1;
}
catch( Exception& )
{