summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/viewdata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view/viewdata.cxx')
-rw-r--r--sc/source/ui/view/viewdata.cxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index a2bf70ff6199..6e2bf8ee0aa4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -1647,6 +1647,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
// (existing or started) with default alignment extend to the right.
bool bGrowCentered = ( eJust == SvxCellHorJustify::Center );
bool bGrowToLeft = ( eJust == SvxCellHorJustify::Right ); // visual left
+ bool bLOKRTLInvert = (bLOKActive && bLayoutRTL);
if ( bAsianVertical )
bGrowCentered = bGrowToLeft = false; // keep old behavior for asian mode
@@ -1690,7 +1691,7 @@ void ScViewData::SetEditEngine( ScSplitPos eWhich,
nSizeXPTwips = aPTwipsRect.GetWidth() + 2 * std::min(nLeftPTwips, nRightPTwips);
}
}
- else if ( bGrowToLeft )
+ else if ( (bGrowToLeft && !bLOKRTLInvert) || (!bGrowToLeft && bLOKRTLInvert) )
{
nSizeXPix = aPixRect.Right(); // space that's available in the window when growing to the left
if (bLOKPrintTwips)
@@ -1925,12 +1926,12 @@ void ScViewData::EditGrowX()
nLogicRightPTwips = nColWidth;
}
- aArea.AdjustLeft( -(bLayoutRTL ? nLogicRight : nLogicLeft) );
- aArea.AdjustRight(bLayoutRTL ? nLogicLeft : nLogicRight );
+ aArea.AdjustLeft( -((bLayoutRTL && !bLOKActive) ? nLogicRight : nLogicLeft) );
+ aArea.AdjustRight((bLayoutRTL && !bLOKActive) ? nLogicLeft : nLogicRight );
if (bLOKPrintTwips)
{
- aAreaPTwips.AdjustLeft( -(bLayoutRTL ? nLogicRightPTwips : nLogicLeftPTwips) );
- aAreaPTwips.AdjustRight(bLayoutRTL ? nLogicLeftPTwips : nLogicRightPTwips );
+ aAreaPTwips.AdjustLeft( -((bLayoutRTL && !bLOKActive) ? nLogicRightPTwips : nLogicLeftPTwips) );
+ aAreaPTwips.AdjustRight((bLayoutRTL && !bLOKActive) ? nLogicLeftPTwips : nLogicRightPTwips );
}
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
@@ -1964,7 +1965,7 @@ void ScViewData::EditGrowX()
tools::Long nLogicWidth = pWin->PixelToLogic(Size(nPix,0)).Width();
tools::Long& nLogicWidthPTwips = nColWidth;
- if ( !bLayoutRTL )
+ if ( !bLayoutRTL || bLOKActive )
{
aArea.AdjustLeft( -nLogicWidth );
if (bLOKPrintTwips)
@@ -1979,7 +1980,7 @@ void ScViewData::EditGrowX()
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
{
- if ( !bLayoutRTL )
+ if ( !bLayoutRTL || bLOKActive )
{
aArea.SetLeft( aArea.Right() - aSize.Width() + 1 );
if (bLOKPrintTwips)
@@ -2005,7 +2006,7 @@ void ScViewData::EditGrowX()
tools::Long nPix = ToPixel( nColWidth, nPPTX );
tools::Long nLogicWidth = pWin->PixelToLogic(Size(nPix,0)).Width();
tools::Long& nLogicWidthPTwips = nColWidth;
- if ( bLayoutRTL )
+ if ( bLayoutRTL && !bLOKActive )
{
aArea.AdjustLeft( -nLogicWidth );
if (bLOKPrintTwips)
@@ -2020,7 +2021,7 @@ void ScViewData::EditGrowX()
if ( aArea.Right() > aArea.Left() + aSize.Width() - 1 )
{
- if ( bLayoutRTL )
+ if ( bLayoutRTL && !bLOKActive )
{
aArea.SetLeft( aArea.Right() - aSize.Width() + 1 );
if (bLOKPrintTwips)
@@ -2513,7 +2514,7 @@ Point ScViewData::GetScrPos( SCCOL nWhereX, SCROW nWhereY, ScSplitPos eWhich,
}
}
- if (mrDoc.IsLayoutRTL(nForTab))
+ if (mrDoc.IsLayoutRTL(nForTab) && !bIsTiledRendering)
{
// mirror horizontal position
nScrPosX = aScrSize.Width() - 1 - nScrPosX;