Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / svtools / bmpmaker / bmpcore.hxx
blob9230b291b837804a88bfe2a75bb5ddca12e1f21e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _BMPCORE_HXX
21 #define _BMPCORE_HXX
23 #include <tools/stream.hxx>
24 #include <tools/fsys.hxx>
25 #include <vcl/bitmap.hxx>
26 #include <vector>
28 // --------------
29 // - Exit codes -
30 // --------------
32 #define EXIT_NOERROR 0
33 #define EXIT_MISSING_BITMAP 1
34 #define EXIT_NOSRSFILE 2
35 #define EXIT_NOIMGLIST 3
36 #define EXIT_DIMENSIONERROR 4
37 #define EXIT_IOERROR 5
38 #define EXIT_COMMONERROR 6
39 #define EXIT_MISSING_RESOURCE 7
40 #define EXIT_COLORDEPTHERROR 8
41 #define EXIT_MISSING_SOLARSRC_ENV 9
43 // ------------
44 // - LangInfo -
45 // ------------
47 struct LangInfo
49 char maLangDir[ 257 ];
50 sal_uInt16 mnLangNum;
53 // --------------
54 // - BmpCreator -
55 // --------------
57 class BmpCreator
59 private:
61 Bitmap aOutBmp;
62 Size aOneSize;
63 Size aTotSize;
64 Point aPos;
65 SvFileStream* pSRS;
67 void ImplCreate( const ::std::vector< DirEntry >& rInDirs,
68 const DirEntry& rOut,
69 const String& rName,
70 const LangInfo& rLang );
72 protected:
74 virtual void Message( const String& rText, sal_uInt8 cExitCode = EXIT_NOERROR );
76 public:
78 BmpCreator();
79 virtual ~BmpCreator();
81 void Create( const String& rSRSName,
82 const ::std::vector< String >& rInDirs,
83 const String& rOutName,
84 const LangInfo& rLang );
87 #endif // _BMPCORE_HXX
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */