summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2017-11-24 17:39:38 +0900
committerTomaž Vajngerl <quikee@gmail.com>2017-11-24 14:51:17 +0100
commit12d12fa8fae469b01db68d23fa6ee2eb89a86d45 (patch)
tree2dd012d21cea99891121a0617abe6a78746d46ef /svx/source
parent0f2f6285f6cad32520999830a4c3d80135c56ac5 (diff)
TSCP: fix oversizing of ListBox-es by defining max lines & chars
Change-Id: I47e8018c5f2c0ea890b5a11ac7cc03fafb7d1eed Reviewed-on: https://gerrit.libreoffice.org/45205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx8
-rw-r--r--svx/source/dialog/ClassificationEditView.cxx2
2 files changed, 9 insertions, 1 deletions
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index a7b1469100f5..aa7f2e778be9 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -194,16 +194,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pIntellectualPropertyPartAddButton->SetClickHdl(LINK(this, ClassificationDialog, ButtonClicked));
+ m_pClassificationListBox->setMaxWidthChars(20);
m_pClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maHelper.GetBACNames())
m_pClassificationListBox->InsertEntry(rName);
+ m_pInternationalClassificationListBox->setMaxWidthChars(20);
m_pInternationalClassificationListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectClassificationHdl));
for (const OUString& rName : maInternationalHelper.GetBACNames())
m_pInternationalClassificationListBox->InsertEntry(rName);
if (!maHelper.GetMarkings().empty())
{
+ m_pMarkingListBox->setMaxWidthChars(20);
m_pMarkingListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectMarkingHdl));
m_pMarkingListBox->SetLoseFocusHdl(LINK(this, ClassificationDialog, LoseFocusMarkingHdl));
@@ -216,14 +219,19 @@ ClassificationDialog::ClassificationDialog(vcl::Window* pParent, const bool bPer
m_pMarkingLabel->Show(false);
}
+ m_pIntellectualPropertyPartNumberListBox->SetDropDownLineCount(5);
+ m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartNumberListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartNumbersHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyPartNumbers())
m_pIntellectualPropertyPartNumberListBox->InsertEntry(rName);
+ m_pIntellectualPropertyPartListBox->SetDropDownLineCount(5);
+ m_pIntellectualPropertyPartNumberListBox->setMaxWidthChars(20);
m_pIntellectualPropertyPartListBox->SetDoubleClickHdl(LINK(this, ClassificationDialog, SelectIPPartHdl));
for (const OUString& rName : maHelper.GetIntellectualPropertyParts())
m_pIntellectualPropertyPartListBox->InsertEntry(rName);
+ m_pRecentlyUsedListBox->setMaxWidthChars(5);
m_pRecentlyUsedListBox->SetSelectHdl(LINK(this, ClassificationDialog, SelectRecentlyUsedHdl));
bool bExpand = officecfg::Office::Common::Classification::IntellectualPropertySectionExpanded::get();
diff --git a/svx/source/dialog/ClassificationEditView.cxx b/svx/source/dialog/ClassificationEditView.cxx
index 76b778303bc2..75eec4aa8329 100644
--- a/svx/source/dialog/ClassificationEditView.cxx
+++ b/svx/source/dialog/ClassificationEditView.cxx
@@ -49,7 +49,7 @@ ClassificationEditView::ClassificationEditView(vcl::Window* pParent, WinBits nBi
Color aBgColor = rStyleSettings.GetWindowColor();
float fScaleFactor = GetDPIScaleFactor();
- set_width_request(600 * fScaleFactor);
+ set_width_request(500 * fScaleFactor);
set_height_request(100 * fScaleFactor);
SetMapMode(MapMode(MapUnit::MapTwip));