Resolves: tdf#117470 reuse parent window of colorwindow...

as parent of color selector window

Change-Id: Id96c9eed21c4e99b9e48ab44bab862fea9fd380a
Reviewed-on: https://gerrit.libreoffice.org/53972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index e4a5302..d6c0e01 100644
--- a/include/svx/colorwindow.hxx
+++ b/include/svx/colorwindow.hxx
@@ -64,6 +64,7 @@ private:
    OUString            maCommand;
    Link<const NamedColor&, void> maSelectedLink;

    VclPtr<vcl::Window> mxParentWindow;
    std::shared_ptr<PaletteManager> mxPaletteManager;
    BorderColorStatus&  mrBorderColorStatus;

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index bf283e4..4114593 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -1256,6 +1256,7 @@ SvxColorWindow::SvxColorWindow(const OUString&            rCommand,
    ToolbarPopup( rFrame, pParentWindow, "palette_popup_window", "svx/ui/colorwindow.ui" ),
    theSlotId( nSlotId ),
    maCommand( rCommand ),
    mxParentWindow(pParentWindow),
    mxPaletteManager( rPaletteManager ),
    mrBorderColorStatus( rBorderColorStatus ),
    maColorSelectFunction(aFunction)
@@ -1374,6 +1375,7 @@ void SvxColorWindow::dispose()
    mpButtonNoneColor.clear();
    mpButtonPicker.clear();
    mpAutomaticSeparator.clear();
    mxParentWindow.clear();
    ToolbarPopup::dispose();
}

@@ -1505,8 +1507,7 @@ IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void)

    if ( IsInPopupMode() )
        EndPopupMode();
    const css::uno::Reference<css::awt::XWindow> xParent(mxFrame->getContainerWindow(), uno::UNO_QUERY);
    mxPaletteManager->PopupColorPicker(VCLUnoHelper::GetWindow(xParent), maCommand, GetSelectEntryColor().first);
    mxPaletteManager->PopupColorPicker(mxParentWindow, maCommand, GetSelectEntryColor().first);
}

void SvxColorWindow::StartSelection()