LOK: don't recreate the dialogs of an old view when loading new views

follow up for f5ebf512ccd3d5ae3af5fe706b411a85fa19182d

now same actions are performed on all the dialogs

Change-Id: I6531a766327dda106770a2c513ebd492dea7c655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176933
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 2fba6df7242586870988b62909156538b42c2bc0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177892
Tested-by: Jenkins
This commit is contained in:
Pranam Lashkari 2024-11-21 20:11:18 +05:30 committed by Caolán McNamara
parent eea90af52e
commit c9763a9f16
6 changed files with 8 additions and 10 deletions

View file

@ -29,6 +29,7 @@
#include <sfx2/chalign.hxx>
#include <sfx2/basedlgs.hxx>
#include <comphelper/lok.hxx>
namespace com::sun::star::frame { class XFrame; }
@ -184,6 +185,8 @@ const int nCloseResponseToJustHide = -42;
{ \
SfxChildWinFactory aFact( \
Class::CreateImpl, MyID, Pos ); \
if (comphelper::LibreOfficeKit::isActive() && nFlags == SfxChildWindowFlags::NONE) \
nFlags |= SfxChildWindowFlags::NEVERCLONE; \
aFact.aInfo.nFlags |= nFlags; \
aFact.aInfo.bVisible = bVis; \
SfxChildWindow::RegisterChildWindow(pMod, aFact); \

View file

@ -223,9 +223,7 @@ void ScDLL::Init()
SvxHlinkDlgWrapper ::RegisterChildWindow(false, pMod);
SvxFontWorkChildWindow ::RegisterChildWindow(false, pMod);
SvxIMapDlgChildWindow ::RegisterChildWindow(false, pMod);
ScSpellDialogChildWindow::RegisterChildWindow(
false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
: SfxChildWindowFlags::NONE);
ScSpellDialogChildWindow ::RegisterChildWindow(false, pMod);
ScValidityRefChildWin::RegisterChildWindow(false, pMod);
sc::SearchResultsDlgWrapper::RegisterChildWindow(false, pMod);

View file

@ -128,7 +128,7 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
if ( nCurRefDlgId != nSlotId )
{
if (!(comphelper::LibreOfficeKit::isActive() && nSlotId == SID_OPENDLG_FUNCTION))
if (!comphelper::LibreOfficeKit::isActive())
{
// the dialog has been opened in a different view
// -> lock the dispatcher for this view (modal mode)

View file

@ -172,9 +172,7 @@ void SdDLL::RegisterControllers(SdModule* pMod)
SvxBmpMaskChildWindow::RegisterChildWindow(false, pMod);
SvxIMapDlgChildWindow::RegisterChildWindow(false, pMod);
SvxHlinkDlgWrapper::RegisterChildWindow(false, pMod);
::sd::SpellDialogChildWindow::RegisterChildWindow(
false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
: SfxChildWindowFlags::NONE);
::sd::SpellDialogChildWindow::RegisterChildWindow(false, pMod);
#if HAVE_FEATURE_AVMEDIA
::avmedia::MediaPlayer::RegisterChildWindow(false, pMod);
#endif

View file

@ -312,9 +312,7 @@ void SwDLL::RegisterControls()
SwInsertAuthMarkWrapper::RegisterChildWindow( false, pMod );
SwWordCountWrapper::RegisterChildWindow( false, pMod );
SvxRubyChildWindow::RegisterChildWindow( false, pMod);
SwSpellDialogChildWindow::RegisterChildWindow(
false, pMod, comphelper::LibreOfficeKit::isActive() ? SfxChildWindowFlags::NEVERCLONE
: SfxChildWindowFlags::NONE);
SwSpellDialogChildWindow::RegisterChildWindow(false, pMod);
DevelopmentToolChildWindow::RegisterChildWindow(false, pMod);
SvxGrafRedToolBoxControl::RegisterControl( SID_ATTR_GRAF_RED, pMod );

View file

@ -197,6 +197,7 @@ SfxChildWindow* TestLokCallbackWrapper::InitializeSidebar()
assert(pViewShell);
SfxViewFrame& rViewFrame = pViewShell->GetViewFrame();
rViewFrame.ShowChildWindow(SID_SIDEBAR);
SfxChildWindow* pSideBar = rViewFrame.GetChildWindow(SID_SIDEBAR);
assert(pSideBar);