diff options
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.cxx | 37 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppDetailView.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/listviewitems.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/listviewitems.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WNameMatch.cxx | 4 |
5 files changed, 23 insertions, 26 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 7329b0b4cd3a..df30a5eef519 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -100,34 +100,31 @@ void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _ rRenderContext.SetFont(m_aOriginalFont); } -void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry* _pEntry) +void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry& rEntry) { Wallpaper aEntryBackground(m_aOriginalBackgroundColor); - if (_pEntry) - { - if (_pEntry == GetCurEntry()) - { - // draw a selection background - bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry ); - vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, GetBoundingRect(_pEntry), - bIsMouseDownEntry ? 1 : 2, false, true, false ); - if (bIsMouseDownEntry) - { - vcl::Font aFont(rRenderContext.GetFont()); - aFont.SetColor(rRenderContext.GetSettings().GetStyleSettings().GetHighlightTextColor()); - rRenderContext.SetFont(aFont); - } + if (&rEntry == GetCurEntry()) + { + // draw a selection background + bool bIsMouseDownEntry = ( &rEntry == m_pMouseDownEntry ); + vcl::RenderTools::DrawSelectionBackground(rRenderContext, *this, GetBoundingRect(&rEntry), + bIsMouseDownEntry ? 1 : 2, false, true, false ); - // and temporary set a transparent background, for all the other - // paint operations the SvTreeListBox is going to do - aEntryBackground = Wallpaper(); - _pEntry->SetBackColor(Color(COL_TRANSPARENT)); + if (bIsMouseDownEntry) + { + vcl::Font aFont(rRenderContext.GetFont()); + aFont.SetColor(rRenderContext.GetSettings().GetStyleSettings().GetHighlightTextColor()); + rRenderContext.SetFont(aFont); } + + // and temporary set a transparent background, for all the other + // paint operations the SvTreeListBox is going to do + aEntryBackground = Wallpaper(); } rRenderContext.SetBackground(aEntryBackground); - _pEntry->SetBackColor(aEntryBackground.GetColor()); + rEntry.SetBackColor(aEntryBackground.GetColor()); } void OCreationList::SelectSearchEntry( const void* _pEntry ) diff --git a/dbaccess/source/ui/app/AppDetailView.hxx b/dbaccess/source/ui/app/AppDetailView.hxx index 3b4286abe7ac..a429ff5490e4 100644 --- a/dbaccess/source/ui/app/AppDetailView.hxx +++ b/dbaccess/source/ui/app/AppDetailView.hxx @@ -71,7 +71,7 @@ namespace dbaui void updateHelpText(); protected: - virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry* _pEntry) SAL_OVERRIDE; + virtual void PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListEntry& rEntry) SAL_OVERRIDE; virtual Rectangle GetFocusRect( SvTreeListEntry* _pEntry, long _nLine ) SAL_OVERRIDE; virtual void ModelHasCleared() SAL_OVERRIDE; diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx index 3120d08d89e9..5f4d28de944b 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -45,7 +45,7 @@ namespace dbaui } void OBoldListboxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) + const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) { if (m_bEmphasized) { @@ -59,7 +59,7 @@ namespace dbaui } else { - SvLBoxString::Paint(rPos, rDev, rRenderContext, pView, pEntry); + SvLBoxString::Paint(rPos, rDev, rRenderContext, pView, rEntry); } } diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index 8703e34c85de..d632d0da07f0 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -42,7 +42,7 @@ namespace dbaui virtual sal_uInt16 GetType() const SAL_OVERRIDE; virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; + const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) SAL_OVERRIDE; virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* _pViewData) SAL_OVERRIDE; bool isEmphasized() const { return m_bEmphasized; } diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx index 0b35a87ead0c..aa1ba97bf273 100644 --- a/dbaccess/source/ui/misc/WNameMatch.cxx +++ b/dbaccess/source/ui/misc/WNameMatch.cxx @@ -350,11 +350,11 @@ public: } virtual void Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) SAL_OVERRIDE; + const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) SAL_OVERRIDE; }; void OColumnString::Paint(const Point& rPos, SvTreeListBox& /*rDev*/, vcl::RenderContext& rRenderContext, - const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/) + const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/) { rRenderContext.Push(PushFlags::TEXTCOLOR | PushFlags::TEXTFILLCOLOR); if(m_bReadOnly) |