include/vcl/EnumContext.hxx | 1 officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu | 5 officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs | 2 sc/Library_sc.mk | 1 sc/UIConfig_scalc.mk | 1 sc/inc/document.hxx | 8 sc/inc/shellids.hxx | 1 sc/sdi/SparklineShell.sdi | 17 ++ sc/sdi/scslots.sdi | 1 sc/source/ui/app/scdll.cxx | 2 sc/source/ui/inc/SparklineShell.hxx | 40 ++++ sc/source/ui/inc/tabvwsh.hxx | 6 sc/source/ui/view/SparklineShell.cxx | 54 ++++++ sc/source/ui/view/tabview3.cxx | 13 + sc/source/ui/view/tabvwsh4.cxx | 42 ++++- sc/uiconfig/scalc/popupmenu/sparkline.xml | 81 ++++++++++ svx/source/sidebar/paragraph/ParaPropertyPanel.cxx | 1 vcl/source/window/EnumContext.cxx | 1 18 files changed, 269 insertions(+), 8 deletions(-)
New commits: commit e1f3f2e00c37173e5f6f1cbb5235ab95b100bde7 Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Fri Apr 15 00:55:54 2022 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Fri Apr 15 02:49:00 2022 +0200 sc: introduce SparklineShell and Sparkline context Having a separate sparkline context is very useful, so we can add a custom UI when the user has the cursor over a sparkline. This will allow a "Sparkline" tab for NotebookBar and its own deck in Sidebar, activated only when the sparkline is present. Also the pop-up menu can be customized specifically for the sparkline, but this may be less useful. For the sparkline context we need a custom shell - SparklineShell where now all the UNO commands can be implemented (not done in this commit). Change-Id: Idca2ad946af3afdd1b494744b80c9c093eec602c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133022 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/vcl/EnumContext.hxx b/include/vcl/EnumContext.hxx index 639a427a138a..dec5711b6ba5 100644 --- a/include/vcl/EnumContext.hxx +++ b/include/vcl/EnumContext.hxx @@ -96,6 +96,7 @@ public: Text, TextObject, Trendline, + Sparkline, // Default context of an application. Do we need this? Default, diff --git a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu index ad61ee9033d6..c64da92d8789 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/Sidebar.xcu @@ -337,6 +337,7 @@ Calc, default, visible ; Calc, EditCell, visible ; Calc, Pivot, visible ; + Calc, Sparkline, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -372,6 +373,7 @@ Calc, DrawLine, hidden ; Calc, EditCell, visible ; Calc, Pivot, visible, .uno:CellTextDlg ; + Calc, Sparkline, visible ; DrawImpress, Draw, hidden ; DrawImpress, DrawFontwork, hidden ; DrawImpress, DrawText, visible ; @@ -1205,6 +1207,7 @@ Calc, default, visible ; Calc, EditCell, visible ; Calc, Pivot, visible ; + Calc, Sparkline, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -1238,6 +1241,7 @@ Calc, EditCell, visible ; Calc, default, visible ; Calc, Pivot, visible ; + Calc, Sparkline, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> @@ -1271,6 +1275,7 @@ Calc, EditCell, visible ; Calc, default, visible ; Calc, Pivot, visible ; + Calc, Sparkline, visible ; </value> </prop> <prop oor:name="ImplementationURL" oor:type="xs:string"> diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs index 53ad678e3574..1eb7007d3008 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs @@ -109,7 +109,7 @@ 2 Context name Know context names are 3DObject, Annotation, Auditing, Axis, Cell, Chart, Draw, DrawPage, DrawText, EditCell, ErrorBar, Form, Frame, Graphic, HandoutPage, MasterPage, Media, Multiobj, OLE, OutlineText, - Pivot, Series, SlidesorterPage, Table, Text, TextObject, Trendline + Pivot, Series, SlidesorterPage, Table, Text, TextObject, Trendline, Sparkline default Special values: diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index bd69b9e57c24..0ba02c9449ac 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -660,6 +660,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/view/scextopt \ sc/source/ui/view/select \ sc/source/ui/view/selectionstate \ + sc/source/ui/view/SparklineShell \ sc/source/ui/view/spelldialog \ sc/source/ui/view/spelleng \ sc/source/ui/view/spellcheckcontext \ diff --git a/sc/UIConfig_scalc.mk b/sc/UIConfig_scalc.mk index 643645ee7432..cf5f7e0951bf 100644 --- a/sc/UIConfig_scalc.mk +++ b/sc/UIConfig_scalc.mk @@ -37,6 +37,7 @@ $(eval $(call gb_UIConfig_add_popupmenufiles,modules/scalc,\ sc/uiconfig/scalc/popupmenu/rowheader \ sc/uiconfig/scalc/popupmenu/row_operations \ sc/uiconfig/scalc/popupmenu/sheettab \ + sc/uiconfig/scalc/popupmenu/sparkline \ )) $(eval $(call gb_UIConfig_add_statusbarfiles,modules/scalc,\ diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index dff68fc6e344..26e43c046164 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -841,6 +841,14 @@ public: SC_DLLPUBLIC ScDPCollection* GetDPCollection(); SC_DLLPUBLIC const ScDPCollection* GetDPCollection() const; SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const; + SC_DLLPUBLIC ScDPObject* GetDPAtCursor(ScAddress const& rAddress) const + { + return GetDPAtCursor(rAddress.Col(), rAddress.Row(), rAddress.Tab()); + } + SC_DLLPUBLIC bool HasDataPilotAtPosition(ScAddress const& rAddress) const + { + return GetDPAtCursor(rAddress) != nullptr; + } ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const; void StopTemporaryChartLock(); diff --git a/sc/inc/shellids.hxx b/sc/inc/shellids.hxx index 9f4fbf7a991c..ecef989d87bb 100644 --- a/sc/inc/shellids.hxx +++ b/sc/inc/shellids.hxx @@ -39,5 +39,6 @@ #define SCID_GRAPHIC_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(15)) #define SCID_PAGEBREAK_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(16)) #define SCID_MEDIA_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(17)) +#define SCID_SPARKLINE_SHELL (SFX_INTERFACE_SC_START+SfxInterfaceId(18)) /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/sdi/SparklineShell.sdi b/sc/sdi/SparklineShell.sdi new file mode 100644 index 000000000000..24e939e04ea0 --- /dev/null +++ b/sc/sdi/SparklineShell.sdi @@ -0,0 +1,17 @@ +/* + * 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/. + * + */ + +interface Sparkline +{ +} + +shell SparklineShell +{ + import Sparkline; +} diff --git a/sc/sdi/scslots.sdi b/sc/sdi/scslots.sdi index 8cf0aaddc0fe..f6ccd7113d5b 100644 --- a/sc/sdi/scslots.sdi +++ b/sc/sdi/scslots.sdi @@ -58,6 +58,7 @@ module StarCalc include "graphsh.sdi" include "pgbrksh.sdi" include "mediash.sdi" + include "SparklineShell.sdi" } diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 58efb29ecb9a..2256ee2e125b 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -51,6 +51,7 @@ #include <mediash.hxx> #include <pgbrksh.hxx> #include <scdll.hxx> +#include <SparklineShell.hxx> #include <appoptio.hxx> #include <searchresults.hxx> @@ -125,6 +126,7 @@ void ScDLL::Init() ScDrawTextObjectBar ::RegisterInterface(pMod); ScEditShell ::RegisterInterface(pMod); ScPivotShell ::RegisterInterface(pMod); + sc::SparklineShell ::RegisterInterface(pMod); ScAuditingShell ::RegisterInterface(pMod); ScFormatShell ::RegisterInterface(pMod); ScCellShell ::RegisterInterface(pMod); diff --git a/sc/source/ui/inc/SparklineShell.hxx b/sc/source/ui/inc/SparklineShell.hxx new file mode 100644 index 000000000000..11028dd8a461 --- /dev/null +++ b/sc/source/ui/inc/SparklineShell.hxx @@ -0,0 +1,40 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 <sfx2/shell.hxx> + +#include <shellids.hxx> + +class ScTabViewShell; +class SfxModule; + +namespace sc +{ +class SparklineShell final : public SfxShell +{ +public: + SFX_DECL_INTERFACE(SCID_SPARKLINE_SHELL) + +private: + /// SfxInterface initializer. + static void InitInterface_Impl(); + +public: + SparklineShell(ScTabViewShell* pView); + virtual ~SparklineShell() override; + +private: + ScTabViewShell* m_pViewShell; +}; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/tabvwsh.hxx b/sc/source/ui/inc/tabvwsh.hxx index 15fba84d2f25..91acb19d39a3 100644 --- a/sc/source/ui/inc/tabvwsh.hxx +++ b/sc/source/ui/inc/tabvwsh.hxx @@ -60,6 +60,7 @@ class ScDPObject; class ScNavigatorSettings; class ScRangeName; class ScDrawTransferObj; +namespace sc { class SparklineShell; } struct ScHeaderFieldData; @@ -85,7 +86,8 @@ enum ObjectSelectionType OST_OleObject, OST_Chart, OST_Graphic, - OST_Media + OST_Media, + OST_Sparkline, }; class ScFormEditData; @@ -100,6 +102,7 @@ private: std::unique_ptr<ScDrawTextObjectBar> pDrawTextShell; std::unique_ptr<ScEditShell> pEditShell; std::unique_ptr<ScPivotShell> pPivotShell; + std::unique_ptr<sc::SparklineShell> m_pSparklineShell; std::unique_ptr<ScAuditingShell> pAuditingShell; std::unique_ptr<ScDrawFormShell> pDrawFormShell; std::unique_ptr<ScCellShell> pCellShell; @@ -280,6 +283,7 @@ public: void SetDrawTextShell( bool bActive ); void SetPivotShell( bool bActive ); + void SetSparklineShell(bool bActive); void SetDialogDPObject( std::unique_ptr<ScDPObject> pObj ); const ScDPObject* GetDialogDPObject() const { return pDialogDPObject.get(); } diff --git a/sc/source/ui/view/SparklineShell.cxx b/sc/source/ui/view/SparklineShell.cxx new file mode 100644 index 000000000000..3b3c4f8399ed --- /dev/null +++ b/sc/source/ui/view/SparklineShell.cxx @@ -0,0 +1,54 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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 <scitems.hxx> +#include <sfx2/objface.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/request.hxx> +#include <svl/whiter.hxx> +#include <vcl/EnumContext.hxx> + +#include <sc.hrc> +#include <SparklineShell.hxx> +#include <tabvwsh.hxx> +#include <docsh.hxx> +#include <document.hxx> + +#define ShellClass_SparklineShell +#include <scslots.hxx> + +namespace sc +{ +SFX_IMPL_INTERFACE(SparklineShell, SfxShell) + +void SparklineShell::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu("sparkline"); } + +SparklineShell::SparklineShell(ScTabViewShell* pViewShell) + : SfxShell(pViewShell) + , m_pViewShell(pViewShell) +{ + SetPool(&m_pViewShell->GetPool()); + ScViewData& rViewData = m_pViewShell->GetViewData(); + SfxUndoManager* pUndoManager = rViewData.GetSfxDocShell()->GetUndoManager(); + SetUndoManager(pUndoManager); + if (!rViewData.GetDocument().IsUndoEnabled()) + { + pUndoManager->SetMaxUndoActionCount(0); + } + SetName("Sparkline"); + SfxShell::SetContextName( + vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Sparkline)); +} + +SparklineShell::~SparklineShell() = default; + +} // end sc namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx index 98d28453aca1..58c0e9a3c84f 100644 --- a/sc/source/ui/view/tabview3.cxx +++ b/sc/source/ui/view/tabview3.cxx @@ -634,10 +634,15 @@ void ScTabView::CursorPosChanged() // Broadcast, so that other Views of the document also switch - ScDocument& rDoc = aViewData.GetDocument(); - bool bDP = nullptr != rDoc.GetDPAtCursor( - aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() ); - aViewData.GetViewShell()->SetPivotShell(bDP); + ScDocument& rDocument = aViewData.GetDocument(); + bool bDataPilot = rDocument.HasDataPilotAtPosition(aViewData.GetCurPos()); + aViewData.GetViewShell()->SetPivotShell(bDataPilot); + + if (!bDataPilot) + { + bool bSparkline = rDocument.HasSparkline(aViewData.GetCurPos()); + aViewData.GetViewShell()->SetSparklineShell(bSparkline); + } // UpdateInputHandler now in CellContentChanged diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx index 1dab645a194e..fb41a4b1d715 100644 --- a/sc/source/ui/view/tabvwsh4.cxx +++ b/sc/source/ui/view/tabvwsh4.cxx @@ -46,6 +46,7 @@ #include <drformsh.hxx> #include <editsh.hxx> #include <pivotsh.hxx> +#include <SparklineShell.hxx> #include <auditsh.hxx> #include <drtxtob.hxx> #include <inputhdl.hxx> @@ -690,6 +691,25 @@ void ScTabViewShell::SetPivotShell( bool bActive ) SetCurSubShell(OST_Cell); } +void ScTabViewShell::SetSparklineShell(bool bActive) +{ + if (eCurOST != OST_Sparkline && eCurOST != OST_Cell) + return; + + if (bActive) + { + bActiveDrawTextSh = bActiveDrawSh = false; + bActiveDrawFormSh=false; + bActiveGraphicSh=false; + bActiveMediaSh=false; + bActiveOleObjectSh=false; + bActiveChartSh=false; + SetCurSubShell(OST_Sparkline); + } + else + SetCurSubShell(OST_Cell); +} + void ScTabViewShell::SetAuditShell( bool bActive ) { if ( bActive ) @@ -948,6 +968,20 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, bool bForce) bCellBrush = true; } break; + case OST_Sparkline: + { + AddSubShell(*pCellShell); + if(bPgBrk) AddSubShell(*pPageBreakShell); + + if (!m_pSparklineShell) + { + m_pSparklineShell.reset(new sc::SparklineShell(this)); + m_pSparklineShell->SetRepeatTarget(&aTarget); + } + AddSubShell(*m_pSparklineShell); + bCellBrush = true; + } + break; default: OSL_FAIL("wrong shell requested"); break; @@ -992,11 +1026,14 @@ SfxShell* ScTabViewShell::GetMySubShell() const SfxShell* pSub = const_cast<ScTabViewShell*>(this)->GetSubShell(nPos); while (pSub) { - if ( pSub == pDrawShell.get() || pSub == pDrawTextShell.get() || pSub == pEditShell.get() || + if (pSub == pDrawShell.get() || pSub == pDrawTextShell.get() || pSub == pEditShell.get() || pSub == pPivotShell.get() || pSub == pAuditingShell.get() || pSub == pDrawFormShell.get() || pSub == pCellShell.get() || pSub == pOleObjectShell.get() || pSub == pChartShell.get() || - pSub == pGraphicShell.get() || pSub == pMediaShell.get() || pSub == pPageBreakShell.get()) + pSub == pGraphicShell.get() || pSub == pMediaShell.get() || pSub == pPageBreakShell.get() || + pSub == m_pSparklineShell.get()) + { return pSub; // found + } pSub = const_cast<ScTabViewShell*>(this)->GetSubShell(++nPos); } @@ -1812,6 +1849,7 @@ ScTabViewShell::~ScTabViewShell() pDrawTextShell.reset(); pEditShell.reset(); pPivotShell.reset(); + m_pSparklineShell.reset(); pAuditingShell.reset(); pCurFrameLine.reset(); mpFormEditData.reset(); diff --git a/sc/uiconfig/scalc/popupmenu/sparkline.xml b/sc/uiconfig/scalc/popupmenu/sparkline.xml new file mode 100644 index 000000000000..fb7f4ff9ecd8 --- /dev/null +++ b/sc/uiconfig/scalc/popupmenu/sparkline.xml @@ -0,0 +1,81 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * 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/. + * +--> +<menu:menupopup xmlns:menu="http://openoffice.org/2001/menu"> + <menu:menuitem menu:id=".uno:Cut"/> + <menu:menuitem menu:id=".uno:Copy"/> + <menu:menuitem menu:id=".uno:Paste"/> + <menu:menu menu:id=".uno:PasteSpecialMenu"> + <menu:menupopup> + <menu:menuitem menu:id=".uno:PasteUnformatted"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:PasteOnlyText"/> + <menu:menuitem menu:id=".uno:PasteOnlyValue"/> + <menu:menuitem menu:id=".uno:PasteOnlyFormula"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:PasteTransposed"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:PasteSpecial"/> + </menu:menupopup> + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:DataSelect"/> + <menu:menuitem menu:id=".uno:CurrentValidation"/> + <menu:menuitem menu:id=".uno:DefineCurrentName"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertCell"/> + <menu:menuitem menu:id=".uno:DeleteCell"/> + <menu:menuitem menu:id=".uno:Delete"/> + <menu:menuitem menu:id=".uno:MergeCells"/> + <menu:menuitem menu:id=".uno:SplitCell"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:FormatPaintbrush"/> + <menu:menuitem menu:id=".uno:ResetAttributes"/> + <menu:menu menu:id=".uno:FormatStylesMenu"> + <menu:menupopup> + <menu:menuitem menu:id=".uno:EditStyle"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:DefaultCellStylesmenu" menu:style="radio"/> + <menu:menuitem menu:id=".uno:Accent1CellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:Accent2CellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:Accent3CellStyles" menu:style="radio"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:BadCellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:ErrorCellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:GoodCellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:NeutralCellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:WarningCellStyles" menu:style="radio"/> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:FootnoteCellStyles" menu:style="radio"/> + <menu:menuitem menu:id=".uno:NoteCellStyles" menu:style="radio"/> + </menu:menupopup> + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:InsertAnnotation"/> + <menu:menuitem menu:id=".uno:EditAnnotation"/> + <menu:menuitem menu:id=".uno:DeleteNote"/> + <menu:menuitem menu:id=".uno:ShowNote"/> + <menu:menuitem menu:id=".uno:HideNote"/> + <menu:menuseparator/> + <menu:menu menu:id=".uno:FormatSparklineMenu"> + <menu:menupopup> + <menu:menuitem menu:id=".uno:InsertSparkline"/> + <menu:menuitem menu:id=".uno:DeleteSparkline"/> + <menu:menuitem menu:id=".uno:DeleteSparklineGroup"/> + <menu:menuitem menu:id=".uno:EditSparklineGroup"/> + <menu:menuitem menu:id=".uno:EditSparkline"/> + <menu:menuitem menu:id=".uno:GroupSparklines"/> + <menu:menuitem menu:id=".uno:UngroupSparklines"/> + </menu:menupopup> + </menu:menu> + <menu:menuseparator/> + <menu:menuitem menu:id=".uno:CurrentConditionalFormatDialog"/> + <menu:menuitem menu:id=".uno:CurrentConditionalFormatManagerDialog"/> + <menu:menuitem menu:id=".uno:FormatCellDialog"/> +</menu:menupopup> diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 5b592a7f4c98..77962e065aeb 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -116,6 +116,7 @@ void ParaPropertyPanel::HandleContextChange ( case CombinedEnumContext(Application::Calc, Context::EditCell): case CombinedEnumContext(Application::Calc, Context::Cell): case CombinedEnumContext(Application::Calc, Context::Pivot): + case CombinedEnumContext(Application::Calc, Context::Sparkline): case CombinedEnumContext(Application::DrawImpress, Context::Text): case CombinedEnumContext(Application::DrawImpress, Context::OutlineText): break; diff --git a/vcl/source/window/EnumContext.cxx b/vcl/source/window/EnumContext.cxx index b407a8069bc7..2eb23e591a5a 100644 --- a/vcl/source/window/EnumContext.cxx +++ b/vcl/source/window/EnumContext.cxx @@ -184,6 +184,7 @@ void EnumContext::ProvideContextContainers() AddEntry("Text", Context::Text); AddEntry("TextObject", Context::TextObject); AddEntry("Trendline", Context::Trendline); + AddEntry("Sparkline", Context::Sparkline); // other general contexts AddEntry("any", Context::Any);