[Libreoffice-commits] core.git: include/svx svx/source

Caolán McNamara caolanm at redhat.com
Tue May 8 14:06:02 UTC 2018


 include/svx/colorwindow.hxx      |    1 +
 svx/source/tbxctrls/tbcontrl.cxx |    5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit bfcf57de81ddd5ed8544ff2ede23bd8428f0c0ce
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue May 8 12:35:19 2018 +0100

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/include/svx/colorwindow.hxx b/include/svx/colorwindow.hxx
index e4a530248419..d6c0e01239bf 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 bf283e4cb9ca..41145935cf5f 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()


More information about the Libreoffice-commits mailing list