summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-02 20:34:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-02-03 09:49:10 +0100
commit3919fc5a5eb24272cc4ccb18fb8d5080089c814d (patch)
treea6c037120e7eef9bea64e6416b51d7edfdbf6808
parentdbad63982fd6df2593e4f57143ac3e7274528b66 (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>
-rw-r--r--include/svtools/ctrlbox.hxx15
-rw-r--r--svtools/source/control/ctrlbox.cxx50
2 files changed, 0 insertions, 65 deletions
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 0a5e5124811e..d5d0f35bc2b6 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -361,21 +361,6 @@ private:
FontNameBox& operator =( const FontNameBox& ) = delete;
};
-class FontStyleBox final : public ComboBox
-{
- Size aOptimalSize;
-
-public:
- FontStyleBox( vcl::Window* pParent, WinBits nBits );
-
- virtual void Modify() override;
- virtual Size GetOptimalSize() const override;
-
-private:
- FontStyleBox( const FontStyleBox& ) = delete;
- FontStyleBox& operator =( const FontStyleBox& ) = delete;
-};
-
class SVT_DLLPUBLIC SvtFontStyleBox
{
std::unique_ptr<weld::ComboBox> m_xComboBox;
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))
{