tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / view / SparklineShell.cxx
blob1cf505df8a371877e4b466738cf01a1730311d5a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #include <sfx2/objface.hxx>
12 #include <sfx2/objsh.hxx>
13 #include <vcl/EnumContext.hxx>
15 #include <SparklineShell.hxx>
16 #include <tabvwsh.hxx>
17 #include <document.hxx>
19 #define ShellClass_SparklineShell
20 #include <scslots.hxx>
22 namespace sc
24 SFX_IMPL_INTERFACE(SparklineShell, SfxShell)
26 void SparklineShell::InitInterface_Impl()
28 GetStaticInterface()->RegisterPopupMenu(u"sparkline"_ustr);
31 SparklineShell::SparklineShell(ScTabViewShell* pViewShell)
32 : SfxShell(pViewShell)
33 , m_pViewShell(pViewShell)
35 SetPool(&m_pViewShell->GetPool());
36 ScViewData& rViewData = m_pViewShell->GetViewData();
37 SfxUndoManager* pUndoManager = rViewData.GetSfxDocShell()->GetUndoManager();
38 SetUndoManager(pUndoManager);
39 if (!rViewData.GetDocument().IsUndoEnabled())
41 pUndoManager->SetMaxUndoActionCount(0);
43 SetName(u"Sparkline"_ustr);
44 SfxShell::SetContextName(
45 vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Sparkline));
48 SparklineShell::~SparklineShell() = default;
50 } // end sc namespace
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */