sc tiled editing: Mapping has to be turned off after drawing the buttons.

Otherwise the redlines are on wrong positions in the tiled rendering case.

Also - we are actually never call with something else than MAP_PIXEL, so
let's kill the resetting of the mapmode; let's see if some obscure corner case
bites us here.

Change-Id: I8da07dd5448b8863df3148882ec50e6746760cca
This commit is contained in:
Jan Holesovsky
2015-06-10 15:01:15 +02:00
parent 54253f382e
commit 342d84218c
2 changed files with 3 additions and 7 deletions

View File

@@ -95,11 +95,6 @@ void ScDPFieldButton::setPopupLeft(bool b)
void ScDPFieldButton::draw()
{
bool bOldMapEnabled = mpOutDev->IsMapModeEnabled();
if (mpOutDev->GetMapMode().GetMapUnit() != MAP_PIXEL )
mpOutDev->EnableMapMode(false);
if (mbBaseButton)
{
// Background
@@ -146,8 +141,6 @@ void ScDPFieldButton::draw()
if (mbPopupButton)
drawPopupButton();
mpOutDev->EnableMapMode(bOldMapEnabled);
}
void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const

View File

@@ -763,6 +763,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
aOutputData.DrawStrings(true); // in logic MapMode if bLogicText is set
aOutputData.DrawEdit(true);
// the buttons are painted in absolute coordinates
if (bIsTiledRendering)
{
// Tiled offset nScrX, nScrY
@@ -777,6 +778,8 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
DrawButtons(nX1, nX2, rTableInfo, pContentDev); // Pixel
pContentDev->SetMapMode(MAP_PIXEL);
aOutputData.DrawClipMarks();
// Szenario / ChangeTracking muss auf jeden Fall nach DrawGrid sein, auch bei !bGridFirst