sw/source/ui/envelp/label1.cxx | 15 +++-------- sw/uiconfig/swriter/ui/labeldialog.ui | 44 ---------------------------------- 2 files changed, 4 insertions(+), 55 deletions(-)
New commits: commit 7ab4918280eb0f06025f23530878de6a67bbdea7 Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Thu Jun 9 21:40:57 2022 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Jun 13 15:37:16 2022 +0200 tdf#148978: Business Cards in Writer dont show database + remove "medium" tab since its goal is exactly what "label" tab does. So now "label" tab is common for "File - New - Business Cards" and "File - New - Labels" Change-Id: I9c7f4e74d7cbc0ffa8ee146a0ef39c87ff5261e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135566 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> (cherry picked from commit 7a7afd3ae5d44677791924a1450d42b7fcf9b82b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135703 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index 6d34ea2132de..cee92d24cb28 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -76,12 +76,9 @@ void SwLabDlg::PageCreated(const OString &rId, SfxTabPage &rPage) { if (rId == "labels") { - if (m_bLabel) - { - static_cast<SwLabPage*>(&rPage)->SetDBManager(pDBManager); - static_cast<SwLabPage*>(&rPage)->InitDatabaseBox(); - } - else + static_cast<SwLabPage*>(&rPage)->SetDBManager(pDBManager); + static_cast<SwLabPage*>(&rPage)->InitDatabaseBox(); + if (!m_bLabel) static_cast<SwLabPage*>(&rPage)->SetToBusinessCard(); } else if (rId == "options") @@ -137,19 +134,16 @@ SwLabDlg::SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet, AddTabPage("format", SwLabFormatPage::Create, nullptr); AddTabPage("options", SwLabPrtPage::Create, nullptr); + AddTabPage("labels", SwLabPage::Create, nullptr); m_sBusinessCardDlg = SwResId(STR_BUSINESS_CARDS); if (m_bLabel) { RemoveTabPage("business"); RemoveTabPage("private"); - RemoveTabPage("medium"); - AddTabPage("labels", SwLabPage::Create, nullptr); } else { - RemoveTabPage("labels"); - AddTabPage("medium", SwLabPage::Create, nullptr); AddTabPage("business", SwBusinessDataPage::Create, nullptr ); AddTabPage("private", SwPrivateDataPage::Create, nullptr); m_xDialog->set_title(m_sBusinessCardDlg); @@ -275,7 +269,6 @@ void SwLabPage::SetToBusinessCard() m_xSheetButton->set_help_id(HID_BUSINESS_FMT_PAGE_SHEET); m_xMakeBox->set_help_id(HID_BUSINESS_FMT_PAGE_BRAND); m_xTypeBox->set_help_id(HID_BUSINESS_FMT_PAGE_TYPE); - m_xAddressFrame->hide(); }; IMPL_LINK_NOARG(SwLabPage, AddrHdl, weld::Toggleable&, void) diff --git a/sw/uiconfig/swriter/ui/labeldialog.ui b/sw/uiconfig/swriter/ui/labeldialog.ui index c29d3d2fb193..ad4f72944e62 100644 --- a/sw/uiconfig/swriter/ui/labeldialog.ui +++ b/sw/uiconfig/swriter/ui/labeldialog.ui @@ -100,50 +100,6 @@ <property name="vexpand">True</property> <property name="scrollable">True</property> <property name="enable_popup">True</property> - <child> - <!-- n-columns=1 n-rows=1 --> - <object class="GtkGrid"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - <child> - <placeholder/> - </child> - </object> - </child> - <child type="tab"> - <object class="GtkLabel" id="medium"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="label" translatable="yes" context="labeldialog|medium">Medium</property> - </object> - <packing> - <property name="tab_fill">False</property> - </packing> - </child> <child> <!-- n-columns=1 n-rows=1 --> <object class="GtkGrid">