merged tag ooo/OOO330_m14
[LibreOffice.git] / sc / inc / zforauto.hxx
blob7c5e9a2f07cb6e30df0ecc288d284555a71e9fd4
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
28 #ifndef _ZFORAUTO_HXX_
29 #define _ZFORAUTO_HXX_
31 #include <tools/string.hxx>
32 #include <i18npool/lang.h>
35 class SvStream;
36 class SvNumberFormatter;
39 class ScNumFormatAbbrev
41 String sFormatstring;
42 LanguageType eLnge;
43 LanguageType eSysLnge;
44 public:
45 ScNumFormatAbbrev();
46 ScNumFormatAbbrev(const ScNumFormatAbbrev& aFormat);
47 ScNumFormatAbbrev(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(ULONG nFormat, SvNumberFormatter& rFormatter);
51 ULONG GetFormatIndex( SvNumberFormatter& rFormatter);
52 inline int operator==(const ScNumFormatAbbrev& rNumFormat) const
54 return ((sFormatstring == rNumFormat.sFormatstring)
55 && (eLnge == rNumFormat.eLnge)
56 && (eSysLnge == rNumFormat.eSysLnge));
58 inline ScNumFormatAbbrev& operator=(const ScNumFormatAbbrev& rNumFormat)
60 sFormatstring = rNumFormat.sFormatstring;
61 eLnge = rNumFormat.eLnge;
62 eSysLnge = rNumFormat.eSysLnge;
63 return *this;
65 inline LanguageType GetLanguage() const { return eLnge; }
70 #endif