Coverage Report

Created: 2026-02-14 09:37

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/framework/source/uiconfiguration/imagemanager.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 <uiconfiguration/imagemanager.hxx>
21
#include "imagemanagerimpl.hxx"
22
23
#include <com/sun/star/beans/XPropertySet.hpp>
24
25
#include <vcl/svapp.hxx>
26
27
using ::com::sun::star::uno::Sequence;
28
using ::com::sun::star::uno::XInterface;
29
using ::com::sun::star::uno::Any;
30
using ::com::sun::star::graphic::XGraphic;
31
using namespace ::com::sun::star;
32
using namespace ::com::sun::star::io;
33
using namespace ::com::sun::star::embed;
34
using namespace ::com::sun::star::lang;
35
36
namespace framework
37
{
38
39
ImageManager::ImageManager( const uno::Reference< uno::XComponentContext >& rxContext, bool bForModule ) :
40
0
    m_pImpl( new ImageManagerImpl(rxContext, this, bForModule) )
41
0
{
42
0
}
43
44
ImageManager::~ImageManager()
45
0
{
46
0
    m_pImpl->clear();
47
0
}
48
49
// XComponent
50
void SAL_CALL ImageManager::dispose()
51
0
{
52
0
    m_pImpl->dispose();
53
0
}
54
55
void SAL_CALL ImageManager::addEventListener( const uno::Reference< XEventListener >& xListener )
56
0
{
57
0
    m_pImpl->addEventListener(xListener);
58
0
}
59
60
void SAL_CALL ImageManager::removeEventListener( const uno::Reference< XEventListener >& xListener )
61
0
{
62
    /* SAFE AREA ----------------------------------------------------------------------------------------------- */
63
0
    m_pImpl->removeEventListener(xListener);
64
0
}
65
66
// Non-UNO methods
67
void ImageManager::setStorage( const uno::Reference< XStorage >& Storage )
68
0
{
69
0
    SolarMutexGuard g;
70
71
0
    m_pImpl->m_xUserConfigStorage = Storage;
72
0
    m_pImpl->implts_initialize();
73
0
}
74
75
// XInitialization
76
void SAL_CALL ImageManager::initialize( const Sequence< Any >& aArguments )
77
0
{
78
0
    m_pImpl->initialize(aArguments);
79
0
}
80
81
// XImageManager
82
void SAL_CALL ImageManager::reset()
83
0
{
84
    /* SAFE AREA ----------------------------------------------------------------------------------------------- */
85
0
    m_pImpl->reset();
86
0
}
87
88
Sequence< OUString > SAL_CALL ImageManager::getAllImageNames( ::sal_Int16 nImageType )
89
0
{
90
0
    return m_pImpl->getAllImageNames( nImageType );
91
0
}
92
93
sal_Bool SAL_CALL ImageManager::hasImage( ::sal_Int16 nImageType, const OUString& aCommandURL )
94
0
{
95
0
    return m_pImpl->hasImage(nImageType,aCommandURL);
96
0
}
97
98
Sequence< uno::Reference< XGraphic > > SAL_CALL ImageManager::getImages(
99
    ::sal_Int16 nImageType,
100
    const Sequence< OUString >& aCommandURLSequence )
101
0
{
102
0
    return m_pImpl->getImages(nImageType,aCommandURLSequence);
103
0
}
104
105
void SAL_CALL ImageManager::replaceImages(
106
    ::sal_Int16 nImageType,
107
    const Sequence< OUString >& aCommandURLSequence,
108
    const Sequence< uno::Reference< XGraphic > >& aGraphicsSequence )
109
0
{
110
0
    m_pImpl->replaceImages(nImageType,aCommandURLSequence,aGraphicsSequence);
111
0
}
112
113
void SAL_CALL ImageManager::removeImages( ::sal_Int16 nImageType, const Sequence< OUString >& aCommandURLSequence )
114
0
{
115
0
    m_pImpl->removeImages(nImageType,aCommandURLSequence);
116
0
}
117
118
void SAL_CALL ImageManager::insertImages( ::sal_Int16 nImageType, const Sequence< OUString >& aCommandURLSequence, const Sequence< uno::Reference< XGraphic > >& aGraphicSequence )
119
0
{
120
0
    m_pImpl->insertImages(nImageType,aCommandURLSequence,aGraphicSequence);
121
0
}
122
123
// XUIConfiguration
124
void SAL_CALL ImageManager::addConfigurationListener( const uno::Reference< css::ui::XUIConfigurationListener >& xListener )
125
0
{
126
0
    m_pImpl->addConfigurationListener(xListener);
127
0
}
128
129
void SAL_CALL ImageManager::removeConfigurationListener( const uno::Reference< css::ui::XUIConfigurationListener >& xListener )
130
0
{
131
    /* SAFE AREA ----------------------------------------------------------------------------------------------- */
132
0
    m_pImpl->removeConfigurationListener(xListener);
133
0
}
134
135
// XUIConfigurationPersistence
136
void SAL_CALL ImageManager::reload()
137
0
{
138
0
    m_pImpl->reload();
139
0
}
140
141
void SAL_CALL ImageManager::store()
142
0
{
143
0
    m_pImpl->store();
144
0
}
145
146
void SAL_CALL ImageManager::storeToStorage( const uno::Reference< XStorage >& Storage )
147
0
{
148
0
    m_pImpl->storeToStorage(Storage);
149
0
}
150
151
sal_Bool SAL_CALL ImageManager::isModified()
152
0
{
153
0
    return m_pImpl->isModified();
154
0
}
155
156
sal_Bool SAL_CALL ImageManager::isReadOnly()
157
0
{
158
0
    return m_pImpl->isReadOnly();
159
0
}
160
161
} // namespace framework
162
163
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
164
com_sun_star_comp_framework_ImageManager_get_implementation(
165
    css::uno::XComponentContext *context,
166
    css::uno::Sequence<css::uno::Any> const &)
167
0
{
168
0
    return cppu::acquire(new framework::ImageManager(context, /*bForModule*/false));
169
0
}
170
171
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */