diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-26 11:20:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-11-27 13:54:09 +0100 |
commit | 1fb4a211983e120a330ebfe32c23cd617df0bead (patch) | |
tree | d05deff5129aeeec1844e6106ea7ca0537004cc2 /svtools | |
parent | fb56de2ef744583a07ec02476fc9bc75c525e863 (diff) |
remove unused SvxIconViewFlags enum values
Change-Id: I31f810383fb92b2d0dbe9fa9162b77f137154e91
Reviewed-on: https://gerrit.libreoffice.org/64085
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/contnr/imivctl.hxx | 4 | ||||
-rw-r--r-- | svtools/source/contnr/imivctl1.cxx | 42 |
2 files changed, 12 insertions, 34 deletions
diff --git a/svtools/source/contnr/imivctl.hxx b/svtools/source/contnr/imivctl.hxx index cb2c4b47b244..52f73e7b6802 100644 --- a/svtools/source/contnr/imivctl.hxx +++ b/svtools/source/contnr/imivctl.hxx @@ -382,8 +382,8 @@ public: } static bool IsBoundingRectValid( const tools::Rectangle& rRect ) { return ( rRect.Right() != LONG_MAX ); } - void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, - bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext ); + static void PaintEmphasis(const tools::Rectangle& rRect1, bool bSelected, + vcl::RenderContext& rRenderContext ); void PaintItem(const tools::Rectangle& rRect, IcnViewFieldType eItem, SvxIconChoiceCtrlEntry* pEntry, sal_uInt16 nPaintFlags, vcl::RenderContext& rRenderContext); diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index 066562294ce0..2d2269b492e5 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1414,45 +1414,28 @@ void SvxIconChoiceCtrl_Impl::SetUpdateMode( bool bUpdate ) } } -// priorities of the emphasis: bDropTarget => bCursored => bSelected +// priorities of the emphasis: bSelected void SvxIconChoiceCtrl_Impl::PaintEmphasis(const tools::Rectangle& rTextRect, bool bSelected, - bool bDropTarget, bool bCursored, vcl::RenderContext& rRenderContext) + vcl::RenderContext& rRenderContext) { static Color aTransparent(COL_TRANSPARENT); - const StyleSettings& rSettings = rRenderContext.GetSettings().GetStyleSettings(); Color aOldFillColor(rRenderContext.GetFillColor()); bool bSolidTextRect = false; - if(bDropTarget && (eSelectionMode != SelectionMode::NONE)) + if (!bSelected) { - rRenderContext.SetFillColor(rSettings.GetHighlightColor()); - bSolidTextRect = true; - } - else - { - if (!bSelected || bCursored) - { - const Color& rFillColor = rRenderContext.GetFont().GetFillColor(); - rRenderContext.SetFillColor(rFillColor); - if (rFillColor != aTransparent) - bSolidTextRect = true; - } + const Color& rFillColor = rRenderContext.GetFont().GetFillColor(); + rRenderContext.SetFillColor(rFillColor); + if (rFillColor != aTransparent) + bSolidTextRect = true; } // draw text rectangle if (bSolidTextRect) { - Color aOldLineColor; - if (bCursored) - { - aOldLineColor = rRenderContext.GetLineColor(); - rRenderContext.SetLineColor(COL_GRAY); - } rRenderContext.DrawRect(rTextRect); - if (bCursored) - rRenderContext.SetLineColor(aOldLineColor); } rRenderContext.SetFillColor(aOldFillColor); @@ -1494,17 +1477,13 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po if (eSelectionMode != SelectionMode::NONE) bSelected = pEntry->IsSelected(); - bool bCursored = pEntry->IsCursored(); - bool bDropTarget = pEntry->IsDropTarget(); - bool bNoEmphasis = pEntry->IsBlockingEmphasis(); - rRenderContext.Push(PushFlags::FONT | PushFlags::TEXTCOLOR); OUString aEntryText(SvtIconChoiceCtrl::GetEntryText(pEntry)); tools::Rectangle aTextRect(CalcTextRect(pEntry, &rPos, false, &aEntryText)); tools::Rectangle aBmpRect(CalcBmpRect(pEntry, &rPos)); - bool bShowSelection = ((bSelected && !bCursored) && !bNoEmphasis && (eSelectionMode != SelectionMode::NONE)); + bool bShowSelection = (bSelected && (eSelectionMode != SelectionMode::NONE)); bool bActiveSelection = (0 != (nWinBits & WB_NOHIDESELECTION)) || pView->HasFocus(); @@ -1550,8 +1529,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po nBmpPaintFlags |= PAINTFLAG_HOR_CENTERED; sal_uInt16 nTextPaintFlags = bLargeIconMode ? PAINTFLAG_HOR_CENTERED : PAINTFLAG_VER_CENTERED; - if( !bNoEmphasis ) - PaintEmphasis(aTextRect, bSelected, bDropTarget, bCursored, rRenderContext); + PaintEmphasis(aTextRect, bSelected, rRenderContext); if ( bShowSelection ) vcl::RenderTools::DrawSelectionBackground(rRenderContext, *pView.get(), CalcFocusRect(pEntry), @@ -1563,7 +1541,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry(SvxIconChoiceCtrlEntry* pEntry, const Po PaintItem(aTextRect, IcnViewFieldType::Text, pEntry, nTextPaintFlags, rRenderContext); // draw highlight frame - if (pEntry == pCurHighlightFrame && !bNoEmphasis) + if (pEntry == pCurHighlightFrame) DrawHighlightFrame(rRenderContext, CalcFocusRect(pEntry)); rRenderContext.Pop(); |