Kaydet (Commit) 09de927b authored tarafından Caolán McNamara's avatar Caolán McNamara

we add and remove this tab page just to get its tab name

Change-Id: Iac48d1c3137cb898a81e5f01442d26a7a81979f0
Reviewed-on: https://gerrit.libreoffice.org/53441Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst e92cf0eb
...@@ -1328,6 +1328,8 @@ ...@@ -1328,6 +1328,8 @@
#define STR_SIGNED_BY NC_("STR_SIGNED_BY", "Signed-by") #define STR_SIGNED_BY NC_("STR_SIGNED_BY", "Signed-by")
#define STR_PARAGRAPH_SIGNATURE NC_("STR_PARAGRAPH_SIGNATURE", "Paragraph Signature") #define STR_PARAGRAPH_SIGNATURE NC_("STR_PARAGRAPH_SIGNATURE", "Paragraph Signature")
#define STR_BUSINESS_CARDS NC_("labeldialog|cards", "Business Cards")
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -102,27 +102,23 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet, ...@@ -102,27 +102,23 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
, m_bLabel(bLabel) , m_bLabel(bLabel)
, m_nOptionsId(0) , m_nOptionsId(0)
, m_nLabelId(0) , m_nLabelId(0)
, m_nCardsId(0)
{ {
WaitObject aWait( pParent ); WaitObject aWait( pParent );
AddTabPage("format", SwLabFormatPage::Create, nullptr); AddTabPage("format", SwLabFormatPage::Create, nullptr);
m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr); m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr);
m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, nullptr); m_sBusinessCardDlg = SwResId(STR_BUSINESS_CARDS);
m_sBusinessCardDlg = GetPageText(m_nCardsId);
if (m_bLabel) if (m_bLabel)
{ {
RemoveTabPage("business"); RemoveTabPage("business");
RemoveTabPage("private"); RemoveTabPage("private");
RemoveTabPage("cards");
RemoveTabPage("medium"); RemoveTabPage("medium");
m_nLabelId = AddTabPage("labels", SwLabPage::Create, nullptr); m_nLabelId = AddTabPage("labels", SwLabPage::Create, nullptr);
} }
else else
{ {
RemoveTabPage("labels"); RemoveTabPage("labels");
RemoveTabPage("cards");
m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr); m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr);
AddTabPage("business", SwBusinessDataPage::Create, nullptr ); AddTabPage("business", SwBusinessDataPage::Create, nullptr );
AddTabPage("private", SwPrivateDataPage::Create, nullptr); AddTabPage("private", SwPrivateDataPage::Create, nullptr);
......
...@@ -44,7 +44,6 @@ class SwLabDlg : public SfxTabDialog ...@@ -44,7 +44,6 @@ class SwLabDlg : public SfxTabDialog
bool m_bLabel; bool m_bLabel;
sal_uInt16 m_nOptionsId; sal_uInt16 m_nOptionsId;
sal_uInt16 m_nLabelId; sal_uInt16 m_nLabelId;
sal_uInt16 m_nCardsId;
void ReplaceGroup_( const OUString &rMake ); void ReplaceGroup_( const OUString &rMake );
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override; virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
......
...@@ -144,29 +144,6 @@ ...@@ -144,29 +144,6 @@
<property name="position">2</property> <property name="position">2</property>
</packing> </packing>
</child> </child>
<child type="tab">
<object class="GtkLabel" id="cards">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="labeldialog|cards">Business Cards</property>
</object>
<packing>
<property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="position">3</property>
</packing>
</child>
<child type="tab"> <child type="tab">
<object class="GtkLabel" id="private"> <object class="GtkLabel" id="private">
<property name="visible">True</property> <property name="visible">True</property>
...@@ -174,7 +151,7 @@ ...@@ -174,7 +151,7 @@
<property name="label" translatable="yes" context="labeldialog|private">Private</property> <property name="label" translatable="yes" context="labeldialog|private">Private</property>
</object> </object>
<packing> <packing>
<property name="position">3</property> <property name="position">2</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
...@@ -187,7 +164,7 @@ ...@@ -187,7 +164,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="position">4</property> <property name="position">3</property>
</packing> </packing>
</child> </child>
<child type="tab"> <child type="tab">
...@@ -197,7 +174,7 @@ ...@@ -197,7 +174,7 @@
<property name="label" translatable="yes" context="labeldialog|business">Business</property> <property name="label" translatable="yes" context="labeldialog|business">Business</property>
</object> </object>
<packing> <packing>
<property name="position">4</property> <property name="position">3</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
...@@ -210,7 +187,7 @@ ...@@ -210,7 +187,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="position">5</property> <property name="position">4</property>
</packing> </packing>
</child> </child>
<child type="tab"> <child type="tab">
...@@ -220,7 +197,7 @@ ...@@ -220,7 +197,7 @@
<property name="label" translatable="yes" context="labeldialog|format">Format</property> <property name="label" translatable="yes" context="labeldialog|format">Format</property>
</object> </object>
<packing> <packing>
<property name="position">5</property> <property name="position">4</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
...@@ -233,7 +210,7 @@ ...@@ -233,7 +210,7 @@
</child> </child>
</object> </object>
<packing> <packing>
<property name="position">6</property> <property name="position">5</property>
</packing> </packing>
</child> </child>
<child type="tab"> <child type="tab">
...@@ -243,7 +220,7 @@ ...@@ -243,7 +220,7 @@
<property name="label" translatable="yes" context="labeldialog|options">Options</property> <property name="label" translatable="yes" context="labeldialog|options">Options</property>
</object> </object>
<packing> <packing>
<property name="position">6</property> <property name="position">5</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
......
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