diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-02 20:34:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-03 09:49:10 +0100 |
commit | 3919fc5a5eb24272cc4ccb18fb8d5080089c814d (patch) | |
tree | a6c037120e7eef9bea64e6416b51d7edfdbf6808 /svtools | |
parent | dbad63982fd6df2593e4f57143ac3e7274528b66 (diff) |
FontStyleBox is unused
Change-Id: I1490c41c86a2f2a51ffc591a4d32499ab7b5faef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87835
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index db06c557178f..5474b5c124ba 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -699,56 +699,6 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) } } -FontStyleBox::FontStyleBox(vcl::Window* pParent, WinBits nBits) - : ComboBox(pParent, nBits) -{ - //Use the standard texts to get an optimal size and stick to that size. - //That should stop the character dialog dancing around. - InsertEntry(SvtResId(STR_SVT_STYLE_LIGHT)); - InsertEntry(SvtResId(STR_SVT_STYLE_LIGHT_ITALIC)); - InsertEntry(SvtResId(STR_SVT_STYLE_NORMAL)); - InsertEntry(SvtResId(STR_SVT_STYLE_NORMAL_ITALIC)); - InsertEntry(SvtResId(STR_SVT_STYLE_BOLD)); - InsertEntry(SvtResId(STR_SVT_STYLE_BOLD_ITALIC)); - InsertEntry(SvtResId(STR_SVT_STYLE_BLACK)); - InsertEntry(SvtResId(STR_SVT_STYLE_BLACK_ITALIC)); - aOptimalSize = GetOptimalSize(); - Clear(); -} - -Size FontStyleBox::GetOptimalSize() const -{ - if (aOptimalSize.Width() || aOptimalSize.Height()) - return aOptimalSize; - return ComboBox::GetOptimalSize(); -} - -void FontStyleBox::Modify() -{ - CharClass aChrCls( ::comphelper::getProcessComponentContext(), - GetSettings().GetLanguageTag() ); - OUString aStr = GetText(); - sal_Int32 nEntryCount = GetEntryCount(); - - if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND ) - { - aStr = aChrCls.uppercase(aStr); - for ( sal_Int32 i = 0; i < nEntryCount; i++ ) - { - OUString aEntryText = aChrCls.uppercase(GetEntry(i)); - - if ( aStr == aEntryText ) - { - SetText( GetEntry( i ) ); - break; - } - } - } - - ComboBox::Modify(); -} - - SvtFontStyleBox::SvtFontStyleBox(std::unique_ptr<weld::ComboBox> p) : m_xComboBox(std::move(p)) { |