xref: /aoo41x/main/sfx2/source/doc/graphhelp.hxx (revision 353d8f4d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include <com/sun/star/uno/Reference.hxx>
25 #include <com/sun/star/io/XStream.hpp>
26 
27 #include <rtl/ustring.hxx>
28 class SvMemoryStream;
29 class GDIMetaFile;
30 class BitmapEx;
31 
32 class GraphicHelper
33 {
34 
35 	static sal_Bool mergeBitmaps_Impl( const BitmapEx& rBmpEx, const BitmapEx& rOverlay,
36 				   const Rectangle& rOverlayRect, BitmapEx& rReturn );
37 
38 	static sal_Bool createThumb_Impl( const GDIMetaFile& rMtf,
39 				       sal_uInt32 nMaximumExtent,
40 				       BitmapEx& rBmpEx,
41 				       const BitmapEx* pOverlay = NULL,
42 				       const Rectangle* pOverlayRect = NULL );
43 
44 public:
45 
46 	static SvMemoryStream* getFormatStrFromGDI_Impl( const GDIMetaFile* pGDIMeta, sal_uInt32 nFormat );
47 
48 	static void* getEnhMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta );
49 
50 	static void* getWinMetaFileFromGDI_Impl( const GDIMetaFile* pGDIMeta, const Size& aMetaSize );
51 
52 	static sal_Bool supportsMetaFileHandle_Impl();
53 
54 	static sal_Bool getThumbnailFormatFromGDI_Impl(
55 			GDIMetaFile* pMetaFile,
56 			sal_Bool bSigned,
57 			const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
58 
59 	static sal_Bool getSignedThumbnailFormatFromBitmap_Impl(
60 			const BitmapEx& aBitmap,
61 			const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
62 
63 	static sal_uInt16 getThumbnailReplacementIDByFactoryName_Impl( const ::rtl::OUString& aFactoryShortName,
64 																	sal_Bool bIsTemplate );
65 
66 	static sal_Bool getThumbnailReplacement_Impl(
67 			sal_Int32 nResID,
68 			const ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xStream );
69 
70 };
71 
72