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-09-24 15:12:34 +0200
commitd78123f7c91b18598f72e8a85187eb4a10145108 (patch)
tree823e772165f32556264aecf97a8babd147c5ef1e
parent82ef6940b2d6a0bb852cb5cfabe8d1b84df32ec5 (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> (cherry picked from commit 7cea5f3e961aa1082a84297e66da0b33626155bb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191435 Tested-by: Jenkins
-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 c0307ae748c5..6cfdf2d0e732 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -3959,7 +3959,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;