include/svtools/ctrlbox.hxx | 15 -------- solenv/bin/native-code.py | 1 svtools/source/control/ctrlbox.cxx | 64 ------------------------------------- 3 files changed, 80 deletions(-)
New commits: commit 3919fc5a5eb24272cc4ccb18fb8d5080089c814d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Feb 2 20:34:42 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 3 09:49:10 2020 +0100 FontStyleBox is unused Change-Id: I1490c41c86a2f2a51ffc591a4d32499ab7b5faef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87835 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> 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)) { commit dbad63982fd6df2593e4f57143ac3e7274528b66 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun Feb 2 20:32:10 2020 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Feb 3 09:48:57 2020 +0100 FontStyleBox does not appear in any .ui files anymore Change-Id: I8da23000064c475863b3b911207fa220ed662a2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87834 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py index f8133a6d7723..d7796260a283 100755 --- a/solenv/bin/native-code.py +++ b/solenv/bin/native-code.py @@ -500,7 +500,6 @@ custom_widgets = [ 'EmojiView', 'FontNameBox', 'FontSizeBox', - 'FontStyleBox', 'IndexBox', 'IndexBox', 'ManagedMenuButton', diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index d0801b7e44d4..db06c557178f 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -723,20 +723,6 @@ Size FontStyleBox::GetOptimalSize() const return ComboBox::GetOptimalSize(); } -extern "C" SAL_DLLPUBLIC_EXPORT void makeFontStyleBox(VclPtr<vcl::Window> & rRet, const VclPtr<vcl::Window> & pParent, VclBuilder::stringmap & rMap) -{ - static_assert(std::is_same_v<std::remove_pointer_t<VclBuilder::customMakeWidget>, - decltype(makeFontStyleBox)>); - bool bDropdown = BuilderUtils::extractDropdown(rMap); - WinBits nWinBits = WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_TABSTOP; - if (bDropdown) - nWinBits |= WB_DROPDOWN; - VclPtrInstance<FontStyleBox> pListBox(pParent, nWinBits); - if (bDropdown) - pListBox->EnableAutoSize(true); - rRet = pListBox; -} - void FontStyleBox::Modify() { CharClass aChrCls( ::comphelper::getProcessComponentContext(), _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits