bump product version to 5.0.4.1
[LibreOffice.git] / basctl / source / basicide / basidectrlr.cxx
blob3dea60f64b220df499adb85e512e390e786abee6
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"
22 #include "basidesh.hxx"
24 #include <com/sun/star/beans/PropertyAttribute.hpp>
26 #include <vcl/syswin.hxx>
28 namespace basctl
31 using namespace com::sun::star;
32 using namespace com::sun::star::uno;
33 using namespace com::sun::star::beans;
35 namespace
38 int const nPropertyIconId = 1;
39 OUString const sPropertyIconId("IconId");
43 Controller::Controller (Shell* pViewShell)
44 :OPropertyContainer( m_aBHelper )
45 ,SfxBaseController( pViewShell )
46 ,m_nIconId( ICON_MACROLIBRARY )
48 registerProperty(
49 sPropertyIconId, nPropertyIconId,
50 PropertyAttribute::READONLY,
51 &m_nIconId, cppu::UnoType<decltype(m_nIconId)>::get()
55 Controller::~Controller()
56 { }
58 // XInterface
59 Any SAL_CALL Controller::queryInterface( const Type & rType ) throw(RuntimeException, std::exception)
61 Any aReturn = SfxBaseController::queryInterface( rType );
62 if ( !aReturn.hasValue() )
63 aReturn = OPropertyContainer::queryInterface( rType );
65 return aReturn;
68 void SAL_CALL Controller::acquire() throw()
70 SfxBaseController::acquire();
73 void SAL_CALL Controller::release() throw()
75 SfxBaseController::release();
78 // XTypeProvider ( ::SfxBaseController )
79 Sequence< Type > SAL_CALL Controller::getTypes() throw(RuntimeException, std::exception)
81 Sequence< Type > aTypes = ::comphelper::concatSequences(
82 SfxBaseController::getTypes(),
83 getBaseTypes()
86 return aTypes;
89 Sequence< sal_Int8 > SAL_CALL Controller::getImplementationId() throw(RuntimeException, std::exception)
91 return css::uno::Sequence<sal_Int8>();
94 // XPropertySet
95 Reference< beans::XPropertySetInfo > SAL_CALL Controller::getPropertySetInfo() throw(RuntimeException, std::exception)
97 Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
98 return xInfo;
101 // OPropertySetHelper
102 ::cppu::IPropertyArrayHelper& Controller::getInfoHelper()
104 return *getArrayHelper();
107 // OPropertyArrayUsageHelper
108 ::cppu::IPropertyArrayHelper* Controller::createArrayHelper( ) const
110 Sequence< Property > aProps;
111 describeProperties( aProps );
112 return new ::cppu::OPropertyArrayHelper( aProps );
115 } // namespace basctl
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */