chart2/source/controller/main/ChartController.cxx |    3 +++
 include/svx/svxids.hrc                            |    2 +-
 sd/sdi/_drvwsh.sdi                                |    7 ++++++-
 sd/sdi/drtxtob.sdi                                |    6 ++++++
 sd/source/ui/view/drtxtob.cxx                     |    4 ++++
 sd/source/ui/view/drtxtob1.cxx                    |   12 ++++++++++++
 sd/source/ui/view/drviews2.cxx                    |   11 +++++++++++
 sd/source/ui/view/drviewsf.cxx                    |    5 +++++
 svx/sdi/svx.sdi                                   |   17 +++++++++++++++++
 9 files changed, 65 insertions(+), 2 deletions(-)

New commits:
commit f7ca5ce78f98505cd301f6bddde143e3ecb846e7
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 16:03:58 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jan 28 20:02:01 2024 +0100

    Resolves: tdf#149409 enable impress 'Small Capitals' Toolbar Button
    
    Change-Id: Ifc8721f50f359669af501c91bc86d6a983785f9f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162663
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 7cc55ac02813..b4e1a91d386a 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -451,7 +451,7 @@ class XFillGradientItem;
 #define SID_ATTR_TEXTCOLUMNS_NUMBER                     ( SID_SVX_START + 340 )
 #define SID_ATTR_TEXTCOLUMNS_SPACING                    ( SID_SVX_START + 341 )
 
-// FREE                                                 ( SID_SVX_START + 342 )
+#define SID_SET_SMALL_CAPS                              ( SID_SVX_START + 342 )
 // FREE                                                 ( SID_SVX_START + 343 )
 // FREE                                                 ( SID_SVX_START + 344 )
 // FREE                                                 ( SID_SVX_START + 345 )
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 55ed82d07dbe..9f9272f2ef6e 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2820,12 +2820,17 @@ interface DrawView
         ExecMethod = ExecChar ;
         StateMethod = GetAttrState ;
     ]
+    SID_SET_SUPER_SCRIPT
+    [
+        ExecMethod = ExecChar ;
+        StateMethod = GetAttrState ;
+    ]
     SID_SET_SUB_SCRIPT
     [
         ExecMethod = ExecChar ;
         StateMethod = GetAttrState ;
     ]
-    SID_SET_SUPER_SCRIPT
+    SID_SET_SMALL_CAPS
     [
         ExecMethod = ExecChar ;
         StateMethod = GetAttrState ;
diff --git a/sd/sdi/drtxtob.sdi b/sd/sdi/drtxtob.sdi
index e34445f55b74..38a4fa7f210b 100644
--- a/sd/sdi/drtxtob.sdi
+++ b/sd/sdi/drtxtob.sdi
@@ -203,6 +203,12 @@ shell TextObjectBar
         StateMethod = GetAttrState;
     ]
 
+    SID_SET_SMALL_CAPS  // ole : ?, status : ?
+    [
+        ExecMethod = Execute;
+        StateMethod = GetAttrState;
+    ]
+
     SID_ATTR_CHAR_KERNING
     [
         ExecMethod = Execute;
diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx
index 710518185dcc..15ceef57a572 100644
--- a/sd/source/ui/view/drtxtob.cxx
+++ b/sd/source/ui/view/drtxtob.cxx
@@ -28,6 +28,7 @@
 #include <editeng/ulspitem.hxx>
 #include <editeng/lspcitem.hxx>
 #include <editeng/adjustitem.hxx>
+#include <editeng/cmapitem.hxx>
 #include <editeng/editview.hxx>
 #include <editeng/outliner.hxx>
 #include <editeng/unolingu.hxx>
@@ -620,6 +621,9 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet )
     SvxEscapement eEsc = static_cast<SvxEscapement>(aAttrSet.Get( 
EE_CHAR_ESCAPEMENT ).GetEnumValue());
     rSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == 
SvxEscapement::Superscript));
     rSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == 
SvxEscapement::Subscript));
+
+    SvxCaseMap eCaseMap = aAttrSet.Get(EE_CHAR_CASEMAP).GetCaseMap();
+    rSet.Put(SfxBoolItem(SID_SET_SMALL_CAPS, eCaseMap == 
SvxCaseMap::SmallCaps));
 }
 
 } // end of namespace sd
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index b176db5596c8..5672f7279a62 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -648,6 +648,18 @@ void TextObjectBar::Execute( SfxRequest &rReq )
                     }
                     break;
 
+                    case SID_SET_SMALL_CAPS:
+                    {
+                        SvxCaseMap eCaseMap = 
aEditAttr.Get(EE_CHAR_CASEMAP).GetCaseMap();
+                        if (eCaseMap == SvxCaseMap::SmallCaps)
+                            eCaseMap = SvxCaseMap::NotMapped;
+                        else
+                            eCaseMap = SvxCaseMap::SmallCaps;
+                        SvxCaseMapItem aItem(eCaseMap, EE_CHAR_CASEMAP);
+                        aNewAttr.Put(aItem);
+                    }
+                    break;
+
                     // attributes for TextObjectBar
                     case SID_ATTR_CHAR_FONT:
                         mpViewShell->GetViewFrame()->GetDispatcher()->
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index f9f176021410..04651d87fe2f 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -3811,6 +3811,17 @@ void DrawViewShell::ExecChar( SfxRequest &rReq )
             }
         }
         break;
+    case SID_SET_SMALL_CAPS:
+        {
+            SvxCaseMap eCaseMap = aEditAttr.Get(EE_CHAR_CASEMAP).GetCaseMap();
+            if (eCaseMap == SvxCaseMap::SmallCaps)
+                eCaseMap = SvxCaseMap::NotMapped;
+            else
+                eCaseMap = SvxCaseMap::SmallCaps;
+            SvxCaseMapItem aItem(eCaseMap, EE_CHAR_CASEMAP);
+            aNewAttr.Put(aItem);
+        }
+        break;
     case SID_SET_SUB_SCRIPT:
         {
             SvxEscapementItem aItem( EE_CHAR_ESCAPEMENT );
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index cb0e6495323d..ac7f5a062982 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -24,6 +24,7 @@
 #include <svx/svxids.hrc>
 #include <svx/sdmetitm.hxx>
 #include <svx/hlnkitem.hxx>
+#include <editeng/cmapitem.hxx>
 #include <editeng/eeitem.hxx>
 #include <editeng/flditem.hxx>
 #include <editeng/udlnitem.hxx>
@@ -441,6 +442,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
             case SID_ATTR_SOFTEDGE_RADIUS:
             case SID_SET_SUB_SCRIPT:
             case SID_SET_SUPER_SCRIPT:
+            case SID_SET_SMALL_CAPS:
             {
                 bAttr = true;
             }
@@ -769,6 +771,9 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
     rSet.Put(SfxBoolItem(SID_SET_SUPER_SCRIPT, eEsc == 
SvxEscapement::Superscript));
     rSet.Put(SfxBoolItem(SID_SET_SUB_SCRIPT, eEsc == 
SvxEscapement::Subscript));
 
+    SvxCaseMap eCaseMap = pSet->Get(EE_CHAR_CASEMAP).GetCaseMap();
+    rSet.Put(SfxBoolItem(SID_SET_SMALL_CAPS, eCaseMap == 
SvxCaseMap::SmallCaps));
+
     eState = pSet->GetItemState( EE_CHAR_KERNING );
     if ( eState == SfxItemState::DONTCARE )
     {
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 4b52f73fb9fa..961f7d9c067c 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -8487,6 +8487,23 @@ SfxBoolItem SuperScript SID_SET_SUPER_SCRIPT
     GroupId = SfxGroupId::Format;
 ]
 
+SfxBoolItem SmallCaps SID_SET_SMALL_CAPS
+
+[
+    AutoUpdate = TRUE,
+    FastCall = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+
+
+    AccelConfig = TRUE,
+    MenuConfig = TRUE,
+    ToolBoxConfig = TRUE,
+    GroupId = SfxGroupId::Format;
+]
 
 SfxVoidItem SwEditOptions SID_SW_EDITOPTIONS
 ()
commit 9126cde8cb13098800d3406d006dbc4c687b2078
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Jan 28 14:37:39 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Jan 28 20:01:50 2024 +0100

    When chart is active pass uno:ChangeTheme through to its parent frame
    
    so theme changes can happen when chart has control of the UI
    
    Change-Id: Id7fd17d697d5ff8c03f1f46d80894e4f69cb9b9d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162661
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/chart2/source/controller/main/ChartController.cxx 
b/chart2/source/controller/main/ChartController.cxx
index 666d6b636740..ae09e6813dd5 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -55,6 +55,7 @@
 #include <ViewElementListProvider.hxx>
 
 #include <cppuhelper/supportsservice.hxx>
+#include <comphelper/dispatchcommand.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <BaseCoordinateSystem.hxx>
 
@@ -1302,6 +1303,8 @@ void SAL_CALL ChartController::dispatch(
             }
         }
     }
+    else if( aCommand == "ChangeTheme" )
+        comphelper::dispatchCommand(".uno:ChangeTheme", getFrame(), rArgs);
 }
 
 void SAL_CALL ChartController::addStatusListener(

Reply via email to