diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-14 16:25:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-19 11:08:59 +0000 |
commit | 13856f360cb24f80401b4df07c9ce5124fdb33de (patch) | |
tree | ef2c0a1633b4483a7927d262e966843d98fddf0e /sfx2 | |
parent | 8318ae29ffe61d516c952fa892f73bdb55dcdd32 (diff) |
Resolves: tdf#92051 add tooltips to section/table statusbar
Change-Id: I649eabbe266085fdbc0ca9c4a5506c0c2a270721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144199
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144450
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/sfxitems.sdi | 7 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 12 |
2 files changed, 17 insertions, 2 deletions
diff --git a/sfx2/sdi/sfxitems.sdi b/sfx2/sdi/sfxitems.sdi index 231548e5a1e0..910c10a0d8bb 100644 --- a/sfx2/sdi/sfxitems.sdi +++ b/sfx2/sdi/sfxitems.sdi @@ -109,6 +109,13 @@ item SfxScriptOrganizer SfxScriptOrganizerItem; item String SvxClipboardFormatItem; //! Dummy + struct Status + { + String Value MID_VALUE; + INT16 Status MID_TYPE; + }; + item Status SvxStatusItem; + struct SvxZoom { UINT16 Value MID_VALUE; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 58626bd6d988..6f68292f46b4 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -22,11 +22,12 @@ #include <tools/debug.hxx> #include <svl/eitem.hxx> #include <svl/intitem.hxx> +#include <svl/itempool.hxx> #include <svl/itemset.hxx> +#include <svl/stritem.hxx> #include <svl/visitem.hxx> #include <svtools/javacontext.hxx> #include <svtools/javainteractionhandler.hxx> -#include <svl/itempool.hxx> #include <tools/urlobj.hxx> #include <com/sun/star/awt/FontDescriptor.hpp> #include <com/sun/star/awt/Point.hpp> @@ -1167,7 +1168,6 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra else if (aEvent.FeatureURL.Path == "StatusDocPos" || aEvent.FeatureURL.Path == "RowColSelCount" || aEvent.FeatureURL.Path == "StatusPageStyle" || - aEvent.FeatureURL.Path == "StateTableCell" || aEvent.FeatureURL.Path == "StateWordCount" || aEvent.FeatureURL.Path == "PageStyleName" || aEvent.FeatureURL.Path == "PageStatus" || @@ -1182,6 +1182,14 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aBuffer.append(aString); } } + else if (aEvent.FeatureURL.Path == "StateTableCell") + { + if (aEvent.IsEnabled) + { + if (const SfxStringItem* pSvxStatusItem = dynamic_cast<const SfxStringItem*>(pState)) + aBuffer.append(pSvxStatusItem->GetValue()); + } + } else if (aEvent.FeatureURL.Path == "InsertMode" || aEvent.FeatureURL.Path == "WrapText" || aEvent.FeatureURL.Path == "NumberFormatCurrency" || |