Kaydet (Commit) 085852e2 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl Kaydeden (comit) Tomaž Vajngerl

tdf#114901 TSCP various advanced TSCP dialog changes

- rename "Part" to "License"
- change Markings from Combo to List box
- minimize whitespace
- move bold and sign paragraph under text area as it is fixed
- remove bold in paragraph dialog

Change-Id: I7ec20460d02d3611a1da325eb7d3de3aef10f03f
Reviewed-on: https://gerrit.libreoffice.org/47632Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
üst e5404aef
...@@ -66,7 +66,6 @@ private: ...@@ -66,7 +66,6 @@ private:
DECL_LINK(SelectToolboxHdl, ToolBox*, void); DECL_LINK(SelectToolboxHdl, ToolBox*, void);
DECL_LINK(SelectClassificationHdl, ListBox&, void); DECL_LINK(SelectClassificationHdl, ListBox&, void);
DECL_LINK(SelectMarkingHdl, ListBox&, void); DECL_LINK(SelectMarkingHdl, ListBox&, void);
DECL_LINK(LoseFocusMarkingHdl, Control&, void);
DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void); DECL_LINK(SelectIPPartNumbersHdl, ListBox&, void);
DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void); DECL_LINK(SelectRecentlyUsedHdl, ListBox&, void);
DECL_LINK(SelectIPPartHdl, ListBox&, void); DECL_LINK(SelectIPPartHdl, ListBox&, void);
......
...@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
get(m_pClassificationListBox, "classificationCB"); get(m_pClassificationListBox, "classificationCB");
get(m_pInternationalClassificationListBox, "internationalClassificationCB"); get(m_pInternationalClassificationListBox, "internationalClassificationCB");
get(m_pMarkingLabel, "markingLabel"); get(m_pMarkingLabel, "markingLabel");
get(m_pMarkingListBox, "markingCB"); get(m_pMarkingListBox, "markingLB");
get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB"); get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB");
get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB"); get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB");
get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton"); get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton");
...@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
m_pSignButton->Show(m_bPerParagraph); m_pSignButton->Show(m_bPerParagraph);
m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl)); // no need for BOLD if we do paragraph classification
if (m_bPerParagraph)
{
m_pToolBox->Show(false);
}
else
{
m_pToolBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectToolboxHdl));
}
m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked)); m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
...@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
if (!maHelper.GetMarkings().empty()) if (!maHelper.GetMarkings().empty())
{ {
m_pMarkingListBox->setMaxWidthChars(20); m_pMarkingListBox->setMaxWidthChars(10);
m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl)); m_pMarkingListBox->SetDropDownLineCount(4);
m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl)); m_pMarkingListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
for (const OUString& rName : maHelper.GetMarkings()) for (const OUString& rName : maHelper.GetMarkings())
m_pMarkingListBox->InsertEntry(rName); m_pMarkingListBox->InsertEntry(rName);
...@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer ...@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
} }
m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5); m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20); m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(10);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl)); m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers()) for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName); m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
...@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void) ...@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void)
m_nCurrentSelectedCategory = nSelected; m_nCurrentSelectedCategory = nSelected;
} }
IMPL_LINK_NOARG(ClassificationDialog, LoseFocusMarkingHdl, Control&, void)
{
if (m_nInsertMarkings >= 0)
{
const OUString aString = maHelper.GetMarkings()[m_nInsertMarkings];
insertField(ClassificationType::MARKING, aString, aString);
m_nInsertMarkings = -1;
}
}
IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void) IMPL_LINK(ClassificationDialog, SelectMarkingHdl, ListBox&, rBox, void)
{ {
sal_Int32 nSelected = rBox.GetSelectedEntryPos(); sal_Int32 nSelected = rBox.GetSelectedEntryPos();
if (nSelected >= 0) if (nSelected >= 0)
{ {
m_nInsertMarkings = nSelected; const OUString aString = maHelper.GetMarkings()[nSelected];
insertField(ClassificationType::MARKING, aString, aString);
} }
} }
......
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