xref: /aoo42x/main/sc/inc/zforauto.hxx (revision 38d50f7b)
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 _ZFORAUTO_HXX_
25 #define _ZFORAUTO_HXX_
26 
27 #include <tools/string.hxx>
28 #include <i18npool/lang.h>
29 
30 
31 class SvStream;
32 class SvNumberFormatter;
33 
34 
35 class ScNumFormatAbbrev
36 {
37 	String sFormatstring;
38 	LanguageType eLnge;
39 	LanguageType eSysLnge;
40 public:
41 	ScNumFormatAbbrev();
42 	ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat);
43 	ScNumFormatAbbrev(sal_uLong nFormat, SvNumberFormatter& rFormatter);
44     void Load( SvStream& rStream, CharSet eByteStrSet );            // Laden der Zahlenformate
45     void Save( SvStream& rStream, CharSet eByteStrSet ) const;   // Speichern der Zahlenformate
46 	void PutFormatIndex(sal_uLong nFormat, SvNumberFormatter& rFormatter);
47     sal_uLong GetFormatIndex( SvNumberFormatter& rFormatter);
operator ==(const ScNumFormatAbbrev & rNumFormat) const48     inline int operator==(const ScNumFormatAbbrev& rNumFormat) const
49 	{
50 		return ((sFormatstring == rNumFormat.sFormatstring)
51 			&& (eLnge == rNumFormat.eLnge)
52 			&& (eSysLnge == rNumFormat.eSysLnge));
53 	}
operator =(const ScNumFormatAbbrev & rNumFormat)54 	inline ScNumFormatAbbrev& operator=(const ScNumFormatAbbrev& rNumFormat)
55 	{
56 		sFormatstring = rNumFormat.sFormatstring;
57 		eLnge = rNumFormat.eLnge;
58 		eSysLnge = rNumFormat.eSysLnge;
59 		return *this;
60 	}
GetLanguage() const61 	inline LanguageType GetLanguage() const { return eLnge; }
62 };
63 
64 
65 
66 #endif
67 
68 
69