make SetParentToDefaultWindow available from vcl only

rechecked tdf#119390. If I tear off the color popdown in writer, click
in the combobox and shift-tab to put focus in the button (where focus is
more visible) and close the torn off window then focus continues to
return to the main document as wanted.

Change-Id: I1e909cdf31e9a1309475d933d0ede289a84884b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118645
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 0bd0d62..f08cfe6 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -182,9 +182,6 @@ public:
                delete static_cast< AddonsParams* >( m_pToolBar->GetItemData( nItemId ));
        }

        // tdf#119390 this will reparent the toolbar, so focus is restored from a
        // floating toolbar to the last focused control of the application window.
        m_pToolBar->SetParentToDefaultWindow();
        // #i93173# note we can still be in one of the toolbar's handlers
        m_pToolBar->SetSelectHdl( Link<ToolBox *, void>() );
        m_pToolBar->SetActivateHdl( Link<ToolBox *, void>() );
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 1cdb347..0deb36d 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1455,7 +1455,7 @@ public:
     * document window and not the first widget in the current parent of the floating
     * window.
    */
    void SetParentToDefaultWindow();
    SAL_DLLPRIVATE void SetParentToDefaultWindow();


    //  Keyboard access functions
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 17b432c..8d3efd8 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -80,9 +80,6 @@ void PopupWindowControllerImpl::SetFloatingWindow()
    if( mpFloatingWindow )
    {
        mpFloatingWindow->RemoveEventListener( LINK( this, PopupWindowControllerImpl, WindowEventListener ) );
        // tdf#119390 reparent the window, so focus is restored
        // to the last focused control of the application window.
        mpFloatingWindow->SetParentToDefaultWindow();
        mpFloatingWindow.disposeAndClear();
    }
    mpFloatingWindow = mpPopupWindow;