1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: managelang.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _BASCTL_MANAGELANG_HXX
32 #define _BASCTL_MANAGELANG_HXX
34 #include <vcl/dialog.hxx>
36 #include <vcl/fixed.hxx>
39 #include <vcl/lstbox.hxx>
42 #include <vcl/button.hxx>
44 #include <svx/langbox.hxx>
45 #include <svx/checklbx.hxx>
47 class LocalizationMgr
;
52 ::com::sun::star::lang::Locale m_aLocale
;
55 LanguageEntry( const String
& _rLanguage
,
56 const ::com::sun::star::lang::Locale
& _rLocale
,
58 m_sLanguage( _rLanguage
),
59 m_aLocale( _rLocale
),
60 m_bIsDefault( _bIsDefault
) {}
63 extern bool localesAreEqual( const ::com::sun::star::lang::Locale
& rLocaleLeft
,
64 const ::com::sun::star::lang::Locale
& rLocaleRight
);
66 class ManageLanguageDialog
: public ModalDialog
69 FixedText m_aLanguageFT
;
70 ListBox m_aLanguageLB
;
72 PushButton m_aDeletePB
;
73 PushButton m_aMakeDefPB
;
77 HelpButton m_aHelpBtn
;
80 LocalizationMgr
* m_pLocalizationMgr
;
84 String m_sCreateLangStr
;
88 void FillLanguageBox();
89 void ClearLanguageBox();
91 DECL_LINK( AddHdl
, Button
* );
92 DECL_LINK( DeleteHdl
, Button
* );
93 DECL_LINK( MakeDefHdl
, Button
* );
94 DECL_LINK( SelectHdl
, ListBox
* );
97 ManageLanguageDialog( Window
* pParent
, LocalizationMgr
* _pLMgr
);
98 ~ManageLanguageDialog();
101 class SetDefaultLanguageDialog
: public ModalDialog
104 FixedText m_aLanguageFT
;
105 SvxLanguageBox
* m_pLanguageLB
;
106 SvxCheckListBox
* m_pCheckLangLB
;
109 FixedLine m_aBtnLine
;
111 CancelButton m_aCancelBtn
;
112 HelpButton m_aHelpBtn
;
114 bool m_bIsDefaultMode
;
115 LocalizationMgr
* m_pLocalizationMgr
;
117 void FillLanguageBox();
121 SetDefaultLanguageDialog( Window
* pParent
, LocalizationMgr
* _pLMgr
);
122 ~SetDefaultLanguageDialog();
124 ::com::sun::star::uno::Sequence
< ::com::sun::star::lang::Locale
> GetLocales() const;
127 #endif //_BASCTL_MANAGELANG_HXX