LibreOffice Module toolkit (master) 1
unocontrolcontainermodel.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 <com/sun/star/uno/XComponentContext.hpp>
22#include <helper/property.hxx>
23
25
26
27UnoControlContainerModel::UnoControlContainerModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory )
28 :UnoControlModel( i_factory )
29{
39}
40
42{
43 return "stardiv.vcl.controlmodel.ControlContainer";
44}
45
47{
48 return "stardiv.Toolkit.UnoControlContainerModel";
49}
50
51css::uno::Sequence<OUString>
53{
55 s.realloc(s.getLength() + 2);
56 auto ps = s.getArray();
57 ps[s.getLength() - 2] = "com.sun.star.awt.UnoControlContainerModel";
58 ps[s.getLength() - 1] = "stardiv.vcl.controlmodel.ControlContainer";
59 return s;
60}
61
62css::uno::Any UnoControlContainerModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
63{
64 css::uno::Any aDefault;
65 if ( nPropId == BASEPROPERTY_BORDER )
66 aDefault <<= sal_Int16(0);
67 else
68 aDefault = UnoControlModel::ImplGetDefaultValue( nPropId );
69 return aDefault;
70}
71
72
73css::uno::Reference< css::beans::XPropertySetInfo > UnoControlContainerModel::getPropertySetInfo( )
74{
75 static css::uno::Reference< css::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
76 return xInfo;
77}
78
80{
82 return aHelper;
83}
84
85extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
87 css::uno::XComponentContext *context,
88 css::uno::Sequence<css::uno::Any> const &)
89{
90 return cppu::acquire(new UnoControlContainerModel(context));
91}
92
93/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
css::uno::Any ImplGetDefaultValue(sal_uInt16 nPropId) const override
OUString SAL_CALL getImplementationName() override
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
::cppu::IPropertyArrayHelper & getInfoHelper() override
UnoControlContainerModel(const css::uno::Reference< css::uno::XComponentContext > &i_factory)
OUString SAL_CALL getServiceName() override
css::uno::Sequence< sal_Int32 > ImplGetPropertyIds() const
void ImplRegisterProperty(sal_uInt16 nPropType)
virtual css::uno::Any ImplGetDefaultValue(sal_uInt16 nPropId) const
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static css::uno::Reference< css::beans::XPropertySetInfo > createPropertySetInfo(cppu::IPropertyArrayHelper &rProperties)
Any aHelper
#define BASEPROPERTY_BORDER
Definition: property.hxx:39
#define BASEPROPERTY_TEXT
Definition: property.hxx:34
#define BASEPROPERTY_HELPURL
Definition: property.hxx:91
#define BASEPROPERTY_BACKGROUNDCOLOR
Definition: property.hxx:35
#define BASEPROPERTY_ENABLED
Definition: property.hxx:77
#define BASEPROPERTY_DEFAULTCONTROL
Definition: property.hxx:52
#define BASEPROPERTY_BORDERCOLOR
Definition: property.hxx:145
#define BASEPROPERTY_HELPTEXT
Definition: property.hxx:106
#define BASEPROPERTY_PRINTABLE
Definition: property.hxx:78
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * stardiv_Toolkit_UnoControlContainerModel_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)