diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/gridwin4.cxx | 3 | ||||
-rw-r--r-- | sc/source/ui/view/output.cxx | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index bfda05af7464..de5411635391 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -718,9 +718,10 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI else aOutputData.SetSolidBackground(true); - pContentDev->SetMapMode(MAP_PIXEL); aOutputData.DrawDocumentBackground(); + pContentDev->SetMapMode(MAP_PIXEL); + if ( bGridFirst && ( bGrid || bPage ) ) aOutputData.DrawGrid( bGrid, bPage ); diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 9dfc3b7eb4d8..4b33d2e80716 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -767,13 +767,14 @@ void ScOutputData::DrawDocumentBackground() if ( !bSolidBackground ) return; - Size aOnePixel = mpDev->PixelToLogic(Size(1,1)); - long nOneX = aOnePixel.Width(); - long nOneY = aOnePixel.Height(); - Rectangle aRect(nScrX - nOneX, nScrY - nOneY, nScrX + nScrW, nScrY + nScrH); Color aBgColor( SC_MOD()->GetColorConfig().GetColorValue(svtools::DOCCOLOR).nColor ); + mpDev->SetLineColor(aBgColor); mpDev->SetFillColor(aBgColor); - mpDev->DrawRect(aRect); + + Point aScreenPos = mpDev->PixelToLogic(Point(nScrX, nScrY)); + Size aScreenSize = mpDev->PixelToLogic(Size(nScrW - 1,nScrH - 1)); + + mpDev->DrawRect(Rectangle(aScreenPos, aScreenSize)); } namespace { |