Coverage Report

Created: 2025-07-07 10:01

/src/libreoffice/sc/source/ui/view/SparklineShell.cxx
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
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/.
8
 *
9
 */
10
11
#include <sfx2/objface.hxx>
12
#include <sfx2/objsh.hxx>
13
#include <vcl/EnumContext.hxx>
14
15
#include <SparklineShell.hxx>
16
#include <tabvwsh.hxx>
17
#include <document.hxx>
18
19
#define ShellClass_SparklineShell
20
#include <scslots.hxx>
21
22
namespace sc
23
{
24
SFX_IMPL_INTERFACE(SparklineShell, SfxShell)
25
26
void SparklineShell::InitInterface_Impl()
27
11
{
28
11
    GetStaticInterface()->RegisterPopupMenu(u"sparkline"_ustr);
29
11
}
30
31
SparklineShell::SparklineShell(ScTabViewShell* pViewShell)
32
0
    : SfxShell(pViewShell)
33
0
    , m_pViewShell(pViewShell)
34
0
{
35
0
    SetPool(&m_pViewShell->GetPool());
36
0
    ScViewData& rViewData = m_pViewShell->GetViewData();
37
0
    SfxUndoManager* pUndoManager = rViewData.GetSfxDocShell().GetUndoManager();
38
0
    SetUndoManager(pUndoManager);
39
0
    if (!rViewData.GetDocument().IsUndoEnabled())
40
0
    {
41
0
        pUndoManager->SetMaxUndoActionCount(0);
42
0
    }
43
0
    SetName(u"Sparkline"_ustr);
44
0
    SfxShell::SetContextName(
45
0
        vcl::EnumContext::GetContextName(vcl::EnumContext::Context::Sparkline));
46
0
}
47
48
0
SparklineShell::~SparklineShell() = default;
49
50
} // end sc namespace
51
52
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */