summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-05-26 21:43:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-05-27 10:03:59 +0200
commit9e577313f538fc0d0643f3aa171a92cac112d949 (patch)
tree10424eeca6d54b0ddbb6e0e2ddcd5aad310becd9 /extensions
parentf46ece5419e4981793189c00b27a6065fcbfaa60 (diff)
weld MappingDialog
Change-Id: Ie4c6ef0f75384e1fbd68905cf4c70ed6d7ab88fe Reviewed-on: https://gerrit.libreoffice.org/73003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibview.cxx2
-rw-r--r--extensions/source/bibliography/datman.cxx311
-rw-r--r--extensions/source/bibliography/datman.hxx2
-rw-r--r--extensions/source/bibliography/framectr.cxx6
-rw-r--r--extensions/source/bibliography/toolbar.cxx11
-rw-r--r--extensions/uiconfig/sbibliography/ui/mappingdialog.ui70
6 files changed, 181 insertions, 221 deletions
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
index bd8e4433b6c7..63e14b82141e 100644
--- a/extensions/source/bibliography/bibview.cxx
+++ b/extensions/source/bibliography/bibview.cxx
@@ -187,7 +187,7 @@ namespace bib
IMPL_LINK_NOARG( BibView, CallMappingHdl, void*, void)
{
- m_pDatMan->CreateMappingDialog( this );
+ m_pDatMan->CreateMappingDialog(GetFrameWeld());
}
void BibView::Resize()
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 2eedd1a7583e..54a5ad6052ba 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -184,54 +184,52 @@ static Reference< XNameAccess > getColumns(const Reference< XForm > & _rxForm)
return xReturn;
}
-class MappingDialog_Impl : public ModalDialog
+class MappingDialog_Impl : public weld::GenericDialogController
{
BibDataManager* pDatMan;
- VclPtr<OKButton> pOKBT;
- VclPtr<ListBox> pIdentifierLB;
- VclPtr<ListBox> pAuthorityTypeLB;
- VclPtr<ListBox> pAuthorLB;
- VclPtr<ListBox> pTitleLB;
- VclPtr<ListBox> pMonthLB;
- VclPtr<ListBox> pYearLB;
- VclPtr<ListBox> pISBNLB;
- VclPtr<ListBox> pBooktitleLB;
- VclPtr<ListBox> pChapterLB;
- VclPtr<ListBox> pEditionLB;
- VclPtr<ListBox> pEditorLB;
- VclPtr<ListBox> pHowpublishedLB;
- VclPtr<ListBox> pInstitutionLB;
- VclPtr<ListBox> pJournalLB;
- VclPtr<ListBox> pNoteLB;
- VclPtr<ListBox> pAnnoteLB;
- VclPtr<ListBox> pNumberLB;
- VclPtr<ListBox> pOrganizationsLB;
- VclPtr<ListBox> pPagesLB;
- VclPtr<ListBox> pPublisherLB;
- VclPtr<ListBox> pAddressLB;
- VclPtr<ListBox> pSchoolLB;
- VclPtr<ListBox> pSeriesLB;
- VclPtr<ListBox> pReportTypeLB;
- VclPtr<ListBox> pVolumeLB;
- VclPtr<ListBox> pURLLB;
- VclPtr<ListBox> pCustom1LB;
- VclPtr<ListBox> pCustom2LB;
- VclPtr<ListBox> pCustom3LB;
- VclPtr<ListBox> pCustom4LB;
- VclPtr<ListBox> pCustom5LB;
- VclPtr<ListBox> aListBoxes[COLUMN_COUNT];
- OUString sNone;
+ OUString sNone;
bool bModified;
-
- DECL_LINK(OkHdl, Button*, void);
- DECL_LINK(ListBoxSelectHdl, ListBox&, void);
+ std::unique_ptr<weld::Button> m_xOKBT;
+ std::unique_ptr<weld::ComboBox> m_xIdentifierLB;
+ std::unique_ptr<weld::ComboBox> m_xAuthorityTypeLB;
+ std::unique_ptr<weld::ComboBox> m_xAuthorLB;
+ std::unique_ptr<weld::ComboBox> m_xTitleLB;
+ std::unique_ptr<weld::ComboBox> m_xMonthLB;
+ std::unique_ptr<weld::ComboBox> m_xYearLB;
+ std::unique_ptr<weld::ComboBox> m_xISBNLB;
+ std::unique_ptr<weld::ComboBox> m_xBooktitleLB;
+ std::unique_ptr<weld::ComboBox> m_xChapterLB;
+ std::unique_ptr<weld::ComboBox> m_xEditionLB;
+ std::unique_ptr<weld::ComboBox> m_xEditorLB;
+ std::unique_ptr<weld::ComboBox> m_xHowpublishedLB;
+ std::unique_ptr<weld::ComboBox> m_xInstitutionLB;
+ std::unique_ptr<weld::ComboBox> m_xJournalLB;
+ std::unique_ptr<weld::ComboBox> m_xNoteLB;
+ std::unique_ptr<weld::ComboBox> m_xAnnoteLB;
+ std::unique_ptr<weld::ComboBox> m_xNumberLB;
+ std::unique_ptr<weld::ComboBox> m_xOrganizationsLB;
+ std::unique_ptr<weld::ComboBox> m_xPagesLB;
+ std::unique_ptr<weld::ComboBox> m_xPublisherLB;
+ std::unique_ptr<weld::ComboBox> m_xAddressLB;
+ std::unique_ptr<weld::ComboBox> m_xSchoolLB;
+ std::unique_ptr<weld::ComboBox> m_xSeriesLB;
+ std::unique_ptr<weld::ComboBox> m_xReportTypeLB;
+ std::unique_ptr<weld::ComboBox> m_xVolumeLB;
+ std::unique_ptr<weld::ComboBox> m_xURLLB;
+ std::unique_ptr<weld::ComboBox> m_xCustom1LB;
+ std::unique_ptr<weld::ComboBox> m_xCustom2LB;
+ std::unique_ptr<weld::ComboBox> m_xCustom3LB;
+ std::unique_ptr<weld::ComboBox> m_xCustom4LB;
+ std::unique_ptr<weld::ComboBox> m_xCustom5LB;
+ weld::ComboBox* aListBoxes[COLUMN_COUNT];
+
+ DECL_LINK(OkHdl, weld::Button&, void);
+ DECL_LINK(ListBoxSelectHdl, weld::ComboBox&, void);
public:
- MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pDatMan);
- virtual ~MappingDialog_Impl() override;
- virtual void dispose() override;
+ MappingDialog_Impl(weld::Window* pParent, BibDataManager* pDatMan);
};
static sal_uInt16 lcl_FindLogicalName(BibConfig const * pConfig ,
@@ -245,101 +243,100 @@ static sal_uInt16 lcl_FindLogicalName(BibConfig const * pConfig ,
return USHRT_MAX;
}
-MappingDialog_Impl::MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pMan)
- : ModalDialog(pParent, "MappingDialog", "modules/sbibliography/ui/mappingdialog.ui")
+MappingDialog_Impl::MappingDialog_Impl(weld::Window* pParent, BibDataManager* pMan)
+ : GenericDialogController(pParent, "modules/sbibliography/ui/mappingdialog.ui", "MappingDialog")
, pDatMan(pMan)
, sNone(BibResId(RID_BIB_STR_NONE))
, bModified(false)
+ , m_xOKBT(m_xBuilder->weld_button("ok"))
+ , m_xIdentifierLB(m_xBuilder->weld_combo_box("identifierCombobox"))
+ , m_xAuthorityTypeLB(m_xBuilder->weld_combo_box("authorityTypeCombobox"))
+ , m_xAuthorLB(m_xBuilder->weld_combo_box("authorCombobox"))
+ , m_xTitleLB(m_xBuilder->weld_combo_box("titleCombobox"))
+ , m_xMonthLB(m_xBuilder->weld_combo_box("monthCombobox"))
+ , m_xYearLB(m_xBuilder->weld_combo_box("yearCombobox"))
+ , m_xISBNLB(m_xBuilder->weld_combo_box("ISBNCombobox"))
+ , m_xBooktitleLB(m_xBuilder->weld_combo_box("bookTitleCombobox"))
+ , m_xChapterLB(m_xBuilder->weld_combo_box("chapterCombobox"))
+ , m_xEditionLB(m_xBuilder->weld_combo_box("editionCombobox"))
+ , m_xEditorLB(m_xBuilder->weld_combo_box("editorCombobox"))
+ , m_xHowpublishedLB(m_xBuilder->weld_combo_box("howPublishedCombobox"))
+ , m_xInstitutionLB(m_xBuilder->weld_combo_box("institutionCombobox"))
+ , m_xJournalLB(m_xBuilder->weld_combo_box("journalCombobox"))
+ , m_xNoteLB(m_xBuilder->weld_combo_box("noteCombobox"))
+ , m_xAnnoteLB(m_xBuilder->weld_combo_box("annoteCombobox"))
+ , m_xNumberLB(m_xBuilder->weld_combo_box("numberCombobox"))
+ , m_xOrganizationsLB(m_xBuilder->weld_combo_box("organizationCombobox"))
+ , m_xPagesLB(m_xBuilder->weld_combo_box("pagesCombobox"))
+ , m_xPublisherLB(m_xBuilder->weld_combo_box("publisherCombobox"))
+ , m_xAddressLB(m_xBuilder->weld_combo_box("addressCombobox"))
+ , m_xSchoolLB(m_xBuilder->weld_combo_box("schoolCombobox"))
+ , m_xSeriesLB(m_xBuilder->weld_combo_box("seriesCombobox"))
+ , m_xReportTypeLB(m_xBuilder->weld_combo_box("reportTypeCombobox"))
+ , m_xVolumeLB(m_xBuilder->weld_combo_box("volumeCombobox"))
+ , m_xURLLB(m_xBuilder->weld_combo_box("URLCombobox"))
+ , m_xCustom1LB(m_xBuilder->weld_combo_box("custom1Combobox"))
+ , m_xCustom2LB(m_xBuilder->weld_combo_box("custom2Combobox"))
+ , m_xCustom3LB(m_xBuilder->weld_combo_box("custom3Combobox"))
+ , m_xCustom4LB(m_xBuilder->weld_combo_box("custom4Combobox"))
+ , m_xCustom5LB(m_xBuilder->weld_combo_box("custom5Combobox"))
{
- get(pOKBT, "ok");
- get(pIdentifierLB, "identifierCombobox");
- get(pAuthorityTypeLB, "authorityTypeCombobox");
- get(pAuthorLB, "authorCombobox");
- get(pTitleLB, "titleCombobox");
- get(pMonthLB, "monthCombobox");
- get(pYearLB, "yearCombobox");
- get(pISBNLB, "ISBNCombobox");
- get(pBooktitleLB, "bookTitleCombobox");
- get(pChapterLB, "chapterCombobox");
- get(pEditionLB, "editionCombobox");
- get(pEditorLB, "editorCombobox");
- get(pHowpublishedLB, "howPublishedCombobox");
- get(pInstitutionLB, "institutionCombobox");
- get(pJournalLB, "journalCombobox");
- get(pNoteLB, "noteCombobox");
- get(pAnnoteLB, "annoteCombobox");
- get(pNumberLB, "numberCombobox");
- get(pOrganizationsLB, "organizationCombobox");
- get(pPagesLB, "pagesCombobox");
- get(pPublisherLB, "publisherCombobox");
- get(pAddressLB, "addressCombobox");
- get(pSchoolLB, "schoolCombobox");
- get(pSeriesLB, "seriesCombobox");
- get(pReportTypeLB, "reportTypeCombobox");
- get(pVolumeLB, "volumeCombobox");
- get(pURLLB, "URLCombobox");
- get(pCustom1LB, "custom1Combobox");
- get(pCustom2LB, "custom2Combobox");
- get(pCustom3LB, "custom3Combobox");
- get(pCustom4LB, "custom4Combobox");
- get(pCustom5LB, "custom5Combobox");
-
- pOKBT->SetClickHdl(LINK(this, MappingDialog_Impl, OkHdl));
- OUString sTitle = GetText();
+ m_xOKBT->connect_clicked(LINK(this, MappingDialog_Impl, OkHdl));
+ OUString sTitle = m_xDialog->get_title();
sTitle = sTitle.replaceFirst("%1", pDatMan->getActiveDataTable());
- SetText(sTitle);
-
- aListBoxes[0] = pIdentifierLB;
- aListBoxes[1] = pAuthorityTypeLB;
- aListBoxes[2] = pAuthorLB;
- aListBoxes[3] = pTitleLB;
- aListBoxes[4] = pYearLB;
- aListBoxes[5] = pISBNLB;
- aListBoxes[6] = pBooktitleLB;
- aListBoxes[7] = pChapterLB;
- aListBoxes[8] = pEditionLB;
- aListBoxes[9] = pEditorLB;
- aListBoxes[10] = pHowpublishedLB;
- aListBoxes[11] = pInstitutionLB;
- aListBoxes[12] = pJournalLB;
- aListBoxes[13] = pMonthLB;
- aListBoxes[14] = pNoteLB;
- aListBoxes[15] = pAnnoteLB;
- aListBoxes[16] = pNumberLB;
- aListBoxes[17] = pOrganizationsLB;
- aListBoxes[18] = pPagesLB;
- aListBoxes[19] = pPublisherLB;
- aListBoxes[20] = pAddressLB;
- aListBoxes[21] = pSchoolLB;
- aListBoxes[22] = pSeriesLB;
- aListBoxes[23] = pReportTypeLB;
- aListBoxes[24] = pVolumeLB;
- aListBoxes[25] = pURLLB;
- aListBoxes[26] = pCustom1LB;
- aListBoxes[27] = pCustom2LB;
- aListBoxes[28] = pCustom3LB;
- aListBoxes[29] = pCustom4LB;
- aListBoxes[30] = pCustom5LB;
-
- aListBoxes[0]->InsertEntry(sNone);
+ m_xDialog->set_title(sTitle);
+
+ aListBoxes[0] = m_xIdentifierLB.get();
+ aListBoxes[1] = m_xAuthorityTypeLB.get();
+ aListBoxes[2] = m_xAuthorLB.get();
+ aListBoxes[3] = m_xTitleLB.get();
+ aListBoxes[4] = m_xYearLB.get();
+ aListBoxes[5] = m_xISBNLB.get();
+ aListBoxes[6] = m_xBooktitleLB.get();
+ aListBoxes[7] = m_xChapterLB.get();
+ aListBoxes[8] = m_xEditionLB.get();
+ aListBoxes[9] = m_xEditorLB.get();
+ aListBoxes[10] = m_xHowpublishedLB.get();
+ aListBoxes[11] = m_xInstitutionLB.get();
+ aListBoxes[12] = m_xJournalLB.get();
+ aListBoxes[13] = m_xMonthLB.get();
+ aListBoxes[14] = m_xNoteLB.get();
+ aListBoxes[15] = m_xAnnoteLB.get();
+ aListBoxes[16] = m_xNumberLB.get();
+ aListBoxes[17] = m_xOrganizationsLB.get();
+ aListBoxes[18] = m_xPagesLB.get();
+ aListBoxes[19] = m_xPublisherLB.get();
+ aListBoxes[20] = m_xAddressLB.get();
+ aListBoxes[21] = m_xSchoolLB.get();
+ aListBoxes[22] = m_xSeriesLB.get();
+ aListBoxes[23] = m_xReportTypeLB.get();
+ aListBoxes[24] = m_xVolumeLB.get();
+ aListBoxes[25] = m_xURLLB.get();
+ aListBoxes[26] = m_xCustom1LB.get();
+ aListBoxes[27] = m_xCustom2LB.get();
+ aListBoxes[28] = m_xCustom3LB.get();
+ aListBoxes[29] = m_xCustom4LB.get();
+ aListBoxes[30] = m_xCustom5LB.get();
+
+ aListBoxes[0]->append_text(sNone);
Reference< XNameAccess > xFields = getColumns( pDatMan->getForm() );
DBG_ASSERT(xFields.is(), "MappingDialog_Impl::MappingDialog_Impl : gave me an invalid form !");
- if(xFields.is())
+ if (xFields.is())
{
for(const OUString& rName : xFields->getElementNames())
- aListBoxes[0]->InsertEntry(rName);
+ aListBoxes[0]->append_text(rName);
}
- Link<ListBox&,void> aLnk = LINK(this, MappingDialog_Impl, ListBoxSelectHdl);
+ Link<weld::ComboBox&,void> aLnk = LINK(this, MappingDialog_Impl, ListBoxSelectHdl);
- aListBoxes[0]->SelectEntryPos(0);
- aListBoxes[0]->SetSelectHdl(aLnk);
+ aListBoxes[0]->set_active(0);
+ aListBoxes[0]->connect_changed(aLnk);
for(sal_uInt16 i = 1; i < COLUMN_COUNT; i++)
{
- for(sal_Int32 j = 0; j < aListBoxes[0]->GetEntryCount();j++)
- aListBoxes[i]->InsertEntry(aListBoxes[0]->GetEntry(j));
- aListBoxes[i]->SelectEntryPos(0);
- aListBoxes[i]->SetSelectHdl(aLnk);
+ for(sal_Int32 j = 0, nEntryCount = aListBoxes[0]->get_count(); j < nEntryCount; ++j)
+ aListBoxes[i]->append_text(aListBoxes[0]->get_text(j));
+ aListBoxes[i]->set_active(0);
+ aListBoxes[i]->connect_changed(aLnk);
}
BibConfig* pConfig = BibModul::GetConfig();
BibDBDescriptor aDesc;
@@ -354,71 +351,27 @@ MappingDialog_Impl::MappingDialog_Impl(vcl::Window* pParent, BibDataManager* pMa
sal_uInt16 nListBoxIndex = lcl_FindLogicalName( pConfig, aColumnPair.sLogicalColumnName);
if(nListBoxIndex < COLUMN_COUNT)
{
- aListBoxes[nListBoxIndex]->SelectEntry(aColumnPair.sRealColumnName);
+ aListBoxes[nListBoxIndex]->set_active_text(aColumnPair.sRealColumnName);
}
}
}
}
-MappingDialog_Impl::~MappingDialog_Impl()
-{
- disposeOnce();
-}
-
-void MappingDialog_Impl::dispose()
-{
- pOKBT.clear();
- pIdentifierLB.clear();
- pAuthorityTypeLB.clear();
- pAuthorLB.clear();
- pTitleLB.clear();
- pMonthLB.clear();
- pYearLB.clear();
- pISBNLB.clear();
- pBooktitleLB.clear();
- pChapterLB.clear();
- pEditionLB.clear();
- pEditorLB.clear();
- pHowpublishedLB.clear();
- pInstitutionLB.clear();
- pJournalLB.clear();
- pNoteLB.clear();
- pAnnoteLB.clear();
- pNumberLB.clear();
- pOrganizationsLB.clear();
- pPagesLB.clear();
- pPublisherLB.clear();
- pAddressLB.clear();
- pSchoolLB.clear();
- pSeriesLB.clear();
- pReportTypeLB.clear();
- pVolumeLB.clear();
- pURLLB.clear();
- pCustom1LB.clear();
- pCustom2LB.clear();
- pCustom3LB.clear();
- pCustom4LB.clear();
- pCustom5LB.clear();
- for(auto & a : aListBoxes)
- a.clear();
- ModalDialog::dispose();
-}
-
-IMPL_LINK(MappingDialog_Impl, ListBoxSelectHdl, ListBox&, rListBox, void)
+IMPL_LINK(MappingDialog_Impl, ListBoxSelectHdl, weld::ComboBox&, rListBox, void)
{
- const sal_Int32 nEntryPos = rListBox.GetSelectedEntryPos();
- if(0 < nEntryPos)
+ const sal_Int32 nEntryPos = rListBox.get_active();
+ if (0 < nEntryPos)
{
- for(VclPtr<ListBox> & aListBoxe : aListBoxes)
+ for(auto & pListBoxe : aListBoxes)
{
- if(&rListBox != aListBoxe && aListBoxe->GetSelectedEntryPos() == nEntryPos)
- aListBoxe->SelectEntryPos(0);
+ if (&rListBox != pListBoxe && pListBoxe->get_active() == nEntryPos)
+ pListBoxe->set_active(0);
}
}
bModified = true;
}
-IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl, Button*, void)
+IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl, weld::Button&, void)
{
if(bModified)
{
@@ -430,7 +383,7 @@ IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl, Button*, void)
BibConfig* pConfig = BibModul::GetConfig();
for(sal_uInt16 nEntry = 0; nEntry < COLUMN_COUNT; nEntry++)
{
- OUString sSel = aListBoxes[nEntry]->GetSelectedEntry();
+ OUString sSel = aListBoxes[nEntry]->get_active_text();
if(sSel != sNone)
{
aNew.aColumnPairs[nWriteIndex].sRealColumnName = sSel;
@@ -445,7 +398,7 @@ IMPL_LINK_NOARG(MappingDialog_Impl, OkHdl, Button*, void)
pDatMan->ResetIdentifierMapping();
pConfig->SetMapping(aDesc, &aNew);
}
- EndDialog(bModified ? RET_OK : RET_CANCEL);
+ m_xDialog->response(bModified ? RET_OK : RET_CANCEL);
}
class DBChangeDialog_Impl : public weld::GenericDialogController
@@ -1351,10 +1304,10 @@ Reference< awt::XControlModel > BibDataManager::loadControlModel(
return xModel;
}
-void BibDataManager::CreateMappingDialog(vcl::Window* pParent)
+void BibDataManager::CreateMappingDialog(weld::Window* pParent)
{
- VclPtrInstance< MappingDialog_Impl > pDlg(pParent, this);
- if(RET_OK == pDlg->Execute() && pBibView)
+ MappingDialog_Impl aDlg(pParent, this);
+ if (RET_OK == aDlg.run() && pBibView)
{
reload();
}
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index 3048b616a52c..1de83d5a03ea 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -148,7 +148,7 @@ public:
css::uno::Reference< css::awt::XControlModel > loadControlModel(const OUString& rName,
bool bForceListBox);
- void CreateMappingDialog(vcl::Window* pParent);
+ void CreateMappingDialog(weld::Window* pParent);
OUString CreateDBChangeDialog(weld::Window* pParent);
void DispatchDBChangeDialog();
diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx
index a2d83e49b51a..6ca93186599c 100644
--- a/extensions/source/bibliography/framectr.cxx
+++ b/extensions/source/bibliography/framectr.cxx
@@ -371,8 +371,8 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
if ( !bDisposing )
{
::SolarMutexGuard aGuard;
- VclPtr<vcl::Window> pParent = VCLUnoHelper::GetWindow( xWindow );
- WaitObject aWaitObject( pParent );
+ weld::Window* pParent = Application::GetFrameWeld(xWindow);
+ weld::WaitObject aWaitObject(pParent);
OUString aCommand( _rURL.Path);
if(aCommand == "Bib/Mapping")
@@ -385,7 +385,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen
}
else if(aCommand == "Bib/sdbsource")
{
- OUString aURL = m_xDatMan->CreateDBChangeDialog(pParent ? pParent->GetFrameWeld() : nullptr);
+ OUString aURL = m_xDatMan->CreateDBChangeDialog(pParent);
if(!aURL.isEmpty())
{
try
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 2a632a546626..5ab0303b90a0 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -363,19 +363,20 @@ void BibToolBar::Click()
{
sal_uInt16 nId = GetCurItemId();
+ vcl::Window* pWin = GetParent();
+
if (nId == nTBC_BT_COL_ASSIGN )
{
- if(pDatMan)
- pDatMan->CreateMappingDialog(GetParent());
+ if (pDatMan)
+ pDatMan->CreateMappingDialog(pWin ? pWin->GetFrameWeld() : nullptr);
CheckItem( nId, false );
}
else if (nId == nTBC_BT_CHANGESOURCE)
{
- if(pDatMan)
+ if (pDatMan)
{
- vcl::Window* pWin = GetParent();
OUString sNew = pDatMan->CreateDBChangeDialog(pWin ? pWin->GetFrameWeld() : nullptr);
- if(!sNew.isEmpty())
+ if (!sNew.isEmpty())
pDatMan->setActiveDataSource(sNew);
}
CheckItem( nId, false );
diff --git a/extensions/uiconfig/sbibliography/ui/mappingdialog.ui b/extensions/uiconfig/sbibliography/ui/mappingdialog.ui
index 615f7100ea92..021ed1aa1d79 100644
--- a/extensions/uiconfig/sbibliography/ui/mappingdialog.ui
+++ b/extensions/uiconfig/sbibliography/ui/mappingdialog.ui
@@ -1,12 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.22.1 -->
<interface domain="pcr">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="MappingDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes" context="mappingdialog|MappingDialog">Column Layout for Table “%1”</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
+ <child>
+ <placeholder/>
+ </child>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
@@ -169,7 +175,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="authorCombobox">
+ <object class="GtkComboBoxText" id="authorCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -181,7 +187,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="publisherCombobox">
+ <object class="GtkComboBoxText" id="publisherCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -193,7 +199,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="chapterCombobox">
+ <object class="GtkComboBoxText" id="chapterCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -205,7 +211,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="editorCombobox">
+ <object class="GtkComboBoxText" id="editorCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -262,7 +268,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="authorityTypeCombobox">
+ <object class="GtkComboBoxText" id="authorityTypeCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -274,7 +280,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="yearCombobox">
+ <object class="GtkComboBoxText" id="yearCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -286,7 +292,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="titleCombobox">
+ <object class="GtkComboBoxText" id="titleCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -343,7 +349,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="addressCombobox">
+ <object class="GtkComboBoxText" id="addressCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -355,7 +361,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="ISBNCombobox">
+ <object class="GtkComboBoxText" id="ISBNCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -367,7 +373,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="pagesCombobox">
+ <object class="GtkComboBoxText" id="pagesCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -394,7 +400,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="editionCombobox">
+ <object class="GtkComboBoxText" id="editionCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -449,7 +455,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="bookTitleCombobox">
+ <object class="GtkComboBoxText" id="bookTitleCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -461,7 +467,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="volumeCombobox">
+ <object class="GtkComboBoxText" id="volumeCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -473,7 +479,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="howPublishedCombobox">
+ <object class="GtkComboBoxText" id="howPublishedCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -530,7 +536,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="organizationCombobox">
+ <object class="GtkComboBoxText" id="organizationCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -542,7 +548,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="institutionCombobox">
+ <object class="GtkComboBoxText" id="institutionCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -554,7 +560,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="schoolCombobox">
+ <object class="GtkComboBoxText" id="schoolCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -596,7 +602,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="reportTypeCombobox">
+ <object class="GtkComboBoxText" id="reportTypeCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -608,7 +614,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="monthCombobox">
+ <object class="GtkComboBoxText" id="monthCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -665,7 +671,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="journalCombobox">
+ <object class="GtkComboBoxText" id="journalCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -677,7 +683,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="numberCombobox">
+ <object class="GtkComboBoxText" id="numberCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -689,7 +695,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="seriesCombobox">
+ <object class="GtkComboBoxText" id="seriesCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -744,7 +750,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="annoteCombobox">
+ <object class="GtkComboBoxText" id="annoteCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -756,7 +762,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="noteCombobox">
+ <object class="GtkComboBoxText" id="noteCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -768,7 +774,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="URLCombobox">
+ <object class="GtkComboBoxText" id="URLCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -855,7 +861,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="custom1Combobox">
+ <object class="GtkComboBoxText" id="custom1Combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -867,7 +873,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="custom2Combobox">
+ <object class="GtkComboBoxText" id="custom2Combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -879,7 +885,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="custom3Combobox">
+ <object class="GtkComboBoxText" id="custom3Combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -891,7 +897,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="custom4Combobox">
+ <object class="GtkComboBoxText" id="custom4Combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -903,7 +909,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="custom5Combobox">
+ <object class="GtkComboBoxText" id="custom5Combobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>
@@ -915,7 +921,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="identifierCombobox">
+ <object class="GtkComboBoxText" id="identifierCombobox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="valign">center</property>