LibreOffice Module toolkit (master) 1
roadmapentry.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
21#include <rtl/ustring.hxx>
22#include <com/sun/star/beans/PropertyAttribute.hpp>
24
25
26ORoadmapEntry::ORoadmapEntry() : OPropertyContainer( GetBroadcastHelper() )
27{
28 // registerProperty or registerMayBeVoidProperty or registerPropertyNoMember
29
31 css::beans::PropertyAttribute::BOUND |
32 css::beans::PropertyAttribute::CONSTRAINED,
33 & m_sLabel, cppu::UnoType<decltype(m_sLabel)>::get() );
34 m_nID = -1;
36 css::beans::PropertyAttribute::BOUND |
37 css::beans::PropertyAttribute::CONSTRAINED,
38 & m_nID, cppu::UnoType<decltype(m_nID)>::get() );
39 m_bEnabled = true;
41 css::beans::PropertyAttribute::BOUND |
42 css::beans::PropertyAttribute::MAYBEDEFAULT,
43 & m_bEnabled, cppu::UnoType<decltype(m_bEnabled)>::get() );
44
46 css::beans::PropertyAttribute::BOUND |
47 css::beans::PropertyAttribute::MAYBEDEFAULT,
48 & m_bInteractive, cppu::UnoType<decltype(m_bInteractive)>::get() );
49
50
51 // Note that the list of registered properties has to be fixed: Different
52 // instances of this class have to register the same set of properties with
53 // the same attributes.
54
55 // This is because all instances of the class share the same PropertySetInfo
56 // which has been built from the registered property of _one_ instance.
57}
58
59
62 // order matters:
63 // the first is the class name
64 // the second is the class which implements the ref-counting
65 // the third up to n-th (when using IMPLEMENT_FORWARD_*3 and so on) are other base classes
66 // whose XInterface and XTypeProvider implementations should be merged
67
68
69css::uno::Reference< css:: beans::XPropertySetInfo > SAL_CALL
70 ORoadmapEntry::getPropertySetInfo()
71{
72 return createPropertySetInfo( getInfoHelper() );
73}
74
76{
77 return "com.sun.star.comp.toolkit.RoadmapItem";
78}
79
80sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName )
81{
83}
84
85css::uno::Sequence< OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames( )
86{
87 return { "com.sun.star.awt.RoadmapItem" };
88}
89
91{
92 return *getArrayHelper();
93}
94
95
97{
98 css::uno::Sequence< css::beans::Property > aProps;
99 // describes all properties which have been registered in the ctor
100 describeProperties( aProps );
101
102 return new ::cppu::OPropertyArrayHelper( aProps );
103}
104
105/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ::cppu::IPropertyArrayHelper * createArrayHelper() const override
OUString m_sLabel
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
sal_Int32 m_nID
DECLARE_XINTERFACE() DECLARE_XTYPEPROVIDER() private virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
::cppu::IPropertyArrayHelper * getArrayHelper()
void describeProperties(css::uno::Sequence< css::beans::Property > &_rProps) const
void registerProperty(const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
IMPLEMENT_FORWARD_XINTERFACE2(ORoadmapEntry, ORoadmapEntry_Base, ::comphelper::OPropertyContainer)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ORoadmapEntry, ORoadmapEntry_Base, ::comphelper::OPropertyContainer)
#define RM_PROPERTY_ID_LABEL
cppu::WeakImplHelper< css::lang::XServiceInfo > ORoadmapEntry_Base
#define RM_PROPERTY_ID_INTERACTIVE
#define RM_PROPERTY_ID_ID
#define RM_PROPERTY_ID_ENABLED
unsigned char sal_Bool