summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohit Marathe <mohit.marathe@collabora.com>2025-07-16 15:27:29 +0530
committerMohit Marathe <mohit.marathe@collabora.com>2025-09-24 13:42:03 +0200
commit29bd8d14eb632e621bbafa1fbf65add12800dc77 (patch)
tree820288b484b35094acbb2f4dc5a68660f6d058f9
parent528d5c8e0b9401ba945967e66775aea17aec7d00 (diff)
svx lok: .uno:GrafLuminance: add Brightness parameter
To add a Brightness menubutton with pre-canned values, we need to send a uno command with a parameter with a particular brightness value. Signed-off-by: Mohit Marathe <mohit.marathe@collabora.com> Change-Id: Ieb72655b27bb65b38f4b5a3ac8c3073e11ace428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187951 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Pranam Lashkari <lpranam@collabora.com> (cherry picked from commit 88d397a7227c5cbbefbe4c3b196ace288df110b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191433 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 6a35d81da2e1..96c4032fff43 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -3902,7 +3902,7 @@ SfxBoolItem GrafInvert SID_ATTR_GRAF_INVERT
SfxInt16Item GrafLuminance SID_ATTR_GRAF_LUMINANCE
-
+(SfxInt16Item Brightness FN_PARAM_1)
[
AutoUpdate = TRUE,
FastCall = FALSE,
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 70f6ca8d002a..a8c0dddec7e4 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -549,12 +549,13 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
case SID_ATTR_GRAF_LUMINANCE:
{
- if( pItem )
- {
+ const SfxInt16Item* pBrightness = rReq.GetArg<SfxInt16Item>(FN_PARAM_1);
+ if (pBrightness)
+ aSet.Put( SdrGrafLuminanceItem( pBrightness->GetValue() ) );
+ else if( pItem )
aSet.Put( SdrGrafLuminanceItem( static_cast<const SfxInt16Item*>(pItem)->GetValue() ));
- if( bUndo )
- aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFLUMINANCE );
- }
+ if( bUndo && (pBrightness || pItem) )
+ aUndoStr += SvxResId( RID_SVXSTR_UNDO_GRAFLUMINANCE );
}
break;