diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-13 17:41:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-16 00:35:34 +0100 |
commit | 6a3f9de585fc0e8e6191db5210729ae6b3730e7d (patch) | |
tree | 5d053ebe13d08608812c2321dd60a6c9c23ffc70 /vcl/source/control | |
parent | 7faa218231b7a807412feada3aa1223b43b5626e (diff) |
native dialog initial basis
Change-Id: I392be563e38257390f748c70bb71c67a66778ddd
Reviewed-on: https://gerrit.libreoffice.org/49677
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/combobox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/control/field.cxx | 14 | ||||
-rw-r--r-- | vcl/source/control/listbox.cxx | 5 |
3 files changed, 16 insertions, 5 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index daf90a3333bc..8e1cc649cb31 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -986,7 +986,7 @@ void ComboBox::SetDoubleClickHdl(const Link<ComboBox&,void>& rLink) { m_pImpl->m const Link<ComboBox&,void>& ComboBox::GetDoubleClickHdl() const { return m_pImpl->m_DoubleClickHdl; } -long ComboBox::CalcWindowSizePixel( sal_uInt16 nLines ) const +long ComboBox::CalcWindowSizePixel(sal_uInt16 nLines) const { return m_pImpl->m_pImplLB->GetEntryHeight() * nLines; } diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 1e5085cf007e..d04886eeb228 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -445,15 +445,21 @@ void FormatterBase::ImplSetText( const OUString& rText, Selection const * pNewSe { if ( mpField ) { - if ( pNewSelection ) - mpField->SetText( rText, *pNewSelection ); + if (pNewSelection) + mpField->SetText(rText, *pNewSelection); else { Selection aSel = mpField->GetSelection(); aSel.Min() = aSel.Max(); - mpField->SetText( rText, aSel ); + mpField->SetText(rText, aSel); + } + if (maOutputHdl.IsSet()) + { + OUString sText(mpField->GetText()); + mpField->SetText(OUString()); + if (!maOutputHdl.Call(*mpField)) + mpField->SetText(sText); } - MarkToBeReformatted( false ); } } diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index df21ca2b1741..c693223bb21a 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1242,6 +1242,11 @@ Size ListBox::CalcSubEditSize() const return aSz; } +long ListBox::CalcWindowSizePixel(sal_uInt16 nLines) const +{ + return mpImplLB->GetEntryHeight() * nLines; +} + Size ListBox::GetOptimalSize() const { return CalcMinimumSize(); |