2010-10-27 12:45:03 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 17:02:47 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2007-01-02 14:52:37 +00:00
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
#ifndef BASCTL_MANAGELANG_HXX
|
|
|
|
#define BASCTL_MANAGELANG_HXX
|
2007-01-02 14:52:37 +00:00
|
|
|
|
|
|
|
#include <svx/checklbx.hxx>
|
2011-11-06 21:21:30 -05:00
|
|
|
#include <vcl/button.hxx>
|
|
|
|
#include <vcl/dialog.hxx>
|
|
|
|
#include <vcl/fixed.hxx>
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2011-11-30 22:03:58 -05:00
|
|
|
class SvxLanguageBox;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
namespace basctl
|
|
|
|
{
|
|
|
|
|
|
|
|
class LocalizationMgr;
|
|
|
|
|
2007-01-02 14:52:37 +00:00
|
|
|
struct LanguageEntry
|
|
|
|
{
|
2012-10-26 23:35:24 -02:00
|
|
|
OUString m_sLanguage;
|
2007-01-02 14:52:37 +00:00
|
|
|
::com::sun::star::lang::Locale m_aLocale;
|
|
|
|
bool m_bIsDefault;
|
|
|
|
|
2012-10-26 23:35:24 -02:00
|
|
|
LanguageEntry( const OUString& _rLanguage,
|
2007-01-02 14:52:37 +00:00
|
|
|
const ::com::sun::star::lang::Locale& _rLocale,
|
|
|
|
bool _bIsDefault ) :
|
|
|
|
m_sLanguage( _rLanguage ),
|
|
|
|
m_aLocale( _rLocale ),
|
|
|
|
m_bIsDefault( _bIsDefault ) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
|
|
|
|
const ::com::sun::star::lang::Locale& rLocaleRight );
|
|
|
|
|
|
|
|
class ManageLanguageDialog : public ModalDialog
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
FixedText m_aLanguageFT;
|
|
|
|
ListBox m_aLanguageLB;
|
|
|
|
PushButton m_aAddPB;
|
|
|
|
PushButton m_aDeletePB;
|
|
|
|
PushButton m_aMakeDefPB;
|
|
|
|
FixedText m_aInfoFT;
|
|
|
|
|
|
|
|
FixedLine m_aBtnLine;
|
|
|
|
HelpButton m_aHelpBtn;
|
|
|
|
OKButton m_aCloseBtn;
|
|
|
|
|
2012-01-20 20:23:06 -05:00
|
|
|
boost::shared_ptr<LocalizationMgr> m_pLocalizationMgr;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2012-10-26 23:35:24 -02:00
|
|
|
OUString m_sDefLangStr;
|
|
|
|
OUString m_sDeleteStr;
|
|
|
|
OUString m_sCreateLangStr;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
|
|
|
void Init();
|
2007-01-29 15:53:20 +00:00
|
|
|
void CalcInfoSize();
|
2007-01-02 14:52:37 +00:00
|
|
|
void FillLanguageBox();
|
|
|
|
void ClearLanguageBox();
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
DECL_LINK(AddHdl, void *);
|
|
|
|
DECL_LINK(DeleteHdl, void *);
|
|
|
|
DECL_LINK(MakeDefHdl, void *);
|
|
|
|
DECL_LINK(SelectHdl, void *);
|
2007-01-02 14:52:37 +00:00
|
|
|
|
|
|
|
public:
|
2012-01-20 20:23:06 -05:00
|
|
|
ManageLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr );
|
2007-01-02 14:52:37 +00:00
|
|
|
~ManageLanguageDialog();
|
|
|
|
};
|
|
|
|
|
|
|
|
class SetDefaultLanguageDialog : public ModalDialog
|
|
|
|
{
|
|
|
|
private:
|
2007-01-29 15:53:20 +00:00
|
|
|
FixedText m_aLanguageFT;
|
|
|
|
SvxLanguageBox* m_pLanguageLB;
|
|
|
|
SvxCheckListBox* m_pCheckLangLB;
|
|
|
|
FixedText m_aInfoFT;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2007-01-29 15:53:20 +00:00
|
|
|
FixedLine m_aBtnLine;
|
|
|
|
OKButton m_aOKBtn;
|
|
|
|
CancelButton m_aCancelBtn;
|
|
|
|
HelpButton m_aHelpBtn;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2012-01-20 20:23:06 -05:00
|
|
|
boost::shared_ptr<LocalizationMgr> m_pLocalizationMgr;
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2007-01-29 15:53:20 +00:00
|
|
|
void FillLanguageBox();
|
|
|
|
void CalcInfoSize();
|
2007-01-02 14:52:37 +00:00
|
|
|
|
|
|
|
public:
|
2012-01-20 20:23:06 -05:00
|
|
|
SetDefaultLanguageDialog( Window* pParent, boost::shared_ptr<LocalizationMgr> _pLMgr );
|
2007-01-02 14:52:37 +00:00
|
|
|
~SetDefaultLanguageDialog();
|
|
|
|
|
|
|
|
::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > GetLocales() const;
|
|
|
|
};
|
|
|
|
|
Basic IDE: namespace basctl
Now all names in basctl are in namespace 'basctl'.
There were lots of names that included the word 'Basic' or 'BasicIDE' in
it, e.g. BasicIDEData, BasicDocumentEntry, BasicTreeListBox,
BasicIDEModule, IDEBaseWindow etc. This information is now stored in the
namespace name, so the names could be shortened: basctl::DocumentEntry,
basctl::TreeListBox, basctl::Module, basctl::BaseWindow etc.
Some other minor changes:
* LibInfos, LibInfoItem, LibInfoKey ->
LibInfos, LibInfos::Item, LibInfos::Key
* The header guards are now uniformly BASCTL_FILENAME_HXX, instead of
e.g. _FILENAME_HXX, which is undefined behaviour because of the '_'.
* namespace BasicIDE, BasicIDEGlobals, basicide -> namespace basctl
* BASICIDE_TYPE_MODULE, ... -> basctl::TYPE_MODULE, ...
Change-Id: I2a9b493562d0d8a2510d569798fbe9e1161b7c9b
Reviewed-on: https://gerrit.libreoffice.org/501
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
2012-08-25 12:43:27 +02:00
|
|
|
} // namespace basctl
|
|
|
|
|
|
|
|
#endif // BASCTL_MANAGELANG_HXX
|
2007-01-02 14:52:37 +00:00
|
|
|
|
2010-10-27 12:45:03 +01:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|