13334a7e6SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 33334a7e6SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 43334a7e6SAndrew Rist * or more contributor license agreements. See the NOTICE file 53334a7e6SAndrew Rist * distributed with this work for additional information 63334a7e6SAndrew Rist * regarding copyright ownership. The ASF licenses this file 73334a7e6SAndrew Rist * to you under the Apache License, Version 2.0 (the 83334a7e6SAndrew Rist * "License"); you may not use this file except in compliance 93334a7e6SAndrew Rist * with the License. You may obtain a copy of the License at 103334a7e6SAndrew Rist * 113334a7e6SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 123334a7e6SAndrew Rist * 133334a7e6SAndrew Rist * Unless required by applicable law or agreed to in writing, 143334a7e6SAndrew Rist * software distributed under the License is distributed on an 153334a7e6SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 163334a7e6SAndrew Rist * KIND, either express or implied. See the License for the 173334a7e6SAndrew Rist * specific language governing permissions and limitations 183334a7e6SAndrew Rist * under the License. 193334a7e6SAndrew Rist * 203334a7e6SAndrew Rist *************************************************************/ 213334a7e6SAndrew Rist 223334a7e6SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef _GALLERY_HXX_ 25cdf0e10cSrcweir #define _GALLERY_HXX_ 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <tools/solar.h> 28cdf0e10cSrcweir #include <tools/string.hxx> 29cdf0e10cSrcweir #include <tools/urlobj.hxx> 30cdf0e10cSrcweir #include <vector> 31cdf0e10cSrcweir #include "svx/svxdllapi.h" 32cdf0e10cSrcweir 33cdf0e10cSrcweir // ----------- 34cdf0e10cSrcweir // - Defines - 35cdf0e10cSrcweir // ----------- 36cdf0e10cSrcweir 37cdf0e10cSrcweir // Defines for preinstalled themes 38cdf0e10cSrcweir #define GALLERY_THEME_3D 1 39cdf0e10cSrcweir #define GALLERY_THEME_ANIMATIONS 2 40cdf0e10cSrcweir #define GALLERY_THEME_BULLETS 3 41cdf0e10cSrcweir #define GALLERY_THEME_OFFICE 4 42cdf0e10cSrcweir #define GALLERY_THEME_FLAGS 5 43cdf0e10cSrcweir #define GALLERY_THEME_FLOWCHARTS 6 44cdf0e10cSrcweir #define GALLERY_THEME_EMOTICONS 7 45cdf0e10cSrcweir #define GALLERY_THEME_PHOTOS 8 46cdf0e10cSrcweir #define GALLERY_THEME_BACKGROUNDS 9 47cdf0e10cSrcweir #define GALLERY_THEME_HOMEPAGE 10 48cdf0e10cSrcweir #define GALLERY_THEME_INTERACTION 11 49cdf0e10cSrcweir #define GALLERY_THEME_MAPS 12 50cdf0e10cSrcweir #define GALLERY_THEME_PEOPLE 13 51cdf0e10cSrcweir #define GALLERY_THEME_SURFACES 14 52d9551ca9SArmin Le Grand #define GALLERY_THEME_HTMLBUTTONS 15 53cdf0e10cSrcweir #define GALLERY_THEME_POWERPOINT 16 54cdf0e10cSrcweir #define GALLERY_THEME_RULERS 17 55cdf0e10cSrcweir #define GALLERY_THEME_SOUNDS 18 56cdf0e10cSrcweir #define GALLERY_THEME_SYMBOLS 19 57cdf0e10cSrcweir #define GALLERY_THEME_MYTHEME 20 58cdf0e10cSrcweir #define GALLERY_THEME_USERSOUNDS 21 59cdf0e10cSrcweir #define GALLERY_THEME_ARROWS 22 60cdf0e10cSrcweir #define GALLERY_THEME_BALLOONS 23 61cdf0e10cSrcweir #define GALLERY_THEME_KEYBOARD 24 62cdf0e10cSrcweir #define GALLERY_THEME_TIME 25 63cdf0e10cSrcweir #define GALLERY_THEME_PRESENTATION 26 64cdf0e10cSrcweir #define GALLERY_THEME_CALENDAR 27 65cdf0e10cSrcweir #define GALLERY_THEME_NAVIGATION 28 66cdf0e10cSrcweir #define GALLERY_THEME_COMMUNICATION 29 67cdf0e10cSrcweir #define GALLERY_THEME_FINANCES 30 68cdf0e10cSrcweir #define GALLERY_THEME_COMPUTER 31 69cdf0e10cSrcweir #define GALLERY_THEME_CLIMA 32 70cdf0e10cSrcweir #define GALLERY_THEME_EDUCATION 33 71cdf0e10cSrcweir #define GALLERY_THEME_TROUBLE 34 72cdf0e10cSrcweir #define GALLERY_THEME_SCREENBEANS 35 73cdf0e10cSrcweir #define GALLERY_THEME_FONTWORK 36 74cdf0e10cSrcweir #define GALLERY_THEME_FONTWORK_VERTICAL 37 75cdf0e10cSrcweir 76cdf0e10cSrcweir #define GALLERY_THEME_DUMMY5 38 77cdf0e10cSrcweir 78cdf0e10cSrcweir // ------------------- 79cdf0e10cSrcweir // - GalleryExplorer - 80cdf0e10cSrcweir // ------------------- 81cdf0e10cSrcweir 82cdf0e10cSrcweir class List; 83cdf0e10cSrcweir class Gallery; 84cdf0e10cSrcweir class VCDrawModel; 85cdf0e10cSrcweir class FmFormModel; 86cdf0e10cSrcweir class SdrModel; 87cdf0e10cSrcweir class Graphic; 88cdf0e10cSrcweir class FmFormModel; 89*6dd94783SArmin Le Grand class BitmapEx; 90cdf0e10cSrcweir class OutputDevice; 91cdf0e10cSrcweir 92cdf0e10cSrcweir class SVX_DLLPUBLIC GalleryExplorer 93cdf0e10cSrcweir { 94cdf0e10cSrcweir public: 95cdf0e10cSrcweir 96cdf0e10cSrcweir static sal_Bool FillThemeList( List& rThemeList ); 97cdf0e10cSrcweir 98cdf0e10cSrcweir // FillObjList is filling rObjList with Strings of the internal Gallery Object URL 99cdf0e10cSrcweir static sal_Bool FillObjList( const String& rThemeName, List& rObjList ); 100cdf0e10cSrcweir static sal_Bool FillObjList( sal_uIntPtr nThemeId, List& rObjList ); 101cdf0e10cSrcweir 102cdf0e10cSrcweir // FillObjTitleList is filling the rList with the title for each gallery object 103cdf0e10cSrcweir static sal_Bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList ); 104cdf0e10cSrcweir 105cdf0e10cSrcweir static sal_Bool InsertURL( const String& rThemeName, const String& rURL ); 106cdf0e10cSrcweir static sal_Bool InsertURL( sal_uIntPtr nThemeId, const String& rURL ); 107cdf0e10cSrcweir 108cdf0e10cSrcweir static sal_uIntPtr GetObjCount( const String& rThemeName ); 109cdf0e10cSrcweir static sal_uIntPtr GetObjCount( sal_uIntPtr nThemeId ); 110cdf0e10cSrcweir 111cdf0e10cSrcweir static sal_Bool GetGraphicObj( const String& rThemeName, sal_uIntPtr nPos, 112*6dd94783SArmin Le Grand Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL, 113cdf0e10cSrcweir sal_Bool bProgess = sal_False ); 114cdf0e10cSrcweir static sal_Bool GetGraphicObj( sal_uIntPtr nThemeId, sal_uIntPtr nPos, 115*6dd94783SArmin Le Grand Graphic* pGraphic = NULL, BitmapEx* pThumb = NULL, 116cdf0e10cSrcweir sal_Bool bProgess = sal_False ); 117cdf0e10cSrcweir 118cdf0e10cSrcweir static sal_Bool InsertGraphicObj( const String& rThemeName, const Graphic& rGraphic ); 119cdf0e10cSrcweir static sal_Bool InsertGraphicObj( sal_uIntPtr nThemeId, const Graphic& rGraphic ); 120cdf0e10cSrcweir 121cdf0e10cSrcweir static sal_uIntPtr GetSdrObjCount( const String& rThemeName ); 122cdf0e10cSrcweir static sal_uIntPtr GetSdrObjCount( sal_uIntPtr nThemeId ); 123cdf0e10cSrcweir 124cdf0e10cSrcweir static sal_Bool GetSdrObj( const String& rThemeName, sal_uIntPtr nSdrModelPos, 125*6dd94783SArmin Le Grand SdrModel* pModel = NULL, BitmapEx* pThumb = NULL ); 126cdf0e10cSrcweir static sal_Bool GetSdrObj( sal_uIntPtr nThemeId, sal_uIntPtr nSdrModelPos, 127*6dd94783SArmin Le Grand SdrModel* pModel = NULL, BitmapEx* pThumb = NULL ); 128cdf0e10cSrcweir 129cdf0e10cSrcweir static sal_Bool InsertSdrObj( const String& rThemeName, FmFormModel& rModel ); 130cdf0e10cSrcweir static sal_Bool InsertSdrObj( sal_uIntPtr nThemeId, FmFormModel& rModel ); 131cdf0e10cSrcweir 132cdf0e10cSrcweir static sal_Bool BeginLocking( const String& rThemeName ); 133cdf0e10cSrcweir static sal_Bool BeginLocking( sal_uIntPtr nThemeId ); 134cdf0e10cSrcweir 135cdf0e10cSrcweir static sal_Bool EndLocking( const String& rThemeName ); 136cdf0e10cSrcweir static sal_Bool EndLocking( sal_uIntPtr nThemeId ); 137cdf0e10cSrcweir }; 138cdf0e10cSrcweir 139cdf0e10cSrcweir #endif // _GALLERY_HXX_ 140