[Libreoffice-commits] core.git: include/vcl vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Jul 24 13:06:33 UTC 2019


 include/vcl/svlbitm.hxx         |    3 +--
 include/vcl/treelistbox.hxx     |    3 +--
 vcl/source/treelist/svlbitm.cxx |    9 ++++-----
 3 files changed, 6 insertions(+), 9 deletions(-)

New commits:
commit be07f2b19ddce09eb4f18b0a7cc4f1583b3f86e0
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jul 24 11:55:34 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jul 24 15:05:22 2019 +0200

    remove unused SvLBoxButtonKind::StaticImage
    
    and consequently unused SvBmp::STATICIMAGE
    
    Change-Id: Ie48deb0c757e6eb9e22e7b29cde72b0145c16943
    Reviewed-on: https://gerrit.libreoffice.org/76235
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/vcl/svlbitm.hxx b/include/vcl/svlbitm.hxx
index 8d267e0754af..c28bed22f460 100644
--- a/include/vcl/svlbitm.hxx
+++ b/include/vcl/svlbitm.hxx
@@ -39,8 +39,7 @@ enum class SvBmp
     TRISTATE         = 2,
     HIUNCHECKED      = 3,
     HICHECKED        = 4,
-    HITRISTATE       = 5,
-    STATICIMAGE      = 6
+    HITRISTATE       = 5
 };
 
 enum class SvItemStateFlags
diff --git a/include/vcl/treelistbox.hxx b/include/vcl/treelistbox.hxx
index c6a13397ba80..ef515aebf5a8 100644
--- a/include/vcl/treelistbox.hxx
+++ b/include/vcl/treelistbox.hxx
@@ -57,8 +57,7 @@ namespace utl {
 enum class SvLBoxButtonKind
 {
     EnabledCheckbox,
-    DisabledCheckbox,
-    StaticImage
+    DisabledCheckbox
 };
 
 enum class SvButtonState { Unchecked, Checked, Tristate };
diff --git a/vcl/source/treelist/svlbitm.cxx b/vcl/source/treelist/svlbitm.cxx
index 56b4f016d9e9..58433644ee93 100644
--- a/vcl/source/treelist/svlbitm.cxx
+++ b/vcl/source/treelist/svlbitm.cxx
@@ -40,7 +40,7 @@ void SvLBoxButtonData::InitData( bool _bRadioBtn, const Control* pCtrl )
 {
     nWidth = nHeight = 0;
 
-    aBmps.resize(int(SvBmp::STATICIMAGE)+1);
+    aBmps.resize(int(SvBmp::HITRISTATE)+1);
 
     bDataOk = false;
     pImpl->bDefaultImages = true;
@@ -307,14 +307,13 @@ void SvLBoxButton::Paint(
     const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext,
     const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/)
 {
-    SvBmp nIndex = eKind == SvLBoxButtonKind::StaticImage ? SvBmp::STATICIMAGE : SvLBoxButtonData::GetIndex(nItemFlags);
+    SvBmp nIndex = SvLBoxButtonData::GetIndex(nItemFlags);
     DrawImageFlags nStyle = eKind != SvLBoxButtonKind::DisabledCheckbox && rDev.IsEnabled() ? DrawImageFlags::NONE : DrawImageFlags::Disable;
 
     //Native drawing
     bool bNativeOK = false;
     ControlType eCtrlType = (pData->IsRadio())? ControlType::Radiobutton : ControlType::Checkbox;
-    if ( nIndex != SvBmp::STATICIMAGE && rRenderContext.IsNativeControlSupported( eCtrlType, ControlPart::Entire) )
-
+    if ( rRenderContext.IsNativeControlSupported( eCtrlType, ControlPart::Entire) )
     {
         Size aSize(pData->Width(), pData->Height());
         ImplAdjustBoxSize(aSize, eCtrlType, rRenderContext);
@@ -386,7 +385,7 @@ void SvLBoxButton::InitViewData(SvTreeListBox* pView,SvTreeListEntry* pEntry, Sv
     Size aSize( pData->Width(), pData->Height() );
 
     ControlType eCtrlType = (pData->IsRadio())? ControlType::Radiobutton : ControlType::Checkbox;
-    if ( eKind != SvLBoxButtonKind::StaticImage && pView )
+    if ( pView )
         ImplAdjustBoxSize(aSize, eCtrlType, *pView);
     pViewData->mnWidth = aSize.Width();
     pViewData->mnHeight = aSize.Height();


More information about the Libreoffice-commits mailing list