summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kyoshida@novell.com>2010-09-16 11:21:13 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2010-09-16 11:21:13 +0200
commit97bea8c3e25d99d499a532290d3bdd006504e1b5 (patch)
tree69afa1bc69700034882ed8380bc1a8fc86024c2c /sc
parent6d0be7e8be764ab6e88e345d165e0670a72d8f2d (diff)
calc-cursor-split-view.diff: show cursor in non-active panes
n#433834
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx38
1 files changed, 18 insertions, 20 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 37da53d732d6..e3ab2f453db1 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5264,24 +5264,16 @@ void ScGridWindow::UpdateCursorOverlay()
if ( bLayoutRTL )
aScrPos.X() -= nSizeXPix - 2; // move instead of mirroring
- BOOL bFix = ( pViewData->GetHSplitMode() == SC_SPLIT_FIX ||
- pViewData->GetVSplitMode() == SC_SPLIT_FIX );
- if ( pViewData->GetActivePart()==eWhich || bFix )
- {
- aScrPos.X() -= 2;
- aScrPos.Y() -= 2;
- Rectangle aRect( aScrPos, Size( nSizeXPix + 3, nSizeYPix + 3 ) );
-
- aPixelRects.push_back(Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ));
- aPixelRects.push_back(Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ));
- aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ));
- aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ));
- }
- else
- {
- Rectangle aRect( aScrPos, Size( nSizeXPix - 1, nSizeYPix - 1 ) );
- aPixelRects.push_back( aRect );
- }
+ // Now, draw the cursor.
+
+ aScrPos.X() -= 2;
+ aScrPos.Y() -= 2;
+ Rectangle aRect( aScrPos, Size( nSizeXPix + 3, nSizeYPix + 3 ) );
+
+ aPixelRects.push_back(Rectangle( aRect.Left(), aRect.Top(), aRect.Left()+2, aRect.Bottom() ));
+ aPixelRects.push_back(Rectangle( aRect.Right()-2, aRect.Top(), aRect.Right(), aRect.Bottom() ));
+ aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Top(), aRect.Right()-3, aRect.Top()+2 ));
+ aPixelRects.push_back(Rectangle( aRect.Left()+3, aRect.Bottom()-2, aRect.Right()-3, aRect.Bottom() ));
}
}
@@ -5292,7 +5284,10 @@ void ScGridWindow::UpdateCursorOverlay()
if(pOverlayManager)
{
- const Color aCursorColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+ Color aCursorColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+ if (pViewData->GetActivePart() != eWhich)
+ // non-active pane uses a different color.
+ aCursorColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor;
std::vector< basegfx::B2DRange > aRanges;
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
@@ -5441,7 +5436,10 @@ void ScGridWindow::UpdateAutoFillOverlay()
if(pOverlayManager)
{
- const Color aHandleColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+ Color aHandleColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::FONTCOLOR).nColor );
+ if (pViewData->GetActivePart() != eWhich)
+ // non-active pane uses a different color.
+ aHandleColor = SC_MOD()->GetColorConfig().GetColorValue(svtools::CALCPAGEBREAKAUTOMATIC).nColor;
std::vector< basegfx::B2DRange > aRanges;
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
basegfx::B2DRange aRB(mpAutoFillRect->Left(), mpAutoFillRect->Top(), mpAutoFillRect->Right() + 1, mpAutoFillRect->Bottom() + 1);