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
37css::uno::Reference<css::io::XInputStream> ImageTree::getImageXInputStream(OUString const & rName, OUString const & rStyle, OUString const & rLang)
38{
39 return mpImplImageTree->getImageXInputStream(rName, rStyle, rLang);
40}
41
42bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle,
43 BitmapEx & rBitmap, bool bLocalized,
44 sal_Int32 nScalePercentage,
45 const ImageLoadFlags eFlags)
46{
47 return mpImplImageTree->loadImage(rName, rStyle, rBitmap, bLocalized, eFlags, nScalePercentage);
48}
49
50bool ImageTree::loadImage(OUString const & rName, OUString const & rStyle,
51 BitmapEx & rBitmap, bool bLocalized,
52 const ImageLoadFlags eFlags)
53{
54 return loadImage(rName, rStyle, rBitmap, bLocalized, -1, eFlags);
55}
56
57css::uno::Reference<css::container::XNameAccess> const & ImageTree::getNameAccess()
58{
59 return mpImplImageTree->getNameAccess();
60}
61
63{
64 mpImplImageTree->shutdown();
65}
66
67/* 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:57
VCL_DLLPUBLIC css::uno::Reference< css::io::XInputStream > getImageXInputStream(OUString const &rName, OUString const &rStyle, OUString const &rLang)
Definition: ImageTree.cxx:37
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:57
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:62
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:50