LibreOffice Module vcl (master) 1
ImageTree.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 */
10
11#include <vcl/ImageTree.hxx>
12#include <implimagetree.hxx>
13#include <com/sun/star/uno/Reference.hxx>
14#include <com/sun/star/container/XNameAccess.hpp>
15
17 static ImageTree s_ImageTree;
18 return s_ImageTree;
19}
20
22 : mpImplImageTree(new ImplImageTree)
23{
24}
25
26OUString ImageTree::getImageUrl(OUString const & rName, OUString const & rStyle, OUString const & rLang)
27
28{
29 return mpImplImageTree->getImageUrl(rName, rStyle, rLang);
30}
31
32std::shared_ptr<SvMemoryStream> ImageTree::getImageStream(OUString const & rName, OUString const & rStyle, OUString const & rLang)
33{
34 return mpImplImageTree->getImageStream(rName, rStyle, rLang);
35}
36
37bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle,
38 BitmapEx & rBitmap, bool bLocalized,
39 sal_Int32 nScalePercentage,
40 const ImageLoadFlags eFlags)
41{
42 return mpImplImageTree->loadImage(rName, rStyle, rBitmap, bLocalized, eFlags, nScalePercentage);
43}
44
45bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle,
46 BitmapEx & rBitmap, bool bLocalized,
47 const ImageLoadFlags eFlags)
48{
49 return loadImage(rName, rStyle, rBitmap, bLocalized, -1, eFlags);
50}
51
52css::uno::Reference<css::container::XNameAccess> const & ImageTree::getNameAccess()
53{
54 return mpImplImageTree->getNameAccess();
55}
56
58{
59 mpImplImageTree->shutdown();
60}
61
62/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ImageLoadFlags
Definition: ImageTree.hxx:32
VCL_DLLPUBLIC css::uno::Reference< css::container::XNameAccess > const & getNameAccess()
Definition: ImageTree.cxx:52
VCL_DLLPUBLIC OUString getImageUrl(OUString const &name, OUString const &style, OUString const &lang)
Definition: ImageTree.cxx:26
std::unique_ptr< ImplImageTree > mpImplImageTree
Definition: ImageTree.hxx:53
static VCL_DLLPUBLIC ImageTree & get()
Definition: ImageTree.cxx:16
VCL_DLLPUBLIC void shutdown()
a crude form of life cycle control (called from DeInitVCL; otherwise, if the ImplImageTree singleton ...
Definition: ImageTree.cxx:57
VCL_DLLPUBLIC std::shared_ptr< SvMemoryStream > getImageStream(OUString const &rName, OUString const &rStyle, OUString const &rLang)
Definition: ImageTree.cxx:32
VCL_DLLPUBLIC bool loadImage(OUString const &name, OUString const &style, BitmapEx &bitmap, bool localized, const ImageLoadFlags eFlags=ImageLoadFlags::NONE)
Definition: ImageTree.cxx:45