1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SVX_GALLERY_HXX
21 #define INCLUDED_SVX_GALLERY_HXX
23 #include <tools/solar.h>
24 #include <tools/urlobj.hxx>
26 #include <svx/svxdllapi.h>
28 // Defines for preinstalled themes
29 // Has to be in sync with svx/inc/galtheme.hrc
30 #define GALLERY_THEME_3D 1
31 #define GALLERY_THEME_BULLETS 3
32 #define GALLERY_THEME_HOMEPAGE 10
33 #define GALLERY_THEME_HTMLBUTTONS 15
34 #define GALLERY_THEME_POWERPOINT 16
35 #define GALLERY_THEME_SOUNDS 18
36 #define GALLERY_THEME_USERSOUNDS 21
38 #define GALLERY_THEME_FONTWORK 37
39 #define GALLERY_THEME_FONTWORK_VERTICAL 38
50 class SVX_DLLPUBLIC GalleryExplorer
54 static bool FillThemeList( std::vector
<OUString
>& rThemeList
);
56 // FillObjList is filling rObjList with Strings of the internal Gallery Object URL
57 static sal_Bool
FillObjList( const OUString
& rThemeName
, std::vector
<OUString
> &rObjList
);
58 static bool FillObjList( const sal_uInt32 nThemeId
, std::vector
<OUString
> &rObjList
);
60 // FillObjTitleList is filling the rList with the title for each gallery object
61 static sal_Bool
FillObjListTitle( const sal_uInt32 nThemeId
, std::vector
< OUString
>& rList
);
63 static sal_Bool
InsertURL( const OUString
& rThemeName
, const OUString
& rURL
);
64 static sal_Bool
InsertURL( sal_uIntPtr nThemeId
, const OUString
& rURL
);
66 static sal_Bool
GetGraphicObj( const OUString
& rThemeName
, sal_uIntPtr nPos
,
67 Graphic
* pGraphic
= NULL
, BitmapEx
* pThumb
= NULL
,
68 sal_Bool bProgess
= sal_False
);
69 static sal_Bool
GetGraphicObj( sal_uIntPtr nThemeId
, sal_uIntPtr nPos
,
70 Graphic
* pGraphic
= NULL
, BitmapEx
* pThumb
= NULL
,
71 sal_Bool bProgess
= sal_False
);
73 static sal_uIntPtr
GetSdrObjCount( const OUString
& rThemeName
);
74 static sal_uIntPtr
GetSdrObjCount( sal_uIntPtr nThemeId
);
76 static sal_Bool
GetSdrObj( const OUString
& rThemeName
, sal_uIntPtr nSdrModelPos
,
77 SdrModel
* pModel
= NULL
, BitmapEx
* pThumb
= NULL
);
78 static sal_Bool
GetSdrObj( sal_uIntPtr nThemeId
, sal_uIntPtr nSdrModelPos
,
79 SdrModel
* pModel
= NULL
, BitmapEx
* pThumb
= NULL
);
81 static sal_Bool
BeginLocking( const OUString
& rThemeName
);
82 static sal_Bool
BeginLocking( sal_uIntPtr nThemeId
);
84 static sal_Bool
EndLocking( const OUString
& rThemeName
);
85 static sal_Bool
EndLocking( sal_uIntPtr nThemeId
);
88 #endif // INCLUDED_SVX_GALLERY_HXX
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */