LibreOffice Module sfx2 (master)
1
sfx2
source
control
msg.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
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#include <
svl/itempool.hxx
>
21
#include <
sfx2/msg.hxx
>
22
23
#include <climits>
24
25
SfxSlotKind
SfxSlot::GetKind
()
const
26
{
27
if
( !
nMasterSlotId
&& !
nValue
)
28
return
SfxSlotKind::Standard
;
29
if
(
nMasterSlotId
&&
fnExec
==
nullptr
&&
fnState
==
nullptr
)
30
{
31
assert(
false
);
32
return
SfxSlotKind::Standard
;
33
}
34
else
35
return
SfxSlotKind::Attribute
;
36
}
37
38
39
sal_uInt16
SfxSlot::GetWhich
(
const
SfxItemPool
&rPool )
const
40
{
41
if
( !
nMasterSlotId
||
nMasterSlotId
== USHRT_MAX )
42
const_cast<
SfxSlot
*
>
(
this
) ->
nMasterSlotId
= rPool.
GetWhich
(
nSlotId
);
43
return
nMasterSlotId
;
44
}
45
46
OUString
SfxSlot::GetCommand
()
const
47
{
48
if
(
"FocusToFindbar"
==
pUnoName
)
49
return
"vnd.sun.star.findbar:"
+
pUnoName
;
50
else
51
return
".uno:"
+
pUnoName
;
52
}
53
54
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxItemPool::GetWhich
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxSlot
Definition:
msg.hxx:184
SfxSlot::pUnoName
OUString pUnoName
Definition:
msg.hxx:205
SfxSlot::fnExec
SfxExecFunc fnExec
Definition:
msg.hxx:193
SfxSlot::GetCommand
SFX2_DLLPUBLIC OUString GetCommand() const
Definition:
msg.cxx:46
SfxSlot::nSlotId
sal_uInt16 nSlotId
Definition:
msg.hxx:186
SfxSlot::nValue
sal_uInt16 nValue
Definition:
msg.hxx:191
SfxSlot::fnState
SfxStateFunc fnState
Definition:
msg.hxx:194
SfxSlot::GetKind
SfxSlotKind GetKind() const
Definition:
msg.cxx:25
SfxSlot::GetWhich
sal_uInt16 GetWhich(const SfxItemPool &rPool) const
Definition:
msg.cxx:39
SfxSlot::nMasterSlotId
sal_uInt16 nMasterSlotId
Definition:
msg.hxx:190
itempool.hxx
msg.hxx
SfxSlotKind
SfxSlotKind
Definition:
msg.hxx:87
SfxSlotKind::Standard
@ Standard
SfxSlotKind::Attribute
@ Attribute
SfxItemPool
Generated on Sun Jul 30 2023 04:33:43 for LibreOffice Module sfx2 (master) by
1.9.3