LibreOffice Module sc (master)
1
sc
source
ui
view
SparklineShell.cxx
Go to the documentation of this file.
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 <
scitems.hxx
>
12
#include <
sfx2/objface.hxx
>
13
#include <
sfx2/objsh.hxx
>
14
#include <
sfx2/request.hxx
>
15
#include <
svl/whiter.hxx
>
16
#include <
vcl/EnumContext.hxx
>
17
18
#include <sc.hrc>
19
#include <
SparklineShell.hxx
>
20
#include <
tabvwsh.hxx
>
21
#include <docsh.hxx>
22
#include <document.hxx>
23
24
#define ShellClass_SparklineShell
25
#include <scslots.hxx>
26
27
namespace
sc
28
{
29
SFX_IMPL_INTERFACE
(SparklineShell,
SfxShell
)
30
31
void
SparklineShell
::InitInterface_Impl() { GetStaticInterface()->RegisterPopupMenu(
"sparkline"
); }
32
33
SparklineShell::SparklineShell
(
ScTabViewShell
* pViewShell)
34
:
SfxShell
(pViewShell)
35
, m_pViewShell(pViewShell)
36
{
37
SetPool
(&
m_pViewShell
->
GetPool
());
38
ScViewData
& rViewData =
m_pViewShell
->
GetViewData
();
39
SfxUndoManager
* pUndoManager = rViewData.
GetSfxDocShell
()->
GetUndoManager
();
40
SetUndoManager
(pUndoManager);
41
if
(!rViewData.
GetDocument
().
IsUndoEnabled
())
42
{
43
pUndoManager->
SetMaxUndoActionCount
(0);
44
}
45
SetName
(
"Sparkline"
);
46
SfxShell::SetContextName
(
47
vcl::EnumContext::GetContextName
(
vcl::EnumContext::Context::Sparkline
));
48
}
49
50
SparklineShell::~SparklineShell
() =
default
;
51
52
}
// end sc namespace
53
54
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
EnumContext.hxx
SparklineShell.hxx
ScDocument::IsUndoEnabled
bool IsUndoEnabled() const
Definition:
document.hxx:1595
ScTabViewShell
Definition:
tabvwsh.hxx:95
ScTabView::GetViewData
ScViewData & GetViewData()
Definition:
tabview.hxx:344
ScViewData
Definition:
viewdata.hxx:271
ScViewData::GetDocument
ScDocument & GetDocument() const
Definition:
viewdata.hxx:380
ScViewData::GetSfxDocShell
SfxObjectShell * GetSfxDocShell() const
Definition:
viewdata.hxx:358
SfxShell
SfxShell::SetUndoManager
void SetUndoManager(SfxUndoManager *pNewUndoMgr)
SfxShell::GetPool
SfxItemPool & GetPool() const
SfxShell::SetContextName
void SetContextName(const OUString &rsContextName)
SfxShell::GetUndoManager
virtual SfxUndoManager * GetUndoManager()
SfxShell::SetPool
void SetPool(SfxItemPool *pNewPool)
SfxShell::SetName
void SetName(const OUString &rName)
SfxUndoManager
SfxUndoManager::SetMaxUndoActionCount
void SetMaxUndoActionCount(size_t nMaxUndoActionCount)
sc::SparklineShell
Shell to handle the sparkline context.
Definition:
SparklineShell.hxx:24
sc::SparklineShell::SparklineShell
SparklineShell(ScTabViewShell *pView)
Definition:
SparklineShell.cxx:33
sc::SparklineShell::~SparklineShell
virtual ~SparklineShell() override
sc::SparklineShell::m_pViewShell
ScTabViewShell * m_pViewShell
Definition:
SparklineShell.hxx:37
vcl::EnumContext::Context::Sparkline
@ Sparkline
vcl::EnumContext::GetContextName
static const OUString & GetContextName(const Context eContext)
sc
CAUTION! The following defines must be in the same namespace as the respective type.
Definition:
broadcast.cxx:15
objface.hxx
objsh.hxx
request.hxx
scitems.hxx
SFX_IMPL_INTERFACE
#define SFX_IMPL_INTERFACE(Class, SuperClass)
tabvwsh.hxx
whiter.hxx
Generated on Sun Jul 30 2023 04:29:53 for LibreOffice Module sc (master) by
1.9.3