Coverage Report

Created: 2025-11-16 09:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/toolkit/source/controls/unocontrolcontainermodel.cxx
Line
Count
Source
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>
21
#include <toolkit/controls/unocontrolcontainermodel.hxx>
22
#include <helper/property.hxx>
23
24
#include <helper/unopropertyarrayhelper.hxx>
25
26
27
UnoControlContainerModel::UnoControlContainerModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory )
28
17
    :UnoControlModel( i_factory )
29
17
{
30
17
    ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
31
17
    ImplRegisterProperty( BASEPROPERTY_BORDER );
32
17
    ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
33
17
    ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
34
17
    ImplRegisterProperty( BASEPROPERTY_ENABLED );
35
17
    ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
36
17
    ImplRegisterProperty( BASEPROPERTY_HELPURL );
37
17
    ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
38
17
    ImplRegisterProperty( BASEPROPERTY_TEXT );
39
17
}
Unexecuted instantiation: UnoControlContainerModel::UnoControlContainerModel(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
UnoControlContainerModel::UnoControlContainerModel(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
Line
Count
Source
28
17
    :UnoControlModel( i_factory )
29
17
{
30
17
    ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR );
31
17
    ImplRegisterProperty( BASEPROPERTY_BORDER );
32
17
    ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR );
33
17
    ImplRegisterProperty( BASEPROPERTY_DEFAULTCONTROL );
34
17
    ImplRegisterProperty( BASEPROPERTY_ENABLED );
35
17
    ImplRegisterProperty( BASEPROPERTY_HELPTEXT );
36
17
    ImplRegisterProperty( BASEPROPERTY_HELPURL );
37
17
    ImplRegisterProperty( BASEPROPERTY_PRINTABLE );
38
17
    ImplRegisterProperty( BASEPROPERTY_TEXT );
39
17
}
40
41
OUString UnoControlContainerModel::getServiceName()
42
17
{
43
17
    return u"stardiv.vcl.controlmodel.ControlContainer"_ustr;
44
17
}
45
46
OUString UnoControlContainerModel::getImplementationName()
47
0
{
48
0
    return u"stardiv.Toolkit.UnoControlContainerModel"_ustr;
49
0
}
50
51
css::uno::Sequence<OUString>
52
UnoControlContainerModel::getSupportedServiceNames()
53
0
{
54
0
    auto s(UnoControlModel::getSupportedServiceNames());
55
0
    s.realloc(s.getLength() + 2);
56
0
    auto ps = s.getArray();
57
0
    ps[s.getLength() - 2] = "com.sun.star.awt.UnoControlContainerModel";
58
0
    ps[s.getLength() - 1] = "stardiv.vcl.controlmodel.ControlContainer";
59
0
    return s;
60
0
}
61
62
css::uno::Any UnoControlContainerModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
63
153
{
64
153
    css::uno::Any aDefault;
65
153
    if ( nPropId == BASEPROPERTY_BORDER )
66
17
        aDefault <<= sal_Int16(0);
67
136
    else
68
136
        aDefault = UnoControlModel::ImplGetDefaultValue( nPropId );
69
153
    return aDefault;
70
153
}
71
72
73
css::uno::Reference< css::beans::XPropertySetInfo > UnoControlContainerModel::getPropertySetInfo(  )
74
34
{
75
34
    static css::uno::Reference< css::beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
76
34
    return xInfo;
77
34
}
78
79
::cppu::IPropertyArrayHelper& UnoControlContainerModel::getInfoHelper()
80
1
{
81
1
    static UnoPropertyArrayHelper aHelper( ImplGetPropertyIds() );
82
1
    return aHelper;
83
1
}
84
85
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
86
stardiv_Toolkit_UnoControlContainerModel_get_implementation(
87
    css::uno::XComponentContext *context,
88
    css::uno::Sequence<css::uno::Any> const &)
89
0
{
90
0
    return cppu::acquire(new UnoControlContainerModel(context));
91
0
}
92
93
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */