summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-02-22 14:00:33 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-02-23 23:50:10 +0900
commitabc3163756f99196ccfb5e69ad5afe070e213c54 (patch)
tree0da865a879577eaabb9361f5fd92091d8c6feed5 /sc
parent04767c132c1ca692c7e989b241eae40af33e43e8 (diff)
fix selection overlay drawing in RTL (off by one px)
Change-Id: I82a743ef3935baab82d9f9239bd589e55def8d76
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index eaaa620d6836..fcbed3d952e0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5867,7 +5867,7 @@ void ScGridWindow::UpdateSelectionOverlay()
std::vector<Rectangle> aPixelRects;
GetSelectionRects( aPixelRects );
- if ( aPixelRects.size() && pViewData->IsActive() )
+ if (!aPixelRects.empty() && pViewData->IsActive())
{
// #i70788# get the OverlayManager safely
rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager = getOverlayManager();
@@ -5876,13 +5876,25 @@ void ScGridWindow::UpdateSelectionOverlay()
{
std::vector< basegfx::B2DRange > aRanges;
const basegfx::B2DHomMatrix aTransform(GetInverseViewTransformation());
+ ScDocument* pDoc = pViewData->GetDocument();
+ SCTAB nTab = pViewData->GetTabNo();
+ bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
for(sal_uInt32 a(0); a < aPixelRects.size(); a++)
{
const Rectangle aRA(aPixelRects[a]);
- basegfx::B2DRange aRB(aRA.Left() - 1, aRA.Top() - 1, aRA.Right(), aRA.Bottom());
- aRB.transform(aTransform);
- aRanges.push_back(aRB);
+ if (bLayoutRTL)
+ {
+ basegfx::B2DRange aRB(aRA.Left(), aRA.Top() - 1, aRA.Right() + 1, aRA.Bottom());
+ aRB.transform(aTransform);
+ aRanges.push_back(aRB);
+ }
+ else
+ {
+ basegfx::B2DRange aRB(aRA.Left() - 1, aRA.Top() - 1, aRA.Right(), aRA.Bottom());
+ aRB.transform(aTransform);
+ aRanges.push_back(aRB);
+ }
}
// get the system's highlight color