[Libreoffice-commits] core.git: include/svtools include/svx svx/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 9 16:04:11 UTC 2018
include/svtools/toolbarmenu.hxx | 2 +-
include/svx/PaletteManager.hxx | 2 +-
svx/source/tbxctrls/PaletteManager.cxx | 4 ++--
svx/source/tbxctrls/tbcontrl.cxx | 3 ++-
4 files changed, 6 insertions(+), 5 deletions(-)
New commits:
commit 7750df3d615fde25d005fc56a14e4ae4d50b2d6a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 9 13:48:20 2018 +0000
give color picker explicit parent
Change-Id: I73e9a29abd5d767b31850e9a6b1f2b8d757ee928
Reviewed-on: https://gerrit.libreoffice.org/51000
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/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index 88174253548a..5372c719892e 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -66,10 +66,10 @@ protected:
/// @throws css::uno::RuntimeException
virtual void statusChanged(const css::frame::FeatureStateEvent& Event );
+ css::uno::Reference< css::frame::XFrame > mxFrame;
private:
void init();
- css::uno::Reference< css::frame::XFrame > mxFrame;
rtl::Reference< svt::FrameStatusListener > mxStatusListener;
};
diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 3cd11df51b22..c2a3b869d517 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -73,7 +73,7 @@ public:
void AddRecentColor(const Color& rRecentColor, const OUString& rColorName, bool bFront = true);
void SetBtnUpdater(svx::ToolboxButtonColorUpdater* pBtnUpdater);
- void PopupColorPicker(const OUString& aCommand, const Color& rInitialColor);
+ void PopupColorPicker(vcl::Window* pParent, const OUString& aCommand, const Color& rInitialColor);
void SetColorSelectFunction(const std::function<void(const OUString&, const NamedColor&)>& aColorSelectFunction);
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()
More information about the Libreoffice-commits
mailing list