summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Marathe <mohit.marathe@collabora.com>2025-07-18 15:16:19 +0530
committerMohit Marathe <mohit.marathe@collabora.com>2025-07-24 07:48:11 +0200
commit7cea5f3e961aa1082a84297e66da0b33626155bb (patch)
tree42562545af90b6304e6d927fde13a26efc7ecb2a
parent807e017ccf189dcadd26343fed69f35e42f02c9f (diff)
svx lok: .uno:GrafTransparence: add Transparency parameter
To add a Transparency menubutton with pre-canned values, we need to send a uno command with a parameter with a particular transparency value. Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com> Change-Id: I888135343032858b64c84e21d2892fe7d5d352c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188099 Reviewed-by: Pranam Lashkari <lpranam@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
-rw-r--r--svx/sdi/svx.sdi2
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx11
2 files changed, 7 insertions, 6 deletions
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 7227200f963f..64fd8003b168 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -3941,7 +3941,7 @@ SfxInt16Item GrafRed SID_ATTR_GRAF_RED
SfxUInt16Item GrafTransparence SID_ATTR_GRAF_TRANSPARENCE
-
+(SfxInt16Item Transparency FN_PARAM_1)
[
AutoUpdate = TRUE,
FastCall = FALSE,
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 3fa4b6cbedbb..2f7441eba942 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -586,12 +586,13 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
case SID_ATTR_GRAF_TRANSPARENCE:
{
- if( pItem )
- {
+ const SfxInt16Item* pTransparency = rReq.GetArg<SfxInt16Item>(FN_PARAM_1);
+ if ( pTransparency )
+ aSet.Put( SdrGrafTransparenceItem( pTransparency->GetValue() ));
+ else if( pItem )
aSet.Put( SdrGrafTransparenceItem( static_cast<const SfxUInt16Item*>(pItem)->GetValue() ));
- if( bUndo )
- aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFTRANSPARENCY );
- }
+ if( bUndo && ( pTransparency || pItem ) )
+ aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFTRANSPARENCY );
}
break;