Kaydet (Commit) 85fc36b9 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ManageLanguageDialog

Change-Id: I03dfa49f4a8b269408d9037feb9c5c984f6c3c52
Reviewed-on: https://gerrit.libreoffice.org/67511
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst cb22fb0c
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <com/sun/star/i18n/Boundary.hpp> #include <com/sun/star/i18n/Boundary.hpp>
#include <com/sun/star/i18n/WordType.hpp> #include <com/sun/star/i18n/WordType.hpp>
#include <com/sun/star/i18n/XBreakIterator.hpp> #include <com/sun/star/i18n/XBreakIterator.hpp>
#include <comphelper/sequence.hxx>
#include <editeng/unolingu.hxx> #include <editeng/unolingu.hxx>
#include <sfx2/bindings.hxx> #include <sfx2/bindings.hxx>
#include <svtools/langtab.hxx> #include <svtools/langtab.hxx>
...@@ -146,13 +147,13 @@ void ManageLanguageDialog::ClearLanguageBox() ...@@ -146,13 +147,13 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl, Button*, void) IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl, Button*, void)
{ {
VclPtr< SetDefaultLanguageDialog > pDlg = VclPtr<SetDefaultLanguageDialog>::Create(this, m_xLocalizationMgr); std::shared_ptr<SetDefaultLanguageDialog> xDlg(new SetDefaultLanguageDialog(GetFrameWeld(), m_xLocalizationMgr));
pDlg->StartExecuteAsync([pDlg,this](sal_Int32 nResult) weld::DialogController::runAsync(xDlg, [xDlg,this](sal_Int32 nResult)
{ {
if (!nResult ) if (!nResult )
return; return;
// add new locales // add new locales
Sequence< Locale > aLocaleSeq = pDlg->GetLocales(); Sequence< Locale > aLocaleSeq = xDlg->GetLocales();
m_xLocalizationMgr->handleAddLocales( aLocaleSeq ); m_xLocalizationMgr->handleAddLocales( aLocaleSeq );
// update listbox // update listbox
ClearLanguageBox(); ClearLanguageBox();
...@@ -224,31 +225,34 @@ IMPL_LINK_NOARG(ManageLanguageDialog, SelectHdl, ListBox&, void) ...@@ -224,31 +225,34 @@ IMPL_LINK_NOARG(ManageLanguageDialog, SelectHdl, ListBox&, void)
// class SetDefaultLanguageDialog ----------------------------------------------- // class SetDefaultLanguageDialog -----------------------------------------------
SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, std::shared_ptr<LocalizationMgr> const & xLMgr) SetDefaultLanguageDialog::SetDefaultLanguageDialog(weld::Window* pParent, std::shared_ptr<LocalizationMgr> const & xLMgr)
: ModalDialog(pParent, "DefaultLanguageDialog", "modules/BasicIDE/ui/defaultlanguage.ui") : GenericDialogController(pParent, "modules/BasicIDE/ui/defaultlanguage.ui", "DefaultLanguageDialog")
, m_pCheckLangLB(nullptr)
, m_xLocalizationMgr(xLMgr) , m_xLocalizationMgr(xLMgr)
, m_xLanguageFT(m_xBuilder->weld_label("defaultlabel"))
, m_xLanguageLB(m_xBuilder->weld_tree_view("entries"))
, m_xCheckLangFT(m_xBuilder->weld_label("checkedlabel"))
, m_xCheckLangLB(m_xBuilder->weld_tree_view("checkedentries"))
, m_xDefinedFT(m_xBuilder->weld_label("defined"))
, m_xAddedFT(m_xBuilder->weld_label("added"))
, m_xAltTitle(m_xBuilder->weld_label("alttitle"))
, m_xLanguageCB(new LanguageBox(m_xBuilder->weld_combo_box("hidden")))
{ {
get(m_pLanguageLB, "entries"); m_xLanguageLB->set_size_request(-1, m_xLanguageLB->get_height_rows(10));
get(m_pCheckLangLB, "checkedentries"); m_xCheckLangLB->set_size_request(-1, m_xCheckLangLB->get_height_rows(10));
get(m_pDefinedFT, "defined"); std::vector<int> aWidths;
get(m_pAddedFT, "added"); aWidths.push_back(m_xCheckLangLB->get_approximate_digit_width() * 3 + 6);
get(m_pLanguageFT, "defaultlabel"); m_xCheckLangLB->set_column_fixed_widths(aWidths);
get(m_pCheckLangFT, "checkedlabel");
m_pLanguageLB->set_height_request(m_pLanguageLB->GetTextHeight() * 10);
m_pCheckLangLB->set_height_request(m_pCheckLangLB->GetTextHeight() * 10);
if (m_xLocalizationMgr->isLibraryLocalized()) if (m_xLocalizationMgr->isLibraryLocalized())
{ {
// change to "Add Interface Language" mode // change to "Add Interface Language" mode
m_pLanguageLB->Hide(); m_xLanguageLB->set_visible(false);
m_pCheckLangLB->Show(); m_xCheckLangLB->set_visible(true);
SetText(get<FixedText>("alttitle")->GetText()); m_xDialog->set_title(m_xAltTitle->get_label());
m_pLanguageFT->Hide(); m_xLanguageFT->set_visible(false);
m_pCheckLangFT->Show(); m_xCheckLangFT->set_visible(true);
m_pDefinedFT->Hide(); m_xDefinedFT->set_visible(false);
m_pAddedFT->Show(); m_xAddedFT->set_visible(true);
} }
FillLanguageBox(); FillLanguageBox();
...@@ -256,72 +260,73 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, std::sh ...@@ -256,72 +260,73 @@ SetDefaultLanguageDialog::SetDefaultLanguageDialog(vcl::Window* pParent, std::sh
SetDefaultLanguageDialog::~SetDefaultLanguageDialog() SetDefaultLanguageDialog::~SetDefaultLanguageDialog()
{ {
disposeOnce();
}
void SetDefaultLanguageDialog::dispose()
{
m_pLanguageFT.clear();
m_pLanguageLB.clear();
m_pCheckLangFT.clear();
m_pCheckLangLB.clear();
m_pDefinedFT.clear();
m_pAddedFT.clear();
ModalDialog::dispose();
} }
void SetDefaultLanguageDialog::FillLanguageBox() void SetDefaultLanguageDialog::FillLanguageBox()
{ {
// fill list with all languages // fill list with all languages
m_pLanguageLB->SetLanguageList( SvxLanguageListFlags::ALL, false ); m_xLanguageCB->SetLanguageList(SvxLanguageListFlags::ALL, false);
if ( m_xLocalizationMgr->isLibraryLocalized() ) if (m_xLocalizationMgr->isLibraryLocalized())
{ {
// remove the already localized languages // remove the already localized languages
Sequence< Locale > aLocaleSeq = m_xLocalizationMgr->getStringResourceManager()->getLocales(); Sequence< Locale > aLocaleSeq = m_xLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray(); const Locale* pLocale = aLocaleSeq.getConstArray();
const sal_Int32 nCountLoc = aLocaleSeq.getLength(); const sal_Int32 nCountLoc = aLocaleSeq.getLength();
for ( sal_Int32 i = 0; i < nCountLoc; ++i ) for ( sal_Int32 i = 0; i < nCountLoc; ++i )
m_pLanguageLB->RemoveLanguage( LanguageTag::convertToLanguageType( pLocale[i] ) ); m_xLanguageCB->remove_id(LanguageTag::convertToLanguageType(pLocale[i]));
// fill checklistbox if not in default mode // fill checklistbox if not in default mode
const sal_Int32 nCountLang = m_pLanguageLB->GetEntryCount(); const sal_Int32 nCountLang = m_xLanguageCB->get_count();
for ( sal_Int32 j = 0; j < nCountLang; ++j ) for (sal_Int32 j = 0; j < nCountLang; ++j)
{ {
m_pCheckLangLB->InsertEntry( LanguageType eLang = m_xLanguageCB->get_id(j);
m_pLanguageLB->GetEntry(j), LISTBOX_APPEND, m_pLanguageLB->GetEntryData(j) ); m_xCheckLangLB->insert(nullptr, -1, nullptr, nullptr, nullptr,
nullptr, nullptr, false);
const int nRow = m_xCheckLangLB->n_children() - 1;
m_xCheckLangLB->set_toggle(nRow, false, 0);
m_xCheckLangLB->set_text(nRow, m_xLanguageCB->get_text(j), 1);
m_xCheckLangLB->set_id(nRow, OUString::number(eLang.get()));
} }
m_pLanguageLB = nullptr; m_xLanguageCB.reset();
m_xLanguageLB.reset();
} }
else else
{
const sal_Int32 nCountLang = m_xLanguageCB->get_count();
for (sal_Int32 j = 0; j < nCountLang; ++j)
{
LanguageType eLang = m_xLanguageCB->get_id(j);
m_xLanguageLB->append(OUString::number(eLang.get()), m_xLanguageCB->get_text(j));
}
m_xLanguageCB.reset();
// preselect current UI language // preselect current UI language
m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() ); m_xLanguageLB->select_id(OUString::number(Application::GetSettings().GetUILanguageTag().getLanguageType().get()));
}
} }
Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const Sequence< Locale > SetDefaultLanguageDialog::GetLocales() const
{ {
bool bNotLocalized = !m_xLocalizationMgr->isLibraryLocalized(); bool bNotLocalized = !m_xLocalizationMgr->isLibraryLocalized();
sal_Int32 nSize = bNotLocalized ? 1 : m_pCheckLangLB->GetCheckedEntryCount(); if (bNotLocalized)
Sequence< Locale > aLocaleSeq( nSize );
if ( bNotLocalized )
{ {
aLocaleSeq[0] = LanguageTag( m_pLanguageLB->GetSelectedLanguage() ).getLocale(); LanguageType eType = LanguageType(m_xLanguageLB->get_selected_id().toUInt32());
Sequence<Locale> aLocaleSeq(1);
aLocaleSeq[0] = LanguageTag(eType).getLocale();
return aLocaleSeq;
} }
else std::vector<Locale> aLocaleSeq;
const sal_Int32 nCount = m_xCheckLangLB->n_children();
for (sal_Int32 i = 0; i < nCount; ++i)
{ {
const sal_Int32 nCount = m_pCheckLangLB->GetEntryCount(); if (m_xCheckLangLB->get_toggle(i, 0))
sal_Int32 j = 0;
for ( sal_Int32 i = 0; i < nCount; ++i )
{ {
if ( m_pCheckLangLB->IsChecked(i) ) LanguageType eType = LanguageType(m_xCheckLangLB->get_id(i).toUInt32());
{ aLocaleSeq.push_back(LanguageTag::convertToLocale(eType));
LanguageType eType = LanguageType( reinterpret_cast<sal_uLong>(m_pCheckLangLB->GetEntryData(i)) );
aLocaleSeq[j++] = LanguageTag::convertToLocale( eType );
}
} }
DBG_ASSERT( nSize == j, "SetDefaultLanguageDialog::GetLocales(): invalid indexes" );
} }
return aLocaleSeq; return comphelper::containerToSequence(aLocaleSeq);
} }
} // namespace basctl } // namespace basctl
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include <vcl/dialog.hxx> #include <vcl/dialog.hxx>
#include <vcl/fixed.hxx> #include <vcl/fixed.hxx>
class SvxLanguageBox; class LanguageBox;
namespace basctl namespace basctl
{ {
...@@ -74,24 +74,25 @@ public: ...@@ -74,24 +74,25 @@ public:
virtual void dispose() override; virtual void dispose() override;
}; };
class SetDefaultLanguageDialog : public ModalDialog class SetDefaultLanguageDialog : public weld::GenericDialogController
{ {
private: private:
VclPtr<FixedText> m_pLanguageFT;
VclPtr<SvxLanguageBox> m_pLanguageLB;
VclPtr<FixedText> m_pCheckLangFT;
VclPtr<SvxCheckListBox> m_pCheckLangLB;
VclPtr<FixedText> m_pDefinedFT;
VclPtr<FixedText> m_pAddedFT;
std::shared_ptr<LocalizationMgr> m_xLocalizationMgr; std::shared_ptr<LocalizationMgr> m_xLocalizationMgr;
void FillLanguageBox(); void FillLanguageBox();
std::unique_ptr<weld::Label> m_xLanguageFT;
std::unique_ptr<weld::TreeView> m_xLanguageLB;
std::unique_ptr<weld::Label> m_xCheckLangFT;
std::unique_ptr<weld::TreeView> m_xCheckLangLB;
std::unique_ptr<weld::Label> m_xDefinedFT;
std::unique_ptr<weld::Label> m_xAddedFT;
std::unique_ptr<weld::Label> m_xAltTitle;
std::unique_ptr<::LanguageBox> m_xLanguageCB;
public: public:
SetDefaultLanguageDialog(vcl::Window* pParent, std::shared_ptr<LocalizationMgr> const & xLMgr); SetDefaultLanguageDialog(weld::Window* pParent, std::shared_ptr<LocalizationMgr> const & xLMgr);
virtual ~SetDefaultLanguageDialog() override; virtual ~SetDefaultLanguageDialog() override;
virtual void dispose() override;
css::uno::Sequence< css::lang::Locale > GetLocales() const; css::uno::Sequence< css::lang::Locale > GetLocales() const;
}; };
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 --> <!-- Generated with glade 3.22.1 -->
<interface domain="basctl"> <interface domain="basctl">
<requires lib="gtk+" version="3.18"/> <requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/> <object class="GtkTreeStore" id="liststore1">
<columns>
<!-- column-name check1 -->
<column type="gboolean"/>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
<!-- column-name checkvis1 -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkTreeStore" id="liststore2">
<columns>
<!-- column-name text -->
<column type="gchararray"/>
<!-- column-name id -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkDialog" id="DefaultLanguageDialog"> <object class="GtkDialog" id="DefaultLanguageDialog">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="border_width">6</property> <property name="border_width">6</property>
<property name="title" translatable="yes" context="defaultlanguage|DefaultLanguageDialog">Set Default User Interface Language</property> <property name="title" translatable="yes" context="defaultlanguage|DefaultLanguageDialog">Set Default User Interface Language</property>
<property name="resizable">False</property> <property name="resizable">False</property>
<property name="modal">True</property>
<property name="type_hint">dialog</property> <property name="type_hint">dialog</property>
<child>
<placeholder/>
</child>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1"> <object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property> <property name="can_focus">False</property>
...@@ -89,10 +112,10 @@ ...@@ -89,10 +112,10 @@
<object class="GtkLabel" id="defaultlabel"> <object class="GtkLabel" id="defaultlabel">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="defaultlanguage|defaultlabel">Default language:</property> <property name="label" translatable="yes" context="defaultlanguage|defaultlabel">Default language:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">entries:border</property> <property name="mnemonic_widget">entries</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -100,12 +123,40 @@ ...@@ -100,12 +123,40 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="svxcorelo-SvxLanguageBox" id="entries:border"> <object class="GtkScrolledWindow">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="dropdown">False</property> <property name="shadow_type">in</property>
<child>
<object class="GtkTreeView" id="entries">
<property name="width_request">-1</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore2</property>
<property name="headers_visible">False</property>
<property name="search_column">1</property>
<property name="enable_tree_lines">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection1"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<property name="spacing">6</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -113,13 +164,44 @@ ...@@ -113,13 +164,44 @@
</packing> </packing>
</child> </child>
<child> <child>
<object class="svxcorelo-SvxCheckListBox" id="checkedentries:border"> <object class="GtkScrolledWindow">
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="no_show_all">True</property>
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<child internal-child="selection"> <property name="shadow_type">in</property>
<object class="GtkTreeSelection" id="Check List Box-selection1"/> <child>
<object class="GtkTreeView" id="checkedentries">
<property name="width_request">-1</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="model">liststore1</property>
<property name="headers_visible">False</property>
<property name="search_column">1</property>
<property name="enable_tree_lines">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="Macro Library List-selection2"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<property name="spacing">6</property>
<child>
<object class="GtkCellRendererToggle" id="cellrenderer5"/>
<attributes>
<attribute name="visible">3</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child> </child>
</object> </object>
<packing> <packing>
...@@ -131,16 +213,32 @@ ...@@ -131,16 +213,32 @@
<object class="GtkLabel" id="checkedlabel"> <object class="GtkLabel" id="checkedlabel">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="no_show_all">True</property> <property name="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="defaultlanguage|checkedlabel">Available languages:</property> <property name="label" translatable="yes" context="defaultlanguage|checkedlabel">Available languages:</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="mnemonic_widget">checkedentries:border</property> <property name="mnemonic_widget">checkedentries</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkComboBoxText" id="hidden">
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="has_entry">True</property>
<child internal-child="entry">
<object class="GtkEntry">
<property name="can_focus">False</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">4</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -151,11 +249,11 @@ ...@@ -151,11 +249,11 @@
<object class="GtkLabel" id="defined"> <object class="GtkLabel" id="defined">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="defaultlanguage|defined">Select a language to define the default user interface language. All currently present strings will be assigned to the resources created for the selected language.</property> <property name="label" translatable="yes" context="defaultlanguage|defined">Select a language to define the default user interface language. All currently present strings will be assigned to the resources created for the selected language.</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="wrap_mode">word-char</property> <property name="wrap_mode">word-char</property>
<property name="max_width_chars">72</property> <property name="max_width_chars">72</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
...@@ -166,11 +264,11 @@ ...@@ -166,11 +264,11 @@
<object class="GtkLabel" id="added"> <object class="GtkLabel" id="added">
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="no_show_all">True</property> <property name="no_show_all">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes" context="defaultlanguage|added">Select languages to be added. Resources for these languages will be created in the library. Strings of the current default user interface language will be copied to these new resources by default.</property> <property name="label" translatable="yes" context="defaultlanguage|added">Select languages to be added. Resources for these languages will be created in the library. Strings of the current default user interface language will be copied to these new resources by default.</property>
<property name="wrap">True</property> <property name="wrap">True</property>
<property name="wrap_mode">word-char</property> <property name="wrap_mode">word-char</property>
<property name="max_width_chars">72</property> <property name="max_width_chars">72</property>
<property name="xalign">0</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
......
...@@ -174,10 +174,13 @@ public: ...@@ -174,10 +174,13 @@ public:
bool get_visible() const { return m_xControl->get_visible(); } bool get_visible() const { return m_xControl->get_visible(); }
LanguageType get_active_id() const; LanguageType get_active_id() const;
int find_id(const LanguageType eLangType) const; int find_id(const LanguageType eLangType) const;
LanguageType get_id(int nPos) const;
void set_id(int nPos, const LanguageType eLangType); void set_id(int nPos, const LanguageType eLangType);
void remove_id(const LanguageType eLangType); void remove_id(const LanguageType eLangType);
void append(const LanguageType eLangType, const OUString& rStr); void append(const LanguageType eLangType, const OUString& rStr);
int find_text(const OUString& rStr) const { return m_xControl->find_text(rStr); } int find_text(const OUString& rStr) const { return m_xControl->find_text(rStr); }
OUString get_text(int nPos) const { return m_xControl->get_text(nPos); }
int get_count() const { return m_xControl->get_count(); }
const weld::ComboBox* get_widget() const { return m_xControl.get(); } const weld::ComboBox* get_widget() const { return m_xControl.get(); }
}; };
......
...@@ -477,6 +477,11 @@ void LanguageBox::set_id(int pos, const LanguageType eLangType) ...@@ -477,6 +477,11 @@ void LanguageBox::set_id(int pos, const LanguageType eLangType)
m_xControl->set_id(pos, OUString::number(static_cast<sal_uInt16>(eLangType))); m_xControl->set_id(pos, OUString::number(static_cast<sal_uInt16>(eLangType)));
} }
LanguageType LanguageBox::get_id(int pos) const
{
return LanguageType(m_xControl->get_id(pos).toInt32());
}
void LanguageBox::remove_id(const LanguageType eLangType) void LanguageBox::remove_id(const LanguageType eLangType)
{ {
m_xControl->remove_id(OUString::number(static_cast<sal_uInt16>(eLangType))); m_xControl->remove_id(OUString::number(static_cast<sal_uInt16>(eLangType)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment