tdf#153690 Prevent invisible dialogs in Calc Full Screen

This change just adds the flag "SfxChildWindowFlags::NEVERHIDE"
to the info passed around so that the dialogs are not treated as
invisible when executing SfxWorkWindow::ShowChildren_Impl.

Change-Id: I35f0be94132cee438b3be9f4b4217208617a1e77
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 57c2369..f4a3830 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -136,7 +136,7 @@ public:

    static void         RegisterChildWindow(SfxModule*, const SfxChildWinFactory&);

    static std::unique_ptr<SfxChildWindow> CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo const &);
    static std::unique_ptr<SfxChildWindow> CreateChildWindow( sal_uInt16, vcl::Window*, SfxBindings*, SfxChildWinInfo &);
    void                SetHideNotDelete( bool bOn );
    bool                IsHideNotDelete() const;
    bool                IsVisible() const;
diff --git a/sc/source/ui/inc/ChildWindowWrapper.hxx b/sc/source/ui/inc/ChildWindowWrapper.hxx
index 5fb038d..926e456 100644
--- a/sc/source/ui/inc/ChildWindowWrapper.hxx
+++ b/sc/source/ui/inc/ChildWindowWrapper.hxx
@@ -22,7 +22,7 @@ class ChildControllerWrapper : public SfxChildWindow
{
public:
    ChildControllerWrapper(vcl::Window* pParentP, sal_uInt16 nId,
                           SfxBindings* pBindings, const SfxChildWinInfo* pInfo)
                           SfxBindings* pBindings, SfxChildWinInfo* pInfo)
        : SfxChildWindow(pParentP, nId)
    {
        ScTabViewShell* pViewShell = getTabViewShell( pBindings );
diff --git a/sc/source/ui/inc/reffact.hxx b/sc/source/ui/inc/reffact.hxx
index 4fbe965..de00135 100644
--- a/sc/source/ui/inc/reffact.hxx
+++ b/sc/source/ui/inc/reffact.hxx
@@ -28,7 +28,7 @@
    class Class : public SfxChildWindow                                         \
    {                                                                           \
    public:                                                                     \
        Class( vcl::Window*, sal_uInt16, SfxBindings*, const SfxChildWinInfo* ); \
        Class( vcl::Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* ); \
        SFX_DECL_CHILDWINDOW_WITHID(Class);                                     \
    };

diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx
index 1b80b0a..47c5c46 100644
--- a/sc/source/ui/inc/tabvwsh.hxx
+++ b/sc/source/ui/inc/tabvwsh.hxx
@@ -356,7 +356,7 @@ public:
    static ScTabViewShell* GetActiveViewShell();

    std::shared_ptr<SfxModelessDialogController> CreateRefDialogController(SfxBindings* pB, SfxChildWindow* pCW,
                                                    const SfxChildWinInfo* pInfo,
                                                    SfxChildWinInfo* pInfo,
                                                    weld::Window* pParent, sal_uInt16 nSlotId);

    void            UpdateOleZoom();
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 3834e3b..0eefc3eb 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -67,7 +67,7 @@ namespace
    Class::Class( vcl::Window*               pParentP,                   \
                    sal_uInt16              nId,                        \
                    SfxBindings*        p,                          \
                    const SfxChildWinInfo*  pInfo )                     \
                    SfxChildWinInfo*  pInfo )                     \
        : SfxChildWindow(pParentP, nId)                             \
    {                                                               \
        /************************************************************************************/\
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 8e2e74e..f948505 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -115,7 +115,7 @@ void ScTabViewShell::SwitchBetweenRefDialogs(SfxModelessDialogController* pDialo

std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogController(
                                SfxBindings* pB, SfxChildWindow* pCW,
                                const SfxChildWinInfo* pInfo,
                                SfxChildWinInfo* pInfo,
                                weld::Window* pParent, sal_uInt16 nSlotId)
{
    // only open dialog when called through ScModule::SetRefDialog,
@@ -449,7 +449,10 @@ std::shared_ptr<SfxModelessDialogController> ScTabViewShell::CreateRefDialogCont
    }

    if (xResult)
        xResult->Initialize( pInfo );
    {
        pInfo->nFlags = SfxChildWindowFlags::NEVERHIDE;
        xResult->Initialize(pInfo);
    }
    return xResult;
}

diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 6bf2814..9dd6da8 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -198,7 +198,7 @@ SfxChildWindow::~SfxChildWindow()
}

std::unique_ptr<SfxChildWindow> SfxChildWindow::CreateChildWindow( sal_uInt16 nId,
        vcl::Window *pParent, SfxBindings* pBindings, SfxChildWinInfo const & rInfo)
        vcl::Window *pParent, SfxBindings* pBindings, SfxChildWinInfo & rInfo)
{
    std::unique_ptr<SfxChildWindow> pChild;
    SfxChildWinFactory* pFact=nullptr;
@@ -239,6 +239,7 @@ std::unique_ptr<SfxChildWindow> SfxChildWindow::CreateChildWindow( sal_uInt16 nI
                SfxChildWinInfo aInfo = rInfo;
                Application::SetSystemWindowMode( SystemWindowFlags::NOAUTOMODE );
                pChild = pFact->pCtor( pParent, nId, pBindings, &aInfo );
                rInfo.nFlags |= aInfo.nFlags;
                Application::SetSystemWindowMode( nOldMode );
                if ( pBindings )
                    pBindings->LEAVEREGISTRATIONS();