xref: /aoo41x/main/sc/inc/zforauto.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _ZFORAUTO_HXX_
29 #define _ZFORAUTO_HXX_
30 
31 #include <tools/string.hxx>
32 #include <i18npool/lang.h>
33 
34 
35 class SvStream;
36 class SvNumberFormatter;
37 
38 
39 class ScNumFormatAbbrev
40 {
41 	String sFormatstring;
42 	LanguageType eLnge;
43 	LanguageType eSysLnge;
44 public:
45 	ScNumFormatAbbrev();
46 	ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat);
47 	ScNumFormatAbbrev(sal_uLong nFormat, SvNumberFormatter& rFormatter);
48     void Load( SvStream& rStream, CharSet eByteStrSet );            // Laden der Zahlenformate
49     void Save( SvStream& rStream, CharSet eByteStrSet ) const;   // Speichern der Zahlenformate
50 	void PutFormatIndex(sal_uLong nFormat, SvNumberFormatter& rFormatter);
51     sal_uLong GetFormatIndex( SvNumberFormatter& rFormatter);
52     inline int operator==(const ScNumFormatAbbrev& rNumFormat) const
53 	{
54 		return ((sFormatstring == rNumFormat.sFormatstring)
55 			&& (eLnge == rNumFormat.eLnge)
56 			&& (eSysLnge == rNumFormat.eSysLnge));
57 	}
58 	inline ScNumFormatAbbrev& operator=(const ScNumFormatAbbrev& rNumFormat)
59 	{
60 		sFormatstring = rNumFormat.sFormatstring;
61 		eLnge = rNumFormat.eLnge;
62 		eSysLnge = rNumFormat.eSysLnge;
63 		return *this;
64 	}
65 	inline LanguageType GetLanguage() const { return eLnge; }
66 };
67 
68 
69 
70 #endif
71 
72 
73