Bump version to 24.04.3.4
[LibreOffice.git] / basctl / source / basicide / basidectrlr.cxx
blob849bff30cbe73f4a128c4a339f5309b3d50db629
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 <basidectrlr.hxx>
21 #include <basidesh.hxx>
22 #include <com/sun/star/beans/PropertyAttribute.hpp>
24 namespace basctl
27 using namespace com::sun::star;
28 using namespace com::sun::star::uno;
29 using namespace com::sun::star::beans;
31 namespace
34 int const nPropertyIconId = 1;
35 constexpr OUStringLiteral sPropertyIconId(u"IconId");
39 Controller::Controller (Shell* pViewShell)
40 :OPropertyContainer( m_aBHelper )
41 ,SfxBaseController( pViewShell )
42 ,m_nIconId( ICON_MACROLIBRARY )
44 registerProperty(
45 sPropertyIconId, nPropertyIconId,
46 PropertyAttribute::READONLY,
47 &m_nIconId, cppu::UnoType<decltype(m_nIconId)>::get()
51 Controller::~Controller()
52 { }
54 // XInterface
55 Any SAL_CALL Controller::queryInterface( const Type & rType )
57 Any aReturn = SfxBaseController::queryInterface( rType );
58 if ( !aReturn.hasValue() )
59 aReturn = OPropertyContainer::queryInterface( rType );
61 return aReturn;
64 void SAL_CALL Controller::acquire() noexcept
66 SfxBaseController::acquire();
69 void SAL_CALL Controller::release() noexcept
71 SfxBaseController::release();
74 // XTypeProvider ( ::SfxBaseController )
75 Sequence< Type > SAL_CALL Controller::getTypes()
77 Sequence< Type > aTypes = ::comphelper::concatSequences(
78 SfxBaseController::getTypes(),
79 getBaseTypes()
82 return aTypes;
85 Sequence< sal_Int8 > SAL_CALL Controller::getImplementationId()
87 return css::uno::Sequence<sal_Int8>();
90 // XPropertySet
91 Reference< beans::XPropertySetInfo > SAL_CALL Controller::getPropertySetInfo()
93 Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
94 return xInfo;
97 // OPropertySetHelper
98 ::cppu::IPropertyArrayHelper& Controller::getInfoHelper()
100 return *getArrayHelper();
103 // OPropertyArrayUsageHelper
104 ::cppu::IPropertyArrayHelper* Controller::createArrayHelper( ) const
106 Sequence< Property > aProps;
107 describeProperties( aProps );
108 return new ::cppu::OPropertyArrayHelper( aProps );
111 } // namespace basctl
113 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */