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 #ifndef _BMPCORE_HXX 25 #define _BMPCORE_HXX 26 27 #include <tools/stream.hxx> 28 #include <tools/fsys.hxx> 29 #include <vcl/bitmap.hxx> 30 #include <vector> 31 32 // -------------- 33 // - Exit codes - 34 // -------------- 35 36 #define EXIT_NOERROR 0 37 #define EXIT_MISSING_BITMAP 1 38 #define EXIT_NOSRSFILE 2 39 #define EXIT_NOIMGLIST 3 40 #define EXIT_DIMENSIONERROR 4 41 #define EXIT_IOERROR 5 42 #define EXIT_COMMONERROR 6 43 #define EXIT_MISSING_RESOURCE 7 44 #define EXIT_COLORDEPTHERROR 8 45 #define EXIT_MISSING_SOLARSRC_ENV 9 46 47 // ------------ 48 // - LangInfo - 49 // ------------ 50 51 struct LangInfo 52 { 53 char maLangDir[ 257 ]; 54 sal_uInt16 mnLangNum; 55 }; 56 57 // -------------- 58 // - BmpCreator - 59 // -------------- 60 61 class BmpCreator 62 { 63 private: 64 65 Bitmap aOutBmp; 66 Size aOneSize; 67 Size aTotSize; 68 Point aPos; 69 SvFileStream* pSRS; 70 sal_uLong nTotCount; 71 sal_uInt16 nPos; 72 73 void ImplCreate( const ::std::vector< DirEntry >& rInDirs, 74 const DirEntry& rOut, 75 const String& rName, 76 const LangInfo& rLang ); 77 78 protected: 79 80 virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR ); 81 82 public: 83 84 BmpCreator(); 85 virtual ~BmpCreator(); 86 87 void Create( const String& rSRSName, 88 const ::std::vector< String >& rInDirs, 89 const String& rOutName, 90 const LangInfo& rLang ); 91 }; 92 93 #endif // _BMPCORE_HXX 94