Bump version to 24.04.3.4
[LibreOffice.git] / sfx2 / source / control / msg.cxx
blob0b484fd614af4830f680635d31b0703dd86caa99
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 * This file incorporates work covered by the following license notice:
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 .
20 #include <svl/itempool.hxx>
21 #include <sfx2/msg.hxx>
23 #include <climits>
25 SfxSlotKind SfxSlot::GetKind() const
27 if( !nMasterSlotId && !nValue)
28 return SfxSlotKind::Standard;
29 if ( nMasterSlotId && fnExec==nullptr && fnState==nullptr )
31 assert(false);
32 return SfxSlotKind::Standard;
34 else
35 return SfxSlotKind::Attribute;
39 sal_uInt16 SfxSlot::GetWhich( const SfxItemPool &rPool ) const
41 if ( !nMasterSlotId || nMasterSlotId == USHRT_MAX )
42 const_cast<SfxSlot*>(this) -> nMasterSlotId = rPool.GetWhich(nSlotId);
43 return nMasterSlotId;
46 OUString SfxSlot::GetCommand() const
48 if("FocusToFindbar" == pUnoName)
49 return "vnd.sun.star.findbar:" + pUnoName;
50 else
51 return ".uno:" + pUnoName;
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */