summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-06-09 21:40:57 +0200
committerJulien Nabet <serval2412@yahoo.fr>2022-06-10 18:32:31 +0200
commit7a7afd3ae5d44677791924a1450d42b7fcf9b82b (patch)
tree2fcb507281a330114c46b67d4fc4c6fca1f49411 /sw
parenta8485d558fab53291e2530fd9a1be581c1628deb (diff)
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 <serval2412@yahoo.fr>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/envelp/label1.cxx15
-rw-r--r--sw/uiconfig/swriter/ui/labeldialog.ui44
2 files changed, 4 insertions, 55 deletions
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
@@ -133,50 +133,6 @@
<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">
- <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>
<packing>
<property name="position">1</property>
</packing>