[Libreoffice-commits] core.git: include/svx svx/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 28 13:36:13 UTC 2018
include/svx/fontlb.hxx | 38 --------------------------
svx/source/dialog/fontlb.cxx | 62 -------------------------------------------
2 files changed, 100 deletions(-)
New commits:
commit 3833b8e8fba49b91259cb52ee6181ce7a602c1e7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 26 10:53:14 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Sep 28 15:35:46 2018 +0200
drop now unused SvxFontListBox
Change-Id: I1ad6c5b98d7bd75c42e14177c417af6ad4ebbeda
Reviewed-on: https://gerrit.libreoffice.org/61016
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx
index d905cb861867..fe9c3b3ce19e 100644
--- a/include/svx/fontlb.hxx
+++ b/include/svx/fontlb.hxx
@@ -51,44 +51,6 @@ public:
const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
};
-
-/** A list box supporting formatted string entries. */
-class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxFontListBox : public SvTabListBox
-{
-private:
- // The following members are used to store additional parameters for InitEntry().
- vcl::Font maEntryFont; /// Current entry font used in InitEntry().
- const Color* mpEntryColor; /// Current entry color used in InitEntry().
- bool mbUseFont; /// true = Use maEntryFont/mpEntryColor in InitEntry().
-
-public:
- SvxFontListBox(vcl::Window* pParent, WinBits nStyle);
-
- /** Inserts a list entry and sets the font used for this entry.
- @param pColor The font color. NULL = use default listbox text color. */
- void InsertFontEntry(
- const OUString& rString, const vcl::Font& rFont, const Color* pColor = nullptr );
-
- /** Selects an entry specified by its position in the list box. */
- void SelectEntryPos( sal_uLong nPos );
- /** Removes a selection. */
- void SetNoSelection();
-
- /** Returns the position of the entry currently selected or TREELIST_APPEND.
- */
- sal_uLong GetSelectedEntryPos() const;
-
-protected:
- /** Initializes a new SvLBoxFontString entry.
- @descr Uses current value of maEntryFont to set the entry font (if mbUseFont is true). */
- virtual void InitEntry(
- SvTreeListEntry* pEntry,
- const OUString& rEntryText,
- const Image& rCollImg,
- const Image& rExpImg,
- SvLBoxButtonKind eButtonKind) override;
-};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index d3aeb9b31b0f..497e2f70f5f4 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -76,66 +76,4 @@ void SvLBoxFontString::InitViewData( SvTreeListBox* pView, SvTreeListEntry* pEnt
pView->Control::SetFont( aOldFont );
}
-
-SvxFontListBox::SvxFontListBox(vcl::Window* pParent, WinBits nStyle)
- : SvTabListBox(pParent, nStyle)
- , mpEntryColor(nullptr)
- , mbUseFont(false)
-{
- vcl::Font aStdFont(GetFont()); // Used for entries without specific font.
- aStdFont.SetTransparent(true);
- maEntryFont = aStdFont;
-}
-
-void SvxFontListBox::InsertFontEntry( const OUString& rString, const vcl::Font& rFont, const Color* pColor )
-{
- mbUseFont = true; // InitEntry() will use maEntryFont
- maEntryFont = rFont; // font to use in InitEntry() over InsertEntry()
- mpEntryColor = pColor; // color to use in InitEntry() over InsertEntry()
- InsertEntry( rString );
- mbUseFont = false;
-}
-
-void SvxFontListBox::SelectEntryPos( sal_uLong nPos )
-{
- SvTreeListEntry* pEntry = GetEntry( nPos );
- if( pEntry )
- {
- Select( pEntry );
- ShowEntry( pEntry );
- }
-}
-
-void SvxFontListBox::SetNoSelection()
-{
- SelectAll( false );
-}
-
-sal_uLong SvxFontListBox::GetSelectedEntryPos() const
-{
- SvTreeListEntry* pSvLBoxEntry = FirstSelected();
- return pSvLBoxEntry ? GetModel()->GetAbsPos( pSvLBoxEntry ) : TREELIST_ENTRY_NOTFOUND;
-}
-
-void SvxFontListBox::InitEntry(
- SvTreeListEntry* pEntry, const OUString& rEntryText,
- const Image& rCollImg, const Image& rExpImg,
- SvLBoxButtonKind eButtonKind)
-{
- if( mbUseFont )
- {
- if( nTreeFlags & SvTreeFlags::CHKBTN )
- pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(
- eButtonKind, pCheckButtonData));
- pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(
- rCollImg, rExpImg, true));
- pEntry->AddItem(o3tl::make_unique<SvLBoxFontString>(
- rEntryText, maEntryFont, mpEntryColor));
- }
- else
- SvTreeListBox::InitEntry( pEntry, rEntryText, rCollImg, rExpImg,
- eButtonKind );
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list