Kaydet (Commit) 682d5eab authored tarafından Krisztian Pinter's avatar Krisztian Pinter Kaydeden (comit) Jan Holesovsky

calc mapmode: Refactor DrawDocumentBackground to use logic units

Change-Id: I316e51bac78981263bfbee55ea5b684a40b44afa
üst 9eb16c85
......@@ -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 );
......
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment