Coverage Report

Created: 2026-09-28 10:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sd/source/ui/accessibility/AccessiblePresentationOLEShape.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 <AccessiblePresentationOLEShape.hxx>
21
#include <com/sun/star/accessibility/AccessibleRole.hpp>
22
#include <com/sun/star/drawing/XShape.hpp>
23
24
#include <SdShapeTypes.hxx>
25
26
#include <svx/ShapeTypeHandler.hxx>
27
28
using namespace ::com::sun::star;
29
using namespace ::com::sun::star::accessibility;
30
31
namespace accessibility
32
{
33
AccessiblePresentationOLEShape::AccessiblePresentationOLEShape(
34
    const AccessibleShapeInfo& rShapeInfo, const AccessibleShapeTreeInfo& rShapeTreeInfo)
35
0
    : AccessibleOLEShape(rShapeInfo, rShapeTreeInfo)
36
0
{
37
0
}
38
39
0
AccessiblePresentationOLEShape::~AccessiblePresentationOLEShape() {}
40
41
/// Set this object's name if it is different to the current name.
42
OUString AccessiblePresentationOLEShape::CreateAccessibleBaseName()
43
0
{
44
0
    OUString sName;
45
46
0
    ShapeTypeId nShapeType = ShapeTypeHandler::Instance().GetTypeId(mxShape);
47
0
    switch (nShapeType)
48
0
    {
49
0
        case PRESENTATION_OLE:
50
0
            sName = "ImpressOLE";
51
0
            break;
52
0
        case PRESENTATION_CHART:
53
0
            sName = "ImpressChart";
54
0
            break;
55
0
        case PRESENTATION_TABLE:
56
0
            sName = "ImpressTable";
57
0
            break;
58
0
        default:
59
0
            sName = "UnknownAccessibleImpressOLEShape";
60
0
            if (mxShape.is())
61
0
                sName += ": " + mxShape->getShapeType();
62
0
    }
63
64
0
    return sName;
65
0
}
66
67
//  Return this object's role.
68
sal_Int16 SAL_CALL AccessiblePresentationOLEShape::getAccessibleRole()
69
0
{
70
0
    return AccessibleRole::EMBEDDED_OBJECT;
71
0
}
72
73
} // end of namespace accessibility
74
75
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */