diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 13:48:20 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-09 17:03:42 +0100 |
commit | 7750df3d615fde25d005fc56a14e4ae4d50b2d6a (patch) | |
tree | c6ed5594a91cef23b922957c7dee3d4d57367618 /svx | |
parent | cf42f0916d1f30d8939de15bff626cabb6836d35 (diff) |
give color picker explicit parent
Change-Id: I73e9a29abd5d767b31850e9a6b1f2b8d757ee928
Reviewed-on: https://gerrit.libreoffice.org/51000
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/PaletteManager.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 32b3aa11edf6..ddd952cf6cb2 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -305,11 +305,11 @@ void PaletteManager::SetColorSelectFunction(const std::function<void(const OUStr maColorSelectFunction = aColorSelectFunction; } -void PaletteManager::PopupColorPicker(const OUString& aCommand, const Color& rInitialColor) +void PaletteManager::PopupColorPicker(vcl::Window* pParent, const OUString& aCommand, const Color& rInitialColor) { // The calling object goes away during aColorDlg.Execute(), so we must copy this OUString aCommandCopy = aCommand; - SvColorDialog aColorDlg( nullptr ); + SvColorDialog aColorDlg(pParent); aColorDlg.SetColor(rInitialColor); aColorDlg.SetMode(svtools::ColorPickerMode::Modify); if( aColorDlg.Execute() == RET_OK ) diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 14d6441feee9..212afa8efe89 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -1505,7 +1505,8 @@ IMPL_LINK_NOARG(SvxColorWindow, OpenPickerClickHdl, Button*, void) if ( IsInPopupMode() ) EndPopupMode(); - mxPaletteManager->PopupColorPicker(maCommand, GetSelectEntryColor().first); + const css::uno::Reference<css::awt::XWindow> xParent(mxFrame->getContainerWindow(), uno::UNO_QUERY); + mxPaletteManager->PopupColorPicker(VCLUnoHelper::GetWindow(xParent), maCommand, GetSelectEntryColor().first); } void SvxColorWindow::StartSelection() |