Coverage Report

Created: 2025-11-16 09:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/framework/inc/uielement/uielement.hxx
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
#pragma once
21
22
#include <com/sun/star/ui/XUIElement.hpp>
23
#include <com/sun/star/ui/DockingArea.hpp>
24
#include <com/sun/star/awt/Point.hpp>
25
#include <com/sun/star/awt/Size.hpp>
26
27
#include <rtl/ustring.hxx>
28
#include <utility>
29
#include <vcl/toolbox.hxx>
30
31
namespace framework
32
{
33
34
struct DockedData
35
{
36
21.7k
    DockedData() : m_aPos( SAL_MAX_INT32, SAL_MAX_INT32 ),
37
21.7k
                   m_nDockedArea( css::ui::DockingArea_DOCKINGAREA_TOP ),
38
21.7k
                   m_bLocked( false ) {}
39
40
    css::awt::Point      m_aPos;
41
    css::ui::DockingArea m_nDockedArea;
42
    bool                 m_bLocked;
43
};
44
45
struct FloatingData
46
{
47
21.7k
    FloatingData() : m_aPos( SAL_MAX_INT32, SAL_MAX_INT32 ),
48
21.7k
                     m_nLines( 1 ),
49
21.7k
                     m_bIsHorizontal( true ) {}
50
51
    css::awt::Point  m_aPos;
52
    css::awt::Size   m_aSize;
53
    ToolBox::ImplToolItems::size_type m_nLines;
54
    bool             m_bIsHorizontal;
55
};
56
57
struct UIElement
58
{
59
21.7k
    UIElement() : m_bFloating( false ),
60
21.7k
                  m_bVisible( true ),
61
21.7k
                  m_bUserActive( false ),
62
21.7k
                  m_bMasterHide( false ),
63
21.7k
                  m_bContextSensitive( false ),
64
21.7k
                  m_bNoClose( false ),
65
21.7k
                  m_bStateRead( false ),
66
21.7k
                  m_nStyle( ButtonType::SYMBOLONLY )
67
21.7k
                  {}
68
69
    UIElement( OUString aName,
70
               OUString aType,
71
               css::uno::Reference< css::ui::XUIElement > xUIElement
72
0
               ) : m_aType(std::move( aType )),
73
0
                   m_aName(std::move( aName )),
74
0
                   m_xUIElement(std::move( xUIElement )),
75
0
                   m_bFloating( false ),
76
0
                   m_bVisible( true ),
77
0
                   m_bUserActive( false ),
78
0
                   m_bMasterHide( false ),
79
0
                   m_bContextSensitive( false ),
80
0
                   m_bNoClose( false ),
81
0
                   m_bStateRead( false ),
82
0
                   m_nStyle( ButtonType::SYMBOLONLY ) {}
83
84
    bool operator< ( const UIElement& aUIElement ) const;
85
86
    OUString                                                      m_aType;
87
    OUString                                                      m_aName;
88
    OUString                                                      m_aUIName;
89
    css::uno::Reference< css::ui::XUIElement >                    m_xUIElement;
90
    bool                                                               m_bFloating,
91
                                                                       m_bVisible,
92
                                                                       m_bUserActive,
93
                                                                       m_bMasterHide,
94
                                                                       m_bContextSensitive;
95
    bool                                                               m_bNoClose,
96
                                                                       m_bStateRead;
97
    ButtonType                                                         m_nStyle;
98
    DockedData                                                         m_aDockedData;
99
    FloatingData                                                       m_aFloatingData;
100
};
101
102
typedef std::vector< UIElement > UIElementVector;
103
104
} // namespace framework
105
106
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */