diff options
author | Mihaela Kedikova <misheto@openoffice.org> | 2010-06-09 14:39:18 +0200 |
---|---|---|
committer | Mihaela Kedikova <misheto@openoffice.org> | 2010-06-09 14:39:18 +0200 |
commit | 5f2e5e46dc915694b4ef945809f15d15b5e9d58f (patch) | |
tree | 85868ebeafa583e90bd1479101d4d232ff9d6516 /svtools/source | |
parent | a080fcbc00bbbb14e92f1850ef9c79d2c833b646 (diff) |
gridcontrol04: fix for #i112217#
Diffstat (limited to 'svtools/source')
-rw-r--r-- | svtools/source/table/gridtablerenderer.cxx | 27 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol.cxx | 6 | ||||
-rw-r--r-- | svtools/source/table/tablecontrol_impl.cxx | 1 |
3 files changed, 23 insertions, 11 deletions
diff --git a/svtools/source/table/gridtablerenderer.cxx b/svtools/source/table/gridtablerenderer.cxx index dd7088d93b40..8e5bd181a583 100644 --- a/svtools/source/table/gridtablerenderer.cxx +++ b/svtools/source/table/gridtablerenderer.cxx @@ -109,7 +109,10 @@ namespace svt { namespace table DBG_ASSERT( !!pColumn, "GridTableRenderer::PaintColumnHeader: invalid column model object!" ); if ( !!pColumn ) sHeaderText = pColumn->getName(); - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + if(m_pImpl->rModel.getTextColor() != 0x000000) + _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -146,6 +149,11 @@ namespace svt { namespace table Color aRowBackground = m_pImpl->rModel.getOddRowBackgroundColor(); Color line = m_pImpl->rModel.getLineColor(); Color aRowBackground2 = m_pImpl->rModel.getEvenRowBackgroundColor(); + Color fieldColor = _rStyle.GetFieldColor(); + if(aRowBackground == 0xFFFFFF) + aRowBackground = fieldColor; + if(aRowBackground2 == 0xFFFFFF) + aRowBackground2 = fieldColor; //if row is selected background color becomes blue, and lines should be also blue //if they aren't user defined if(_bSelected) @@ -161,7 +169,7 @@ namespace svt { namespace table //and set line color to be the same else { - if(aRowBackground2 != 0xFFFFFF && _nRow%2) + if(aRowBackground2 != fieldColor && _nRow%2) { aRowBackground = aRowBackground2; if(line == 0xFFFFFF) @@ -170,7 +178,7 @@ namespace svt { namespace table _rDevice.SetLineColor(line); } //fill the rows with alternating background colors if second background color is specified - else if(aRowBackground != 0xFFFFFF && line == 0xFFFFFF) + else if(aRowBackground != fieldColor && line == 0xFFFFFF) _rDevice.SetLineColor(aRowBackground); else { @@ -195,7 +203,10 @@ namespace svt { namespace table _rDevice.Push( PUSH_LINECOLOR); _rDevice.SetLineColor(_rStyle.GetSeparatorColor()); _rDevice.DrawLine( _rArea.BottomLeft(), _rArea.BottomRight() ); - _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + if(m_pImpl->rModel.getTextColor() != 0x000000) + _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -326,11 +337,11 @@ namespace svt { namespace table ++aRect.Left(); --aRect.Right(); aRect.Top(); aRect.Bottom(); if(_bSelected) - { _rDevice.SetTextColor(_rStyle.GetHighlightTextColor()); - } - else + else if(m_pImpl->rModel.getTextColor() != 0x000000) _rDevice.SetTextColor(m_pImpl->rModel.getTextColor()); + else + _rDevice.SetTextColor(_rStyle.GetFieldTextColor()); ULONG nHorFlag = TEXT_DRAW_LEFT; ULONG nVerFlag = TEXT_DRAW_TOP; if(m_pImpl->rModel.getVerticalAlign() == 1) @@ -344,7 +355,7 @@ namespace svt { namespace table Rectangle textRect(_rArea); textRect.Left()+=4; textRect.Right()-=4; textRect.Bottom()-=2; - _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); + _rDevice.DrawText( textRect, _rText, nHorFlag | nVerFlag | TEXT_DRAW_CLIP); _rDevice.Pop(); (void)_bActive; diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 87e295fab507..130667777760 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -264,7 +264,7 @@ namespace svt { namespace table aRetText = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ColumnHeaderBar" ) ); break; case TCTYPE_TABLECELL: - aRetText = GetRowName(_nRow); + aRetText = GetAccessibleCellText(_nRow, _nCol); break; case TCTYPE_ROWHEADERCELL: aRetText = GetRowName(_nRow); @@ -347,9 +347,9 @@ namespace svt { namespace table } // ----------------------------------------------------------------------------- -::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) +::rtl::OUString TableControl::GetAccessibleCellText( sal_Int32 _nRowPos, sal_Int32 _nColPos) const { - ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos); + const ::com::sun::star::uno::Any cellContent = GetCellContent(_nRowPos, _nColPos); return m_pImpl->convertToString(cellContent); } // ----------------------------------------------------------------------------- diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index cfa86bbb5373..69ad3cff9db2 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1040,6 +1040,7 @@ namespace svt { namespace table --aInters.Top(); --aInters.Bottom(); } + --aInters.Right(); pRenderer->PaintHeaderArea( *m_pDataWindow, aInters, true, true, rStyle ); |