summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-12-02 14:18:09 +0900
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2018-01-24 19:20:45 +0100
commit2373acbbb21dd6095d7bfc20b31bbfaa1d9bbad6 (patch)
treeed25e09b81a55794c183d6a56145921b22f346e7 /svx/source
parenta747dfef9c723808e12e802a2cc2f5688ab255fa (diff)
tdf#114901 TSCP various advanced TSCP dialog changes
- 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/47632 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 085852e2e2779de1712cf18b5e67740cb7a4bcb6) Reviewed-on: https://gerrit.libreoffice.org/47924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx33
1 files changed, 16 insertions, 17 deletions
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index fa5be8da164d..7e8097e7e120 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -180,7 +180,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
get(m_pClassificationListBox, "classificationCB");
get(m_pInternationalClassificationListBox, "internationalClassificationCB");
get(m_pMarkingLabel, "markingLabel");
- get(m_pMarkingListBox, "markingCB");
+ get(m_pMarkingListBox, "markingLB");
get(m_pIntellectualPropertyPartNumberListBox, "intellectualPropertyPartNumberLB");
get(m_pIntellectualPropertyPartListBox, "intellectualPropertyPartLB");
get(m_pIntellectualPropertyPartAddButton, "intellectualPropertyPartAddButton");
@@ -190,7 +190,15 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pSignButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
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));
@@ -206,9 +214,9 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
if (!maHelper.GetMarkings().empty())
{
- m_pMarkingListBox->setMaxWidthChars(20);
- m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
- m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl));
+ m_pMarkingListBox->setMaxWidthChars(10);
+ m_pMarkingListBox->SetDropDownLineCount(4);
+ m_pMarkingListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
for (const OUString& rName : maHelper.GetMarkings())
m_pMarkingListBox->InsertEntry(rName);
@@ -220,7 +228,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
}
m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
- m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
+ m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(10);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
@@ -621,22 +629,13 @@ IMPL_LINK(ClassificationDialog, SelectClassificationHdl, ListBox&, rBox, void)
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)
{
sal_Int32 nSelected = rBox.GetSelectedEntryPos();
if (nSelected >= 0)
{
- m_nInsertMarkings = nSelected;
+ const OUString aString = maHelper.GetMarkings()[nSelected];
+ insertField(ClassificationType::MARKING, aString, aString);
}
}