[Libreoffice-commits] core.git: 2 commits - sw/inc sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk
Caolán McNamara
caolanm at redhat.com
Wed Apr 25 19:26:28 UTC 2018
sw/UIConfig_swriter.mk | 1
sw/inc/strings.hrc | 2
sw/qa/unit/data/sw-dialogs-test.txt | 1
sw/source/ui/envelp/label1.cxx | 176 -------------------------------
sw/source/ui/envelp/labelexp.cxx | 134 -----------------------
sw/source/ui/envelp/swuilabimp.hxx | 43 -------
sw/source/uibase/inc/label.hxx | 1
sw/uiconfig/swriter/ui/cardformatpage.ui | 129 ----------------------
sw/uiconfig/swriter/ui/labeldialog.ui | 37 +-----
9 files changed, 10 insertions(+), 514 deletions(-)
New commits:
commit fb55ab7c8ed49bdf5d9d0d57ca0741c20cb16451
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 25 10:19:15 2018 +0100
SwVisitingCardPage is now unused
Change-Id: I0d9d3cbcbc9c3e6019dbd220a42c0a18fdd1ca67
Reviewed-on: https://gerrit.libreoffice.org/53442
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 9092d085e48d..02b81e3a268c 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -105,7 +105,6 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/cannotsavelabeldialog \
sw/uiconfig/swriter/ui/captiondialog \
sw/uiconfig/swriter/ui/captionoptions \
- sw/uiconfig/swriter/ui/cardformatpage \
sw/uiconfig/swriter/ui/cardmediumpage \
sw/uiconfig/swriter/ui/ccdialog \
sw/uiconfig/swriter/ui/characterproperties \
diff --git a/sw/qa/unit/data/sw-dialogs-test.txt b/sw/qa/unit/data/sw-dialogs-test.txt
index 2732cfa830ca..931a40c09c28 100644
--- a/sw/qa/unit/data/sw-dialogs-test.txt
+++ b/sw/qa/unit/data/sw-dialogs-test.txt
@@ -65,7 +65,6 @@ modules/swriter/ui/businessdatapage.ui
modules/swriter/ui/cannotsavelabeldialog.ui
modules/swriter/ui/captiondialog.ui
modules/swriter/ui/captionoptions.ui
-modules/swriter/ui/cardformatpage.ui
modules/swriter/ui/cardmediumpage.ui
modules/swriter/ui/ccdialog.ui
modules/swriter/ui/characterproperties.ui
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 2b76d2c5b3eb..6ff18b882716 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -565,176 +565,6 @@ void SwLabPage::Reset(const SfxItemSet* rSet)
m_pSheetButton->Check();
}
-void SwVisitingCardPage::ClearUserData()
-{
- SvTreeListEntry* pEntry = m_pAutoTextLB->First();
- while(pEntry)
- {
- delete static_cast<OUString*>(pEntry->GetUserData());
- pEntry = m_pAutoTextLB->Next(pEntry);
- }
-}
-
-void SwVisitingCardPage::SetUserData( sal_uInt32 nCnt,
- const OUString* pNames, const OUString* pValues )
-{
- for( sal_uInt32 i = 0; i < nCnt; ++i )
- {
- SvTreeListEntry* pEntry = m_pAutoTextLB->InsertEntry( pNames[ i ] );
- pEntry->SetUserData( new OUString( pValues[ i ] ));
- }
-}
-
-SwVisitingCardPage::SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet)
- : SfxTabPage(pParent, "CardFormatPage",
- "modules/swriter/ui/cardformatpage.ui", &rSet)
- , pExampleFrame(nullptr)
-{
- get(m_pAutoTextLB, "treeview");
- m_pAutoTextLB->set_height_request(m_pAutoTextLB->GetTextHeight() * 16);
- get(m_pAutoTextGroupLB, "autotext");
- get(m_pExampleWIN, "preview");
-
- m_pAutoTextLB->SetStyle( m_pAutoTextLB->GetStyle() | WB_HSCROLL );
- m_pAutoTextLB->SetSpaceBetweenEntries(0);
- m_pAutoTextLB->SetSelectionMode( SelectionMode::Single );
-
- SetExchangeSupport();
- m_pAutoTextLB->SetSelectHdl(LINK(this, SwVisitingCardPage, AutoTextSelectTreeListBoxHdl));
- m_pAutoTextGroupLB->SetSelectHdl(LINK(this, SwVisitingCardPage, AutoTextSelectHdl));
-
- m_pExampleWIN->Hide();
-
- InitFrameControl();
-}
-
-SwVisitingCardPage::~SwVisitingCardPage()
-{
- disposeOnce();
-}
-
-void SwVisitingCardPage::dispose()
-{
- for(sal_Int32 i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); ++i)
- delete static_cast<OUString*>(m_pAutoTextGroupLB->GetEntryData( i ));
- m_xAutoText = nullptr;
-
- ClearUserData();
- delete pExampleFrame;
- m_pAutoTextLB.clear();
- m_pAutoTextGroupLB.clear();
- m_pExampleWIN.clear();
- SfxTabPage::dispose();
-}
-
-VclPtr<SfxTabPage> SwVisitingCardPage::Create(TabPageParent pParent, const SfxItemSet* rSet)
-{
- return VclPtr<SwVisitingCardPage>::Create(pParent.pParent, *rSet);
-}
-
-void SwVisitingCardPage::ActivatePage(const SfxItemSet& rSet)
-{
- Reset( &rSet );
- UpdateFields();
-}
-
-DeactivateRC SwVisitingCardPage::DeactivatePage(SfxItemSet* _pSet)
-{
- if (_pSet)
- FillItemSet(_pSet);
- return DeactivateRC::LeavePage;
-}
-
-bool SwVisitingCardPage::FillItemSet(SfxItemSet* rSet)
-{
- const OUString* pGroup = static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectedEntryData());
- OSL_ENSURE(pGroup, "no group selected?");
-
- if (pGroup)
- aLabItem.m_sGlossaryGroup = *pGroup;
-
- SvTreeListEntry* pSelEntry = m_pAutoTextLB->FirstSelected();
- if(pSelEntry)
- aLabItem.m_sGlossaryBlockName = *static_cast<OUString*>(pSelEntry->GetUserData());
- rSet->Put(aLabItem);
- return true;
-}
-
-static void lcl_SelectBlock(SvTreeListBox& rAutoTextLB, const OUString& rBlockName)
-{
- SvTreeListEntry* pEntry = rAutoTextLB.First();
- while(pEntry)
- {
- if(*static_cast<OUString*>(pEntry->GetUserData()) == rBlockName)
- {
- rAutoTextLB.Select(pEntry);
- rAutoTextLB.MakeVisible(pEntry);
- break;
- }
- pEntry = rAutoTextLB.Next(pEntry);
- }
-}
-
-static bool lcl_FindBlock(SvTreeListBox& rAutoTextLB, const OUString& rBlockName)
-{
- SvTreeListEntry* pEntry = rAutoTextLB.First();
- while(pEntry)
- {
- if(*static_cast<OUString*>(pEntry->GetUserData()) == rBlockName)
- {
- rAutoTextLB.Select(pEntry);
- return true;
- }
- pEntry = rAutoTextLB.Next(pEntry);
- }
- return false;
-}
-
-void SwVisitingCardPage::Reset(const SfxItemSet* rSet)
-{
- aLabItem = static_cast<const SwLabItem&>( rSet->Get(FN_LABEL) );
-
- bool bFound = false;
- sal_Int32 i;
- for(i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); i++)
- if( aLabItem.m_sGlossaryGroup == *static_cast<const OUString*>(m_pAutoTextGroupLB->GetEntryData( i )))
- {
- bFound = true;
- break;
- }
-
- if(!bFound)
- {
- // initially search for a group starting with "crd" which is the name of the
- // business card AutoTexts
- for(i = 0; i < m_pAutoTextGroupLB->GetEntryCount(); i++)
- if (static_cast<const OUString*>(m_pAutoTextGroupLB->GetEntryData(i))->startsWith("crd"))
- {
- bFound = true;
- break;
- }
- }
- if(bFound)
- {
- if(m_pAutoTextGroupLB->GetSelectedEntryPos() != i)
- {
- m_pAutoTextGroupLB->SelectEntryPos(i);
- AutoTextSelectHdl(*m_pAutoTextGroupLB);
- }
- if(lcl_FindBlock(*m_pAutoTextLB, aLabItem.m_sGlossaryBlockName))
- {
- SvTreeListEntry* pSelEntry = m_pAutoTextLB->FirstSelected();
- if( pSelEntry &&
- *static_cast<OUString*>(pSelEntry->GetUserData()) != aLabItem.m_sGlossaryBlockName)
- {
- lcl_SelectBlock(*m_pAutoTextLB, aLabItem.m_sGlossaryBlockName);
- if(m_xAutoText.is() && pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument();
- }
- }
- }
-}
-
SwPrivateDataPage::SwPrivateDataPage(vcl::Window* pParent, const SfxItemSet& rSet)
: SfxTabPage(pParent, "PrivateUserPage",
"modules/swriter/ui/privateuserpage.ui", &rSet)
diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx
index 6f7a79623bb9..f6302e7756ec 100644
--- a/sw/source/ui/envelp/labelexp.cxx
+++ b/sw/source/ui/envelp/labelexp.cxx
@@ -36,140 +36,6 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::uno;
using namespace ::comphelper;
-void SwVisitingCardPage::InitFrameControl()
-{
- Link<SwOneExampleFrame&,void> aLink(LINK(this, SwVisitingCardPage, FrameControlInitializedHdl));
- m_pExampleWIN->Show();
- pExampleFrame = new SwOneExampleFrame( *m_pExampleWIN,
- EX_SHOW_BUSINESS_CARDS, &aLink );
-
- Reference< XComponentContext > xContext = comphelper::getProcessComponentContext();
-
- //now the AutoText ListBoxes have to be filled
-
- m_xAutoText = text::AutoTextContainer::create( xContext );
-
- uno::Sequence<OUString> aNames = m_xAutoText->getElementNames();
- const OUString* pGroups = aNames.getConstArray();
-
- for(sal_Int32 i = 0; i < aNames.getLength(); ++i)
- {
- uno::Any aGroup = m_xAutoText->getByName(pGroups[i]);
- uno::Reference< text::XAutoTextGroup > xGroup;
- aGroup >>= xGroup;
- uno::Reference< container::XIndexAccess > xIdxAcc(xGroup, uno::UNO_QUERY);
- try
- {
- if(!xIdxAcc.is() || xIdxAcc->getCount())
- {
- uno::Reference< beans::XPropertySet > xPrSet(xGroup, uno::UNO_QUERY);
- uno::Any aTitle = xPrSet->getPropertyValue( UNO_NAME_TITLE );
- OUString uTitle;
- aTitle >>= uTitle;
- const sal_Int32 nEntry = m_pAutoTextGroupLB->InsertEntry(uTitle);
- m_pAutoTextGroupLB->SetEntryData(nEntry, new OUString(pGroups[i]));
- }
- }
- catch (const Exception&)
- {
- }
- }
- if(m_pAutoTextGroupLB->GetEntryCount())
- {
- if(LISTBOX_ENTRY_NOTFOUND == m_pAutoTextGroupLB->GetSelectedEntryPos())
- m_pAutoTextGroupLB->SelectEntryPos(0);
- const OUString *pCurGroupName(
- static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectedEntryData()));
- if(m_xAutoText->hasByName(*pCurGroupName))
- {
- uno::Any aGroup = m_xAutoText->getByName(*pCurGroupName);
- try
- {
- uno::Reference< text::XAutoTextGroup > xGroup;
- aGroup >>= xGroup;
- uno::Sequence< OUString > aBlockNames = xGroup->getElementNames();
- uno::Sequence< OUString > aTitles = xGroup->getTitles() ;
-
- SetUserData( aBlockNames.getLength(), aTitles.getConstArray(),
- aBlockNames.getConstArray() );
- }
- catch (const uno::RuntimeException&)
- {
- // we'll be her if path settings were wrong
- }
- }
- }
-}
-
-IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl, SwOneExampleFrame&, void)
-{
- SvTreeListEntry* pSel = m_pAutoTextLB->FirstSelected();
- OUString sEntry;
- if( pSel )
- sEntry = *static_cast<OUString*>(pSel->GetUserData());
- uno::Reference< text::XTextCursor > & xCursor = pExampleFrame->GetTextCursor();
- OUString uEntry(sEntry);
-
- if(LISTBOX_ENTRY_NOTFOUND != m_pAutoTextGroupLB->GetSelectedEntryPos())
- {
- const OUString *pGroup( static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectedEntryData()) );
- uno::Any aGroup = m_xAutoText->getByName(*pGroup);
- uno::Reference< text::XAutoTextGroup > xGroup;
- aGroup >>= xGroup;
-
- if( !sEntry.isEmpty() && xGroup->hasByName( uEntry ) )
- {
- uno::Any aEntry(xGroup->getByName(uEntry));
- uno::Reference< text::XAutoTextEntry > xEntry;
- aEntry >>= xEntry;
- if(xEntry.is())
- {
- uno::Reference< text::XTextRange > xRange(xCursor, uno::UNO_QUERY);
- xEntry->applyTo(xRange);
- }
- UpdateFields();
- }
- }
-}
-
-IMPL_LINK_NOARG( SwVisitingCardPage, AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void )
-{
- if(m_xAutoText.is() && pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument();
-}
-IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, ListBox&, rBox, void )
-{
- if(m_xAutoText.is())
- {
- if (m_pAutoTextGroupLB == &rBox)
- {
- const OUString *pGroup( static_cast<const OUString*>(m_pAutoTextGroupLB->GetSelectedEntryData()));
- uno::Any aGroup = m_xAutoText->getByName(*pGroup);
- uno::Reference< text::XAutoTextGroup > xGroup;
- aGroup >>= xGroup;
-
- ClearUserData();
- m_pAutoTextLB->Clear();
-
- uno::Sequence<OUString> aBlockNames = xGroup->getElementNames();
- uno::Sequence< OUString > aTitles = xGroup->getTitles() ;
- SetUserData( aBlockNames.getLength(), aTitles.getConstArray(),
- aBlockNames.getConstArray() );
- }
- if(pExampleFrame->IsInitialized())
- pExampleFrame->ClearDocument();
- }
-}
-
-void SwVisitingCardPage::UpdateFields()
-{
- uno::Reference< frame::XModel > xModel;
- if( pExampleFrame && (xModel = pExampleFrame->GetModel()).is())
- {
- SwLabDlg::UpdateFieldInformation(xModel, aLabItem);
- }
-}
-
void SwLabDlg::UpdateFieldInformation(uno::Reference< frame::XModel > const & xModel, const SwLabItem& rItem)
{
uno::Reference< text::XTextFieldsSupplier > xFields(xModel, uno::UNO_QUERY);
diff --git a/sw/source/ui/envelp/swuilabimp.hxx b/sw/source/ui/envelp/swuilabimp.hxx
index b63c30df324f..79b2e11eb09d 100644
--- a/sw/source/ui/envelp/swuilabimp.hxx
+++ b/sw/source/ui/envelp/swuilabimp.hxx
@@ -81,49 +81,6 @@ public:
SwDBManager* GetDBManager() const { return pDBManager; }
};
-class SwOneExampleFrame;
-class SwVisitingCardPage : public SfxTabPage
-{
- VclPtr<SvTreeListBox> m_pAutoTextLB;
- VclPtr<ListBox> m_pAutoTextGroupLB;
- VclPtr<vcl::Window> m_pExampleWIN;
-
- SwLabItem aLabItem;
-
- SwOneExampleFrame* pExampleFrame;
- css::uno::Reference< css::text::XAutoTextContainer2 > m_xAutoText;
-
- DECL_LINK( AutoTextSelectTreeListBoxHdl, SvTreeListBox*, void );
- DECL_LINK( AutoTextSelectHdl, ListBox&, void );
- DECL_LINK( FrameControlInitializedHdl, SwOneExampleFrame&, void );
-
- void InitFrameControl();
- void UpdateFields();
-
- void ClearUserData();
-
- using SfxTabPage::SetUserData;
- void SetUserData( sal_uInt32 nCnt,
- const OUString* pNames,
- const OUString* pValues );
-
- virtual ~SwVisitingCardPage() override;
- virtual void dispose() override;
-
- using TabPage::ActivatePage;
- using TabPage::DeactivatePage;
-
-public:
- SwVisitingCardPage(vcl::Window* pParent, const SfxItemSet& rSet);
-
- static VclPtr<SfxTabPage> Create(TabPageParent pParent, const SfxItemSet* rSet);
-
- virtual void ActivatePage(const SfxItemSet& rSet) override;
- virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
- virtual bool FillItemSet(SfxItemSet* rSet) override;
- virtual void Reset(const SfxItemSet* rSet) override;
-};
-
class SwPrivateDataPage : public SfxTabPage
{
VclPtr<Edit> m_pFirstNameED;
diff --git a/sw/uiconfig/swriter/ui/cardformatpage.ui b/sw/uiconfig/swriter/ui/cardformatpage.ui
deleted file mode 100644
index 15dbf1d26735..000000000000
--- a/sw/uiconfig/swriter/ui/cardformatpage.ui
+++ /dev/null
@@ -1,129 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface domain="sw">
- <!-- interface-requires gtk+ 3.0 -->
- <!-- interface-requires LibreOffice 1.0 -->
- <object class="GtkFrame" id="CardFormatPage">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkGrid" id="grid1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="column_spacing">12</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkGrid" id="grid2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">12</property>
- <child>
- <object class="GtkGrid" id="grid3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes" context="cardformatpage|label2">AutoText - Section</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">autotext</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="autotext">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="entry_text_column">0</property>
- <property name="id_column">1</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="svtlo-SvTreeListBox" id="treeview:border">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <child internal-child="selection">
- <object class="GtkTreeSelection" id="Tree List-selection1"/>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="preview">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- <property name="orientation">vertical</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes" context="cardformatpage|label1">Content</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
-</interface>
commit 09de927ba60db4ab5c55aae15a0b0d049b298a4c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Apr 25 10:17:50 2018 +0100
we add and remove this tab page just to get its tab name
Change-Id: Iac48d1c3137cb898a81e5f01442d26a7a81979f0
Reviewed-on: https://gerrit.libreoffice.org/53441
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index cb801c38ac60..6ca7ba5580b8 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1328,6 +1328,8 @@
#define STR_SIGNED_BY NC_("STR_SIGNED_BY", "Signed-by")
#define STR_PARAGRAPH_SIGNATURE NC_("STR_PARAGRAPH_SIGNATURE", "Paragraph Signature")
+#define STR_BUSINESS_CARDS NC_("labeldialog|cards", "Business Cards")
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index a6a6f93cc0c8..2b76d2c5b3eb 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -102,27 +102,23 @@ SwLabDlg::SwLabDlg(vcl::Window* pParent, const SfxItemSet& rSet,
, m_bLabel(bLabel)
, m_nOptionsId(0)
, m_nLabelId(0)
- , m_nCardsId(0)
{
WaitObject aWait( pParent );
AddTabPage("format", SwLabFormatPage::Create, nullptr);
m_nOptionsId = AddTabPage("options", SwLabPrtPage::Create, nullptr);
- m_nCardsId = AddTabPage("cards", SwVisitingCardPage::Create, nullptr);
- m_sBusinessCardDlg = GetPageText(m_nCardsId);
+ m_sBusinessCardDlg = SwResId(STR_BUSINESS_CARDS);
if (m_bLabel)
{
RemoveTabPage("business");
RemoveTabPage("private");
- RemoveTabPage("cards");
RemoveTabPage("medium");
m_nLabelId = AddTabPage("labels", SwLabPage::Create, nullptr);
}
else
{
RemoveTabPage("labels");
- RemoveTabPage("cards");
m_nLabelId = AddTabPage("medium", SwLabPage::Create, nullptr);
AddTabPage("business", SwBusinessDataPage::Create, nullptr );
AddTabPage("private", SwPrivateDataPage::Create, nullptr);
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index 5eabaef5b6cd..cc2e77a1e9ec 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -44,7 +44,6 @@ class SwLabDlg : public SfxTabDialog
bool m_bLabel;
sal_uInt16 m_nOptionsId;
sal_uInt16 m_nLabelId;
- sal_uInt16 m_nCardsId;
void ReplaceGroup_( const OUString &rMake );
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) override;
diff --git a/sw/uiconfig/swriter/ui/labeldialog.ui b/sw/uiconfig/swriter/ui/labeldialog.ui
index 28cdd5cf66f1..eb75eeb8ea79 100644
--- a/sw/uiconfig/swriter/ui/labeldialog.ui
+++ b/sw/uiconfig/swriter/ui/labeldialog.ui
@@ -145,36 +145,13 @@
</packing>
</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">
<object class="GtkLabel" id="private">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="labeldialog|private">Private</property>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -187,7 +164,7 @@
</child>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">3</property>
</packing>
</child>
<child type="tab">
@@ -197,7 +174,7 @@
<property name="label" translatable="yes" context="labeldialog|business">Business</property>
</object>
<packing>
- <property name="position">4</property>
+ <property name="position">3</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -210,7 +187,7 @@
</child>
</object>
<packing>
- <property name="position">5</property>
+ <property name="position">4</property>
</packing>
</child>
<child type="tab">
@@ -220,7 +197,7 @@
<property name="label" translatable="yes" context="labeldialog|format">Format</property>
</object>
<packing>
- <property name="position">5</property>
+ <property name="position">4</property>
<property name="tab_fill">False</property>
</packing>
</child>
@@ -233,7 +210,7 @@
</child>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
</packing>
</child>
<child type="tab">
@@ -243,7 +220,7 @@
<property name="label" translatable="yes" context="labeldialog|options">Options</property>
</object>
<packing>
- <property name="position">6</property>
+ <property name="position">5</property>
<property name="tab_fill">False</property>
</packing>
</child>
More information about the Libreoffice-commits
mailing list