From 5a100a3b62da5ea94d4707c10633023065e1d04f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 25 Mar 2020 14:58:14 +0300 Subject: tdf#101181: add sidebar panel for Glow effect ... in Writer, Calc, Draw and Impress for CustomShapes. The artifacts that become apparent using the controls, e.g. remnants of the effect when decreasing radius (in Impress), or glow not drawn until reload after enabled or radius set to 0, should be fixed in a separate commit. Change-Id: I6107597161bc67ae8c3e62c260ef6ad241c7dedf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91056 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sd/sdi/_drvwsh.sdi | 15 +++++++++++++++ sd/source/ui/view/drviews2.cxx | 15 ++++++++++++--- sd/source/ui/view/drviewsf.cxx | 3 +++ 3 files changed, 30 insertions(+), 3 deletions(-) (limited to 'sd') diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index 5d99ed09b16b..962ef2368e15 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2860,5 +2860,20 @@ interface DrawView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] + SID_ATTR_GLOW + [ + ExecMethod = FuTemporary ; + StateMethod = GetAttrState ; + ] + SID_ATTR_GLOW_COLOR + [ + ExecMethod = FuTemporary ; + StateMethod = GetAttrState ; + ] + SID_ATTR_GLOW_RADIUS + [ + ExecMethod = FuTemporary; + StateMethod = GetAttrState; + ] } diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 248092c06416..3348594ffdc7 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -3440,8 +3440,8 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; - case SID_PHOTOALBUM: - { + case SID_PHOTOALBUM: + { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); vcl::Window* pWin = GetActiveWindow(); ScopedVclPtr pDlg(pFact->CreateSdPhotoAlbumDialog( @@ -3456,7 +3456,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_INSERT_QRCODE: case SID_EDIT_QRCODE: - { + { VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); const uno::Reference xModel = GetViewShellBase().GetController()->getModel(); ScopedVclPtr pDlg(pFact->CreateQrCodeGenDialog( @@ -3467,6 +3467,15 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) } break; + case SID_ATTR_GLOW: + case SID_ATTR_GLOW_COLOR: + case SID_ATTR_GLOW_RADIUS: + if (const SfxItemSet* pNewArgs = rReq.GetArgs()) + mpDrawView->SetAttributes(*pNewArgs); + rReq.Done(); + Cancel(); + break; + default: { SAL_WARN( "sd.ui", "Slot without function" ); diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 95ecd4a0d52a..c3401210c40d 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -437,6 +437,9 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) case SID_ATTR_CHAR_COLOR: case SID_ATTR_CHAR_KERNING: case SID_ATTR_CHAR_CASEMAP: + case SID_ATTR_GLOW: + case SID_ATTR_GLOW_COLOR: + case SID_ATTR_GLOW_RADIUS: case SID_SET_SUB_SCRIPT: case SID_SET_SUPER_SCRIPT: { -- cgit