bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / numfmtlb.hxx
blobd1dafdf1212648270c982ab7467a5a84bff28e90
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 .
19 #ifndef _SWNUMFMTLB_HXX
20 #define _SWNUMFMTLB_HXX
22 #include <vcl/lstbox.hxx>
23 #include <svl/zforlist.hxx>
24 #include "swdllapi.h"
26 class SwView;
28 class SW_DLLPUBLIC NumFormatListBox : public ListBox
30 short nCurrFormatType;
31 sal_uInt16 nStdEntry;
32 sal_Bool bOneArea;
33 sal_uLong nDefFormat;
34 SwView* pVw;
35 SvNumberFormatter* pOwnFormatter;
36 LanguageType eCurLanguage;
37 sal_Bool bShowLanguageControl; //determine whether the language control has
38 //to be shown in the number format dialog
39 sal_Bool bUseAutomaticLanguage;//determine whether language is automatically assigned
41 SW_DLLPRIVATE DECL_LINK( SelectHdl, ListBox * );
43 SW_DLLPRIVATE double GetDefValue(const short nFormatType) const;
44 SW_DLLPRIVATE void Init(short nFormatType, sal_Bool bUsrFmts);
45 SW_DLLPRIVATE SwView* GetView();
47 public:
48 NumFormatListBox( Window* pWin, const ResId& rResId,
49 short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
50 sal_Bool bUsrFmts = sal_True );
52 NumFormatListBox( Window* pWin, SwView* pView, const ResId& rResId,
53 short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
54 sal_Bool bUsrFmts = sal_True );
56 ~NumFormatListBox();
58 void Clear();
60 inline void SetOneArea(sal_Bool bOnlyOne = sal_True) { bOneArea = bOnlyOne; }
62 void SetFormatType(const short nFormatType);
63 inline short GetFormatType() const { return nCurrFormatType; }
64 void SetDefFormat(const sal_uLong nDefFmt);
65 sal_uLong GetFormat() const;
67 inline LanguageType GetCurLanguage() const { return eCurLanguage;}
68 void SetLanguage(LanguageType eSet) { eCurLanguage = eSet;}
70 void SetAutomaticLanguage(sal_Bool bSet){bUseAutomaticLanguage = bSet;}
71 sal_Bool IsAutomaticLanguage()const {return bUseAutomaticLanguage;}
73 void SetShowLanguageControl(sal_Bool bSet){bShowLanguageControl = bSet;}
78 #endif
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */