summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 14:17:48 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-29 16:34:43 -0500
commit251dab0145e15a372ff0fe41ce9647e9df8e9ffd (patch)
tree813037847c767cb8405b2bceef94356bb6bdd2e4 /svx
parent764878deacb5018539ff5df71af8bf7e6677a93e (diff)
Pass pointer to view data entry to Paint() instead of its raw flag value.
We need to hide these flags away. Change-Id: I112003a88a92174f5012b3356ba261a039eeccc1
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/ctredlin.hxx4
-rw-r--r--svx/inc/svx/fontlb.hxx7
-rw-r--r--svx/source/dialog/ctredlin.cxx9
-rw-r--r--svx/source/dialog/docrecovery.cxx6
-rw-r--r--svx/source/dialog/fontlb.cxx7
-rw-r--r--svx/source/form/filtnav.cxx10
-rw-r--r--svx/source/inc/docrecovery.hxx30
-rw-r--r--svx/workben/msview/msview.cxx5
8 files changed, 37 insertions, 41 deletions
diff --git a/svx/inc/svx/ctredlin.hxx b/svx/inc/svx/ctredlin.hxx
index 46b5c0a256b1..4268adc3a817 100644
--- a/svx/inc/svx/ctredlin.hxx
+++ b/svx/inc/svx/ctredlin.hxx
@@ -79,7 +79,9 @@ public:
SvLBoxColorString();
~SvLBoxColorString();
- void Paint( const Point&, SvTreeListBox& rDev, sal_uInt16 nFlags,SvTreeListEntry* );
+ virtual void Paint(
+ const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
+
SvLBoxItem* Create() const;
};
diff --git a/svx/inc/svx/fontlb.hxx b/svx/inc/svx/fontlb.hxx
index 1437984cdb5f..236ba82b05f9 100644
--- a/svx/inc/svx/fontlb.hxx
+++ b/svx/inc/svx/fontlb.hxx
@@ -51,11 +51,8 @@ public:
void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* );
/** Paints this entry to the specified position, using the own font settings. */
- void Paint(
- const Point& rPos,
- SvTreeListBox& rDev,
- sal_uInt16 nFlags,
- SvTreeListEntry* pEntry );
+ virtual void Paint(
+ const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
};
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index 732dc85351da..54d4307a7522 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -112,8 +112,9 @@ SvLBoxItem* SvLBoxColorString::Create() const
return new SvLBoxColorString;
}
-void SvLBoxColorString::Paint( const Point& rPos, SvTreeListBox& rDev,
- sal_uInt16 nFlags, SvTreeListEntry* pEntry )
+void SvLBoxColorString::Paint(
+ const Point& rPos, SvTreeListBox& rDev,
+ const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
/* [Description]
Paint function of the SvLBoxColorString class. The relevant text with the
@@ -123,11 +124,11 @@ void SvLBoxColorString::Paint( const Point& rPos, SvTreeListBox& rDev,
{
Color aColor=rDev.GetTextColor();
Color a2Color=aColor;
- if(!(nFlags & SVLISTENTRYFLAG_SELECTED))
+ if (!pView->IsSelected())
{
rDev.SetTextColor(aPrivColor);
}
- SvLBoxString::Paint(rPos,rDev,nFlags,pEntry );
+ SvLBoxString::Paint(rPos, rDev, pView, pEntry);
rDev.SetTextColor(a2Color);
}
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index f38ca72eb81d..6ce25d7fb68f 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -884,10 +884,8 @@ RecovDocListEntry::RecovDocListEntry( SvTreeListEntry* pEntry,
}
//===============================================
-void RecovDocListEntry::Paint(const Point& aPos ,
- SvTreeListBox& aDevice,
- sal_uInt16 /*nFlags */,
- SvTreeListEntry* pEntry )
+void RecovDocListEntry::Paint(
+ const Point& aPos, SvTreeListBox& aDevice, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{
const Image* pImg = 0;
const OUString* pTxt = 0;
diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx
index e6ab6c32e1d4..e3247ded4efe 100644
--- a/svx/source/dialog/fontlb.cxx
+++ b/svx/source/dialog/fontlb.cxx
@@ -56,12 +56,13 @@ SvLBoxItem* SvLBoxFontString::Create() const
return new SvLBoxFontString;
}
-void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry )
+void SvLBoxFontString::Paint(
+ const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
{
DBG_CHKTHIS( SvLBoxFontString, 0 );
Font aOldFont( rDev.GetFont() );
Font aNewFont( maFont );
- bool bSel = (nFlags & SVLISTENTRYFLAG_SELECTED) != 0;
+ bool bSel = pView->IsSelected();
if( !mbUseColor || bSel ) // selection always gets highlight color
{
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
@@ -69,7 +70,7 @@ void SvLBoxFontString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16
}
rDev.SetFont( aNewFont );
- SvLBoxString::Paint( rPos, rDev, nFlags, pEntry );
+ SvLBoxString::Paint(rPos, rDev, pView, pEntry);
rDev.SetFont( aOldFont );
}
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index cb7d51f626c1..a03c38fae6f8 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1036,13 +1036,14 @@ public:
FmFilterItemsString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr )
:SvLBoxString(pEntry,nFlags,rStr){}
- virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData);
};
const int nxDBmp = 12;
//------------------------------------------------------------------------
-void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* pEntry )
+void FmFilterItemsString::Paint(
+ const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* pEntry)
{
FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData();
FmFormItem* pForm = (FmFormItem*)pRow->GetParent();
@@ -1100,7 +1101,7 @@ public:
m_aName.AppendAscii(": ");
}
- virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
+ virtual void Paint(const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData);
};
@@ -1124,7 +1125,8 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry,
}
//------------------------------------------------------------------------
-void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* /*pEntry*/ )
+void FmFilterString::Paint(
+ const Point& rPos, SvTreeListBox& rDev, const SvViewDataEntry* /*pView*/, const SvTreeListEntry* /*pEntry*/)
{
Font aOldFont( rDev.GetFont());
Font aFont( aOldFont );
diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx
index 6e76d06496f9..6802827ac3bc 100644
--- a/svx/source/inc/docrecovery.hxx
+++ b/svx/source/inc/docrecovery.hxx
@@ -550,24 +550,18 @@ class SaveProgressDialog : public ModalDialog
//===============================================
class RecovDocListEntry : public SvLBoxString
{
- //-------------------------------------------
- // interface
- private:
-
- //-------------------------------------------
- // interface
- public:
-
- //---------------------------------------
- /** @short TODO */
- RecovDocListEntry( SvTreeListEntry* pEntry,
- sal_uInt16 nFlags,
- const String& sText );
-
- //---------------------------------------
- /** @short TODO */
- virtual void Paint(
- const Point& aPos, SvTreeListBox& aDevice, sal_uInt16 nFlags, SvTreeListEntry* pEntry);
+public:
+
+ //---------------------------------------
+ /** @short TODO */
+ RecovDocListEntry( SvTreeListEntry* pEntry,
+ sal_uInt16 nFlags,
+ const String& sText );
+
+ //---------------------------------------
+ /** @short TODO */
+ virtual void Paint(
+ const Point& rPos, SvTreeListBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry);
};
//===============================================
diff --git a/svx/workben/msview/msview.cxx b/svx/workben/msview/msview.cxx
index 1a24d6652897..9760d2af24f7 100644
--- a/svx/workben/msview/msview.cxx
+++ b/svx/workben/msview/msview.cxx
@@ -487,7 +487,8 @@ public:
~AtomBoxString() { }
- void Paint( const Point& rPos, SvLBox& rOutDev, USHORT nViewDataEntryFlags, SvTreeListEntry* pEntry )
+ virtual void Paint(
+ const Point& rPos, SvLBox& rOutDev, const SvViewDataEntry* pView, const SvTreeListEntry* pEntry)
{
Color aOldTextColor = rOutDev.GetTextColor();
@@ -497,7 +498,7 @@ public:
rOutDev.SetTextColor( Color( gColors[ pAtom->getCompareStatus() ] ) );
}
- SvLBoxString::Paint( rPos, rOutDev, nViewDataEntryFlags, pEntry );
+ SvLBoxString::Paint(rPos, rOutDev, pView, pEntry);
rOutDev.SetTextColor( aOldTextColor );
}