From 251dab0145e15a372ff0fe41ce9647e9df8e9ffd Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 29 Nov 2012 14:17:48 -0500 Subject: Pass pointer to view data entry to Paint() instead of its raw flag value. We need to hide these flags away. Change-Id: I112003a88a92174f5012b3356ba261a039eeccc1 --- cui/source/customize/acccfg.cxx | 4 ++-- cui/source/customize/cfg.cxx | 8 ++++---- cui/source/customize/macropg.cxx | 14 ++++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) (limited to 'cui/source/customize') diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx index d0cc24a65358..78b9e7358e7d 100644 --- a/cui/source/customize/acccfg.cxx +++ b/cui/source/customize/acccfg.cxx @@ -630,7 +630,7 @@ class SfxAccCfgLBoxString_Impl : public SvLBoxString virtual ~SfxAccCfgLBoxString_Impl(); virtual void Paint( - const Point& aPos, SvTreeListBox& rDevice, sal_uInt16 nFlags, SvTreeListEntry* pEntry); + const Point& aPos, SvTreeListBox& rDevice, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); }; //----------------------------------------------- @@ -647,7 +647,7 @@ SfxAccCfgLBoxString_Impl::~SfxAccCfgLBoxString_Impl() } void SfxAccCfgLBoxString_Impl::Paint( - const Point& aPos, SvTreeListBox& rDevice, sal_uInt16 /*nFlags*/, SvTreeListEntry* pEntry) + const Point& aPos, SvTreeListBox& rDevice, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry) { if (!pEntry) return; diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index d657db009d64..72e9097284a9 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1360,10 +1360,10 @@ public: ~PopupPainter() { } - void Paint( const Point& rPos, SvTreeListBox& rOutDev, - sal_uInt16 nViewDataEntryFlags, SvTreeListEntry* pEntry ) + virtual void Paint( const Point& rPos, SvTreeListBox& rOutDev, + const SvViewDataEntry* pView, const SvTreeListEntry* pEntry) { - SvLBoxString::Paint( rPos, rOutDev, nViewDataEntryFlags, pEntry ); + SvLBoxString::Paint(rPos, rOutDev, pView, pEntry); Color aOldFillColor = rOutDev.GetFillColor(); @@ -1376,7 +1376,7 @@ public: nX -= pVScroll->GetSizePixel().Width(); } - SvViewDataItem* pItem = rOutDev.GetViewDataItem( pEntry, this ); + const SvViewDataItem* pItem = rOutDev.GetViewDataItem( pEntry, this ); nX -= pItem->maSize.Height(); long nSize = pItem->maSize.Height() / 2; diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index 376d75188142..691c4e764759 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -433,10 +433,11 @@ class IconLBoxString : public SvLBoxString Image* m_pComponentImg; int m_nxImageOffset; - public: - IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& sText, - Image* pMacroImg, Image* pComponentImg ); - virtual void Paint(const Point& aPos, SvTreeListBox& aDevice, sal_uInt16 nFlags, SvTreeListEntry* pEntry ); +public: + IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const String& sText, + Image* pMacroImg, Image* pComponentImg ); + virtual void Paint( + const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry); }; @@ -450,8 +451,9 @@ IconLBoxString::IconLBoxString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, cons } //=============================================== -void IconLBoxString::Paint( const Point& aPos, SvTreeListBox& aDevice, - sal_uInt16 /*nFlags*/, SvTreeListEntry* /*pEntry*/ ) +void IconLBoxString::Paint( + const Point& aPos, SvTreeListBox& aDevice, const SvViewDataEntry* /*pView*/, + const SvTreeListEntry* /*pEntry*/) { String aTxt( GetText() ); if( aTxt.Len() ) -- cgit v1.2.3