include/svx/statusitem.hxx | 46 ++++++++++++ include/svx/strings.hrc | 7 + include/svx/svxids.hrc | 3 sc/source/ui/app/typemap.cxx | 1 sc/source/ui/view/cellsh.cxx | 9 +- sfx2/sdi/sfxitems.sdi | 7 + sfx2/source/control/unoctitm.cxx | 12 ++- svx/Library_svx.mk | 1 svx/sdi/svx.sdi | 2 svx/source/items/statusitem.cxx | 134 ++++++++++++++++++++++++++++++++++++ svx/source/stbctrls/pszctrl.cxx | 43 +++++++++++ sw/source/uibase/docvw/edtwin.cxx | 3 sw/source/uibase/shells/slotadd.cxx | 1 sw/source/uibase/uiview/srcview.cxx | 3 sw/source/uibase/uiview/view2.cxx | 19 ++++- 15 files changed, 279 insertions(+), 12 deletions(-)
New commits: commit 13856f360cb24f80401b4df07c9ce5124fdb33de Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Wed Dec 14 16:25:25 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Dec 19 11:08:59 2022 +0000 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 <caol...@redhat.com> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144450 Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/svx/statusitem.hxx b/include/svx/statusitem.hxx new file mode 100644 index 000000000000..1a78fe677d0f --- /dev/null +++ b/include/svx/statusitem.hxx @@ -0,0 +1,46 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#pragma once + +#include <svl/stritem.hxx> +#include <svx/svxdllapi.h> + +enum class StatusCategory : sal_Int16 +{ + NONE, + TableCell, + Section, + TableOfContents, + Numbering, + ListStyle, + Formula, + RowColumn +}; + +class SVX_DLLPUBLIC SvxStatusItem final : public SfxStringItem +{ +private: + StatusCategory m_eCategory; + +public: + SvxStatusItem(TypedWhichId<SvxStatusItem> nWhich, const OUString& rString, + StatusCategory eStatusCategory); + + StatusCategory GetCategory() const { return m_eCategory; } + + virtual bool QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId = 0) const override; + virtual bool PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) override; + + virtual bool operator==(const SfxPoolItem& rItem) const override; + virtual SvxStatusItem* Clone(SfxItemPool* pPool = nullptr) const override; + + static SfxPoolItem* CreateDefault(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 9662aa83656f..76153cc0722d 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1326,6 +1326,13 @@ #define RID_SVXSTR_DOC_LOAD NC_("RID_SVXSTR_DOC_LOAD", "Loading document...") #define RID_SVXSTR_FIT_SLIDE NC_("RID_SVXSTR_FIT_SLIDE", "Fit slide to current window.") #define RID_SVXSTR_WARN_MISSING_SMARTART NC_("RID_SVXSTR_WARN_MISSING_SMARTART", "Could not load all SmartArt objects. Saving in Microsoft Office 2010 or later would avoid this issue.") +#define RID_SVXSTR_TABLECELL_HINT NC_("RID_SVXSTR_TABLECELL_HINT", "Table cell address. Click to open Table Properties dialog.") +#define RID_SVXSTR_SECTION_HINT NC_("RID_SVXSTR_SECTION_HINT", "Section name. Click to open Edit Sections dialog.") +#define RID_SVXSTR_TOC_HINT NC_("RID_SVXSTR_TOC_HINT", "Table of Contents. Click to open Table of Contents dialog.") +#define RID_SVXSTR_NUMBERING_HINT NC_("RID_SVXSTR_NUMBERING_HINT", "Numbering Level. Click to open Numbering dialog.") +#define RID_SVXSTR_LIST_STYLE_HINT NC_("RID_SVXSTR_LIST_STYLE_HINT", "List Style and Level.") +#define RID_SVXSTR_FORMULA_HINT NC_("RID_SVXSTR_FORMULA_HINT", "Formula") +#define RID_SVXSTR_ROW_COLUMN_HINT NC_("RID_SVXSTR_ROW_COLUMN_HINT", "Row and Column") #define RID_SVXSTR_ZOOMTOOL_HINT NC_("RID_SVXSTR_ZOOMTOOL_HINT", "Zoom factor. Right-click to change zoom factor or click to open Zoom dialog.") #define RID_SVXSTR_ZOOM_IN NC_("RID_SVXSTR_ZOOM_IN", "Zoom In") #define RID_SVXSTR_ZOOM_OUT NC_("RID_SVXSTR_ZOOM_OUT", "Zoom Out") diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc index 7d474a9510e6..0c744f007348 100644 --- a/include/svx/svxids.hrc +++ b/include/svx/svxids.hrc @@ -63,6 +63,7 @@ class SvxPostItTextItem; class SvxRulerItem; class SvxSetItem; class SvxSizeItem; +class SvxStatusItem; class SvxSmartTagItem; class SvxViewLayoutItem; class SvxZoomSliderItem; @@ -355,7 +356,7 @@ class XFillGradientItem; #define SID_ATTR_ZOOM_USER TypedWhichId<SfxUInt16Item>( SID_SVX_START + 222 ) #define SID_ATTR_POSITION TypedWhichId<SfxPointItem>( SID_SVX_START + 223 ) #define SID_ATTR_SIZE TypedWhichId<SvxSizeItem>( SID_SVX_START + 224 ) -#define SID_TABLE_CELL ( SID_SVX_START + 225 ) +#define SID_TABLE_CELL TypedWhichId<SvxStatusItem>( SID_SVX_START + 225 ) #define SID_ATTR_ALIGN_MARGIN ( SID_SVX_START + 228 ) #define SID_ATTR_ALIGN_STACKED ( SID_SVX_START + 229 ) #define SID_ATTR_ALIGN_LINEBREAK ( SID_SVX_START + 230 ) diff --git a/sc/source/ui/app/typemap.cxx b/sc/source/ui/app/typemap.cxx index ac98c6fc4b2e..0719a4ed6686 100644 --- a/sc/source/ui/app/typemap.cxx +++ b/sc/source/ui/app/typemap.cxx @@ -27,6 +27,7 @@ #include <svx/hlnkitem.hxx> #include <svl/srchitem.hxx> #include <svx/postattr.hxx> +#include <svx/statusitem.hxx> #include <editeng/postitem.hxx> #include <sfx2/tplpitem.hxx> #include <sfx2/zoomitem.hxx> diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx index 215587cfa0e5..7694061e6093 100644 --- a/sc/source/ui/view/cellsh.cxx +++ b/sc/source/ui/view/cellsh.cxx @@ -34,6 +34,7 @@ #include <vcl/EnumContext.hxx> #include <vcl/svapp.hxx> #include <svx/clipfmtitem.hxx> +#include <svx/statusitem.hxx> #include <cellsh.hxx> #include <sc.hrc> @@ -874,7 +875,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) // calculations etc. with date/time/Fail/position&size together - // #i34458# The SfxStringItem belongs only into SID_TABLE_CELL. It no longer has to be + // #i34458# The SvxStatusItem belongs only into SID_TABLE_CELL. It no longer has to be // duplicated in SID_ATTR_POSITION or SID_ATTR_SIZE for SvxPosSizeStatusBarControl. case SID_TABLE_CELL: { @@ -883,7 +884,7 @@ void ScCellShell::GetState(SfxItemSet &rSet) // In interpreter may happen via rescheduled Basic if ( rDoc.IsInInterpreter() ) - rSet.Put( SfxStringItem( nWhich, "..." ) ); + rSet.Put( SvxStatusItem( SID_TABLE_CELL, "...", StatusCategory::Formula ) ); else { FormulaError nErrCode = FormulaError::NONE; @@ -893,7 +894,9 @@ void ScCellShell::GetState(SfxItemSet &rSet) OUString aFuncStr; if ( pTabViewShell->GetFunction( aFuncStr, nErrCode ) ) - rSet.Put( SfxStringItem( nWhich, aFuncStr ) ); + { + rSet.Put( SvxStatusItem( SID_TABLE_CELL, aFuncStr, StatusCategory::Formula ) ); + } } } break; 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" || diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk index 092a4613f374..29f8d16454c7 100644 --- a/svx/Library_svx.mk +++ b/svx/Library_svx.mk @@ -200,6 +200,7 @@ $(eval $(call gb_Library_add_exception_objects,svx,\ svx/source/items/postattr \ svx/source/items/rotmodit \ svx/source/items/SmartTagItem \ + svx/source/items/statusitem \ svx/source/items/svxerr \ svx/source/items/viewlayoutitem \ svx/source/items/zoomslideritem \ diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index bc1d9e5c429f..d1f02f5b1d3b 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -10378,7 +10378,7 @@ SfxVoidItem DecrementIndent SID_DEC_INDENT ] -SfxStringItem StateTableCell SID_TABLE_CELL +SvxStatusItem StateTableCell SID_TABLE_CELL [ AutoUpdate = FALSE, diff --git a/svx/source/items/statusitem.cxx b/svx/source/items/statusitem.cxx new file mode 100644 index 000000000000..3b326f39ebe0 --- /dev/null +++ b/svx/source/items/statusitem.cxx @@ -0,0 +1,134 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <com/sun/star/uno/Sequence.hxx> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <comphelper/propertyvalue.hxx> +#include <svl/memberid.h> +#include <svx/statusitem.hxx> + +constexpr OUStringLiteral STATUS_PARAM_VALUE = u"Value"; +constexpr OUStringLiteral STATUS_PARAM_TYPE = u"Type"; +constexpr int STATUS_PARAMS = 2; + +SvxStatusItem::SvxStatusItem(TypedWhichId<SvxStatusItem> nWhich, const OUString& rString, + StatusCategory eCategory) + : SfxStringItem(nWhich, rString) + , m_eCategory(eCategory) +{ +} + +bool SvxStatusItem::operator==(const SfxPoolItem& rItem) const +{ + return SfxStringItem::operator==(rItem) + && static_cast<const SvxStatusItem&>(rItem).m_eCategory == m_eCategory; +} + +bool SvxStatusItem::QueryValue(css::uno::Any& rVal, sal_uInt8 nMemberId) const +{ + nMemberId &= ~CONVERT_TWIPS; + + switch (nMemberId) + { + case 0: + { + css::uno::Sequence<css::beans::PropertyValue> aSeq{ + comphelper::makePropertyValue(STATUS_PARAM_VALUE, GetValue()), + comphelper::makePropertyValue(STATUS_PARAM_TYPE, + static_cast<sal_Int16>(m_eCategory)) + }; + assert(aSeq.getLength() == STATUS_PARAMS); + rVal <<= aSeq; + break; + } + case MID_VALUE: + rVal <<= GetValue(); + break; + case MID_TYPE: + rVal <<= static_cast<sal_Int16>(m_eCategory); + break; + default: + return false; + } + + return true; +} + +bool SvxStatusItem::PutValue(const css::uno::Any& rVal, sal_uInt8 nMemberId) +{ + nMemberId &= ~CONVERT_TWIPS; + bool bRet; + switch (nMemberId) + { + case 0: + { + css::uno::Sequence<css::beans::PropertyValue> aSeq; + if ((rVal >>= aSeq) && (aSeq.getLength() == STATUS_PARAMS)) + { + OUString sValueTmp; + sal_Int16 nTypeTmp(0); + bool bAllConverted(true); + sal_Int16 nConvertedCount(0); + for (const auto& rProp : std::as_const(aSeq)) + { + if (rProp.Name == STATUS_PARAM_VALUE) + { + bAllConverted &= (rProp.Value >>= sValueTmp); + ++nConvertedCount; + } + else if (rProp.Name == STATUS_PARAM_TYPE) + { + bAllConverted &= (rProp.Value >>= nTypeTmp); + ++nConvertedCount; + } + } + + if (bAllConverted && nConvertedCount == STATUS_PARAMS) + { + SetValue(sValueTmp); + m_eCategory = static_cast<StatusCategory>(nTypeTmp); + return true; + } + } + return false; + } + case MID_TYPE: + { + sal_Int16 nCategory; + bRet = (rVal >>= nCategory); + if (bRet) + m_eCategory = static_cast<StatusCategory>(nCategory); + break; + } + case MID_VALUE: + { + OUString aStr; + bRet = (rVal >>= aStr); + if (bRet) + SetValue(aStr); + break; + } + default: + return false; + } + + return bRet; +} + +SvxStatusItem* SvxStatusItem::Clone(SfxItemPool* /*pPool*/) const +{ + return new SvxStatusItem(*this); +} + +SfxPoolItem* SvxStatusItem::CreateDefault() +{ + return new SvxStatusItem(TypedWhichId<SvxStatusItem>(0), OUString(), StatusCategory::NONE); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 129ac67eb085..768a312fabef 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -32,6 +32,9 @@ #include <svl/stritem.hxx> #include <svl/ptitem.hxx> #include <sfx2/module.hxx> +#include <svx/dialmgr.hxx> +#include <svx/statusitem.hxx> +#include <svx/strings.hrc> #include <svl/intitem.hxx> #include <sal/log.hxx> @@ -321,8 +324,48 @@ void SvxPosSizeStatusBarControl::StateChangedAtStatusBarControl( sal_uInt16 nSID pImpl->bSize = true; pImpl->bTable = false; } + else if ( auto pStatusItem = dynamic_cast<const SvxStatusItem*>( pState) ) + { + // show string (table cell or different) + pImpl->aStr = pStatusItem->GetValue(); + pImpl->bTable = true; + pImpl->bPos = false; + pImpl->bSize = false; + if (!pImpl->aStr.isEmpty()) + { + OUString sTip; + switch (pStatusItem->GetCategory()) + { + case StatusCategory::TableCell: + sTip = SvxResId(RID_SVXSTR_TABLECELL_HINT); + break; + case StatusCategory::Section: + sTip = SvxResId(RID_SVXSTR_SECTION_HINT); + break; + case StatusCategory::TableOfContents: + sTip = SvxResId(RID_SVXSTR_TOC_HINT); + break; + case StatusCategory::Numbering: + sTip = SvxResId(RID_SVXSTR_NUMBERING_HINT); + break; + case StatusCategory::ListStyle: + sTip = SvxResId(RID_SVXSTR_LIST_STYLE_HINT); + break; + case StatusCategory::Formula: + sTip = SvxResId(RID_SVXSTR_FORMULA_HINT); + break; + case StatusCategory::RowColumn: + sTip = SvxResId(RID_SVXSTR_ROW_COLUMN_HINT); + break; + case StatusCategory::NONE: + break; + } + GetStatusBar().SetQuickHelpText(GetId(), sTip); + } + } else if ( auto pStringItem = dynamic_cast<const SfxStringItem*>( pState) ) { + SAL_WARN( "svx.stbcrtls", "this should be a SvxStatusItem not a SfxStringItem" ); // show string (table cel or different) pImpl->aStr = pStringItem->GetValue(); pImpl->bTable = true; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 1b59059d11e2..a52f6a15dd1e 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -55,6 +55,7 @@ #include <svl/ptitem.hxx> #include <editeng/sizeitem.hxx> #include <editeng/langitem.hxx> +#include <svx/statusitem.hxx> #include <svx/svdview.hxx> #include <svx/svdhdl.hxx> #include <svx/svdoutl.hxx> @@ -4204,7 +4205,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) rBnd.Invalidate(SID_ATTR_POSITION); } rBnd.Invalidate(SID_ATTR_SIZE); - const SfxStringItem aCell( SID_TABLE_CELL, OUString() ); + const SvxStatusItem aCell( SID_TABLE_CELL, OUString(), StatusCategory::NONE ); rBnd.SetState( aCell ); } } diff --git a/sw/source/uibase/shells/slotadd.cxx b/sw/source/uibase/shells/slotadd.cxx index 3aa3469db14d..b8253ce75f0b 100644 --- a/sw/source/uibase/shells/slotadd.cxx +++ b/sw/source/uibase/shells/slotadd.cxx @@ -30,6 +30,7 @@ #include <sfx2/objitem.hxx> #include <sfx2/objsh.hxx> #include <svx/rulritem.hxx> +#include <svx/statusitem.hxx> #include <sfx2/zoomitem.hxx> #include <svx/viewlayoutitem.hxx> #include <svx/zoomslideritem.hxx> diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index b9f9d821826f..2a4487f9251f 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -45,6 +45,7 @@ #include <sfx2/request.hxx> #include <sfx2/docfile.hxx> #include <svx/srchdlg.hxx> +#include <svx/statusitem.hxx> #include <svl/srchitem.hxx> #include <sfx2/sfxhtml.hxx> #include <swtypes.hxx> @@ -426,7 +427,7 @@ void SwSrcView::GetState(SfxItemSet& rSet) aPos += " : " + SwResId(STR_SRCVIEW_COL); aPos += OUString::number( aSel.GetEnd().GetIndex()+1 ); - SfxStringItem aItem( nWhich, aPos ); + SvxStatusItem aItem( SID_TABLE_CELL, aPos, StatusCategory::RowColumn ); rSet.Put( aItem ); } break; diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 5235e3bf4b91..baff544cb7f8 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -46,9 +46,10 @@ #include <sfx2/sfxdlg.hxx> #include <sfx2/filedlghelper.hxx> #include <editeng/langitem.hxx> +#include <svx/linkwarn.hxx> +#include <svx/statusitem.hxx> #include <svx/viewlayoutitem.hxx> #include <svx/zoomslideritem.hxx> -#include <svx/linkwarn.hxx> #include <sfx2/htmlmode.hxx> #include <vcl/svapp.hxx> #include <sfx2/app.hxx> @@ -1963,12 +1964,14 @@ void SwView::StateStatusLine(SfxItemSet &rSet) } else { + StatusCategory eCategory(StatusCategory::NONE); OUString sStr; if( rShell.IsCursorInTable() ) { // table name + cell coordinate sStr = rShell.GetTableFormat()->GetName() + ":"; sStr += rShell.GetBoxNms(); + eCategory = StatusCategory::TableCell; } else { @@ -1982,17 +1985,22 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { const SwTOXBase* pTOX = m_pWrtShell->GetCurTOX(); if( pTOX ) + { sStr = pTOX->GetTOXName(); + eCategory = StatusCategory::TableOfContents; + } else { OSL_ENSURE( false, "Unknown kind of section" ); sStr = pCurrSect->GetSectionName(); + eCategory = StatusCategory::Section; } } break; default: sStr = pCurrSect->GetSectionName(); + eCategory = StatusCategory::Section; break; } } @@ -2019,6 +2027,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet) { if(!sStr.isEmpty()) sStr += sStatusDelim; + if (eCategory == StatusCategory::NONE) + eCategory = StatusCategory::ListStyle; sStr += rNumStyle; } } @@ -2026,7 +2036,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet) if (!sStr.isEmpty()) sStr += sStatusDelim; sStr += SwResId(STR_NUM_LEVEL) + OUString::number( nNumLevel + 1 ); - + if (eCategory == StatusCategory::NONE) + eCategory = StatusCategory::Numbering; } } const int nOutlineLevel = rShell.GetCurrentParaOutlineLevel(); @@ -2042,6 +2053,8 @@ void SwView::StateStatusLine(SfxItemSet &rSet) else sStr += SwResId(STR_NUM_OUTLINE); sStr += OUString::number( nOutlineLevel); + if (eCategory == StatusCategory::NONE) + eCategory = StatusCategory::Numbering; } if( rShell.HasReadonlySel() ) @@ -2051,7 +2064,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet) sStr = SwResId(SW_STR_READONLY) + sStr; } if (!sStr.isEmpty()) - rSet.Put( SfxStringItem( SID_TABLE_CELL, sStr )); + rSet.Put( SvxStatusItem( SID_TABLE_CELL, sStr, eCategory )); } break; case FN_STAT_SELMODE: