summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-07-08 09:33:52 +0000
committerOliver Bolte <obo@openoffice.org>2005-07-08 09:33:52 +0000
commitd0bcad811700eda1a272a77ab1ef25ff7a7d1386 (patch)
tree3efd696d89407cb0d6157e32145f3e52d559d974 /svx
parent57d7925b71ff6f19f8c5e9315b45ec97320c5e60 (diff)
INTEGRATION: CWS dba20blocker (1.41.234); FILE MERGED
2005/06/23 12:54:44 fs 1.41.234.1: copying fix for #i47348# into this CWS
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/gridcell.cxx17
1 files changed, 10 insertions, 7 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index edcaa273c600..02de64e45745 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: gridcell.cxx,v $
*
- * $Revision: 1.41 $
+ * $Revision: 1.42 $
*
- * last change: $Author: vg $ $Date: 2005-02-17 10:54:42 $
+ * last change: $Author: obo $ $Date: 2005-07-08 10:33:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -505,13 +505,16 @@ void DbGridColumn::Paint(OutputDevice& rDev,
const DbGridRow* pRow,
const Reference< ::com::sun::star::util::XNumberFormatter >& xFormatter)
{
+ bool bEnabled = ( rDev.GetOutDevType() != OUTDEV_WINDOW )
+ || ( static_cast< Window& >( rDev ).IsEnabled() );
+
FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell);
if (pDataCell)
{
if (!pRow || !pRow->IsValid())
{
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
- if (!((Window&)rDev).IsEnabled())
+ if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
rDev.DrawText(rRect, INVALIDTEXT, nStyle);
@@ -520,7 +523,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
{
static String aAutoText(SVX_RES(RID_STR_AUTOFIELD));
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER;
- if (!((Window&)rDev).IsEnabled())
+ if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
switch (GetAlignment())
@@ -547,7 +550,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
if (!pRow || !pRow->IsValid())
{
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
- if (!((Window&)rDev).IsEnabled())
+ if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
rDev.DrawText(rRect, INVALIDTEXT, nStyle);
@@ -555,7 +558,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
else if (pRow->HasField(m_nFieldPos) && m_bObject)
{
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_CENTER;
- if (!((Window&)rDev).IsEnabled())
+ if ( !bEnabled )
nStyle |= TEXT_DRAW_DISABLE;
rDev.DrawText(rRect, OBJECTTEXT, nStyle);
}
@@ -3203,7 +3206,7 @@ void FmXTextCell::Paint(OutputDevice& rDev,
}
sal_uInt16 nStyle = TEXT_DRAW_CLIP | TEXT_DRAW_VCENTER;
- if (!((Window&)rDev).IsEnabled())
+ if ( ( rDev.GetOutDevType() == OUTDEV_WINDOW ) && !static_cast< Window& >( rDev ).IsEnabled() )
nStyle |= TEXT_DRAW_DISABLE;
switch (m_pColumn->GetAlignment())