[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - sc/source
Henry Castro
hcastro at collabora.com
Fri Mar 20 04:23:25 PDT 2015
sc/source/ui/view/gridwin4.cxx | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
New commits:
commit 44d92b0cff3815950e013351f93be0b21541cb97
Author: Henry Castro <hcastro at collabora.com>
Date: Fri Mar 20 12:22:09 2015 +0100
sc tiled rendering: add missing mm100 -> twips conversion
Change-Id: Id0b1d88d0852e9333538ca9cecf4605c06440494
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 6324933..630a0c8 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -984,7 +984,19 @@ void ScGridWindow::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();
+ }
+
pViewData->GetDocument()->GetDrawLayer()->libreOfficeKitCallback(LOK_CALLBACK_INVALIDATE_TILES, sRectangle.getStr());
}
More information about the Libreoffice-commits
mailing list