Kaydet (Commit) 3661c3eb authored tarafından Faisal M. Al-Otaibi's avatar Faisal M. Al-Otaibi Kaydeden (comit) Ahmad Harthi

fdo#64011 fix the position and the drawing from left to right in RTL sheet

this will fix the start position for drawing and you can draw shapes
from left to right when the Sheet are RTL

Change-Id: I5cc8eabf474918968bea026dba9c5add2bb4f28e
Reviewed-on: https://gerrit.libreoffice.org/3912Reviewed-by: 's avatarAhmad Harthi <aalharthi@kacst.edu.sa>
Tested-by: 's avatarAhmad Harthi <aalharthi@kacst.edu.sa>
üst ada91eb7
...@@ -83,6 +83,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos ) ...@@ -83,6 +83,7 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
// involved. Lets calculate where aPos would be at 100% zoom // involved. Lets calculate where aPos would be at 100% zoom
// that's the actual correct position for the object ( when you // that's the actual correct position for the object ( when you
// restore the zoom. // restore the zoom.
sal_Bool bNegative = pDoc->IsNegativePage(pView->GetTab());
Rectangle aObjRect( rInOutPos, rInOutPos ); Rectangle aObjRect( rInOutPos, rInOutPos );
ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect ); ScRange aRange = pDoc->GetRange( pView->GetTab(), aObjRect );
ScAddress aOldStt = aRange.aStart; ScAddress aOldStt = aRange.aStart;
...@@ -98,6 +99,12 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos ) ...@@ -98,6 +99,12 @@ Point FuConstruct::CurrentGridSyncOffsetAndPos( Point& rInOutPos )
Point aOff = ( rInOutPos - aCurPosHmm ); Point aOff = ( rInOutPos - aCurPosHmm );
rInOutPos = aOldPos + aOff; rInOutPos = aOldPos + aOff;
aRetGridOff = aCurPosHmm - aOldPos; aRetGridOff = aCurPosHmm - aOldPos;
// fdo#64011 fix the X position when the sheet are RTL
if ( bNegative )
{
aRetGridOff.setX( aCurPosHmm.getX() + aOldPos.getX() );
rInOutPos.setX( aOff.getX() - aOldPos.getX() );
}
} }
return aRetGridOff; return aRetGridOff;
} }
......
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