summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-06-20 14:15:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-06-20 21:57:36 +0200
commitb15244d526c285cd109f7195855409f698d0cdc0 (patch)
treef5b36b0d2ad0c2ba94024ef742147ed320f1ca17 /svtools
parent02e5afcea007365714b57e09b079ad0acca6e99d (diff)
move SvColorDialog to welded arguments
Change-Id: Ieb04fc4684caa6df47b123ab06e280f2d204375a Reviewed-on: https://gerrit.libreoffice.org/56162 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/dialogs/colrdlg.cxx16
1 files changed, 7 insertions, 9 deletions
diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx
index 8c60e753f2bf..bd2cc410f61f 100644
--- a/svtools/source/dialogs/colrdlg.cxx
+++ b/svtools/source/dialogs/colrdlg.cxx
@@ -29,7 +29,7 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/colrdlg.hxx>
-#include <vcl/window.hxx>
+#include <vcl/weld.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -37,29 +37,25 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::ui::dialogs;
-SvColorDialog::SvColorDialog( vcl::Window* pWindow )
-: mpParent( pWindow )
-, meMode( svtools::ColorPickerMode::Select )
+SvColorDialog::SvColorDialog()
+ : meMode(svtools::ColorPickerMode::Select)
{
}
SvColorDialog::~SvColorDialog()
{
}
-
void SvColorDialog::SetColor( const Color& rColor )
{
maColor = rColor;
}
-
void SvColorDialog::SetMode( svtools::ColorPickerMode eMode )
{
meMode = eMode;
}
-
-short SvColorDialog::Execute()
+short SvColorDialog::Execute(weld::Window* pParent)
{
short ret = 0;
try
@@ -67,7 +63,9 @@ short SvColorDialog::Execute()
const OUString sColor( "Color" );
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference< css::awt::XWindow > xParent( VCLUnoHelper::GetInterface( mpParent ) );
+ Reference<css::awt::XWindow> xParent;
+ if (pParent)
+ xParent = pParent->GetXWindow();;
Reference< XExecutableDialog > xDialog = css::cui::ColorPicker::createWithParent(xContext, xParent);
Reference< XPropertyAccess > xPropertyAccess( xDialog, UNO_QUERY_THROW );