svx/sdi/svx.sdi                  |    2 +-
 svx/source/tbxctrls/grafctrl.cxx |   11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 29bd8d14eb632e621bbafa1fbf65add12800dc77
Author:     Mohit Marathe <[email protected]>
AuthorDate: Wed Jul 16 15:27:29 2025 +0530
Commit:     Mohit Marathe <[email protected]>
CommitDate: Wed Sep 24 13:42:03 2025 +0200

    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 <[email protected]>
    Change-Id: Ieb72655b27bb65b38f4b5a3ac8c3073e11ace428
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187951
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Pranam Lashkari <[email protected]>
    (cherry picked from commit 88d397a7227c5cbbefbe4c3b196ace288df110b2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191433
    Tested-by: Jenkins

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;
 

Reply via email to