summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/sdwindow.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-24 17:43:42 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-02 08:50:54 +0100
commit60045c089eef772cf0935fba1ccec6cb45173ebe (patch)
treefeba4816ec47cf6d5fa935809ee124cb36ce5aba /sd/source/ui/view/sdwindow.cxx
parent80ac88cc00e7d85ee971205de0310760f70f31cd (diff)
sd::Window::LogicInvalidate: add missing mm100 -> twips conversion
The method assumed that the map mode of the output device is twips, but that's not true for Impress. If paintTile() does the twips -> mm100 conversion, then LogicInvalidate() has to do the reverse of that. This fixes typing into the main placeholder shape of an empty Impress document: with our 256x256px tiles only the 3rd and 4th row was repainted previously, while the interesting content is in the 2nd row. Change-Id: I8bda113e73335e465c1c4626a58b6be2b232a190
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r--sd/source/ui/view/sdwindow.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx
index 1c5bdd7ea8aa..6c70e19ce348 100644
--- a/sd/source/ui/view/sdwindow.cxx
+++ b/sd/source/ui/view/sdwindow.cxx
@@ -992,7 +992,18 @@ void Window::LogicInvalidate(const ::vcl::Region* pRegion)
if (!pRegion)
sRectangle = "EMPTY";
else
- sRectangle = pRegion->GetBoundRect().toString();
+ {
+ Rectangle aRectangle = pRegion->GetBoundRect();
+ if (GetMapMode().GetMapUnit() == MAP_100TH_MM)
+ {
+ // Conversion to twips is necessary.
+ aRectangle.Left() = convertMm100ToTwip(aRectangle.Left());
+ aRectangle.Top() = convertMm100ToTwip(aRectangle.Top());
+ aRectangle.Right() = convertMm100ToTwip(aRectangle.Right());
+ aRectangle.Bottom() = convertMm100ToTwip(aRectangle.Bottom());
+ }
+ sRectangle = aRectangle.toString();
+ }
mpViewShell->GetDoc()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
}