summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-08 12:35:19 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-08 16:05:41 +0200
commitbfcf57de81ddd5ed8544ff2ede23bd8428f0c0ce (patch)
treea6d3a528b2ec1e5f41764984d16675df3d352621
parentb68daa69739e83095c023b683234d344d0fa02c8 (diff)
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>
-rw-r--r--include/svx/colorwindow.hxx1
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx5
2 files changed, 4 insertions, 2 deletions
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()