This is an automated email from the ASF dual-hosted git repository. mseidel pushed a commit to branch Pilot-Pirx-table in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit d362c36b903ea7bcffbb17f8e2b89840041bf12a Author: Matthias Seidel <[email protected]> AuthorDate: Tue Jan 27 02:07:26 2026 +0100 Quick hack, clean up code later Use a solid color for row/column header in Calc. --- main/sc/source/ui/view/hdrcont.cxx | 64 +++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/main/sc/source/ui/view/hdrcont.cxx b/main/sc/source/ui/view/hdrcont.cxx index 46148e5fc7..7b60eb9b05 100644 --- a/main/sc/source/ui/view/hdrcont.cxx +++ b/main/sc/source/ui/view/hdrcont.cxx @@ -19,13 +19,9 @@ * *************************************************************/ - - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" - - // INCLUDE --------------------------------------------------------------- #include <sfx2/dispatch.hxx> @@ -222,42 +218,40 @@ long ScHeaderControl::GetScrPos( SCCOLROW nEntryNo ) void ScHeaderControl::DrawShadedRect( long nStart, long nEnd, const Color& rBaseColor ) { - Color aWhite( COL_WHITE ); +// Color aWhite( COL_WHITE ); - Color aInner( rBaseColor ); // highlight color, unchanged - Color aCenter( rBaseColor ); - aCenter.Merge( aWhite, 0xd0 ); // lighten up a bit - Color aOuter( rBaseColor ); - aOuter.Merge( aWhite, 0xa0 ); // lighten up more + Color aInner( rBaseColor ); // highlight color, unchanged + Color aCenter( rBaseColor ); +// aCenter.Merge( aWhite, 0xd0 ); // lighten up a bit + Color aOuter( rBaseColor ); +// aOuter.Merge( aWhite, 0xa0 ); // lighten up more - if ( IsMirrored() ) - std::swap( aInner, aOuter ); // just swap colors instead of positions +// if ( IsMirrored() ) +// std::swap( aInner, aOuter ); // just swap colors instead of positions - Size aWinSize = GetSizePixel(); - long nBarSize = bVertical ? aWinSize.Width() : aWinSize.Height(); - long nCenterPos = (nBarSize / 2) - 1; + Size aWinSize = GetSizePixel(); + long nBarSize = bVertical ? aWinSize.Width() : aWinSize.Height(); + long nCenterPos = (nBarSize / 2) - 1; - SetLineColor(); - SetFillColor( aOuter ); - if (bVertical) - DrawRect( Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); - else - DrawRect( Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); - SetFillColor( aCenter ); - if (bVertical) - DrawRect( Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); - else - DrawRect( Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); - SetFillColor( aInner ); - if (bVertical) - DrawRect( Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); - else - DrawRect( Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); + SetLineColor(); + SetFillColor( aOuter ); + if (bVertical) + DrawRect( Rectangle( 0, nStart, nCenterPos-1, nEnd ) ); + else + DrawRect( Rectangle( nStart, 0, nEnd, nCenterPos-1 ) ); + SetFillColor( aCenter ); + if (bVertical) + DrawRect( Rectangle( nCenterPos, nStart, nCenterPos, nEnd ) ); + else + DrawRect( Rectangle( nStart, nCenterPos, nEnd, nCenterPos ) ); + SetFillColor( aInner ); + if (bVertical) + DrawRect( Rectangle( nCenterPos+1, nStart, nBarSize-1, nEnd ) ); + else + DrawRect( Rectangle( nStart, nCenterPos+1, nEnd, nBarSize-1 ) ); } -// // Paint -// void ScHeaderControl::Paint( const Rectangle& rRect ) { @@ -449,10 +443,8 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) } } - // // loop through entries several times to avoid changing the line color too often // and to allow merging of lines - // ScGridMerger aGrid( this, 1, 1 ); @@ -1037,3 +1029,5 @@ String ScHeaderControl::GetDragHelp( long /* nVal */ ) void ScHeaderControl::SetMarking( sal_Bool /* bSet */ ) { } + +/* vim: set noet sw=4 ts=4: */
